劳务人员相关
parent
b141ed6723
commit
3f4b5c228e
|
@ -0,0 +1,20 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
const getDeptWorksList=(deptId,projectId)=> {
|
||||||
|
return request({
|
||||||
|
url: `bgscreen/attendance/getDeptWorksList?deptId=${deptId}&projectId=${projectId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getWorkAttendanceList=(deptId,projectId,date)=> {
|
||||||
|
return request({
|
||||||
|
url: `bgscreen/attendance/getWorkAttendanceList?deptId=${deptId}&projectId=${projectId}&date=${date}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default{
|
||||||
|
getDeptWorksList,
|
||||||
|
getWorkAttendanceList
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ import workFile from './workFile/index'
|
||||||
import workTrain from './workTrain/index'
|
import workTrain from './workTrain/index'
|
||||||
import special from './special/index'
|
import special from './special/index'
|
||||||
import dict from './dict/index'
|
import dict from './dict/index'
|
||||||
|
import attendance from './attendance/index'
|
||||||
export default {
|
export default {
|
||||||
project,
|
project,
|
||||||
dept,
|
dept,
|
||||||
|
@ -16,5 +17,6 @@ export default {
|
||||||
workFile,
|
workFile,
|
||||||
workTrain,
|
workTrain,
|
||||||
special,
|
special,
|
||||||
dict
|
dict,
|
||||||
|
attendance
|
||||||
}
|
}
|
|
@ -318,7 +318,7 @@ export default {
|
||||||
laborPersonnelData: [
|
laborPersonnelData: [
|
||||||
{ text: "总包人员", value: 10 },
|
{ text: "总包人员", value: 10 },
|
||||||
{ text: "监理人员", value: 70 },
|
{ text: "监理人员", value: 70 },
|
||||||
{ text: "劳务人员", value: 20 },
|
{ text: "劳务人员", value: 220 },
|
||||||
],
|
],
|
||||||
//特种作业人员
|
//特种作业人员
|
||||||
specialDataList:[],
|
specialDataList:[],
|
||||||
|
@ -341,6 +341,7 @@ export default {
|
||||||
this.getWorkTrainList();
|
this.getWorkTrainList();
|
||||||
this.getEmergencyDrillList();
|
this.getEmergencyDrillList();
|
||||||
this.getProjectSpecialView();
|
this.getProjectSpecialView();
|
||||||
|
this.getDeptWorksList();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$bus.$on("deptChange", dept => {
|
this.$bus.$on("deptChange", dept => {
|
||||||
|
@ -349,6 +350,11 @@ export default {
|
||||||
this.getWorkTrainList();
|
this.getWorkTrainList();
|
||||||
this.getEmergencyDrillList();
|
this.getEmergencyDrillList();
|
||||||
this.getProjectSpecialView();
|
this.getProjectSpecialView();
|
||||||
|
if (this.infoNav == 0) {
|
||||||
|
this.getDeptWorksList();
|
||||||
|
} else {
|
||||||
|
this.getWorkAttendanceList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -411,6 +417,44 @@ export default {
|
||||||
this.specialDataList = d.rows;
|
this.specialDataList = d.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//查询在岗人数
|
||||||
|
getDeptWorksList(){
|
||||||
|
let deptId = '';
|
||||||
|
if (this.dept && this.dept.id != 0) {
|
||||||
|
deptId = this.dept.id;
|
||||||
|
}
|
||||||
|
this.$api.attendance.getDeptWorksList(deptId).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});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//查询出勤人数
|
||||||
|
getWorkAttendanceList(){
|
||||||
|
let deptId = '';
|
||||||
|
if (this.dept && this.dept.id != 0) {
|
||||||
|
deptId = this.dept.id;
|
||||||
|
}
|
||||||
|
this.$api.attendance.getWorkAttendanceList(deptId).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});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
fmt(n) {
|
fmt(n) {
|
||||||
n = "" + n;
|
n = "" + n;
|
||||||
return " ".substring(0, 3 - n.length) + n;
|
return " ".substring(0, 3 - n.length) + n;
|
||||||
|
@ -482,20 +526,10 @@ export default {
|
||||||
this.staffText = text
|
this.staffText = text
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
this.surveyUrl = 'images/survey_icon_4.png'
|
this.surveyUrl = 'images/survey_icon_4.png'
|
||||||
this.laborPersonnelData = [
|
this.getDeptWorksList();
|
||||||
{ text: "总包人员", value: 118 },
|
|
||||||
{ text: "监理人员", value: 3 },
|
|
||||||
{ text: "劳务人员", value: 28 },
|
|
||||||
]
|
|
||||||
this.laborPersonnelTotal = 149;
|
|
||||||
} else {
|
} else {
|
||||||
this.surveyUrl = 'images/survey_icon_5.png'
|
this.surveyUrl = 'images/survey_icon_5.png'
|
||||||
this.laborPersonnelTotal = 133;
|
this.getWorkAttendanceList();
|
||||||
this.laborPersonnelData = [
|
|
||||||
{ text: "总包人员", value: 105 },
|
|
||||||
{ text: "监理人员", value: 3 },
|
|
||||||
{ text: "劳务人员", value: 25 },
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doSafeNav(n, t) {
|
doSafeNav(n, t) {
|
||||||
|
|
Loading…
Reference in New Issue