From 85e5da3405bc6ef2adabe1c55a42b9e21c84dd25 Mon Sep 17 00:00:00 2001 From: haha Date: Tue, 15 Apr 2025 00:53:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yanzhu-bigscreen/src/components/header.vue | 236 +- yanzhu-bigscreen/src/pages-old/index.vue | 1135 +++++----- .../src/pages-old/safe/towerCrane.vue | 1908 ++++++++--------- yanzhu-bigscreen/src/views/index.vue | 16 +- yanzhu-bigscreen/src/views/projectDetail.vue | 15 +- .../views/safety/dialog/safetyCheckDialog.vue | 114 +- .../src/views/safety/safetyCheck.vue | 311 ++- .../src/views/safety/towerCrane.vue | 551 +++-- 8 files changed, 2099 insertions(+), 2187 deletions(-) diff --git a/yanzhu-bigscreen/src/components/header.vue b/yanzhu-bigscreen/src/components/header.vue index 2ec51871..ddf825f3 100644 --- a/yanzhu-bigscreen/src/components/header.vue +++ b/yanzhu-bigscreen/src/components/header.vue @@ -3,95 +3,69 @@
-
项目概况
+
项目概况
项目详情
-
+
安全管理
-
+
-
+
质量管理
-
+
-
+
进度管理
-
+
-
- + {{ selProject?.setting?.orgName || '数字建安施工管理平台' }} @@ -99,31 +73,43 @@
绿碳中心
- - + + viewBox="0 0 1024 1024" + version="1.1" + xmlns="http://www.w3.org/2000/svg" + p-id="3304" + > + fill + p-id="3305" + /> - + viewBox="0 0 1024 1024" + version="1.1" + xmlns="http://www.w3.org/2000/svg" + p-id="3952" + > + p-id="3953" + /> @@ -144,100 +130,102 @@ export default { }, computed: { nickName() { - return this.$store.getters.nickName; + return this.$store.getters.nickName }, curNav() { - return this.$store.getters.nav; - } + return this.$store.getters.nav + }, }, watch: { curNav(n, o) { - this.nav = this.$store.getters.nav; - } + this.nav = this.$store.getters.nav + }, }, mounted() { - window.xapp = this; - this.$api.project.findMyProjectList().then(d => { - this.projects = d.rows || []; + window.xapp = this + this.$api.project.findMyProjectList().then((d) => { + this.projects = d.rows || [] if (this.projects.length > 0) { - let id = localStorage.getItem("selProj") || this.projects[0].id - this.selProjectId = +id; - this.doProjectSelect(); + let id = localStorage.getItem('selProj') || this.projects[0].id + this.selProjectId = +id + this.doProjectSelect() } - }); + }) }, methods: { toggleFullScreen() { - let el = document.body; - this.$toggleFullScreen(el); + let el = document.body + this.$toggleFullScreen(el) setTimeout(() => { - this.isFullScreen = document.fullscreenElement == el; - }, 400); + this.isFullScreen = document.fullscreenElement == el + }, 400) }, doProjectSelect() { - let tmps = this.projects.filter(d => d.id == this.selProjectId); + let tmps = this.projects.filter((d) => d.id == this.selProjectId) if (tmps.length > 0) { - this.$store.dispatch('SetSelProject', tmps[0]); - this.selProject = tmps[0]; + this.$store.dispatch('SetSelProject', tmps[0]) + this.selProject = tmps[0] } else { - this.$store.dispatch('SetSelProject', null); - this.selProject = null; + this.$store.dispatch('SetSelProject', null) + this.selProject = null } - localStorage.setItem("selProj", this.selProjectId); + localStorage.setItem('selProj', this.selProjectId) }, doNav(n) { if (this.nav == n) { - return; + return } - this.nav = n; + this.nav = n switch (n) { case 1: - this.$router.push("/index"); - break; + this.$router.push('/index') + break case 2: - this.$router.push("/detail"); - break; + this.$router.push('/detail') + break case 3: - this.$router.push("/prjSafety"); - break; + this.$router.push('/prjSafety') + break case 309: - this.$router.push("/videoMonitor"); - break; + this.$router.push('/videoMonitor') + break case 301: - this.$router.push("/safetyCheck"); - break; + this.$router.push('/safetyCheck') + break case 304: - this.$router.push("/towerCrane"); - break; + this.$router.push('/towerCrane') + break case 306: - this.$router.push("/powerIot"); - break; + this.$router.push('/powerIot') + break case 4: - this.$router.push("/prjQuality"); - break; + this.$router.push('/prjQuality') + break case 5: - this.$router.push("/prjProgress"); - break; + this.$router.push('/prjProgress') + break case 6: - this.$router.push("/greenCarbon"); - break; + this.$router.push('/greenCarbon') + break case 501: - this.$router.push("/photography"); - break; + this.$router.push('/photography') + break } }, doLogout() { this.$confirm('确定注销并退出系统吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', - type: 'warning' - }).then(() => { - this.$store.dispatch('LogOut').then(() => { - location.href = window.XDBSAPP; + type: 'warning', + }) + .then(() => { + this.$store.dispatch('LogOut').then(() => { + location.href = window.XDBSAPP + }) }) - }).catch(() => { }); - } - } + .catch(() => {}) + }, + }, } @@ -304,10 +292,8 @@ export default { } } } - } } - } } } @@ -370,8 +356,6 @@ export default { } @media (min-width: 2561px) { - - .header-center { font-size: 52px !important; margin-top: 10px; diff --git a/yanzhu-bigscreen/src/pages-old/index.vue b/yanzhu-bigscreen/src/pages-old/index.vue index 9e836c1a..e5effd9d 100644 --- a/yanzhu-bigscreen/src/pages-old/index.vue +++ b/yanzhu-bigscreen/src/pages-old/index.vue @@ -11,254 +11,270 @@
- -
-
-
项目数
-
-
-
项目总投资
-
-
-
项目年投资
-
+ +
+
+
项目数
- - - - - - -
-
安全管理
-
质量管理
+
+
项目总投资
- - +
+
项目年投资
+
+
+ + + + + +
+
安全管理
+
质量管理
+
+ +
- +
- +
- - -
- + + +
+ +
+
{{ item.title }}
+
+
+ + +
+
+
开累产值
+
+
+
-
- {{ item.title }} -
- - - - -
-
- - -
开累产值
-
-
- -
-
-
- - - -
+
+
+ + +
+
-
年度产值
-
-
- -
+
年度产值
+
+
+
+
-
月度产值
-
-
- -
+
月度产值
+
+
+
- -
- - - - +
+ + + +
- +
- - - -
-
在岗人数
-
离岗人数
-
今日出勤
-
- - -
-
- -
+ + + +
+
在岗人数
+
离岗人数
+
今日出勤
+
+ + +
+
+
-
-
{{ laborPersonnelTotal }} 人 -
-

{{ staffText }}

-
- - - - - - - - - - -
-
- 在建项目({{ getPrjCateCount(0) }})
-
- 拟建项目({{ getPrjCateCount(1) }}) -
-
- 完成项目({{ getPrjCateCount(3) }}) -
-
- - -
-
- - - - - - - - - - - - - - -
+
+
+ {{ laborPersonnelTotal }}
-
-
{{ prjPrcessTotal }}
-

{{ prjPrcessText }}

+

{{ staffText }}

+
+ + + + + + + + + + +
+
在建项目({{ getPrjCateCount(0) }})
+
拟建项目({{ getPrjCateCount(1) }})
+
完成项目({{ getPrjCateCount(3) }})
+
+ + +
+
+ + + + + + + + + + + + + +
- - - - - - - - +
+
+
+ {{ prjPrcessTotal }} 个 +
+

{{ prjPrcessText }}

+
+
+ + + +
+
+
+
- - - - - - - - - - + - - - - - - - - -
+ --> + +
+ +
+
- +
@@ -283,11 +299,13 @@ export default { indexDlg3, MonitAndWarning, journalismDlg, - AttendanceDetailDialog,mapIndex,JobWorkerDialog + AttendanceDetailDialog, + mapIndex, + JobWorkerDialog, }, data() { return { - isLocalhost:location.href.indexOf("localhost:3000")>=0, + isLocalhost: location.href.indexOf('localhost:3000') >= 0, elDeptWorks: 0, prj: {}, prjs: [], @@ -296,43 +314,43 @@ export default { prjInfo: {}, loading: true, legendOpt1: { - icon: "rect", + icon: 'rect', textStyle: { - color: "#c3dbfd", - fontSize: 14, + color: '#c3dbfd', + fontSize: 14, rich: { name: { - color: "#c3dbfd", + color: '#c3dbfd', padding: [0, 20, 0, 0], }, percent: { - color: "#4676FD" + color: '#4676FD', }, }, }, }, legendOpt2: { - icon: "rect", - orient: "horizontal", + icon: 'rect', + orient: 'horizontal', left: '50%', top: '10%', itemGap: 20, - itemHeight:30, + itemHeight: 30, textStyle: { - padding:[0,0,2,0], + padding: [0, 0, 2, 0], fontSize: 10, - color: "#c3dbfd", + color: '#c3dbfd', rich: { name: { - color: "#c3dbfd", + color: '#c3dbfd', padding: [5, 2, 5, 2], }, percent: { - color: "#4676FD", + color: '#4676FD', padding: [0, 2, 0, 2], }, }, - } + }, }, projectList: [ { text: '中铁一局建安公司', id: 0, type: 1 }, @@ -349,7 +367,7 @@ export default { typeDistributionData: [ { name: '在建项目', value: '15' }, { name: '项目总投资', value: '515.97' }, - { name: '项目年投资', value: '134.86' } + { name: '项目年投资', value: '134.86' }, ], //质量管理 qualityNav: 0, @@ -361,9 +379,9 @@ export default { surveyUrl: 'images/survey_icon_4.png', laborPersonnelTotal: 0, laborPersonnelData: [ - { text: "总包人员", value: 0 }, - { text: "监理人员", value: 0 }, - { text: "劳务人员", value: 0 }, + { text: '总包人员', value: 0 }, + { text: '监理人员', value: 0 }, + { text: '劳务人员', value: 0 }, ], //项目进度 prjProcessNav: 1, @@ -371,16 +389,12 @@ export default { prjPrcessTotal: 100, prjPrcessUrl: 'images/prj1.svg', prjPrcessData: [ - { text: "正常推进项目", value: 0 }, - { text: "进度滞后项目", value: 0 }, - ], - //总投金额 - investmentAmountData1: [ - { text: "付款金额", value: 0 }, - ], - investmentAmountData2: [ - { text: "挂账金额", value: 0 }, + { text: '正常推进项目', value: 0 }, + { text: '进度滞后项目', value: 0 }, ], + //总投金额 + investmentAmountData1: [{ text: '付款金额', value: 0 }], + investmentAmountData2: [{ text: '挂账金额', value: 0 }], //设备概况 overview: 0, overviewInterval: '', @@ -420,30 +434,30 @@ export default { address: '苏州桑田岛项目', longitude: '120.43316', latitude: '31.282088', - } + }, ], /*warningData[i].images 图标 - * 机械 images/warning_jixie.png - * 测斜 images/warning_cexie.png - * 沉降 images/warning_chenjiang.png - * 吊重 images/warning_diaozhong.png - * 风速 images/warning_fengsu.png - * 幅度 images/warning_fudu.png - * 高度 images/warning_gaodu.png - * PM2.5 images/warning_PM2.5.png - * PM10 images/warning_PM10.png - * 倾角 images/warning_qingjiao.png - * 倾斜 images/warning_qingxie.png - * 人员 images/warning_renyuan.png - * 湿度 images/warning_shidu.png - * 水位 images/warning_shuiwei.png - * 位移 images/warning_weiyi.png - * 温度 images/warning_wendu.png - * 应力 images/warning_yingli.png - * 噪音 images/warning_zaoyin.png - * 转角 images/warning_zhuanjiao.png - * */ + * 机械 images/warning_jixie.png + * 测斜 images/warning_cexie.png + * 沉降 images/warning_chenjiang.png + * 吊重 images/warning_diaozhong.png + * 风速 images/warning_fengsu.png + * 幅度 images/warning_fudu.png + * 高度 images/warning_gaodu.png + * PM2.5 images/warning_PM2.5.png + * PM10 images/warning_PM10.png + * 倾角 images/warning_qingjiao.png + * 倾斜 images/warning_qingxie.png + * 人员 images/warning_renyuan.png + * 湿度 images/warning_shidu.png + * 水位 images/warning_shuiwei.png + * 位移 images/warning_weiyi.png + * 温度 images/warning_wendu.png + * 应力 images/warning_yingli.png + * 噪音 images/warning_zaoyin.png + * 转角 images/warning_zhuanjiao.png + * */ //重大节点预期预警 数据 index: 0, majorInterval: undefined, @@ -497,192 +511,199 @@ export default { JournalismList: [], sumCost: {}, //动画 - leftShow:true, - leftSrc:'./images/arrow_left_retract.png', - rightSrc:'./images/arrow_right_retract.png', - bottomSrc:'./images/arrow_bottom_retract.png' + leftShow: true, + leftSrc: './images/arrow_left_retract.png', + rightSrc: './images/arrow_right_retract.png', + bottomSrc: './images/arrow_bottom_retract.png', } }, created() { this.init() }, mounted() { - window.xapp = this; - this.$nextTick(() => { - if(this.$root.isTypeBuser){ - this.$router.push("/detail"); + this.$nextTick(() => { + if (this.$root.isTypeBuser) { + this.$router.push('/detail') } - this.loading = true; - }); - this.$bus.$on("projectChange", debounce(res => { - this.deptInfo = this.$root.dept||this.deptInfo; - this.prj=res||this.$root.project; - this.prjs=this.$root.projects||this.prjs||[]; - if (this.prj.id == 0) { - this.prjInfo = this.prjs[1]; - } - this.groupByProjectCategory(this.deptInfo.id); - this.onClickoOverview(0) - this.qualityNavClick(0); - this.onWarningInfoNav(0); - this.sumCostOutByDeptId(); - })); - if(this.$root.hasInitHeader){ - this.initMe(); + this.loading = true + }) + this.$bus.$on( + 'projectChange', + debounce((res) => { + this.deptInfo = this.$root.dept || this.deptInfo + this.prj = res || this.$root.project + this.prjs = this.$root.projects || this.prjs || [] + if (this.prj.id == 0) { + this.prjInfo = this.prjs[1] + } + this.groupByProjectCategory(this.deptInfo.id) + this.onClickoOverview(0) + this.qualityNavClick(0) + this.onWarningInfoNav(0) + this.sumCostOutByDeptId() + }) + ) + if (this.$root.hasInitHeader) { + this.initMe() } - document.body.classList.add("is-index"); + document.body.classList.add('is-index') }, - beforeDestroy(){ - document.body.classList.remove("is-index"); + beforeDestroy() { + document.body.classList.remove('is-index') }, methods: { - arrowRetract(){ - if(this.leftShow == true){ + arrowRetract() { + if (this.leftShow == true) { this.leftSrc = './images/arrow_right_retract.png' this.rightSrc = './images/arrow_right_open.png' this.bottomSrc = './images/arrow_bottom_open.png' - $("#arrowLeft").animate({left: 10+'px'},300) - $("#arrowRight").animate({right: 10+'px'},300) - $("#arrowBottom").animate({bottom: 10+'px'},300) - }else{ + $('#arrowLeft').animate({ left: 10 + 'px' }, 300) + $('#arrowRight').animate({ right: 10 + 'px' }, 300) + $('#arrowBottom').animate({ bottom: 10 + 'px' }, 300) + } else { this.leftSrc = './images/arrow_left_retract.png' this.rightSrc = './images/arrow_left_open.png' this.bottomSrc = './images/arrow_bottom_retract.png' - $("#arrowLeft").animate({left: 490+'px'},300) - $("#arrowRight").animate({right: 490+'px'},300) - $("#arrowBottom").animate({bottom: -490+'px'},300) + $('#arrowLeft').animate({ left: 490 + 'px' }, 300) + $('#arrowRight').animate({ right: 490 + 'px' }, 300) + $('#arrowBottom').animate({ bottom: -490 + 'px' }, 300) } - this.leftShow = !this.leftShow; - }, - initMe(){ - this.prj=this.$root.project||{}; - this.deptInfo=this.$root.dept||{}; - this.prjs=this.$root.projects||[]; - let res=this.prj; - this.investmentAmountData1[0].value = "" + res.paidAmount * 1.0; - this.investmentAmountData2[0].value = "" + res.onAccountAmount * 1.0; - this.elKey++; - this.onWarningInfoNav(0); - this.sumCostOutByDeptId(); - this.groupByProjectCategory(this.deptInfo.id); - this.onClickoOverview(0) - this.qualityNavClick(0); + this.leftShow = !this.leftShow }, - doShowAttendanceDetail(){ - let data={ - deptId:this.deptInfo.id||0, - projectId:0, - attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD") + initMe() { + this.prj = this.$root.project || {} + this.deptInfo = this.$root.dept || {} + this.prjs = this.$root.projects || [] + let res = this.prj + this.investmentAmountData1[0].value = '' + res.paidAmount * 1.0 + this.investmentAmountData2[0].value = '' + res.onAccountAmount * 1.0 + this.elKey++ + this.onWarningInfoNav(0) + this.sumCostOutByDeptId() + this.groupByProjectCategory(this.deptInfo.id) + this.onClickoOverview(0) + this.qualityNavClick(0) + }, + doShowAttendanceDetail() { + let data = { + deptId: this.deptInfo.id || 0, + projectId: 0, + attendanceTime: this.$dt(new Date()).format('YYYY-MM-DD'), } - if(this.infoNav == 2){ - this.$refs.attDetailDlg.showDialog(data); - }else{ + if (this.infoNav == 2) { + this.$refs.attDetailDlg.showDialog(data) + } else { this.$refs.jobWorkerdlg.showDialog({ ...data, - type:this.infoNav, - total:this.laborPersonnelTotal, - datas:this.laborPersonnelData.map(it=>{ + type: this.infoNav, + total: this.laborPersonnelTotal, + datas: this.laborPersonnelData.map((it) => { return { - text:it.text.replace("总包人员","101").replace("监理人员","102").replace("劳务人员","103"), - cnt:it.value + text: it.text.replace('总包人员', '101').replace('监理人员', '102').replace('劳务人员', '103'), + cnt: it.value, } - }) - }); + }), + }) } }, //查询在岗人数 - loadAttendanceData(){ - let data={ - id:this.infoNav, - subDeptId:this.deptInfo.id||0, - projectId:0, - attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD") + loadAttendanceData() { + let data = { + id: this.infoNav, + subDeptId: this.deptInfo.id || 0, + projectId: 0, + attendanceTime: this.$dt(new Date()).format('YYYY-MM-DD'), } - let ajax=this.$api.attendance.groupByComany + let ajax = this.$api.attendance.groupByComany if (this.infoNav != 2) { - ajax=this.$api.attendance.groupAllByComany + ajax = this.$api.attendance.groupAllByComany } - ajax(data).then(d=>{ - let tmps=d.data||[]; - const func=(ids)=>{ - let sum=0; - tmps.filter(it=>ids.includes(it.companyTypeId)).map(it=>it.id).forEach(it=>{ - sum+=it*1; - }) - return sum; - } - this.laborPersonnelTotal = 0; - this.laborPersonnelData = [{ text: "劳务人员", value: func(["0","2","3","4","5"]) }, { text: "监理人员", value: func(["8"]) }, { text: "总包人员", value: func(["1","6"]) }]; - this.laborPersonnelData.forEach(it=>{ - this.laborPersonnelTotal += it.value; + ajax(data).then((d) => { + let tmps = d.data || [] + const func = (ids) => { + let sum = 0 + tmps.filter((it) => ids.includes(it.companyTypeId)) + .map((it) => it.id) + .forEach((it) => { + sum += it * 1 + }) + return sum + } + this.laborPersonnelTotal = 0 + this.laborPersonnelData = [ + { text: '劳务人员', value: func(['0', '2', '3', '4', '5']) }, + { text: '监理人员', value: func(['8']) }, + { text: '总包人员', value: func(['1', '6']) }, + ] + this.laborPersonnelData.forEach((it) => { + this.laborPersonnelTotal += it.value }) - this.elDeptWorks++; - }); + this.elDeptWorks++ + }) }, - planSummaryChartClick(p){ - let idx=0; - if(p.event.target.parent.style && p.event.target.parent.style.text){ - if(p.event.target.parent.style.text.includes("正常推进项目")){ - idx=2; + planSummaryChartClick(p) { + let idx = 0 + if (p.event.target.parent.style && p.event.target.parent.style.text) { + if (p.event.target.parent.style.text.includes('正常推进项目')) { + idx = 2 } - if(p.event.target.parent.style.text.includes("进度滞后项目")){ - idx=1; + if (p.event.target.parent.style.text.includes('进度滞后项目')) { + idx = 1 } + } else { + idx = p.seriesIndex + } - }else{ - idx=p.seriesIndex; - } - - if(idx==1||idx==2){ - this.$refs.dlg2.showDetailDialog(this.prjProcessNav,idx,this.deptInfo); + if (idx == 1 || idx == 2) { + this.$refs.dlg2.showDetailDialog(this.prjProcessNav, idx, this.deptInfo) } }, - sumCostOutByDeptId() { - let dt = this.$dt(new Date()); + sumCostOutByDeptId() { + let dt = this.$dt(new Date()) let postData = { year: dt.$y, - month: dt.$M + 1 - }; - if(postData.month==1){ - postData.year--; - postData.month=12 - }else{ - postData.month--; - } - postData.id = this.deptInfo.id; - this.$api.costOut.sumByDeptId(postData).then(d => { - this.sumCost = d; - }); + month: dt.$M + 1, + } + if (postData.month == 1) { + postData.year-- + postData.month = 12 + } else { + postData.month-- + } + postData.id = this.deptInfo.id + this.$api.costOut.sumByDeptId(postData).then((d) => { + this.sumCost = d + }) }, qualityNavClick(n) { - let dt1=this.$dt((+new Date())-30*24*3600*1000); - let dt2=this.$dt(new Date()); - this.qualityNav = n; + let dt1 = this.$dt(+new Date() - 30 * 24 * 3600 * 1000) + let dt2 = this.$dt(new Date()) + this.qualityNav = n if (n == 0) { - this.qualityNavTitle = "安全隐患总数"; + this.qualityNavTitle = '安全隐患总数' let postData = { deptId: this.deptInfo?.id || 0, roleType: 0, //startDate:this.$dt(dt1).format("YYYY-MM-DD"), //endDate:this.$dt(dt2).format("YYYY-MM-DD"), - }; - this.$api.problemmodify.safetySummary(postData).then(d => { - let tmps= (d || []).map(it => { + } + this.$api.problemmodify.safetySummary(postData).then((d) => { + let tmps = (d || []).map((it) => { return { text: it.problemArea, prop: '0.0', name: it.problemArea, - value: +it.roleType || 0 + value: +it.roleType || 0, } - }); - tmps.splice(6) - this.dangersDatas =tmps; - let sum = 0; - d.forEach(it => { - sum += it.roleType * 1; }) - this.qualityNavTotal = sum; - this.elKey++; + tmps.splice(6) + this.dangersDatas = tmps + let sum = 0 + d.forEach((it) => { + sum += it.roleType * 1 + }) + this.qualityNavTotal = sum + this.elKey++ }) } else { let postData = { @@ -690,34 +711,33 @@ export default { roleType: 0, //startDate:this.$dt(dt1).format("YYYY-MM-DD"), //endDate:this.$dt(dt2).format("YYYY-MM-DD"), - }; - this.qualityNavTitle = "质量隐患总数"; - this.$api.problemmodify.qualitySummary(postData).then(d => { - let tmps = (d || []).map(it => { + } + this.qualityNavTitle = '质量隐患总数' + this.$api.problemmodify.qualitySummary(postData).then((d) => { + let tmps = (d || []).map((it) => { return { text: it.problemArea, prop: '0.0', name: it.problemArea, - value: +it.roleType || 0 + value: +it.roleType || 0, } - }); - tmps.splice(6) - this.dangersDatas=tmps; - let sum = 0; - d.forEach(it => { - sum += it.roleType * 1; }) - this.qualityNavTotal = sum; - this.elKey++; + tmps.splice(6) + this.dangersDatas = tmps + let sum = 0 + d.forEach((it) => { + sum += it.roleType * 1 + }) + this.qualityNavTotal = sum + this.elKey++ }) } }, numberWithCommas(x) { - x = x.toString(); - var pattern = /(-?\d+)(\d{3})/; - while (pattern.test(x)) - x = x.replace(pattern, "$1,$2"); - return x; + x = x.toString() + var pattern = /(-?\d+)(\d{3})/ + while (pattern.test(x)) x = x.replace(pattern, '$1,$2') + return x }, doShowDlg3() { this.$refs.dlg3.showDialog(this.deptInfo?.id || 0) @@ -726,79 +746,82 @@ export default { this.$refs.dlg1.showDialog() }, doShowDlg2() { - this.$refs.dlg2.showDialog(this.prjProcessNav, [this.getPrjCateCount(0), this.getPrjCateCount(1), this.getPrjCateCount(3)],this.deptInfo) + this.$refs.dlg2.showDialog( + this.prjProcessNav, + [this.getPrjCateCount(0), this.getPrjCateCount(1), this.getPrjCateCount(3)], + this.deptInfo + ) }, getPrjCateCount(n) { if (this.projectCategory.length < n + 1) { - return 0; + return 0 } - let tmps = this.projectCategory[n]; + let tmps = this.projectCategory[n] if (tmps && tmps.length > 0) { - let sum = 0; - tmps.forEach(d => { - sum += d.cnt; + let sum = 0 + tmps.forEach((d) => { + sum += d.cnt }) - return sum; + return sum } - return 0; + return 0 }, - groupByProjectCategory(deptId) { - this.$api.project.groupByProjectCategory(deptId, datas => { - this.projectCategory = datas; - this.prjPrcessTotal = this.getPrjCateCount(0); - let item = this.projectCategory.length > 0 ? this.projectCategory[0] : null; - this.prjPrcessData[0].value = item && item.length > 0 ? item[0].cnt : 0; - this.prjPrcessData[1].value = item && item.length > 1 ? item[1].cnt : 0; - this.doPrjProcess(1, '在建项目'); - this.elKey++; - }); + groupByProjectCategory(deptId) { + this.$api.project.groupByProjectCategory(deptId, (datas) => { + this.projectCategory = datas + this.prjPrcessTotal = this.getPrjCateCount(0) + let item = this.projectCategory.length > 0 ? this.projectCategory[0] : null + this.prjPrcessData[0].value = item && item.length > 0 ? item[0].cnt : 0 + this.prjPrcessData[1].value = item && item.length > 1 ? item[1].cnt : 0 + this.doPrjProcess(1, '在建项目') + this.elKey++ + }) }, init() { - - this.localStorage = JSON.parse(localStorage.getItem("data1")) + this.localStorage = JSON.parse(localStorage.getItem('data1')) //地图数据 this.chartMap() //设备概况点击事件定时器 //this.overviewInterval = setInterval(this.overviewClick, 5000); //重大节点预期预警 - this.majorInterval = setInterval(this.timer, 5000); + this.majorInterval = setInterval(this.timer, 5000) //正在发生 定时器 - this.warningInterval = setInterval(this.automaticRoll, 5000); - this.getJournalismList(); - setInterval(this.loadAttendanceData, 600000); - setInterval(this.getJournalismList, 600000); + this.warningInterval = setInterval(this.automaticRoll, 5000) + this.getJournalismList() + setInterval(this.loadAttendanceData, 600000) + setInterval(this.getJournalismList, 600000) }, doPrjProcess(n, text) { - this.prjProcessNav = n; - this.prjPrcessText = text; - n--; - this.prjPrcessTotal = this.getPrjCateCount(n); - let item = this.projectCategory.length > n ? this.projectCategory[n] : null; - this.prjPrcessData[0].value = item && item.length > 0 ? item[0].cnt : 0; - this.prjPrcessData[1].value = item && item.length > 1 ? item[1].cnt : 0; - this.elSumKey++; + this.prjProcessNav = n + this.prjPrcessText = text + n-- + this.prjPrcessTotal = this.getPrjCateCount(n) + let item = this.projectCategory.length > n ? this.projectCategory[n] : null + this.prjPrcessData[0].value = item && item.length > 0 ? item[0].cnt : 0 + this.prjPrcessData[1].value = item && item.length > 1 ? item[1].cnt : 0 + this.elSumKey++ }, //劳务人员概况 onWarningInfoNav(n) { this.infoNav = n - this.staffText = n == 0 ? '在岗人数' : n == 1?'离岗人数': '今日出勤' - if (n == 0||n==1) { + this.staffText = n == 0 ? '在岗人数' : n == 1 ? '离岗人数' : '今日出勤' + if (n == 0 || n == 1) { this.surveyUrl = 'images/survey_icon_4.png' } else { this.surveyUrl = 'images/survey_icon_5.png' - } - this.loadAttendanceData(); - }, + } + this.loadAttendanceData() + }, //集团新闻列表 getJournalismList() { //查询出勤人数 - this.$api.journalism.getJournalismList().then(d => { - this.JournalismList = d.rows; - }); + this.$api.journalism.getJournalismList().then((d) => { + this.JournalismList = d.rows + }) }, handJournalism(item) { - this.$refs.journalismDlg.showDialog(item); + this.$refs.journalismDlg.showDialog(item) }, //设备概况点击事件定时器方法 overviewClick() { @@ -820,118 +843,115 @@ export default { this.overview = n if (this.overview == 0) { - this.projectCategoryWidth = 290; - this.overviewText = "项目数"; + this.projectCategoryWidth = 290 + this.overviewText = '项目数' this.surveyUrlSb = 'images/survey_icon_1.png' - } else if (this.overview == 1) { - this.projectCategoryWidth = 210; - this.overviewText = "项目总投资(万元)"; + this.projectCategoryWidth = 210 + this.overviewText = '项目总投资(万元)' this.surveyUrlSb = 'images/survey_icon_2.png' - } else { - this.projectCategoryWidth = 210; - this.overviewText = "项目年投资(万元)"; + this.projectCategoryWidth = 210 + this.overviewText = '项目年投资(万元)' this.surveyUrlSb = 'images/survey_icon_3.png' } - let year = this.$dt(new Date()).$y; - this.$api.project.groupByCategory(this.deptInfo.id, n, year).then(d => { - let tmps = (d.data || []).map(it => { + let year = this.$dt(new Date()).$y + this.$api.project.groupByCategory(this.deptInfo.id, n, year).then((d) => { + let tmps = (d.data || []).map((it) => { return { id: it.id, - name: it.projectName+(n>0?'(万元)':''), - value: it.deptId / 10000.0 + name: it.projectName + (n > 0 ? '(万元)' : ''), + value: it.deptId / 10000.0, } - }); - let sum = 0; - tmps.forEach(it => { - sum += it.value; }) - if(n==0){ - this.overviewTotal = sum; - }else{ - this.overviewTotal = sum.toFixed(2); + let sum = 0 + tmps.forEach((it) => { + sum += it.value + }) + if (n == 0) { + this.overviewTotal = sum + } else { + this.overviewTotal = sum.toFixed(2) } - this.typeDistributionData = tmps; - this.elKey++; + this.typeDistributionData = tmps + this.elKey++ }) - this.$api.project.groupByLevel(this.deptInfo.id, n, year).then(d => { - let tmps = (d.data || []).map(it => { + this.$api.project.groupByLevel(this.deptInfo.id, n, year).then((d) => { + let tmps = (d.data || []).map((it) => { return { id: it.id, text: it.projectName, value: it.deptId / 10000.0, prop: 0, } - }); - let sum = 0; - tmps.forEach(it => { - sum += it.value; }) - let total = 0; + let sum = 0 + tmps.forEach((it) => { + sum += it.value + }) + let total = 0 tmps.forEach((it, idx) => { - it.prop = sum == 0 ? 0 : (it.value * 100.0 / sum).toFixed(1) + it.prop = sum == 0 ? 0 : ((it.value * 100.0) / sum).toFixed(1) if (idx < tmps.length - 1) { - total += it.prop * 1; + total += it.prop * 1 } else { if (sum > 0) { - it.prop = (100 - total).toFixed(1); + it.prop = (100 - total).toFixed(1) } } - }); - this.availabilityData = tmps; - this.elKey++; + }) + this.availabilityData = tmps + this.elKey++ }) - }, //地图数据 chartMap() { var data = [ { - "latitude": "34.546109", - "project_shorthand": "泾河新城荟锦坊二期", - "zc": 621, - "project_name": "泾河新城荟锦坊二期 EPC 工程总承包项目", - "zg": 610, - "cq": 0, - "project_addr": "泾河新城荟锦坊二期 EPC 工程总承包项目", - "glrs": 0, - "prop": 0.00, - "grrs": 621, - "projectId": 1, - "longitude": "108.913119" + latitude: '34.546109', + project_shorthand: '泾河新城荟锦坊二期', + zc: 621, + project_name: '泾河新城荟锦坊二期 EPC 工程总承包项目', + zg: 610, + cq: 0, + project_addr: '泾河新城荟锦坊二期 EPC 工程总承包项目', + glrs: 0, + prop: 0.0, + grrs: 621, + projectId: 1, + longitude: '108.913119', }, { - "latitude": "34.379435", - "project_shorthand": "西安地铁2号线二期2标", - "zc": 450, - "project_name": "西安市地铁2号线二期工程施工总承包项目2标段", - "zg": 448, - "cq": 0, - "project_addr": "西安市地铁2号线二期工程施工总承包项目2标段", - "glrs": 48, - "prop": 0.00, - "grrs": 402, - "projectId": 2, - "longitude": "108.917", + latitude: '34.379435', + project_shorthand: '西安地铁2号线二期2标', + zc: 450, + project_name: '西安市地铁2号线二期工程施工总承包项目2标段', + zg: 448, + cq: 0, + project_addr: '西安市地铁2号线二期工程施工总承包项目2标段', + glrs: 48, + prop: 0.0, + grrs: 402, + projectId: 2, + longitude: '108.917', }, { - "latitude": "31.282088", - "project_shorthand": "苏州桑田岛项目", - "zc": 376, - "project_name": "苏州桑田岛项目", - "zg": 376, - "cq": 0, - "project_addr": "苏州桑田岛项目", - "glrs": 0, - "prop": 0.00, - "grrs": 376, - "projectId": 3, - "longitude": "120.43316" + latitude: '31.282088', + project_shorthand: '苏州桑田岛项目', + zc: 376, + project_name: '苏州桑田岛项目', + zg: 376, + cq: 0, + project_addr: '苏州桑田岛项目', + glrs: 0, + prop: 0.0, + grrs: 376, + projectId: 3, + longitude: '120.43316', }, ] - data.map(x => { + data.map((x) => { x.value = [x.longitude, x.latitude] return x }) @@ -939,61 +959,74 @@ export default { var tooltipInfo = [] for (let i = 0; i < data.length; i++) { - var tipHtml = '
\n' + + var tipHtml = + '
\n' + '
\n' + - '
\n' + - '
' + data[i].project_shorthand + '
\n' + + '
\n' + + '
' + + data[i].project_shorthand + + '
\n' + '
\n' + '
\n' + '
\n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + '
\n' + - '
设备数量:' + data[i].zg + '
\n' + + '
设备数量:' + + data[i].zg + + '
\n' + '
\n' + - '
监控数量:' + data[i].cq + '
\n' + + '
监控数量:' + + data[i].cq + + '
\n' + '
\n' + - '
在岗人数:' + data[i].glrs + '
\n' + + '
在岗人数:' + + data[i].glrs + + '
\n' + '
\n' + - '
今日出勤:' + data[i].grrs + '
\n' + + '
今日出勤:' + + data[i].grrs + + '
\n' + '
\n' + '
\n' + '
\n' + - '
' + data[i].project_addr + '
\n' + + '
' + + data[i].project_addr + + '
\n' + '
\n' + '
\n' + '
' tooltipInfo.push(tipHtml) } this.tooltipData = tooltipInfo - }, //Echart 地图 点击返回值 projectClick(id) { var list = this.projectList for (let i = 0; i < list.length; i++) { if (list[i].id == id) { - localStorage.setItem("data", JSON.stringify(list[i])) + localStorage.setItem('data', JSON.stringify(list[i])) location.href = 'projectOverviewProject.html' } } }, - towardsLeft() { if (this.index == 0) { this.$notify({ title: '提示', message: '没有更多了!', - type: 'warning' - }); + type: 'warning', + }) } else { this.index = this.index + 1 } @@ -1001,12 +1034,12 @@ export default { towardsRight() { var length = this.majorWarningData.length if (length > 3) { - if ((length - Math.abs(this.index)) == 3) { + if (length - Math.abs(this.index) == 3) { this.$notify({ title: '提示', message: '没有更多了!', - type: 'warning' - }); + type: 'warning', + }) } else { this.index = this.index - 1 } @@ -1015,7 +1048,7 @@ export default { timer() { var length = this.majorWarningData.length if (length > 3) { - if ((length - Math.abs(this.index)) == 3) { + if (length - Math.abs(this.index) == 3) { this.index = 0 } else { this.index = this.index - 1 @@ -1023,29 +1056,23 @@ export default { } }, - - - automaticRoll() { - var height = window.$(".afoot-con-for").innerHeight() + var height = window.$('.afoot-con-for').innerHeight() if (this.forIndex == this.warningData.length) { this.forIndex = 0 } else { this.forIndex = this.forIndex + 1 } - window.$("#afootOverflow").animate({ scrollTop: (height * this.forIndex) + 'px' }) + window.$('#afootOverflow').animate({ scrollTop: height * this.forIndex + 'px' }) }, listMinMouseover() { - clearInterval(this.warningInterval); + clearInterval(this.warningInterval) }, listMinMouseout() { - this.warningInterval = setInterval(this.automaticRoll, 10000); + this.warningInterval = setInterval(this.automaticRoll, 10000) }, - - }, - } @@ -1062,8 +1089,7 @@ export default { } .my-svg-icon * { - fill: #389DE3; - + fill: #389de3; } .people-number-con div.is-split { @@ -1088,4 +1114,5 @@ export default { } } } -} +} + diff --git a/yanzhu-bigscreen/src/pages-old/safe/towerCrane.vue b/yanzhu-bigscreen/src/pages-old/safe/towerCrane.vue index 46aa770e..5bd0989f 100644 --- a/yanzhu-bigscreen/src/pages-old/safe/towerCrane.vue +++ b/yanzhu-bigscreen/src/pages-old/safe/towerCrane.vue @@ -1,1038 +1,968 @@ diff --git a/yanzhu-bigscreen/src/views/index.vue b/yanzhu-bigscreen/src/views/index.vue index 5723221d..d1da035b 100644 --- a/yanzhu-bigscreen/src/views/index.vue +++ b/yanzhu-bigscreen/src/views/index.vue @@ -1,21 +1,21 @@ diff --git a/yanzhu-bigscreen/src/views/projectDetail.vue b/yanzhu-bigscreen/src/views/projectDetail.vue index a550feab..cd20210d 100644 --- a/yanzhu-bigscreen/src/views/projectDetail.vue +++ b/yanzhu-bigscreen/src/views/projectDetail.vue @@ -12,7 +12,7 @@
-
{{ deptType1.deptName }}
+
{{ deptType1.deptName }}
{{ deptType1.leader }} {{ deptType1.phone }} @@ -26,7 +26,7 @@
-
{{ deptType2.deptName }}
+
{{ deptType2.deptName }}
{{ deptType2.leader }} {{ deptType2.phone }} @@ -56,7 +56,7 @@
-
{{ deptType4.deptName }}
+
{{ deptType4.deptName }}
{{ deptType4.leader }} {{ deptType4.phone }} @@ -72,7 +72,7 @@
-
{{ deptType5.deptName }}
+
{{ deptType5.deptName }}
{{ deptType5.leader }} {{ deptType5.phone }} @@ -87,7 +87,7 @@
-
{{ deptType6.deptName }}
+
{{ deptType6.deptName }}
{{ deptType6.leader }} {{ deptType6.phone }} @@ -820,6 +820,9 @@ export default { .dept-name { color: #50a2eb; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .dept-leader-phone { @@ -904,7 +907,7 @@ export default { .prj-img-nav { position: absolute; z-index: 999; - + left: calc(50% - 100px); .prj-img-nav-item { display: inline-block; line-height: 30px; diff --git a/yanzhu-bigscreen/src/views/safety/dialog/safetyCheckDialog.vue b/yanzhu-bigscreen/src/views/safety/dialog/safetyCheckDialog.vue index afda7920..80b216a5 100644 --- a/yanzhu-bigscreen/src/views/safety/dialog/safetyCheckDialog.vue +++ b/yanzhu-bigscreen/src/views/safety/dialog/safetyCheckDialog.vue @@ -1,8 +1,6 @@ @@ -73,7 +75,7 @@ export default { data() { return { show: false, - title: "安全隐患排查", + title: '安全隐患排查', prjInfo: {}, nav: 6, problemType: null, @@ -88,39 +90,39 @@ export default { }, methods: { handleCurrentChange(n) { - this.pageNum = n; - this.loadData(); + this.pageNum = n + this.loadData() }, getDict(n) { - let tmps = this.dangerTypeDict.filter(d => d.value == n); - return tmps.length > 0 ? tmps[0].label : ''; + let tmps = this.dangerTypeDict.filter((d) => d.value == n) + return tmps.length > 0 ? tmps[0].label : '' }, doNav(n) { - this.nav = n; - this.loadData(); + this.nav = n + this.loadData() }, showDialog(prj, n, dangerTypeDict) { - this.dangerTypeDict = dangerTypeDict; - this.problemType = n == 0 ? null : n; - this.prjInfo = prj; - this.title = ["安全隐患排查", "日常巡检", "周检", "月检", "转型检查"][n]; - this.pageNum = 0; - this.show = true; - this.getCount(n); - this.loadData(); + this.dangerTypeDict = dangerTypeDict + this.problemType = n == 0 ? null : n + this.prjInfo = prj + this.title = ['安全隐患排查', '日常巡检', '周检', '月检', '专项检查'][n] + this.pageNum = 0 + this.show = true + this.getCount(n) + this.loadData() }, getCount(n) { let postData = { projectId: this.prjInfo.id, comId: this.prjInfo.comId, - infoType: 0 - }; - if (n > 0) { - postData.problemType = n; + infoType: 0, } - this.$api.safety.listCountForBG(postData).then(d => { - this.counts = d.data.filter(it => it.projectName != 'a').map(it => it.id) - }); + if (n > 0) { + postData.problemType = n + } + this.$api.safety.listCountForBG(postData).then((d) => { + this.counts = d.data.filter((it) => it.projectName != 'a').map((it) => it.id) + }) }, loadData() { let postData = { @@ -130,19 +132,18 @@ export default { pageNum: this.pageNum, pageSize: this.pageSize, problemType: this.problemType, - projectName: this.nav - }; - this.$api.safety.listForBG(postData).then(d => { - this.total = d.total; - this.rows = (d.rows || []).map(it => { - it.imgSel = 0; - return it; - }); - this.dataKey++; - }); - } - - } + projectName: this.nav, + } + this.$api.safety.listForBG(postData).then((d) => { + this.total = d.total + this.rows = (d.rows || []).map((it) => { + it.imgSel = 0 + return it + }) + this.dataKey++ + }) + }, + }, } @@ -189,16 +190,14 @@ export default { line-height: 30px; text-align: center; background: #fff; - color: #5B84EB; + color: #5b84eb; cursor: pointer; &.active { color: #fff; - background: #5B84EB; + background: #5b84eb; } } - - } .el-image { @@ -213,12 +212,11 @@ export default { line-height: 30px; .sp-label { - color: #8BFFD2; + color: #8bffd2; } } } } - } @media (min-width: 1921px) and (max-width: 2560px) { @@ -241,14 +239,11 @@ export default { max-height: calc(75vh - 180px); .data-item { - - - .right-data { font-size: 18px; .sp-label { - color: #8BFFD2; + color: #8bffd2; } } } @@ -276,14 +271,11 @@ export default { max-height: calc(75vh - 180px); .data-item { - - - .right-data { font-size: 24px; .sp-label { - color: #8BFFD2; + color: #8bffd2; } } } diff --git a/yanzhu-bigscreen/src/views/safety/safetyCheck.vue b/yanzhu-bigscreen/src/views/safety/safetyCheck.vue index 3af307b5..473359b7 100644 --- a/yanzhu-bigscreen/src/views/safety/safetyCheck.vue +++ b/yanzhu-bigscreen/src/views/safety/safetyCheck.vue @@ -1,11 +1,9 @@