update code
parent
3683005b57
commit
67015cb5f6
|
@ -23,6 +23,13 @@ const groupByComany=(data)=> {
|
||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const groupAllByComany=(data)=> {
|
||||||
|
return request({
|
||||||
|
url: `bgscreen/attendance/groupByComany`,
|
||||||
|
data:data,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
const todayAttendance=(data)=>{
|
const todayAttendance=(data)=>{
|
||||||
return request({
|
return request({
|
||||||
url: `bgscreen/attendance/todayAttendance`,
|
url: `bgscreen/attendance/todayAttendance`,
|
||||||
|
@ -43,5 +50,6 @@ export default{
|
||||||
getWorkAttendanceList,
|
getWorkAttendanceList,
|
||||||
groupByComany,
|
groupByComany,
|
||||||
todayAttendance,
|
todayAttendance,
|
||||||
selectList
|
selectList,
|
||||||
|
groupAllByComany
|
||||||
}
|
}
|
|
@ -535,14 +535,18 @@ export default {
|
||||||
this.$refs.jobWorkerdlg.showDialog(data);
|
this.$refs.jobWorkerdlg.showDialog(data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//查询在岗人数
|
||||||
loadAttendanceData(){
|
loadAttendanceData(){
|
||||||
let data={
|
let data={
|
||||||
subDeptId:this.deptInfo.id||0,
|
subDeptId:this.deptInfo.id||0,
|
||||||
projectId:this.prj.id||0,
|
projectId:this.prj.id||0,
|
||||||
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD")
|
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD")
|
||||||
}
|
}
|
||||||
this.$api.attendance.groupByComany(data).then(d=>{
|
let ajax=this.$api.attendance.groupByComany
|
||||||
|
if (this.infoNav == 0) {
|
||||||
|
ajax=this.$api.attendance.groupAllByComany
|
||||||
|
}
|
||||||
|
ajax(data).then(d=>{
|
||||||
let tmps=d.data||[];
|
let tmps=d.data||[];
|
||||||
const func=(ids)=>{
|
const func=(ids)=>{
|
||||||
let sum=0;
|
let sum=0;
|
||||||
|
@ -550,8 +554,7 @@ export default {
|
||||||
sum+=it*1;
|
sum+=it*1;
|
||||||
})
|
})
|
||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.laborPersonnelTotal = 0;
|
this.laborPersonnelTotal = 0;
|
||||||
this.laborPersonnelData = [{ text: "劳务人员", value: func(["2","3","4","5"]) }, { text: "监理人员", value: func(["8"]) }, { text: "总包人员", value: func(["1","6"]) }];
|
this.laborPersonnelData = [{ text: "劳务人员", value: func(["2","3","4","5"]) }, { text: "监理人员", value: func(["8"]) }, { text: "总包人员", value: func(["1","6"]) }];
|
||||||
this.laborPersonnelData.forEach(it=>{
|
this.laborPersonnelData.forEach(it=>{
|
||||||
|
@ -706,7 +709,7 @@ export default {
|
||||||
//正在发生 定时器
|
//正在发生 定时器
|
||||||
this.warningInterval = setInterval(this.automaticRoll, 5000);
|
this.warningInterval = setInterval(this.automaticRoll, 5000);
|
||||||
this.getJournalismList();
|
this.getJournalismList();
|
||||||
setInterval(this.getDeptWorksList, 600000);
|
setInterval(this.loadAttendanceData, 600000);
|
||||||
setInterval(this.getJournalismList, 600000);
|
setInterval(this.getJournalismList, 600000);
|
||||||
},
|
},
|
||||||
doPrjProcess(n, text) {
|
doPrjProcess(n, text) {
|
||||||
|
@ -728,32 +731,8 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.surveyUrl = 'images/survey_icon_5.png'
|
this.surveyUrl = 'images/survey_icon_5.png'
|
||||||
}
|
}
|
||||||
this.getDeptWorksList();
|
this.loadAttendanceData();
|
||||||
},
|
},
|
||||||
//查询在岗人数
|
|
||||||
getDeptWorksList() {
|
|
||||||
let deptId = this.deptInfo?.id || 0;
|
|
||||||
if (this.infoNav == 0) {
|
|
||||||
//查询在岗人数
|
|
||||||
this.$api.attendance.getDeptWorksList(deptId, this.prj.id).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 });
|
|
||||||
}
|
|
||||||
this.elDeptWorks++;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
//查询出勤人数
|
|
||||||
this.loadAttendanceData();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//集团新闻列表
|
//集团新闻列表
|
||||||
getJournalismList() {
|
getJournalismList() {
|
||||||
//查询出勤人数
|
//查询出勤人数
|
||||||
|
|
|
@ -771,9 +771,10 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShowAttendanceDetail() {
|
doShowAttendanceDetail() {
|
||||||
|
this.getProjectId(id => {
|
||||||
let data = {
|
let data = {
|
||||||
deptId: this.dept.id || 0,
|
deptId: this.dept.id || 0,
|
||||||
projectId: this.project.id || 0,
|
projectId: id || 0,
|
||||||
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD")
|
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD")
|
||||||
}
|
}
|
||||||
if (this.infoNav == 1) {
|
if (this.infoNav == 1) {
|
||||||
|
@ -781,6 +782,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.$refs.jobWorkerdlg.showDialog(data);
|
this.$refs.jobWorkerdlg.showDialog(data);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
initMe() {
|
initMe() {
|
||||||
this.project = this.$root.project || {};
|
this.project = this.$root.project || {};
|
||||||
|
@ -914,7 +916,7 @@ export default {
|
||||||
});
|
});
|
||||||
this.projectBuildNode = [];
|
this.projectBuildNode = [];
|
||||||
this.getProjectBuildNode();
|
this.getProjectBuildNode();
|
||||||
this.getDeptWorksList();
|
this.loadAttendanceData();
|
||||||
this.getProjectUser();
|
this.getProjectUser();
|
||||||
this.getCostOut(id);
|
this.getCostOut(id);
|
||||||
});
|
});
|
||||||
|
@ -953,7 +955,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.minWidth = n * 200 + 100;
|
this.minWidth = n * 200 + 100;
|
||||||
});
|
});
|
||||||
this.getDeptWorksList();
|
this.loadAttendanceData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
|
@ -971,6 +973,7 @@ export default {
|
||||||
//造价 定时器
|
//造价 定时器
|
||||||
this.costInterval = setInterval(this.manufacturingCostRoll, 5000);
|
this.costInterval = setInterval(this.manufacturingCostRoll, 5000);
|
||||||
},
|
},
|
||||||
|
//查询在岗人数
|
||||||
loadAttendanceData() {
|
loadAttendanceData() {
|
||||||
this.getProjectId(id => {
|
this.getProjectId(id => {
|
||||||
let data = {
|
let data = {
|
||||||
|
@ -978,7 +981,11 @@ export default {
|
||||||
projectId: id || 0,
|
projectId: id || 0,
|
||||||
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD")
|
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD")
|
||||||
}
|
}
|
||||||
this.$api.attendance.groupByComany(data).then(d => {
|
let ajax=this.$api.attendance.groupByComany;
|
||||||
|
if (this.infoNav == 0) {
|
||||||
|
ajax=this.$api.attendance.groupAllByComany;
|
||||||
|
}
|
||||||
|
ajax(data).then(d => {
|
||||||
let tmps = d.data || [];
|
let tmps = d.data || [];
|
||||||
const func = (ids) => {
|
const func = (ids) => {
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
|
@ -989,36 +996,14 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.laborPersonnelTotal = 0;
|
this.laborPersonnelTotal = 0;
|
||||||
this.laborPersonnelData = [{ text: "劳务人员", value: func(["2", "3"]) }, { text: "监理人员", value: func(["8"]) }, { text: "总包人员", value: func(["1"]) }];
|
this.laborPersonnelData = [{ text: "劳务人员", value: func(["2","3","4","5"]) }, { text: "监理人员", value: func(["8"]) }, { text: "总包人员", value: func(["1","6"]) }];
|
||||||
this.laborPersonnelData.forEach(it => {
|
this.laborPersonnelData.forEach(it => {
|
||||||
this.laborPersonnelTotal += it.value;
|
this.laborPersonnelTotal += it.value;
|
||||||
})
|
})
|
||||||
this.elDeptWorks++;
|
this.elDeptWorks++;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//查询在岗人数
|
|
||||||
getDeptWorksList() {
|
|
||||||
if (this.infoNav == 0) {
|
|
||||||
//查询在岗人数
|
|
||||||
this.$api.attendance.getDeptWorksList(this.dept?.id || 0, this.project?.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();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//项目介绍弹窗
|
//项目介绍弹窗
|
||||||
projectIntroduction() {
|
projectIntroduction() {
|
||||||
//this.popupShow = true
|
//this.popupShow = true
|
||||||
|
@ -1140,7 +1125,7 @@ export default {
|
||||||
onWarningInfoNav(n, text) {
|
onWarningInfoNav(n, text) {
|
||||||
this.infoNav = n
|
this.infoNav = n
|
||||||
this.staffText = text
|
this.staffText = text
|
||||||
this.getDeptWorksList();
|
this.loadAttendanceData();
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
this.surveyUrl = 'images/survey_icon_4.png'
|
this.surveyUrl = 'images/survey_icon_4.png'
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue