update code
parent
1467cb18d7
commit
44ea12c84f
|
@ -0,0 +1,20 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
const groupByCategory=(projectId,deptId)=> {
|
||||||
|
return request({
|
||||||
|
url: `bgscreen/flow/groupByCategory?projectId=${projectId}&deptId=${deptId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const groupByUnit=(projectId,deptId)=> {
|
||||||
|
return request({
|
||||||
|
url: `bgscreen/flow/groupByUnit?projectId=${projectId}&deptId=${deptId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default{
|
||||||
|
groupByCategory,
|
||||||
|
groupByUnit
|
||||||
|
}
|
|
@ -17,6 +17,7 @@ import materialSeal from './materialSeal/index'
|
||||||
import costOut from './costOut/index'
|
import costOut from './costOut/index'
|
||||||
import checkDetection from './checkDetection/index'
|
import checkDetection from './checkDetection/index'
|
||||||
import standard from './standard/index'
|
import standard from './standard/index'
|
||||||
|
import flow from './flow/index'
|
||||||
import video from './video/index'
|
import video from './video/index'
|
||||||
import plan from './plan/index'
|
import plan from './plan/index'
|
||||||
import {axios,download} from '@/utils/request'
|
import {axios,download} from '@/utils/request'
|
||||||
|
@ -42,6 +43,7 @@ export default {
|
||||||
http:axios,
|
http:axios,
|
||||||
video,
|
video,
|
||||||
standard,
|
standard,
|
||||||
|
flow,
|
||||||
plan,
|
plan,
|
||||||
downFile:download
|
downFile:download
|
||||||
}
|
}
|
|
@ -16,7 +16,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="div-desc">
|
<div class="div-desc">
|
||||||
<el-popover placement="bottom" width="200" trigger="hover" :content="getTitle()">
|
<el-popover placement="bottom" width="200" trigger="hover" :content="getTitle()">
|
||||||
<div class="div-title" slot="reference">{{ getTitle() }} {{ images.length }}</div>
|
<div class="div-title" slot="reference">{{ getTitle() }}</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -96,6 +96,8 @@ export default {
|
||||||
list4:[],
|
list4:[],
|
||||||
list5:[],
|
list5:[],
|
||||||
list6:[],
|
list6:[],
|
||||||
|
chart1Data:[],
|
||||||
|
chart2Data:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -131,7 +133,13 @@ export default {
|
||||||
},
|
},
|
||||||
loadData(){
|
loadData(){
|
||||||
this.getProjectId(id => {
|
this.getProjectId(id => {
|
||||||
this.$api.standard.getList(id,this.dept.id).then(d=>{
|
let ajaxs=[
|
||||||
|
this.$api.standard.getList(id,this.dept.id),
|
||||||
|
this.$api.flow.groupByCategory(this.project.id,this.dept.id),
|
||||||
|
this.$api.flow.groupByUnit(this.project.id,this.dept.id),
|
||||||
|
];
|
||||||
|
this.$api.http.all(ajaxs).then(res=>{
|
||||||
|
let d=res[0];
|
||||||
let tmps=d.data||[];
|
let tmps=d.data||[];
|
||||||
this.list1=tmps.filter(it=>it.standardType==1);
|
this.list1=tmps.filter(it=>it.standardType==1);
|
||||||
this.list2=tmps.filter(it=>it.standardType==2);
|
this.list2=tmps.filter(it=>it.standardType==2);
|
||||||
|
@ -140,6 +148,32 @@ export default {
|
||||||
this.list5=tmps.filter(it=>it.standardType==5);
|
this.list5=tmps.filter(it=>it.standardType==5);
|
||||||
this.list6=tmps.filter(it=>it.standardType==6);
|
this.list6=tmps.filter(it=>it.standardType==6);
|
||||||
this.loading=false;
|
this.loading=false;
|
||||||
|
this.chart1Data=(res[1].data||[]).map(it=>{
|
||||||
|
let o= {
|
||||||
|
title:it.taskName,
|
||||||
|
comp:it.assigneeId||0,
|
||||||
|
uncomp:it.procDefVersion||0,
|
||||||
|
total:0
|
||||||
|
}
|
||||||
|
o.total=o.comp+o.uncomp;
|
||||||
|
return o;
|
||||||
|
})
|
||||||
|
console.log("-1->",this.chart1Data);
|
||||||
|
let tmps2=[{title:'总包单位',count:0},
|
||||||
|
{title:'监理单位',count:0},
|
||||||
|
{title:'设计单位',count:0},
|
||||||
|
{title:'甲方代表',count:0},
|
||||||
|
{title:'子公司',count:0},
|
||||||
|
];
|
||||||
|
let objs=res[2].data||[];
|
||||||
|
tmps2.forEach(it=>{
|
||||||
|
let o=objs.find(item=>it.title==item.taskName);
|
||||||
|
if(o){
|
||||||
|
it.count=o.assigneeId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.chart2Data=tmps2;
|
||||||
|
console.log("-2->",this.chart2Data);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -156,7 +190,7 @@ export default {
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.project-engin-index{
|
.project-engin-index{
|
||||||
/deep/ .border-1{
|
/deep/ .border-1{
|
||||||
padding-left:2px;
|
padding-left:0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue