update code
parent
3e5ffbacf8
commit
a90f6846d5
|
@ -2,7 +2,7 @@ import request from '@/utils/request'
|
|||
|
||||
const getProjectInsuranceList=(deptId,projectId)=> {
|
||||
return request({
|
||||
url: `bgscreen/insurance/getProjectInsuranceList?deptId=${deptId}&projectId=${projectId}`,
|
||||
url: `bgscreen/insurance/getProjectInsuranceList?deptId=${deptId||0}&projectId=${projectId||0}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -3,34 +3,34 @@ import request from '@/utils/request'
|
|||
|
||||
|
||||
//质量整改-安全分类汇总(按分类)
|
||||
const safetySummary=(deptId,roleType)=>{
|
||||
const safetySummary=(deptId,roleType,projectId)=>{
|
||||
return request({
|
||||
url: `bgscreen/problemmodify/safetySummary?deptId=${deptId}&roleType=${roleType}`,
|
||||
url: `bgscreen/problemmodify/safetySummary?deptId=${deptId}&roleType=${roleType}&projectId=${projectId||0}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//质量整改-质量分类汇总(按分类)
|
||||
const qualitySummary=(deptId,roleType)=>{
|
||||
const qualitySummary=(deptId,roleType,projectId)=>{
|
||||
return request({
|
||||
url: `bgscreen/problemmodify/qualitySummary?deptId=${deptId}&roleType=${roleType}`,
|
||||
url: `bgscreen/problemmodify/qualitySummary?deptId=${deptId}&roleType=${roleType}&projectId=${projectId||0}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//质量整改-安全分类汇总(按项目)
|
||||
const safetySummaryByProject=(deptId,roleType)=>{
|
||||
const safetySummaryByProject=(deptId,roleType,projectId)=>{
|
||||
return request({
|
||||
url: `bgscreen/problemmodify/safetySummaryByProject?deptId=${deptId}&roleType=${roleType}`,
|
||||
url: `bgscreen/problemmodify/safetySummaryByProject?deptId=${deptId}&roleType=${roleType}&projectId=${projectId||0}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//质量整改-安全分类汇总(按项目)
|
||||
const qualitySummaryByProject=(deptId,roleType)=>{
|
||||
const qualitySummaryByProject=(deptId,roleType,projectId)=>{
|
||||
return request({
|
||||
url: `bgscreen/problemmodify/qualitySummaryByProject?deptId=${deptId}&roleType=${roleType}`,
|
||||
url: `bgscreen/problemmodify/qualitySummaryByProject?deptId=${deptId}&roleType=${roleType}&projectId=${projectId||0}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -179,10 +179,11 @@ Vue.component("screen-header", {
|
|||
},
|
||||
loadProject(init){
|
||||
this.$api.project.findProjectByDept( this.localStorage1.id).then(d=>{
|
||||
this.data=(d?.data||[]).map(it=>{
|
||||
it.text=it.projectName;
|
||||
return it;
|
||||
}).filter(it=>+it.progressVisible==0);
|
||||
let objs=(d?.data||[]).map(it=>{
|
||||
it.text=it.projectName;
|
||||
return it;
|
||||
}).filter(it=>+it.progressVisible==0);
|
||||
this.data=[{id:0,text:'所有项目'},...objs];
|
||||
this.$bus.$emit("loadProjects",this.data);
|
||||
if(this.data.length>0){
|
||||
this.setScreenLiSel2(this.data[0],init);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<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"
|
||||
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">
|
||||
|
@ -9,7 +9,7 @@
|
|||
p-id="4968"></path>
|
||||
</svg>
|
||||
</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"
|
||||
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">
|
||||
|
@ -55,6 +55,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
isOnly:false,
|
||||
info: {},
|
||||
prj: {},
|
||||
prjs: [],
|
||||
|
@ -71,6 +72,14 @@ export default {
|
|||
prjInfo: {
|
||||
handler(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,
|
||||
deep: true
|
||||
|
@ -78,7 +87,12 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
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.prj = this.prjInfo || {};
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -58,7 +58,7 @@
|
|||
<module-one-1-2 label="项目季度考核目标">
|
||||
<img src="images/icon2001.png" style="position: absolute;cursor: pointer;right: 12px;top: 12px;" @click="doShowDlg1">
|
||||
<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"
|
||||
ref="fbsubordinateUnit" >
|
||||
|
||||
|
@ -323,9 +323,8 @@ export default {
|
|||
selectData:[
|
||||
{text:'泾河新城荟锦坊二期',id:1},
|
||||
],
|
||||
prjInfos:[
|
||||
|
||||
],
|
||||
dept:null,
|
||||
prjInfos:[],
|
||||
prjInfo:{},
|
||||
scheduleInfo:null,
|
||||
projects:[],
|
||||
|
@ -336,6 +335,7 @@ export default {
|
|||
this.init()
|
||||
},
|
||||
mounted() {
|
||||
window.app=this;
|
||||
this.$bus.$on("projectChange",res=>{
|
||||
this.loadProjectConstructionProgress();
|
||||
});
|
||||
|
@ -343,7 +343,20 @@ export default {
|
|||
this.projects=prjs;
|
||||
})
|
||||
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=>{
|
||||
it.prj=it.project?.projectName||'';
|
||||
it.deptName=it.project?.paretProjectName||'';
|
||||
|
@ -372,17 +385,32 @@ export default {
|
|||
return it;
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
getProjectId(cb){
|
||||
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(){
|
||||
this.prjInfo= JSON.parse(localStorage.getItem("data2"));
|
||||
this.$api.schedule.projectConstructionProgress(this.prjInfo.id).then(d=>{
|
||||
let obj=d?.data||{};
|
||||
if(obj.image){
|
||||
obj.images=obj.image.split(",").filter(d=>d);
|
||||
}
|
||||
this.scheduleInfo=obj;
|
||||
this.getProjectId(prjId=>{
|
||||
this.$api.schedule.projectConstructionProgress(prjId).then(d=>{
|
||||
let obj=d?.data||{};
|
||||
if(obj.image){
|
||||
obj.images=obj.image.split(",").filter(d=>d);
|
||||
}
|
||||
this.scheduleInfo=obj;
|
||||
})
|
||||
})
|
||||
},
|
||||
doShowDlg1(){
|
||||
|
|
|
@ -211,6 +211,7 @@ export default {
|
|||
return {
|
||||
elKey:0,
|
||||
dept:null,
|
||||
projectInfo:null,
|
||||
safeNav:0,
|
||||
safeText:'汇总总数',
|
||||
rowStyle:{
|
||||
|
@ -253,6 +254,10 @@ export default {
|
|||
this.init()
|
||||
},
|
||||
mounted() {
|
||||
this.$bus.$on("projectChange", res => {
|
||||
this.projectInfo=res;
|
||||
this.doDeptChane();
|
||||
});
|
||||
this.$bus.$on("deptChange",dept=>{
|
||||
this.dept=dept;
|
||||
this.doDeptChane();
|
||||
|
@ -267,7 +272,7 @@ export default {
|
|||
return " ".substring(0,3-n.length)+n;
|
||||
},
|
||||
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=>{
|
||||
return {
|
||||
text:it.problemArea,
|
||||
|
@ -290,7 +295,7 @@ export default {
|
|||
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=>{
|
||||
return {
|
||||
...it,
|
||||
|
|
|
@ -293,7 +293,7 @@ export default {
|
|||
return {
|
||||
elKey: 0,
|
||||
dept: null,
|
||||
prjectInfo:null,
|
||||
projectInfo:null,
|
||||
safeNav: 0,
|
||||
safeText: '汇总总数',
|
||||
rowStyle: {
|
||||
|
@ -339,6 +339,15 @@ export default {
|
|||
this.init();
|
||||
},
|
||||
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.dept = dept;
|
||||
this.doDeptChane();
|
||||
|
@ -348,6 +357,7 @@ export default {
|
|||
this.getDeptWorksList();
|
||||
this.getProjectInsuranceList();
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
doProbleRowClick(a,b,c){
|
||||
|
@ -462,7 +472,7 @@ export default {
|
|||
return " ".substring(0, 3 - n.length) + n;
|
||||
},
|
||||
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 => {
|
||||
return {
|
||||
|
@ -486,7 +496,7 @@ export default {
|
|||
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 => {
|
||||
return {
|
||||
...it,
|
||||
|
|
Loading…
Reference in New Issue