Commit fe63dd5a authored by 王向前's avatar 王向前

no message

parent acd196f9
const fs = require('fs') const fs = require('fs')
const child_process = require('child_process'); const child_process = require('child_process');
let clone = 'D: && CD D://FrontPackage && git clone git@gitlab.gavelinfo.com:lisu/common.git '; let clone = 'CD /Users/forwards/Dev/FrontPackage && git clone git@gitlab.gavelinfo.com:lisu/common.git ';
let pull = 'D: && CD D://FrontPackage && cd common && git pull '; let pull = 'CD /Users/forwards/Dev/FrontPackage && cd common && git pull';
fs.readFile('./README.md','utf-8',(err,data)=>{ fs.readFile('./README.md','utf-8',(err,data)=>{
console.log(data||'Loading') console.log(data||'Loading')
console.table(global.process.versions) console.table(global.process.versions)
console.log('\x1B[33m%s','>正在读取项目必须依赖common包') console.log('\x1B[33m%s','>正在读取项目必须依赖common包')
}) })
fs.mkdir('D://FrontPackage', (error) => { fs.mkdir('/Users/forwards/Dev/FrontPackage', (error) => {
if(error){ if(error){
if(error.code=='EEXIST'){ if(error.code=='EEXIST'){
creatCommon() creatCommon()
...@@ -20,7 +20,7 @@ let pull = 'D: && CD D://FrontPackage && cd common && git pull '; ...@@ -20,7 +20,7 @@ let pull = 'D: && CD D://FrontPackage && cd common && git pull ';
} }
}) })
function creatCommon(){ function creatCommon(){
fs.readFile('D:/FrontPackage/common/index.js','utf-8',(err,data)=>{ fs.readFile('/Users/forwards/Dev/FrontPackage/common/index.js','utf-8',(err,data)=>{
if(data){ if(data){
console.log('\x1B[33m%s','>正在拉取最新commom包') console.log('\x1B[33m%s','>正在拉取最新commom包')
child_process.exec(pull,(err,s1,s2)=>{ child_process.exec(pull,(err,s1,s2)=>{
......
{ {
"name": "GavelDmg", "name": "GavelDmg",
"version": "0.0.1", "version": "0.0.1",
"description": "GavelDmg", "description": "GavelDmg",
"author": "Gavel", "author": "Gavel",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"clear": "rmdir /s/q node_modules", "clear": "rmdir /s/q node_modules",
"serve": "node init && vue-cli-service serve", "serve": "vue-cli-service serve",
"devbuild": "vue-cli-service build --mode development", "devbuild": "vue-cli-service build --mode development",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"build:report": "vue-cli-service build --report", "build:report": "vue-cli-service build --report",
"build:stage": "vue-cli-service build --mode staging", "build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview", "preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src" "lint": "eslint --ext .js,.vue src"
}, },
"husky": { "husky": {
"hooks": { "hooks": {
"pre-commit": "lint-staged" "pre-commit": "lint-staged"
} }
}, },
"lint-staged": { "lint-staged": {
"src/**/*.{js,vue}": [ "src/**/*.{js,vue}": [
"eslint --fix", "eslint --fix",
"git add" "git add"
] ]
}, },
"keywords": [ "keywords": [
"vue", "vue",
"admin", "admin",
"dashboard", "dashboard",
"element-ui", "element-ui",
"boilerplate", "boilerplate",
"admin-template", "admin-template",
"management-system" "management-system"
], ],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://gitee.com/y_project/RuoYi-Vue.git" "url": "https://gitee.com/y_project/RuoYi-Vue.git"
}, },
"dependencies": { "dependencies": {
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"axios": "0.24.0", "axios": "0.24.0",
"clipboard": "2.0.8", "clipboard": "2.0.8",
"common": "file:D://common", "common": "file:/Users/forwards/Dev/sgaqgl-vue/public/common",
"core-js": "3.19.1", "core-js": "3.19.1",
"echarts": "^4.9.0", "echarts": "^4.9.0",
"element-ui": "2.15.8", "element-ui": "2.15.8",
"file-saver": "2.0.5", "file-saver": "2.0.5",
"fuse.js": "6.4.3", "fuse.js": "6.4.3",
"highlight.js": "9.18.5", "highlight.js": "9.18.5",
"js-beautify": "1.13.0", "js-beautify": "1.13.0",
"js-cookie": "3.0.1", "js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1", "jsencrypt": "3.0.0-rc.1",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"quill": "1.3.7", "quill": "1.3.7",
"screenfull": "5.0.2", "screenfull": "5.0.2",
"sortablejs": "1.10.2", "sortablejs": "1.10.2",
"typescript": "^4.5.2", "typescript": "^4.5.2",
"vue": "2.6.12", "vue": "2.6.12",
"vue-class-component": "^7.2.3", "vue-class-component": "^7.2.3",
"vue-count-to": "1.0.13", "vue-count-to": "1.0.13",
"vue-cropper": "0.5.5", "vue-cropper": "0.5.5",
"vue-meta": "2.4.0", "vue-meta": "2.4.0",
"vue-router": "3.4.9", "vue-router": "3.4.9",
"vue-seamless-scroll": "^1.1.23", "vue-seamless-scroll": "^1.1.23",
"vue-video-player": "5.0", "vue-video-player": "5.0",
"vuedraggable": "^2.24.3", "vuedraggable": "^2.24.3",
"vuex": "3.6.0" "vuex": "3.6.0"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "4.4.6", "@vue/cli-plugin-babel": "4.4.6",
"@vue/cli-plugin-eslint": "4.4.6", "@vue/cli-plugin-eslint": "4.4.6",
"@vue/cli-service": "4.4.6", "@vue/cli-service": "4.4.6",
"babel-eslint": "10.1.0", "babel-eslint": "10.1.0",
"babel-plugin-dynamic-import-node": "2.3.3", "babel-plugin-dynamic-import-node": "2.3.3",
"babel-plugin-transform-remove-console": "^6.9.4", "babel-plugin-transform-remove-console": "^6.9.4",
"babel-plugin-transform-remove-debugger": "^6.9.4", "babel-plugin-transform-remove-debugger": "^6.9.4",
"chalk": "4.1.0", "chalk": "4.1.0",
"compression-webpack-plugin": "5.0.2", "compression-webpack-plugin": "5.0.2",
"connect": "3.6.6", "connect": "3.6.6",
"eslint": "7.15.0", "eslint": "7.15.0",
"eslint-plugin-vue": "7.2.0", "eslint-plugin-vue": "7.2.0",
"lint-staged": "10.5.3", "lint-staged": "10.5.3",
"runjs": "4.4.2", "runjs": "4.4.2",
"sass": "1.32.13", "sass": "1.32.13",
"sass-loader": "10.1.1", "sass-loader": "10.1.1",
"script-ext-html-webpack-plugin": "2.1.5", "script-ext-html-webpack-plugin": "2.1.5",
"svg-sprite-loader": "5.1.1", "svg-sprite-loader": "5.1.1",
"ts-loader": "~8.2.0", "ts-loader": "~8.2.0",
"vue-particles": "^1.0.9", "vue-particles": "^1.0.9",
"vue-property-decorator": "^9.1.2", "vue-property-decorator": "^9.1.2",
"vue-template-compiler": "2.6.12" "vue-template-compiler": "2.6.12"
}, },
"engines": { "engines": {
"node": ">=8.9", "node": ">=8.9",
"npm": ">= 3.0.0" "npm": ">= 3.0.0"
}, },
"browserslist": [ "browserslist": [
"> 1%", "> 1%",
"last 2 versions" "last 2 versions"
] ]
} }
import request from '@/utils/request';
/*query */
export function fxpcQuery(query) {
return request({
url: '/aqgl/kbcx/fxpc',
method: 'post',
data: query||{}
})
}
export function lzglQuery(query) {
return request({
url: '/aqgl/kbcx/lzgl',
method: 'post',
data: query||{}
})
}
export function ygczQuery(query) {
return request({
url: '/aqgl/kbcx/ygcz',
method: 'post',
data: query||{}
})
}
export function yhtjQuery(query) {
return request({
url: '/aqgl/kbcx/yhtj',
method: 'post',
data: query||{}
})
}
export function yjylQuery(query) {
return request({
url: '/aqgl/kbcx/yjyl',
method: 'post',
data: query||{}
})
}
\ No newline at end of file
This image diff could not be displayed because it is too large. You can view the blob instead.
<template> <template>
<!-- 外层排版--> <!-- 外层排版-->
<div class="min_full " style="margin: 0;border: 0;background-color: #fff;"> <div class="page-homepage" id="homePage" style="">
<!-- 上层布局--> <div class="page-left">
<div class="top" style="border: 5px solid #eee;"> <div class="page-left-t page-left-3">
<div class="homePage " style="margin: 0;border: 0;border-right: 5px solid #eee;"> <div class="page-fxpc">
<!-- 数据展示--> <div id="fxpcChart" class="chart"></div>
<div class="lbt" v-if="showList.length>0" > </div>
<el-carousel height='290px' > <div class="page-yhhz">
<el-carousel-item v-for="(item,index) in showList" :key="item.id+index"> <div class="search-item" style="border-bottom: 2px solid #eee;padding-left: 10px;display: none">
<!-- 轮播图all--> <RelSelect style="width: 200px;margin-right: 10px;" hasValue src='jcsj/common/bm/queryGs' filterable
<div class="lbtAll"> :match="{ value: 'id', label: 'bmmc' }" v-model='queryParams1.gsid'></RelSelect>
<!-- 说明-->
<div class="sm">
<el-tooltip :content="`${item.gsName}${item.bzName||''}:${item.wzr}:${item.wzxw}`" placement="top">
<span class='infor' >
{{`${item.gsName}${item.bzName||''}的${item.wzr}做出违章行为:${item.wzxw}`}}
</span>
</el-tooltip>
</div>
<el-image
style="width: 100%; height: 100%"
:src=" `${baseurl}/api/file/${item.filePath}`"
fit="fit"></el-image>
</div> </div>
</el-carousel-item> <div id="yhclChart" class="chart"></div>
</el-carousel> </div>
</div>
<div style="height: 300px;display: flex;align-items: center;justify-content: center;position: relative;" class="lbt" v-else >
<span style="position: absolute;bottom: 50px;line-height: 40px;font-size: 18px;font-weight: 800;color:#787878" >本月暂无违规记录。</span>
<img style="height:150px;width: 200px;" :src="aqpng" alt="" srcset="">
</div> </div>
<!-- 轮播图--> <div class="page-left-c page-left-4">
</div> <div class="lbt" v-if="showList.length > 0">
<div class="homePage " style="margin: 0;border: 0;border-right: 5px solid #eee;"> <el-carousel :height='carHeight'>
<!-- 数据展示--> <el-carousel-item v-for="(item, index) in showList" :key="item.id + index">
<div class="lbt" v-if="showListRy.length>0" > <!-- 轮播图all-->
<el-carousel height='290px' > <div class="lbtAll">
<el-carousel-item v-for="(item,index) in showListRy" :key="item.id+index"> <!-- 说明-->
<!-- 轮播图all--> <div class="sm">
<div class="lbtAll"> <el-tooltip :content="`${item.gsName}${item.bzName || ''}:${item.wzr}:${item.wzxw}`" placement="top">
<!-- 说明--> <span class='infor'>
<div class="sm"> {{ `${item.gsName}${item.bzName || ''}的${item.wzr}做出违章行为:${item.wzxw}` }}
<el-tooltip :content="`${item.gsName}${item.userName||''}:${item.bytitle}:${item.bycont}`" placement="top"> </span>
<span class='infor' > </el-tooltip>
{{`${item.gsName}${item.bzName||''}的${item.userName}:${item.bytitle}`}} </div>
<el-image style="width: 100%; height: 100%" :src="`${baseurl}/api/file/${item.filePath}`"
</span>
</el-tooltip>
</div>
<el-image
style="width: 100%; height: 100%"
:src=" `${baseurl}/api/file/${item.filePath}`"
fit="fit"></el-image> fit="fit"></el-image>
</div> </div>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</div>
<div style="height:100%;display: flex;align-items: center;justify-content: center;position: relative;"
class="lbt" v-else>
<span
style="position: absolute;bottom: 50px;line-height: 40px;font-size: 18px;font-weight: 800;color:#787878">本月暂无违规记录。</span>
<img style="height:150px;width: 200px;" :src="aqpng" alt="" srcset="">
</div>
</div> </div>
<div style="height: 300px;display: flex;align-items: center;justify-content: center;position: relative;" class="lbt" v-else > <div class="page-left-b page-left-3">
<span style="position: absolute;bottom: 50px;line-height: 40px;font-size: 18px;font-weight: 800;color:#787878" >本月暂无荣誉记录。</span> <div id="yjylChart" class="chart"></div>
<img style="height:150px;width: 200px;" :src="ryqno" alt="" srcset="">
</div> </div>
<!-- 轮播图-->
</div> </div>
<div class="top_right" > <div class="page-center">
<div class="top_right_fxpc"> <div class="page-center-t">
<div class="zttitle"> <div class="gs-select"></div>
风险排查率 <div class="gs-picture">
</div> <img :src="gspicture" alt="" style="width: 100%;height: 100%;">
<div class="ztcxxx">
<div class="search-item" style="padding-left: 20px;border-bottom: 2px solid #eee;">
<el-radio v-model="queryParams1.rwlx" label="D">日任务</el-radio>
<el-radio v-model="queryParams1.rwlx" label="W">周任务</el-radio>
<el-radio v-model="queryParams1.rwlx" label="M">月任务</el-radio>
</div>
</div>
<!-- 图表-->
<div id="fxpcChart" class="chart" >
</div>
</div>
<div class="top_right_yhhz">
<div class="zttitle" style="border-right: 0px;">
隐患处理完成率
</div>
<div class="ztcxxx" style="padding-left: 0px;" >
<div class="search-item" style="border-bottom: 2px solid #eee;padding-left: 10px;" >
<RelSelect style="width: 200px;margin-right: 10px;" hasValue src='jcsj/common/bm/queryGs' filterable :match="{value:'id',label:'bmmc'}" v-model='queryParams1.gsid' ></RelSelect>
<!-- <el-radio v-model="queryParams2.hzfs" label="GS">按公司</el-radio>
<el-radio v-model="queryParams2.hzfs" label="BM">按班组</el-radio>
<el-radio v-model="queryParams2.hzfs" label="RY">按人员</el-radio> -->
</div>
</div> </div>
<div id="yhclChart" class="chart" > </div>
<div class="page-center-b">
</div> <div id="yhzlChart" class="chart"></div>
</div> </div>
</div>
<!-- 隐患率-->
<!-- 风险率-->
</div>
<div class="bottom">
<div class="zttitle">
未处理隐患
</div> </div>
<div class="" style="height: calc(100% - 30px);width: 100%;"> <div class="page-right">
<TablePager isAutoRoll showPagination queryAll :delButton='false' @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem' <div class="page-right-t">
@getRow='getRow'> <div id="rfxpcChart" class="chart"></div>
</TablePager> </div>
<div class="page-right-c">
<div id="lzglChart" class="chart"></div>
</div>
<div class="page-right-b">
<div id="ygzcChart" class="chart"></div>
</div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
const baseurl=process.env.VUE_APP_BASE_API const baseurl = process.env.VUE_APP_BASE_API
import { import {
tableMixin tableMixin
} from 'common' } from 'common'
import vueSeamlessScroll from 'vue-seamless-scroll' import vueSeamlessScroll from 'vue-seamless-scroll'
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import aqpng from '@/assets/images/aq.png' import aqpng from '@/assets/images/aq.png';
import { import gspicture from '@/assets/images/gs.jpg';
doQuery as doQueryfx import {
} from "@/api/riskPrecontrol/riskAnalysis.js"; doQuery as doQueryfx
import { } from "@/api/riskPrecontrol/riskAnalysis.js";
queryYhsbtj as doQueryyh import {
} from "@/api/dangerManagement/yhslhz.js"; queryYhsbtj as doQueryyh
} from "@/api/dangerManagement/yhslhz.js";
import {
doQuery as doQueryDcl import {
} from "@/api/dangerManagement/enterSafetyRecords.js" doQuery as doQueryDcl
} from "@/api/dangerManagement/enterSafetyRecords.js"
import {
queryBglxFile import {
} from '@/api/threeViolations/enterTV.js'; queryBglxFile
import { } from '@/api/threeViolations/enterTV.js';
doQueryWithFile import {
} from '@/api/basicData/ryq.js'; doQueryWithFile
import ryqno from '@/assets/images/ryqno.png' } from '@/api/basicData/ryq.js';
export default{
components: { import {
fxpcQuery, lzglQuery, ygczQuery, yhtjQuery, yjylQuery
vueSeamlessScroll } from '@/api/home/homepage.js'
import ryqno from '@/assets/images/ryqno.png'
export default {
components: {
vueSeamlessScroll
},
mixins: [tableMixin],
computed: {
gsid() {
return this.queryParams1.gsid
},
radio1() {
let val = this.queryParams1.rwlx
return val
}
},
watch: {
gsid(val) {
/* 监听公司id*/
if (val) {
this.queryParams2.gsid = this.queryParams1.gsid
this.doQueryfx()
this.doQueryyh();
this.postYhzl();//隐患治理
this.postFxpc();//风险排查
this.postLzgl();//履职管理
this.postYgcz();//员工持证
}
},
},
activated() {
console.log('activated')
},
mounted() {
this.carHeight=document.getElementById('homePage').clientHeight*0.4+'px';
this.fxpcChart = echarts.init(document.getElementById('fxpcChart'))
this.yhclChart = echarts.init(document.getElementById('yhclChart'))
this.yjylChart = echarts.init(document.getElementById('yjylChart'));
this.yhzlChart = echarts.init(document.getElementById('yhzlChart'));
this.rfxpcChart = echarts.init(document.getElementById('rfxpcChart'));
this.lzglChart= echarts.init(document.getElementById('lzglChart'));
this.ygzcChart= echarts.init(document.getElementById('ygzcChart'));
this.$nextTick(() => {
// this.setChart(this.yhclChart,{
// name:'隐患整改完成率',
// title:'隐患整改'
// })
})
doQueryWithFile({}).then(res => {
this.showListRy = res.data.records || []
})
queryBglxFile({}).then(res => {
this.showList = res.data.records || []
// this.showList=[]
})
this.postYjyl();//应急演练
},
data() {
return {
showListRy: [],
queryParams1: {
grouptype: 'GS',
rwlx: 'D',
gsid: '',
ksrq: new Date().getTime(),
jsrq: new Date().getTime()
}, },
mixins: [tableMixin], queryParams2: {
computed:{ hzfs: 'GS',
gsid(){ gsid: '',
return this.queryParams1.gsid ksrq: null,
jsrq: new Date().getTime()
}, },
radio1(){ queryParams: {
let val=this.queryParams1.rwlx queryType: 'YHWCL'
return val // zt:'S'
}, },
// radio2(){ carHeight:"290px",
// let val=this.queryParams2.hzfs ryqno: ryqno,
// return val aqpng: aqpng,
// } gspicture:gspicture,
}, baseurl: baseurl,
watch:{ showList: [],
gsid(val){ /* dom*/
/* 监听公司id*/ fxpcChart: null,
if(val){ yhclChart: null,
this.queryParams2.gsid= this.queryParams1.gsid
this.doQueryfx() }
this.doQueryyh() },
methods: {
doQueryfx() {
if (this.queryParams1.rwlx == 'W') {
this.queryParams1.ksrq = new Date(new Date(this.getFirstWeek()).Format('yyyy/MM/dd') + " 00:00:00").getTime();
this.queryParams1.jsrq = new Date(new Date(this.getlastWeek()).Format('yyyy/MM/dd') + " 23:59:59").getTime();
} else if (this.queryParams1.rwlx == 'D') {
this.queryParams1.ksrq = new Date().getTime();
this.queryParams1.jsrq = new Date().getTime();
} else {
const today = new Date();
today.setDate(1);
today.setHours(0, 0, 0, 0);
const timestamp = today.getTime();
this.queryParams1.ksrq = timestamp;
this.queryParams1.jsrq = new Date().getTime();
}
doQueryfx(this.queryParams1).then(res => {
if (res.success) {
let value
if (res.data.records[0]) {
value = res.data.records[0].wcPercent || 0
} else {
value = 0
}
this.setChart(this.fxpcChart, {
name: '风险排查率',
title: '风险排查',
value: value
})
} }
}, })
radio1(val){
this.doQueryfx()
},
// radio2(){
// this.doQueryyh()
// }
}, },
activated() { getFirstWeek() {
console.log('activated') let nowDate = new Date();
this.$refs['TablePager'].pageQuery() let first = nowDate.getDate() - nowDate.getDay() + 1;//getDate()从nowDate对象返回一个月中的某一天;getDay()从nowDate对象返回一周中的某一天
let firstDate = new Date(nowDate.setDate(first)).toUTCString();//setDate()设置nowDate对象中月的某一天;toUTCString()根据世界时,把nowDate对象转换为字符串。
console.log(firstDate);
return firstDate;
}, },
mounted(){ getlastWeek() {
// this.$refs['TablePager'].pageQuery() let nowDate = new Date();
this.fxpcChart=echarts.init(document.getElementById('fxpcChart')) let first = nowDate.getDate() - nowDate.getDay() + 1;
this.yhclChart=echarts.init(document.getElementById('yhclChart')) let last = first + 6; // last day is the first day + 6
this.$nextTick(()=>{ let lastday = new Date(nowDate.setDate(last)).toUTCString();
return lastday
},
doQueryyh() {
doQueryyh(this.queryParams2).then(res => {
if (res.success) {
let value
if (res.data.records[0]) {
let data1 = res.data.records[0] ? res.data.records[0].wclCount : 0;
let data2 = res.data.records[0] ? res.data.records[0].yclCount : 0;
value = Number(parseFloat(data2 / (data1 + data2)).toFixed(4)) * 100;
// value=res.data.records[0].wcPercent||0
} else {
value = 0
}
this.setChart(this.yhclChart, {
name: '隐患整改完成率',
title: '隐患整改',
value: value
})
// this.setChart(this.yhclChart,{ }
// name:'隐患整改完成率',
// title:'隐患整改'
// })
}) })
doQueryWithFile({}).then(res=>{ },
this.showListRy=res.data.records||[] postYjyl() {
yjylQuery().then(res => {
if (res.success) {
let value = res.data.records ? res.data.records : [];
let seriesData = [], xAxis = [];
value.forEach(element => {
xAxis.push(element.bmName || "");
seriesData.push(Number(parseFloat((element.wcl || 0) * 100).toFixed(2)));
});
this.setBarhart(this.yjylChart, {
title: "应急演练",
xAxis: xAxis,
series:[
{
name: "完成率",
type: 'bar',
barWidth: "60%",
data: seriesData,
show:true,
itemStyle:{
color:'white'
}
}
]
})
}
}) })
queryBglxFile({}).then(res=>{ },
this.showList=res.data.records||[] postYhzl(){
// this.showList=[] yhtjQuery({
gsid:this.queryParams1.gsid
}).then(res=>{
if(res.success){
let value = res.data.records ? res.data.records : [];
let seriesData = [
{name:"隐患数量",data:[],type:"bar"},
{name:"隐患关闭数量",data:[],type:"bar"},
{name:"超期未处理",data:[],type:"bar"},
{name:"超期已处理",data:[],type:"bar"},
], xAxis = [];
value.forEach(element => {
xAxis.push(element.month);
seriesData[0]["data"].push(element.allCount||0);
seriesData[1]["data"].push(element.yclCount||0);
seriesData[2]["data"].push(element.cqwclCount ||0);
seriesData[3]["data"].push(element.cqyclCount ||0);
});
this.setBarhart(this.yhzlChart, {
title: "隐患治理",
xAxis: xAxis,
series:seriesData
})
}
}) })
}, },
data(){ postFxpc(){
return{ fxpcQuery({
showListRy:[], gsid:this.queryParams1.gsid
tableTitle: [ }).then(res=>{
{label: "状态", prop: "ztName", fieldType: "ftString",width:60}, if(res.success){
{label: "公司", prop: "gsid", fieldType: "ftString",width:192,transform:{ let value = res.data.records ? res.data.records : [];
url:'jcsj/common/bm/queryGs',label:'bmmc',value:'id' let seriesData = [
}}, {name:"全部",data:[],type:"bar",},
{label: "班组", prop: "bmid", fieldType: "ftString",width:192,transform:{ {name:"完成",data:[],type:"bar"},
url:'jcsj/common/bm/queryBz',label:'bmmc',value:'id' ], xAxis = [];
}}, let lx={
// "D":"昨日",
// {label: "状态", prop: "zt", fieldType: "ftString",transform:{ "W":"本周",
// url:'aqgl/yhgl/yhjl/init/zt',label:'name',value:'id' "M":"本月"
// }}, }
// {label: "整改说明", prop: "clff", fieldType: "ftString",width:300}, value.forEach(element => {
// {label: "整改完成时间", prop: "clsj", fieldType: "ftDateTime"}, xAxis.push(lx[element.lx]);
seriesData[0]["data"].push(element.allCount||0);
seriesData[1]["data"].push(element.wcCount||0);
{label: "发现日期", prop: "fxrq", fieldType: "ftDateTime"}, });
/* */ this.setBarhart(this.rfxpcChart, {
{label: "整改日期", prop: "clsj", fieldType: "ftDateTime"}, title: "风险排查",
{label: "复查日期", prop: "fcsj", fieldType: "ftDateTime"}, xAxis: xAxis,
/* */ series:seriesData
{label: "风险点", prop: "fxdName", fieldType: "ftString",width:300}, })
{label: "隐患地点", prop: "yhdd", fieldType: "ftString",width:300}, }
{label: "隐患类型", prop: "flid", fieldType: "ftString",width:192,transform:{ })
url:'aqgl/yhgl/yhfl/query',label:'name',value:'id' },
}}, postLzgl(){
{label: "隐患等级", prop: "dj", fieldType: "ftString",width:192,transform:{ lzglQuery({
url:'aqgl/fxyk/fxpc/init/wxdj',label:'name',value:'id' gsid:this.queryParams1.gsid
}}, }).then(res=>{
{label: "内容", prop: "nr", fieldType: "ftString",width:300}, if(res.success){
// {label: "责任部门", prop: "bmName", fieldType: "ftString",width:192}, let value = res.data.records ? res.data.records : [];
// {label: "制定整改方案", prop: "zdzgfa", fieldType: "ftString",width:6}, let seriesData = [
{label: "责任人", prop: "zrrName", fieldType: "ftString",width:192}, {name:"全部",data:[],type:"bar", yAxisIndex: 0,},
{label: "整改方案", prop: "zgfa", fieldType: "ftString",width:300}, {name:"完成",data:[],type:"bar", yAxisIndex: 0,},
{label: "管控措施", prop: "gkcs", fieldType: "ftString",width:300}, {name:"完成率",data:[],type:"line", yAxisIndex: 1},
{label: "要求整改完成时间", prop: "yqzgsj", fieldType: "ftDateTime"}, ], xAxis = [],yAxis=[];
// {label: "隐患分类", prop: "flid", fieldType: "ftString",width:192}, let lx={
{label: "处理人", prop: "clrName", fieldType: "ftString",width:192}, "D":"昨日",
// {label: "处理时间", prop: "clsj", fieldType: "ftDateTime"}, "W":"本周",
// {label: "处理方法", prop: "clff", fieldType: "ftString",width:300}, "M":"本月"
{label: "复查人", prop: "fcrName", fieldType: "ftString",width:192}, };
{label: "上报人", prop: "sbrName", fieldType: "ftString",width:192}, let yAxisStyle={axisTick: {
/* 检查人 */ color:"white"
// {label: "复查时间", prop: "fcsj", fieldType: "ftDateTime"}, },
// {label: "复查结果", prop: "fcjg", fieldType: "ftString",width:300}, axisLabel:{
// {label: "处置人", prop: "czr", fieldType: "ftString",width:192}, color:'white'
// {label: "处置时间", prop: "czsj", fieldType: "ftDateTime"}, },
// {label: "处置意见", prop: "czyj", fieldType: "ftString",width:300}, axisLine:{
// {label: "状态", prop: "zt", fieldType: "ftString",width:6}, lineStyle:{
// {label: "附件数", prop: "attachcount", fieldType: "int"}, color:'white'
{label: "备注", prop: "bz", fieldType: "ftString",width:300}, },
// {label: "工作流状态", prop: "wfpname", fieldType: "ftString",width:300}, },
{label: "维护人", prop: "whr", fieldType: "ftString"}, splitLine:{
{label: "维护时间", prop: "whsj", fieldType: "ftDateTime"}, show:true,
// {label: "创建人", prop: "cjr", fieldType: "ftString"}, color:'white'
// {label: "创建时间", prop: "cjsj", fieldType: "ftDateTime"}, }}
], yAxis=[{},{}];
queryParams1:{ yAxis[0]={...{ name: "数量",type: "value",position: "left",},...yAxisStyle};
grouptype:'GS', yAxis[1]={...yAxisStyle,...{ name: "完成率",type: "value",position: "right", axisLabel: {
rwlx:'D', formatter: "{value}%"
gsid:'',
// ksrq:new Date(new Date().setHours(0, 0, 0, 0)).getTime(),
// jsrq:new Date(new Date().setHours(23,59,59,999)).getTime()
ksrq:new Date().getTime(),
jsrq:new Date().getTime()
},
queryParams2:{
hzfs:'GS',
gsid:'',
ksrq:null,
jsrq:new Date().getTime()
// jsrq:new Date(new Date().setHours(23,59,59,999)).getTime()
},
queryParams:{
queryType:'YHWCL'
// zt:'S'
},
ryqno:ryqno,
aqpng:aqpng,
baseurl:baseurl,
showList:[],
/* dom*/
fxpcChart:null,
yhclChart:null,
} }
}};
value.forEach(element => {
xAxis.push(lx[element.lx]);
seriesData[0]["data"].push(element.allCount||0);
seriesData[1]["data"].push(element.wcCount||0);
let percent=element.allCount?(element.wcCount/element.allCount):0;
seriesData[2]["data"].push(Number(parseFloat(percent*100).toFixed(2)));
});
this.setBarhart(this.lzglChart, {
title: "履职管理",
xAxis: xAxis,
yAxis:yAxis,
series:seriesData
})
}
})
}, },
methods:{ postYgcz(){
query:doQueryDcl, ygczQuery({
doQueryfx(){ gsid:this.queryParams1.gsid
if(this.queryParams1.rwlx=='W'){ }).then(res=>{
this.queryParams1.ksrq=new Date(new Date(this.getFirstWeek()).Format('yyyy/MM/dd')+" 00:00:00").getTime(); if(res.success){
this.queryParams1.jsrq=new Date(new Date(this.getlastWeek()).Format('yyyy/MM/dd')+" 23:59:59").getTime(); let value = res.data.records ? res.data.records : [];
}else if(this.queryParams1.rwlx=='D'){ let seriesData = [
this.queryParams1.ksrq=new Date().getTime(); {name:"持证人数",data:[],type:"bar",},
this.queryParams1.jsrq=new Date().getTime(); {name:"即将到期",data:[],type:"bar"},
}else{ ], xAxis = [];
const today = new Date(); value.forEach(element => {
today.setDate(1); xAxis.push(element.flName);
today.setHours(0, 0, 0, 0); seriesData[0]["data"].push(element.allCount-element.dqCount||0);
const timestamp = today.getTime(); seriesData[1]["data"].push(element.dqCount||0);
this.queryParams1.ksrq=timestamp; });
this.queryParams1.jsrq=new Date().getTime(); this.setBarhart(this.ygzcChart, {
title: "员工持证",
yAxis: {
name:"种类",
data:xAxis,
type:"category"
},
customxAxis:{
type:"value",
boundaryGap: [0, 0.01]
},
series:seriesData
})
} }
doQueryfx(this.queryParams1).then(res=>{ })
if(res.success){ },
let value /* 渲染仪表盘*/
if(res.data.records[0]){ setChart(chartDom, setting) {
value=res.data.records[0].wcPercent||0 /* 基础配置*/
}else{ let option = {
value=0 tooltip: {
formatter: '{a} <br/>{b} : {c}%'
},
title: {
show: true,
text: setting.title || "",
bottom: 0,
left: "center",
textStyle: {
fontSize: 14,
fontWeight: 400,
align: 'center',
verticalAlign: 'middle',
color:'white'
}
},
series: [
{
axisLine: {
lineStyle: {
width: 6,
color: [
[0.25, '#FF6E76'],
[0.5, '#FDDD60'],
[0.75, '#58D9F9'],
[1, '#7CFFB2']
]
}
},
radius: '90%',
name: setting.title,
type: 'gauge',
center: ["50%", "50%"], // 仪表盘位置(圆心坐标)
progress: {
show: true
},
title: {
show: false
},
detail: {
valueAnimation: true,
formatter: '{value}',
textStyle: {
fontSize: 17
} }
this.setChart(this.fxpcChart,{
name:'风险排查率',
title:'风险排查',
value:value
})
},
data: [
{
value: setting.value,
name: setting.name
}
]
} }
}) ]
}, }
getFirstWeek(){ /* 渲染dom*/
let nowDate = new Date(); chartDom.setOption(option)
let first = nowDate.getDate() - nowDate.getDay()+1;//getDate()从nowDate对象返回一个月中的某一天;getDay()从nowDate对象返回一周中的某一天 },
let firstDate = new Date(nowDate.setDate(first)).toUTCString();//setDate()设置nowDate对象中月的某一天;toUTCString()根据世界时,把nowDate对象转换为字符串。 //渲染柱状图
console.log(firstDate); setBarhart(chartDom, setting) {
return firstDate; /* 基础配置*/
}, let option = {
getlastWeek(){ title: {
let nowDate = new Date(); show: true,
let first = nowDate.getDate() - nowDate.getDay()+1; text: setting.title || "",
let last = first + 6; // last day is the first day + 6 top: 0,
let lastday = new Date(nowDate.setDate(last)).toUTCString(); left: "center",
return lastday textStyle: {
}, fontSize: 18,
doQueryyh(){ fontWeight: 600,
doQueryyh(this.queryParams2).then(res=>{ align: 'center',
if(res.success){ verticalAlign: 'middle',
let value color:'white'
if(res.data.records[0]){ }
let data1=res.data.records[0]?res.data.records[0].wclCount:0; },
let data2=res.data.records[0]?res.data.records[0].yclCount:0; tooltip: {
value=Number(parseFloat(data2/(data1+data2)).toFixed(4))*100; trigger: 'axis',
// value=res.data.records[0].wcPercent||0 axisPointer: {
}else{ type: 'shadow'
value=0 }
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: setting.customxAxis||[
{
type: 'category',
data: setting.xAxis,
axisTick: {
alignWithLabel: true,
color:"white"
},
axisLabel:{
color:'white'
},
axisLine:{
lineStyle:{
color:'white'
},
},
splitLine:{
show:false,
color:'white'
} }
this.setChart(this.yhclChart,{
name:'隐患整改完成率',
title:'隐患整改',
value:value
})
} }
}) ],
}, yAxis: setting.yAxis||[
/* 渲染仪表盘*/ {
setChart(chartDom,setting){ type: 'value',
/* 基础配置*/ axisTick: {
let option = { color:"white"
tooltip: { },
formatter: '{a} <br/>{b} : {c}%' axisLabel:{
}, color:'white'
},
series: [ axisLine:{
{ lineStyle:{
axisLine: { color:'white'
lineStyle: {
width: 6,
color: [
[0.25, '#FF6E76'],
[0.5, '#FDDD60'],
[0.75, '#58D9F9'],
[1, '#7CFFB2']
]
}},
radius:'90%',
name:setting.title,
type: 'gauge',
center: ["50%", "50%"], // 仪表盘位置(圆心坐标)
progress: {
show: true
},
title:{
show:false
},
detail: {
valueAnimation: true,
formatter: '{value}',
textStyle:{
fontSize:17
}
}, },
data: [ },
{ splitLine:{
value: setting.value, show:true,
name: setting.name color:'white'
}
]
} }
] }
} ],
/* 渲染dom*/ series: setting.series||[]
chartDom.setOption(option)
} }
/* 渲染dom*/
chartDom.setOption(option)
},
}
} }
}
</script> </script>
<style lang="scss" scope> <style lang="scss" scope>
.listf{ .listf {
float: right; float: right;
} }
.zttitle{
border-right: 2px solid #eee; .ztcxxx {
border-bottom: 2px solid #eee; height: 60px;
line-height: 30px;
font-size: 16px;
font-weight: 700;
color: #777;
width: 100%; width: 100%;
// padding-left: 30px;
text-align: center;
}
.ztcxxx{
height: 60px;
width: 100%;
}
.chart{
width: 100%;
height: calc(300px - 60px - 30px);
}
.top{
height:300px;
width:100%;
display: flex;
.top_right{
flex: 1;
// background-color: #eee;
display: flex;
/* fxpc*/
.top_right_fxpc{
flex:1
}
.top_right_yhhz{
flex:1
}
}
} }
.bottom{
flex: 1; .chart {
border-bottom: 5px solid #eee; width: 100%;
border-left: 5px solid #eee; height: calc(300px - 60px - 30px);
border-right: 5px solid #eee;
} }
.homePage{ .homePage {
width: 35%; width: 35%;
height: 100%; height: 100%;
} }
.nodata{
.nodata {
background-image: url('/src/assets/image/aq.svg'); background-image: url('/src/assets/image/aq.svg');
} }
.lbt{
height: 100%; .lbt {
height: 100%;
width: 100%; width: 100%;
.lbtAll{
.lbtAll {
height: 100%; height: 100%;
width: 100%; width: 100%;
.sm{
.sm {
padding-top: 16px; padding-top: 16px;
padding-bottom: 26px; padding-bottom: 26px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
position: absolute; position: absolute;
<<<<<<< HEAD
height:70px; height:70px;
width:100%; width:100%;
background-color: rgba(0,0,0,0.7); background-color: rgba(0,0,0,0.7);
=======
height: 117px;
width: 100%;
background-color: rgba(0, 0, 0, 0.7);
>>>>>>> 07d9e85 (hompage)
z-index: 999; z-index: 999;
bottom:0; bottom: 0;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
<<<<<<< HEAD
.infor{ .infor{
color: #fff; color: #fff;
line-height: 25px; line-height: 25px;
font-size: 12px; font-size: 12px;
=======
.infor {
color: #fff;
line-height: 25px;
font-size: 14px;
>>>>>>> 07d9e85 (hompage)
} }
} }
} }
} }
.el-carousel__item:nth-child(2n) {
background-color: #99a9bf; .el-carousel__item:nth-child(2n) {
background-color: #99a9bf;
}
.el-carousel__item:nth-child(2n+1) {
background-color: #d3dce6;
}
.page-homepage {
width: 100%;
height: 100%;
position: relative;
display: flex;
background-image: url('~@/assets/images/data08.png');
.page-left {
flex: 1;
height: 100%;
display: inline-block;
.page-left-3 {
width: 100%;
height: 30%;
}
.page-left-4{
width: 100%;
height: 40%;
}
.page-left-t {
display: flex;
.page-fxpc {
flex: 1
}
.page-yhhz {
flex: 1;
}
}
.page-left-c,
.page-left-b {}
} }
.el-carousel__item:nth-child(2n+1) { .page-center {
background-color: #d3dce6; flex: 0 0 40%;
height: 100%;
display: inline-block;
.page-center-t {
width: 100%;
height: 70%;
.gs-select{
height: 200px;
width: 100%;
}
.gs-picture{
height: calc(100% - 200px );
width: 100%;
}
}
.page-center-b {
width: 100%;
height: 30%;
}
}
.page-right {
flex:1;
height: 100%;
float: right;
.page-right-t,
.page-right-c,
.page-right-b {
width: 100%;
height: 33.3%;
}
} }
</style> }</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment