提交代码

dev-login
姜玉琦 2023-08-17 19:39:55 +08:00
parent 3f4b5c228e
commit eacaab5234
4 changed files with 97 additions and 48 deletions

View File

@ -8,6 +8,7 @@ import workTrain from './workTrain/index'
import special from './special/index'
import dict from './dict/index'
import attendance from './attendance/index'
import insurance from './insurance/index'
export default {
project,
dept,
@ -18,5 +19,6 @@ export default {
workTrain,
special,
dict,
attendance
attendance,
insurance
}

View File

@ -0,0 +1,12 @@
import request from '@/utils/request'
const getProjectInsuranceList=(deptId,projectId)=> {
return request({
url: `bgscreen/insurance/getProjectInsuranceList?deptId=${deptId}&projectId=${projectId}`,
method: 'get'
})
}
export default{
getProjectInsuranceList
}

View File

@ -536,7 +536,8 @@ export default {
//
this.majorInterval = setInterval(this.timer, 5000);
//
this.warningInterval = setInterval(this.automaticRoll, 5000);
this.warningInterval = setInterval(this.automaticRoll, 5000);
setInterval(this.getDeptWorksList, 60000);
},
doPrjProcess(n, text) {
this.prjProcessNav = n;
@ -553,24 +554,45 @@ export default {
this.staffText = n==0?'在岗人数':'今日出勤'
if (n == 0) {
this.surveyUrl = 'images/survey_icon_4.png'
this.laborPersonnelData = [
{ text: "总包人员", value: this.prjInfo?.servicePersonnel||0 },
{ text: "监理人员", value: this.prjInfo?.supervisorPersonnel||0 },
{ text: "劳务人员", value: this.prjInfo?.generalContractor||0 },
]
let sum=0;
this.laborPersonnelData.forEach(it=>{
sum+=it.value;
})
this.laborPersonnelTotal = sum;
} else {
this.surveyUrl = 'images/survey_icon_5.png'
this.laborPersonnelTotal = 133;
this.laborPersonnelData = [
{ text: "总包人员", value: 25 },
{ text: "监理人员", value: 3 },
{ text: "劳务人员", value: 105 },
]
}
this.getDeptWorksList();
},
//
getDeptWorksList(){
let deptId = '';
// if (this.dept && this.dept.id != 0) {
// deptId = this.dept.id;
// }
if (this.infoNav == 0) {
//
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});
}
});
} else {
//
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});
}
});
}
},
//

View File

