提交代码

dev-login
姜玉琦 2023-08-18 00:53:46 +08:00
parent a90f6846d5
commit 1828dd253b
4 changed files with 20 additions and 39 deletions

View File

@ -2,14 +2,14 @@ import request from '@/utils/request'
const getDeptWorksList=(deptId,projectId)=> { const getDeptWorksList=(deptId,projectId)=> {
return request({ return request({
url: `bgscreen/attendance/getDeptWorksList?deptId=${deptId}&projectId=${projectId}`, url: `bgscreen/attendance/getDeptWorksList?deptId=${deptId||0}&projectId=${projectId||0}`,
method: 'get' method: 'get'
}) })
} }
const getWorkAttendanceList=(deptId,projectId,date)=> { const getWorkAttendanceList=(deptId,projectId,date)=> {
return request({ return request({
url: `bgscreen/attendance/getWorkAttendanceList?deptId=${deptId}&projectId=${projectId}&date=${date}`, url: `bgscreen/attendance/getWorkAttendanceList?deptId=${deptId||0}&projectId=${projectId||0}&date=${date}`,
method: 'get' method: 'get'
}) })
} }

View File

@ -2,14 +2,14 @@ import request from '@/utils/request'
const getProjectSpecialView=(deptId,projectId)=> { const getProjectSpecialView=(deptId,projectId)=> {
return request({ return request({
url: `bgscreen/projectspecial/getProjectSpecialView?deptId=${deptId}&projectId=${projectId}`, url: `bgscreen/projectspecial/getProjectSpecialView?deptId=${deptId||0}&projectId=${projectId||0}`,
method: 'get' method: 'get'
}) })
} }
const getProjectSpecialList=(projectId)=> { const getProjectSpecialList=(projectId)=> {
return request({ return request({
url: `bgscreen/projectspecial/getProjectSpecialList?projectId=${projectId}`, url: `bgscreen/projectspecial/getProjectSpecialList?projectId=${projectId||0}`,
method: 'get' method: 'get'
}) })
} }

View File

@ -1,8 +1,8 @@
import request from '@/utils/request' import request from '@/utils/request'
const getWorkTrainList=(trainType,deptId)=> { const getWorkTrainList=(trainType,deptId,projectId)=> {
return request({ return request({
url: `bgscreen/workTrain/getWorkTrainList?trainType=${trainType}&deptId=${deptId}`, url: `bgscreen/workTrain/getWorkTrainList?trainType=${trainType}&deptId=${deptId||0}&projectId=${projectId||0}`,
method: 'get' method: 'get'
}) })
} }

View File

@ -142,7 +142,7 @@
ref="fbsubordinateUnit" @row-click="doSpecialRowClick"> ref="fbsubordinateUnit" @row-click="doSpecialRowClick">
<el-table-column prop="projectName" label="项目名称" min-width="180"></el-table-column> <el-table-column prop="projectName" label="项目名称" min-width="180"></el-table-column>
<el-table-column prop="total" label="操作证数"> </el-table-column> <el-table-column prop="total" label="操作证数"> </el-table-column>
<el-table-column prop="expired" label="即将过期"> </el-table-column> <!-- <el-table-column prop="expired" label="即将过期"> </el-table-column> -->
<el-table-column prop="void" label="已过期"> <el-table-column prop="void" label="已过期">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="color:#01A9FF">{{ scope.row.void }}</span> <span style="color:#01A9FF">{{ scope.row.void }}</span>
@ -207,7 +207,7 @@
</module-one-1-1> </module-one-1-1>
<module-one-1-1 label="保险采购明细"> <module-one-1-1 label="保险采购明细">
<div class="quality-table special-table"> <div class="quality-table special-table">
<el-table :data="insuranceDataList" style="width: 100%;background: transparent;" height="265" <el-table :data="insuranceDataList" class="my-table" style="width: 100%;background: transparent;" height="265"
ref="fbsubordinateUnit"> ref="fbsubordinateUnit">
<el-table-column prop="projectName" label="项目名称" align="left" min-width="180"> </el-table-column> <el-table-column prop="projectName" label="项目名称" align="left" min-width="180"> </el-table-column>
@ -342,11 +342,11 @@ export default {
this.$bus.$on("projectChange", res => { this.$bus.$on("projectChange", res => {
this.projectInfo=res; this.projectInfo=res;
this.doDeptChane(); this.doDeptChane();
//this.getWorkTrainList(); this.getWorkTrainList();
//this.getEmergencyDrillList(); this.getEmergencyDrillList();
//this.getProjectSpecialView(); this.getProjectSpecialView();
//this.getDeptWorksList(); this.getDeptWorksList();
//this.getProjectInsuranceList(); this.getProjectInsuranceList();
}); });
this.$bus.$on("deptChange", dept => { this.$bus.$on("deptChange", dept => {
this.dept = dept; this.dept = dept;
@ -391,43 +391,27 @@ export default {
}, },
// //
getWorkTrainList() { getWorkTrainList() {
let deptId = ''; this.$api.workTrain.getWorkTrainList(0, this.dept?.id||0,this.projectInfo?.id||0).then(d => {
if (this.dept && this.dept.id != 0) {
deptId = this.dept.id;
}
this.$api.workTrain.getWorkTrainList(0, deptId).then(d => {
this.workTrainList = d.rows; this.workTrainList = d.rows;
}); });
}, },
// //
getEmergencyDrillList() { getEmergencyDrillList() {
let deptId = ''; this.$api.workTrain.getWorkTrainList(1, this.dept?.id||0,this.projectInfo?.id||0).then(d => {
if (this.dept && this.dept.id != 0) {
deptId = this.dept.id;
}
this.$api.workTrain.getWorkTrainList(1, deptId).then(d => {
this.emergencyDrillList = d.rows; this.emergencyDrillList = d.rows;
}); });
}, },
// //
getProjectSpecialView(){ getProjectSpecialView(){
let deptId = ''; this.$api.special.getProjectSpecialView(this.dept?.id||0,this.projectInfo?.id||0).then(d => {
if (this.dept && this.dept.id != 0) {
deptId = this.dept.id;
}
this.$api.special.getProjectSpecialView(deptId).then(d => {
this.specialDataList = d.rows; this.specialDataList = d.rows;
}); });
}, },
// //
getDeptWorksList(){ getDeptWorksList(){
let deptId = '';
if (this.dept && this.dept.id != 0) {
deptId = this.dept.id;
}
if (this.infoNav == 0) { if (this.infoNav == 0) {
// //
this.$api.attendance.getDeptWorksList(deptId).then(d => { this.$api.attendance.getDeptWorksList(this.dept?.id||0,this.projectInfo?.id||0).then(d => {
this.laborPersonnelTotal=0; this.laborPersonnelTotal=0;
this.laborPersonnelData=[]; this.laborPersonnelData=[];
if(d.rows.length>0 && d.rows[0]!=null){ if(d.rows.length>0 && d.rows[0]!=null){
@ -441,7 +425,7 @@ export default {
}); });
} else { } else {
// //
this.$api.attendance.getWorkAttendanceList(deptId).then(d => { this.$api.attendance.getWorkAttendanceList(this.dept?.id||0,this.projectInfo?.id||0).then(d => {
this.laborPersonnelTotal=0; this.laborPersonnelTotal=0;
this.laborPersonnelData=[]; this.laborPersonnelData=[];
if(d.rows.length>0 && d.rows[0]!=null){ if(d.rows.length>0 && d.rows[0]!=null){
@ -456,11 +440,7 @@ export default {
} }
}, },
getProjectInsuranceList(){ getProjectInsuranceList(){
let deptId = ''; this.$api.insurance.getProjectInsuranceList(this.dept?.id||0,this.projectInfo?.id||0).then(d => {
if (this.dept && this.dept.id != 0) {
deptId = this.dept.id;
}
this.$api.insurance.getProjectInsuranceList(deptId).then(d => {
this.insuranceDataList=[]; this.insuranceDataList=[];
if(d.rows.length>0 && d.rows[0]!=null){ if(d.rows.length>0 && d.rows[0]!=null){
this.insuranceDataList = d.rows; this.insuranceDataList = d.rows;
@ -561,6 +541,7 @@ export default {
this.warningTypeInterval = setInterval(this.automaticRollType, 5000); this.warningTypeInterval = setInterval(this.automaticRollType, 5000);
//| //|
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);