提交代码

dev-login
姜玉琦 2023-08-19 13:22:07 +08:00
parent 3259d1ee67
commit ce0746302f
3 changed files with 46 additions and 22 deletions

View File

@ -1,4 +1,5 @@
import request from '@/utils/request' import request from '@/utils/request'
import { Date } from 'core-js'
const getDeptWorksList=(deptId,projectId)=> { const getDeptWorksList=(deptId,projectId)=> {
return request({ return request({
@ -7,9 +8,9 @@ const getDeptWorksList=(deptId,projectId)=> {
}) })
} }
const getWorkAttendanceList=(deptId,projectId,date)=> { const getWorkAttendanceList=(deptId,projectId)=> {
return request({ return request({
url: `bgscreen/attendance/getWorkAttendanceList?deptId=${deptId||0}&projectId=${projectId||0}&date=${date}`, url: `bgscreen/attendance/getWorkAttendanceList?deptId=${deptId||0}&projectId=${projectId||0}`,
method: 'get' method: 'get'
}) })
} }

View File

@ -741,6 +741,7 @@ export default {
}); });
this.projectBuildNode = []; this.projectBuildNode = [];
this.getProjectBuildNode(); this.getProjectBuildNode();
this.getDeptWorksList();
}); });
}, },
getProjectBuildNode() { getProjectBuildNode() {
@ -789,8 +790,8 @@ export default {
return it; return it;
}); });
});
}) this.getDeptWorksList();
}); });
}, },
init() { init() {
@ -808,6 +809,39 @@ export default {
// //
this.costInterval = setInterval(this.manufacturingCostRoll, 5000); this.costInterval = setInterval(this.manufacturingCostRoll, 5000);
}, },
//
getDeptWorksList(){
if (this.infoNav == 0) {
//
this.$api.attendance.getDeptWorksList(this.dept?.id||0,this.project?.id||0).then(d => {
this.laborPersonnelTotal=0;
this.laborPersonnelData=[];
if(d.rows.length>0 && d.rows[0]!=null){
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.$api.attendance.getWorkAttendanceList(this.dept?.id||0,this.project?.id||0).then(d => {
this.laborPersonnelTotal=0;
this.laborPersonnelData=[];
if(d.rows.length>0 && d.rows[0]!=null){
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});
}
});
}
},
// //
projectIntroduction() { projectIntroduction() {
this.popupShow = true this.popupShow = true
@ -909,22 +943,11 @@ export default {
onWarningInfoNav(n, text) { onWarningInfoNav(n, text) {
this.infoNav = n this.infoNav = n
this.staffText = text this.staffText = text
this.getDeptWorksList();
if (n == 0) { if (n == 0) {
this.surveyUrl = 'images/survey_icon_4.png' this.surveyUrl = 'images/survey_icon_4.png'
this.laborPersonnelData = [
{ text: "总包人员", value: 28 },
{ text: "监理人员", value: 3 },
{ text: "劳务人员", value: 118 },
]
this.laborPersonnelTotal = 149;
} else { } else {
this.surveyUrl = 'images/survey_icon_5.png' this.surveyUrl = 'images/survey_icon_5.png'
this.laborPersonnelTotal = 133;
this.laborPersonnelData = [
{ text: "总包人员", value: 25 },
{ text: "监理人员", value: 3 },
{ text: "劳务人员", value: 105 },
]
} }
}, },
// //

View File

@ -542,12 +542,12 @@ export default {
//| //|
this.getWorkFileList(); this.getWorkFileList();
setInterval(this.getWorkFileList, 60000); //setInterval(this.getWorkFileList, 60000);
setInterval(this.getWorkTrainList, 60000); //setInterval(this.getWorkTrainList, 60000);
setInterval(this.getEmergencyDrillList, 60000); //setInterval(this.getEmergencyDrillList, 60000);
setInterval(this.getProjectSpecialView, 60000); //setInterval(this.getProjectSpecialView, 60000);
setInterval(this.getDeptWorksList, 60000); //setInterval(this.getDeptWorksList, 60000);
setInterval(this.getProjectInsuranceList, 60000); //setInterval(this.getProjectInsuranceList, 60000);
}, },
}, },