@ -207,13 +207,13 @@
</module-one-1-1>
<module-one-1-1 label="保险采购明细">
<div class="quality-table special-table">
<el-table :data="insuranceData" style="width: 100%;background: transparent;" height="265"
<el-table :data="insuranceDataList" style="width: 100%;background: transparent;" height="265"
ref="fbsubordinateUnit">
<el-table-column prop="name" label="项目名称"> </el-table-column>
<el-table-column prop="cnt" label="安责险" class-name="td-left">
<el-table-column prop="projectName" label="项目名称" align="left" min-width="180"> </el-table-column>
<el-table-column prop="azxstate" label="安责险" class-name="td-center" align="center">
<template slot-scope="scope">
<svg v-if="scope.row.dt1" style="width: 1em;height: 1em;position: relative;
<svg v-if="scope.row.azxstate==''" style="width: 1em;height: 1em;position: relative;
top: -2px;vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="3100">
@ -229,12 +229,12 @@
d="M512 981.333333C252.8 981.333333 42.666667 771.2 42.666667 512S252.8 42.666667 512 42.666667s469.333333 210.133333 469.333333 469.333333-210.133333 469.333333-469.333333 469.333333z m44.245333-469.333333l159.914667-159.914667a31.274667 31.274667 0 1 0-44.245333-44.245333L512 467.754667 352.085333 307.84a31.274667 31.274667 0 1 0-44.245333 44.245333L467.754667 512l-159.914667 159.914667a31.274667 31.274667 0 1 0 44.245333 44.245333L512 556.245333l159.914667 159.914667a31.274667 31.274667 0 1 0 44.245333-44.245333L556.245333 512z"
fill="#F5222D" p-id="3473"></path>
</svg>
<span style="color:#fff">{{ scope.row.dt1 }}</span>
<span style="color:#fff">{{ scope.row.azxstate }}</span>
</template>
</el-table-column>
<el-table-column prop="cnt3" class-name="td-left" label="一切险">
<el-table-column prop="yqxstate" class-name="td-center" label="一切险" align="center">
<template slot-scope="scope">
<svg v-if="scope.row.dt2" style="width: 1em;height: 1em;position: relative;
<svg v-if="scope.row.yqxstate==''" style="width: 1em;height: 1em;position: relative;
top: -2px;vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="3100">
@ -250,7 +250,7 @@
d="M512 981.333333C252.8 981.333333 42.666667 771.2 42.666667 512S252.8 42.666667 512 42.666667s469.333333 210.133333 469.333333 469.333333-210.133333 469.333333-469.333333 469.333333z m44.245333-469.333333l159.914667-159.914667a31.274667 31.274667 0 1 0-44.245333-44.245333L512 467.754667 352.085333 307.84a31.274667 31.274667 0 1 0-44.245333 44.245333L467.754667 512l-159.914667 159.914667a31.274667 31.274667 0 1 0 44.245333 44.245333L512 556.245333l159.914667 159.914667a31.274667 31.274667 0 1 0 44.245333-44.245333L556.245333 512z"
fill="#F5222D" p-id="3473"></path>
</svg>
<span style="color:#fff">{{ scope.row.dt2 }}</span>
<span style="color:#fff">{{ scope.row.yqxstate }}</span>
</template>
</el-table-column>
</el-table>
@ -323,7 +323,7 @@ export default {
//
specialDataList:[],
//
insuranceData: [
insuranceDataList: [
{ name: '荟锦坊一期', dt1: '已购买', dt2: '正在办理' },
{ name: '泾河智谷一期', dt1: '正在办理', dt2: '正在办理' },
{ name: '泊域人才中心', dt1: '正在办理', dt2: '正在办理' },
@ -337,11 +337,6 @@ export default {
},
created() {
this.init();
this.getWorkFileList();
this.getWorkTrainList();
this.getEmergencyDrillList();
this.getProjectSpecialView();
this.getDeptWorksList();
},
mounted() {
this.$bus.$on("deptChange", dept => {
@ -350,11 +345,8 @@ export default {
this.getWorkTrainList();
this.getEmergencyDrillList();
this.getProjectSpecialView();
if (this.infoNav == 0) {
this.getDeptWorksList();
} else {
this.getWorkAttendanceList();
}
this.getDeptWorksList();
this.getProjectInsuranceList();
});
},
methods: {
@ -423,7 +415,9 @@ export default {
if (this.dept && this.dept.id != 0) {
deptId = this.dept.id;
}
this.$api.attendance.getDeptWorksList(deptId).then(d => {
if (this.infoNav == 0) {
//
this.$api.attendance.getDeptWorksList(deptId).then(d => {
this.laborPersonnelTotal=0;
this.laborPersonnelData=[];
if(d.rows.length>0 && d.rows[0]!=null){
@ -435,14 +429,9 @@ export default {
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 => {
} else {
//
this.$api.attendance.getWorkAttendanceList(deptId).then(d => {
this.laborPersonnelTotal=0;
this.laborPersonnelData=[];
if(d.rows.length>0 && d.rows[0]!=null){
@ -454,6 +443,19 @@ export default {
this.laborPersonnelData.push({text: "总包人员", value: d.rows[0].contractorPersonnel});
}
});
}
},
getProjectInsuranceList(){
let deptId = '';
if (this.dept && this.dept.id != 0) {
deptId = this.dept.id;
}
this.$api.insurance.getProjectInsuranceList(deptId).then(d => {
this.insuranceDataList=[];
if(d.rows.length>0 && d.rows[0]!=null){
this.insuranceDataList = d.rows;
}
});
},
fmt(n) {
n = "" + n;
@ -526,11 +528,10 @@ export default {
this.staffText = text
if (n == 0) {
this.surveyUrl = 'images/survey_icon_4.png'
this.getDeptWorksList();
} else {
this.surveyUrl = 'images/survey_icon_5.png'
this.getWorkAttendanceList();
}
this.getDeptWorksList();
},
doSafeNav(n, t) {
this.safeNav = n;
@ -548,6 +549,14 @@ export default {
this.warningInterval = setInterval(this.automaticRoll, 5000);
//
this.warningTypeInterval = setInterval(this.automaticRollType, 5000);
//|
setInterval(this.getWorkFileList, 60000);
setInterval(this.getWorkTrainList, 60000);
setInterval(this.getEmergencyDrillList, 60000);
setInterval(this.getProjectSpecialView, 60000);
setInterval(this.getDeptWorksList, 60000);
setInterval(this.getProjectInsuranceList, 60000);
},
},
@ -694,6 +703,10 @@ export default {
text-align: left !important;
}
td.td-center {
text-align: center !important;
}
.file-list {
max-height: calc(100% - 90px);
margin-right: 12px;