diff --git a/src/api/flow/index.js b/src/api/flow/index.js index 4816cdd..77a71dd 100644 --- a/src/api/flow/index.js +++ b/src/api/flow/index.js @@ -59,6 +59,21 @@ const listByState=(projectId,deptId,state,pageNum,pageSize)=>{ }) } +const findSafetyWorkList=(deptId,projectId,flowType)=> { + return request({ + url: `bgscreen/flow/findSafetyWorkList?projectId=${projectId}&deptId=${deptId}&flowType=${flowType}`, + method: 'get' + }) +} + +const findFormDatasByProcInsId=(procInsId)=> { + return request({ + url: `bgscreen/flow/findFormDatasByProcInsId/${procInsId}`, + method: 'get' + }) +} + + export default{ groupByCategory, groupByUnit, @@ -66,5 +81,7 @@ export default{ groupByUnitTotal, listByUnit, listByState, - groupByProject + groupByProject, + findSafetyWorkList, + findFormDatasByProcInsId } diff --git a/src/pages/projectSafety.vue b/src/pages/projectSafety.vue index 99786c0..db9e72e 100644 --- a/src/pages/projectSafety.vue +++ b/src/pages/projectSafety.vue @@ -187,30 +187,41 @@ - -
-
在岗人数
-
今日出勤
+ +
+
受限空间
+
动火作业
+
临时用电
+
高处作业
+
吊装作业
+
破土作业
+
断路作业
+
+
+ + + + + + + + + + + + +
+
+ +
暂无数据
- - - -
-
- -
-
-
-
{{ laborPersonnelTotal }}
-

{{ staffText }}

-
-
- - - -
@@ -323,7 +334,7 @@ export default { fileTitle: "传达文件(0)", // 传达文件列表 fileList: [], - infoNav: 0, + infoNav: 'sxkj', staffText: '在岗人员', surveyUrl: 'images/survey_icon_4.png', laborPersonnelTotal: 100, @@ -332,6 +343,7 @@ export default { { text: "监理人员", value: 70 }, { text: "劳务人员", value: 220 }, ], + safetyWorkFlowList:[], //特种作业人员 specialDataList:[], //保险采购明细 @@ -384,7 +396,7 @@ export default { this.getWorkTrainList(); this.getEmergencyDrillList(); this.getProjectSpecialView(); - this.getDeptWorksList(); + this.getDeptSafetyWorksList(); this.getProjectInsuranceList(); })); this.$bus.$on("loadProjects", debounce(prjs => { @@ -396,7 +408,7 @@ export default { this.getWorkTrainList(); this.getEmergencyDrillList(); this.getProjectSpecialView(); - this.getDeptWorksList(); + this.getDeptSafetyWorksList(); this.getProjectInsuranceList(); if(this.fileNav==3){ this.getWorkFileList(); @@ -428,7 +440,7 @@ export default { this.getWorkTrainList(); this.getEmergencyDrillList(); this.getProjectSpecialView(); - this.getDeptWorksList(); + this.getDeptSafetyWorksList(); this.getProjectInsuranceList(); if(this.fileNav==3){ this.getWorkFileList(); @@ -484,26 +496,12 @@ export default { this.specialDataList = d.rows; }); }, - //查询在岗人数 - getDeptWorksList(){ - if (this.infoNav == 0) { - //查询在岗人数 - this.$api.attendance.getDeptWorksList(this.dept?.id||0,this.projectInfo?.id||0).then(d => { - this.laborPersonnelTotal=0; - this.laborPersonnelData=[{text: "劳务人员", value: 0},{text: "监理人员", value: 0},{text: "总包人员", value: 0}]; - if(d.rows.length>0 && d.rows[0]!=null){ - this.laborPersonnelData=[]; - this.laborPersonnelTotal += d.rows[0].servicePersonnel; - this.laborPersonnelData.push({text: "劳务人员", value: d.rows[0].servicePersonnel}); - this.laborPersonnelTotal += d.rows[0].supervisorPersonnel; - this.laborPersonnelData.push({text: "监理人员", value: d.rows[0].supervisorPersonnel}); - this.laborPersonnelTotal += d.rows[0].contractorPersonnel; - this.laborPersonnelData.push({text: "总包人员", value: d.rows[0].contractorPersonnel}); - } - }); - } else { - this.loadAttendanceData(); - } + //查询安全作业概况 + getDeptSafetyWorksList(){ + //查询安全作业 + this.$api.flow.findSafetyWorkList(this.dept?.id||0,this.projectInfo?.id||0,this.infoNav).then(d => { + this.safetyWorkFlowList = d.data||[]; + }); }, getProjectId(cb) { let func = () => { @@ -635,11 +633,22 @@ export default { window.open('/jhapi' + it.filePath); } }, - //劳务人员概况 + downloadFlowFile(it) { + // 查询工作流附件 + this.$api.flow.findFormDatasByProcInsId(it.procInsId).then(d => { + if(d.data && d.data.files){ + //多个文件批量下载 + d.data.files.split(",").forEach(item => { + this.$api.downFile("/jhapi" + item, {}, item.substring(item.lastIndexOf("/")+1)); + }); + } + }) + }, + //安全作业概况 onWarningInfoNav(n, text) { this.infoNav = n this.staffText = text - if (n == 0) { + if (n == 'sxkj') { this.surveyUrl = 'images/survey_icon_4.png' } else { this.surveyUrl = 'images/survey_icon_5.png' @@ -669,7 +678,7 @@ export default { //setInterval(this.getWorkTrainList, 60000); //setInterval(this.getEmergencyDrillList, 60000); //setInterval(this.getProjectSpecialView, 60000); - //setInterval(this.getDeptWorksList, 60000); + //setInterval(this.getDeptSafetyWorksList, 60000); //setInterval(this.getProjectInsuranceList, 60000); }, @@ -680,6 +689,14 @@ export default {