Compare commits
2 Commits
c8c287de1c
...
6807227049
Author | SHA1 | Date |
---|---|---|
|
6807227049 | |
|
ce0746302f |
|
@ -1,4 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
import { Date } from 'core-js'
|
||||
|
||||
const getDeptWorksList=(deptId,projectId)=> {
|
||||
return request({
|
||||
|
@ -7,9 +8,9 @@ const getDeptWorksList=(deptId,projectId)=> {
|
|||
})
|
||||
}
|
||||
|
||||
const getWorkAttendanceList=(deptId,projectId,date)=> {
|
||||
const getWorkAttendanceList=(deptId,projectId)=> {
|
||||
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'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -741,6 +741,7 @@ export default {
|
|||
});
|
||||
this.projectBuildNode = [];
|
||||
this.getProjectBuildNode();
|
||||
this.getDeptWorksList();
|
||||
});
|
||||
},
|
||||
getProjectBuildNode() {
|
||||
|
@ -789,8 +790,8 @@ export default {
|
|||
|
||||
return it;
|
||||
});
|
||||
|
||||
})
|
||||
});
|
||||
this.getDeptWorksList();
|
||||
});
|
||||
},
|
||||
init() {
|
||||
|
@ -808,6 +809,39 @@ export default {
|
|||
//造价 定时器
|
||||
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() {
|
||||
this.popupShow = true
|
||||
|
@ -909,22 +943,11 @@ export default {
|
|||
onWarningInfoNav(n, text) {
|
||||
this.infoNav = n
|
||||
this.staffText = text
|
||||
this.getDeptWorksList();
|
||||
if (n == 0) {
|
||||
this.surveyUrl = 'images/survey_icon_4.png'
|
||||
this.laborPersonnelData = [
|
||||
{ text: "总包人员", value: 28 },
|
||||
{ text: "监理人员", value: 3 },
|
||||
{ text: "劳务人员", value: 118 },
|
||||
]
|
||||
this.laborPersonnelTotal = 149;
|
||||
} else {
|
||||
this.surveyUrl = 'images/survey_icon_5.png'
|
||||
this.laborPersonnelTotal = 133;
|
||||
this.laborPersonnelData = [
|
||||
{ text: "总包人员", value: 25 },
|
||||
{ text: "监理人员", value: 3 },
|
||||
{ text: "劳务人员", value: 105 },
|
||||
]
|
||||
}
|
||||
},
|
||||
//设备概况点击事件定时器方法
|
||||
|
|
|
@ -542,12 +542,12 @@ export default {
|
|||
|
||||
//定时器|一分钟执行一次
|
||||
this.getWorkFileList();
|
||||
setInterval(this.getWorkFileList, 60000);
|
||||
setInterval(this.getWorkTrainList, 60000);
|
||||
setInterval(this.getEmergencyDrillList, 60000);
|
||||
setInterval(this.getProjectSpecialView, 60000);
|
||||
setInterval(this.getDeptWorksList, 60000);
|
||||
setInterval(this.getProjectInsuranceList, 60000);
|
||||
//setInterval(this.getWorkFileList, 60000);
|
||||
//setInterval(this.getWorkTrainList, 60000);
|
||||
//setInterval(this.getEmergencyDrillList, 60000);
|
||||
//setInterval(this.getProjectSpecialView, 60000);
|
||||
//setInterval(this.getDeptWorksList, 60000);
|
||||
//setInterval(this.getProjectInsuranceList, 60000);
|
||||
},
|
||||
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue