update code

dev-login
haha 2023-08-17 22:47:44 +08:00
parent 3e5ffbacf8
commit a90f6846d5
8 changed files with 1175 additions and 880 deletions

View File

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

View File

@ -3,34 +3,34 @@ import request from '@/utils/request'
//质量整改-安全分类汇总(按分类) //质量整改-安全分类汇总(按分类)
const safetySummary=(deptId,roleType)=>{ const safetySummary=(deptId,roleType,projectId)=>{
return request({ return request({
url: `bgscreen/problemmodify/safetySummary?deptId=${deptId}&roleType=${roleType}`, url: `bgscreen/problemmodify/safetySummary?deptId=${deptId}&roleType=${roleType}&projectId=${projectId||0}`,
method: 'get' method: 'get'
}) })
} }
//质量整改-质量分类汇总(按分类) //质量整改-质量分类汇总(按分类)
const qualitySummary=(deptId,roleType)=>{ const qualitySummary=(deptId,roleType,projectId)=>{
return request({ return request({
url: `bgscreen/problemmodify/qualitySummary?deptId=${deptId}&roleType=${roleType}`, url: `bgscreen/problemmodify/qualitySummary?deptId=${deptId}&roleType=${roleType}&projectId=${projectId||0}`,
method: 'get' method: 'get'
}) })
} }
//质量整改-安全分类汇总(按项目) //质量整改-安全分类汇总(按项目)
const safetySummaryByProject=(deptId,roleType)=>{ const safetySummaryByProject=(deptId,roleType,projectId)=>{
return request({ return request({
url: `bgscreen/problemmodify/safetySummaryByProject?deptId=${deptId}&roleType=${roleType}`, url: `bgscreen/problemmodify/safetySummaryByProject?deptId=${deptId}&roleType=${roleType}&projectId=${projectId||0}`,
method: 'get' method: 'get'
}) })
} }
//质量整改-安全分类汇总(按项目) //质量整改-安全分类汇总(按项目)
const qualitySummaryByProject=(deptId,roleType)=>{ const qualitySummaryByProject=(deptId,roleType,projectId)=>{
return request({ return request({
url: `bgscreen/problemmodify/qualitySummaryByProject?deptId=${deptId}&roleType=${roleType}`, url: `bgscreen/problemmodify/qualitySummaryByProject?deptId=${deptId}&roleType=${roleType}&projectId=${projectId||0}`,
method: 'get' method: 'get'
}) })
} }

View File

@ -179,10 +179,11 @@ Vue.component("screen-header", {
}, },
loadProject(init){ loadProject(init){
this.$api.project.findProjectByDept( this.localStorage1.id).then(d=>{ this.$api.project.findProjectByDept( this.localStorage1.id).then(d=>{
this.data=(d?.data||[]).map(it=>{ let objs=(d?.data||[]).map(it=>{
it.text=it.projectName; it.text=it.projectName;
return it; return it;
}).filter(it=>+it.progressVisible==0); }).filter(it=>+it.progressVisible==0);
this.data=[{id:0,text:'所有项目'},...objs];
this.$bus.$emit("loadProjects",this.data); this.$bus.$emit("loadProjects",this.data);
if(this.data.length>0){ if(this.data.length>0){
this.setScreenLiSel2(this.data[0],init); this.setScreenLiSel2(this.data[0],init);

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="modify-project-amount problem-progress" style="margin-top:20px;"> <div class="modify-project-amount problem-progress" style="margin-top:20px;">
<div class="modify-btn btn-left" @click="modifyLeftBtn"> <div class="modify-btn btn-left" @click="modifyLeftBtn" v-if="!isOnly">
<svg class="my-svg-icon-aaa" <svg class="my-svg-icon-aaa"
style="cursor:pointer; width: 3em;vertical-align: middle;fill: currentColor;overflow: hidden;" style="cursor:pointer; width: 3em;vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4967"> viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4967">
@ -9,7 +9,7 @@
p-id="4968"></path> p-id="4968"></path>
</svg> </svg>
</div> </div>
<div class="modify-btn btn-right" @click="modifyRightBtn"> <div class="modify-btn btn-right" @click="modifyRightBtn" v-if="!isOnly">
<svg class="my-svg-icon-aaa" <svg class="my-svg-icon-aaa"
style="cursor:pointer; width: 3em;vertical-align: middle;fill: currentColor;overflow: hidden;" style="cursor:pointer; width: 3em;vertical-align: middle;fill: currentColor;overflow: hidden;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4997"> viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4997">
@ -55,6 +55,7 @@ export default {
}, },
data() { data() {
return { return {
isOnly:false,
info: {}, info: {},
prj: {}, prj: {},
prjs: [], prjs: [],
@ -71,6 +72,14 @@ export default {
prjInfo: { prjInfo: {
handler(v) { handler(v) {
this.prj = v || {}; this.prj = v || {};
if(this.prj.id>0){
this.isOnly=true;
}else{
this.isOnly=false;
if(this.prjs.length>0){
this.setScreenLiSel2(this.prjs[0]);
}
}
}, },
immediate: true, immediate: true,
deep: true deep: true
@ -78,7 +87,12 @@ export default {
}, },
mounted() { mounted() {
this.$bus.$on("loadProjects", prjs => { this.$bus.$on("loadProjects", prjs => {
this.prjs = prjs; this.prjs = prjs.filter(d=>d.id>0);
if(this.prj.id==0){
if(this.prjs.length>0){
this.setScreenLiSel2(this.prjs[0]);
}
}
}) })
this.info = this.scheduleInfo || {}; this.info = this.scheduleInfo || {};
this.prj = this.prjInfo || {}; this.prj = this.prjInfo || {};

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,7 @@
<module-one-1-2 label="项目季度考核目标"> <module-one-1-2 label="项目季度考核目标">
<img src="images/icon2001.png" style="position: absolute;cursor: pointer;right: 12px;top: 12px;" @click="doShowDlg1"> <img src="images/icon2001.png" style="position: absolute;cursor: pointer;right: 12px;top: 12px;" @click="doShowDlg1">
<div class="quality-table special-table"> <div class="quality-table special-table">
<el-table :data="assessData" style="width: 100%;background: transparent;" <el-table :data="getAssessData()" style="width: 100%;background: transparent;"
height="265" height="265"
ref="fbsubordinateUnit" > ref="fbsubordinateUnit" >
@ -323,9 +323,8 @@ export default {
selectData:[ selectData:[
{text:'泾河新城荟锦坊二期',id:1}, {text:'泾河新城荟锦坊二期',id:1},
], ],
prjInfos:[ dept:null,
prjInfos:[],
],
prjInfo:{}, prjInfo:{},
scheduleInfo:null, scheduleInfo:null,
projects:[], projects:[],
@ -336,6 +335,7 @@ export default {
this.init() this.init()
}, },
mounted() { mounted() {
window.app=this;
this.$bus.$on("projectChange",res=>{ this.$bus.$on("projectChange",res=>{
this.loadProjectConstructionProgress(); this.loadProjectConstructionProgress();
}); });
@ -343,7 +343,20 @@ export default {
this.projects=prjs; this.projects=prjs;
}) })
this.$bus.$on("deptChange",dept=>{ this.$bus.$on("deptChange",dept=>{
this.$api.quarterlyAssess.currentListByDept(dept.id).then(d=>{ this.dept=dept;
this.deptChange();
})
},
methods: {
getAssessData(){
if(this.prjInfo.id==0){
return this.assessData;
}else{
return this.assessData.filter(d=>d.projectId==this.prjInfo.id);
}
},
deptChange(){
this.$api.quarterlyAssess.currentListByDept(this.dept.id).then(d=>{
this.assessData=(d.rows||[]).map(it=>{ this.assessData=(d.rows||[]).map(it=>{
it.prj=it.project?.projectName||''; it.prj=it.project?.projectName||'';
it.deptName=it.project?.paretProjectName||''; it.deptName=it.project?.paretProjectName||'';
@ -372,17 +385,32 @@ export default {
return it; return it;
}) })
}) })
}) },
}, getProjectId(cb){
methods: { let func=()=>{
let prjId=this.prjInfo.id;
if(prjId==0){
if(this.projects.length==0){
setTimeout(func,100);
}else{
cb && cb(this.projects[1].id);
}
}else{
cb && cb(prjId);
}
}
func();
},
loadProjectConstructionProgress(){ loadProjectConstructionProgress(){
this.prjInfo= JSON.parse(localStorage.getItem("data2")); this.prjInfo= JSON.parse(localStorage.getItem("data2"));
this.$api.schedule.projectConstructionProgress(this.prjInfo.id).then(d=>{ this.getProjectId(prjId=>{
let obj=d?.data||{}; this.$api.schedule.projectConstructionProgress(prjId).then(d=>{
if(obj.image){ let obj=d?.data||{};
obj.images=obj.image.split(",").filter(d=>d); if(obj.image){
} obj.images=obj.image.split(",").filter(d=>d);
this.scheduleInfo=obj; }
this.scheduleInfo=obj;
})
}) })
}, },
doShowDlg1(){ doShowDlg1(){

View File

@ -211,6 +211,7 @@ export default {
return { return {
elKey:0, elKey:0,
dept:null, dept:null,
projectInfo:null,
safeNav:0, safeNav:0,
safeText:'汇总总数', safeText:'汇总总数',
rowStyle:{ rowStyle:{
@ -253,6 +254,10 @@ export default {
this.init() this.init()
}, },
mounted() { mounted() {
this.$bus.$on("projectChange", res => {
this.projectInfo=res;
this.doDeptChane();
});
this.$bus.$on("deptChange",dept=>{ this.$bus.$on("deptChange",dept=>{
this.dept=dept; this.dept=dept;
this.doDeptChane(); this.doDeptChane();
@ -267,7 +272,7 @@ export default {
return " ".substring(0,3-n.length)+n; return " ".substring(0,3-n.length)+n;
}, },
doDeptChane(){ doDeptChane(){
this.$api.problemmodify.qualitySummary(this.dept.id,this.safeNav).then(d=>{ this.$api.problemmodify.qualitySummary(this.dept.id,this.safeNav,this.projectInfo?.id).then(d=>{
this.summary=(d||[]).map(it=>{ this.summary=(d||[]).map(it=>{
return { return {
text:it.problemArea, text:it.problemArea,
@ -290,7 +295,7 @@ export default {
this.elKey++; this.elKey++;
}); });
this.$api.problemmodify.qualitySummaryByProject(this.dept.id,this.safeNav).then(d=>{ this.$api.problemmodify.qualitySummaryByProject(this.dept.id,this.safeNav,this.projectInfo?.id).then(d=>{
this.summaryPrj=(d||[]).map(it=>{ this.summaryPrj=(d||[]).map(it=>{
return { return {
...it, ...it,

View File

@ -293,7 +293,7 @@ export default {
return { return {
elKey: 0, elKey: 0,
dept: null, dept: null,
prjectInfo:null, projectInfo:null,
safeNav: 0, safeNav: 0,
safeText: '汇总总数', safeText: '汇总总数',
rowStyle: { rowStyle: {
@ -339,6 +339,15 @@ export default {
this.init(); this.init();
}, },
mounted() { mounted() {
this.$bus.$on("projectChange", res => {
this.projectInfo=res;
this.doDeptChane();
//this.getWorkTrainList();
//this.getEmergencyDrillList();
//this.getProjectSpecialView();
//this.getDeptWorksList();
//this.getProjectInsuranceList();
});
this.$bus.$on("deptChange", dept => { this.$bus.$on("deptChange", dept => {
this.dept = dept; this.dept = dept;
this.doDeptChane(); this.doDeptChane();
@ -348,6 +357,7 @@ export default {
this.getDeptWorksList(); this.getDeptWorksList();
this.getProjectInsuranceList(); this.getProjectInsuranceList();
}); });
}, },
methods: { methods: {
doProbleRowClick(a,b,c){ doProbleRowClick(a,b,c){
@ -462,7 +472,7 @@ export default {
return " ".substring(0, 3 - n.length) + n; return " ".substring(0, 3 - n.length) + n;
}, },
doDeptChane() { doDeptChane() {
this.$api.problemmodify.safetySummary(this.dept.id, this.safeNav).then(d => { this.$api.problemmodify.safetySummary(this.dept.id, this.safeNav,this.projectInfo?.id||0).then(d => {
this.summary = (d || []).map(it => { this.summary = (d || []).map(it => {
return { return {
@ -486,7 +496,7 @@ export default {
this.elKey++; this.elKey++;
}); });
this.$api.problemmodify.safetySummaryByProject(this.dept.id, this.safeNav).then(d => { this.$api.problemmodify.safetySummaryByProject(this.dept.id, this.safeNav,this.projectInfo?.id||0).then(d => {
this.summaryPrj = (d || []).map(it => { this.summaryPrj = (d || []).map(it => {
return { return {
...it, ...it,