update code

prv
haha 2024-05-04 00:57:54 +08:00
parent 7ff2c8421b
commit 135a2b60aa
2 changed files with 125 additions and 47 deletions

View File

@ -98,6 +98,22 @@ const findFlowLabourGroupCountByApprove=(deptId,projectId)=> {
})
}
//工程管理-分包单位占比
const groupFlowBySubDeptType=(data)=>{
return request({
url:'bgscreen/flow/groupFlowBySubDeptType',
method:'post',
data:data
})
}
const listFlowBySubDeptType=(data,pageNum,pageSize)=>{
return request({
url:`bgscreen/flow/listFlowBySubDeptType?pageNum=${pageNum}&pageSize=${pageSize}`,
method:'post',
data:data
})
}
export default{
groupByCategory,
@ -111,5 +127,7 @@ export default{
findFormDatasByProcInsId,
listByCategory,
findFlowLabourList,
findFlowLabourGroupCountByApprove
findFlowLabourGroupCountByApprove,
groupFlowBySubDeptType,
listFlowBySubDeptType
}

View File

@ -185,27 +185,40 @@
</enginChart>
</module-one-1-1>
<module-one-2-1 label="劳务单位资质审批明细" style="position: relative;">
<template v-if="dataList4.length > 0">
<div class="data-list3 scroll">
<table style=" border-collapse: collapse;">
<tr class="tr-header">
<th>所属项目</th>
<th style="width:95px">所属总包单位</th>
<th>申请单位</th>
<th style="width:60px">所属时间</th>
<th style="width:30px">状态</th>
<th>分包类型</th>
<th style="width:40px">申请<br />时间</th>
<th style="width:40px">状态</th>
</tr>
<tr v-for="(it,idx) in dataList4" :key="idx">
<td>泾河智谷一期一标段</td>
<td>中国一冶集团有限公司</td>
<td>陕西凯德劳务建筑有限公司</td>
<td>2024-3-4</td>
<tr v-for="(it, idx) in dataList4" :key="idx">
<td>{{ it.businessKeyName }}</td>
<td>{{ it.startDeptName }}</td>
<td>{{ it.deptName }}</td>
<td>{{ it.taskName }}</td>
<td>{{ it.createTime | formatDate }}</td>
<td>
<span v-if="idx<10"></span>
<span v-else style="color:green">行中</span>
<span v-if="!it.finishTime"></span>
<span v-else style="color:green">完成</span>
</td>
</tr>
</table>
</div>
<el-pagination layout="total,prev, pager, next"
@current-change="handleCurrentChange" :total="data4Page.total" :page-size="data4Page.pageSize"
:current-page.sync="data4Page.pageIndex" class="bg-pagination"></el-pagination>
</template>
<div v-else style="text-align: center;margin-top:100px;" class="div-no-data">
<img src="images/nodata.png" style="width: 120px;">
<div style="text-align: center;font-size: 12px;color:#888;">暂无数据</div>
</div>
</module-one-2-1>
</el-col>
</el-row>
@ -238,7 +251,12 @@ export default {
chart1Data: [],
elChart2: 0,
flowList: [],
dataList4:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
dataList4: [],
data4Page: {
total: 0,
pageSize: 10,
pageIndex: 1
}
};
},
@ -297,16 +315,51 @@ export default {
this.loadCostList();
this.loadFlow();
this.initChart2();
this.data4Page.pageIndex = 1;
this.loadFlowDataList();
},
handleCurrentChange(n) {
this.data4Page.pageIndex = n;
this.loadFlowDataList();
},
loadFlowDataList() {
let postData = {};
if (this.project && this.project.id > 0) {
postData.projectId = this.project.id;
} else {
postData.id = this.dept.id;
}
this.$api.flow.listFlowBySubDeptType(postData, this.data4Page.pageIndex, this.data4Page.pageSize).then(d => {
let data = d.rows || [];
this.dataList4 = data;
this.data4Page.total = d.total;
});
},
initChart2() {
let opt = { "tooltip": { "trigger": "item" }, "series": [{ "top": 10, "type": "pie", "radius": "60%",
"data": [{ "name": "未发起", "value": 6 },
{ "name": " 审批中", "value": 4 },
{ "name": "审批通过", "value": 15 }
], "label": { "alignTo": "edge", "edgeDistance": "10%", "color": "#fff", "formatter": "{name|{b}}\n{cnt|{c}}", "rich": { "cnt": { "fontSize": 10, "color": "#eee" } } } }] };
let postData = {};
if (this.project && this.project.id > 0) {
postData.projectId = this.project.id;
} else {
postData.id = this.dept.id;
}
this.$api.flow.groupFlowBySubDeptType(postData).then(d => {
let data = (d.data || []).map(it => {
return {
name: it.taskName,
value: it.taskId || 0
}
});
let opt = {
"tooltip": { "trigger": "item" }, "series": [{
"top": 10, "type": "pie", "radius": "60%",
"data": data, "label": { "alignTo": "edge", "edgeDistance": "10%", "color": "#fff", "formatter": "{name|{b}}\n{cnt|{c}}", "rich": { "cnt": { "fontSize": 10, "color": "#eee" } } }
}]
};
if (this.$refs.chart2 && this.$refs.chart2.init) {
this.$refs.chart2.init(opt);
}
});
},
loadFlow() {
let ajaxs = [
@ -423,7 +476,7 @@ export default {
th {
font-size: 14px;
color:#409eff;
color: #409eff;
border: solid 1px #ffffff52;
line-height: 60px;
}
@ -436,19 +489,23 @@ export default {
}
}
}
.data-list3{
max-height: calc(100% - 40px);
.data-list3 {
max-height: calc(100% - 70px);
overflow-y: auto;
padding:4px;
.tr-header{
th{
color:#409eff;
padding: 4px;
.tr-header {
th {
color: #409eff;
}
}
td,th{
td,
th {
border: solid 1px #409eff8c;
padding: 0px 8px;
font-size:12px;
font-size: 12px;
line-height: 20px;
}
}
@ -489,10 +546,13 @@ export default {
.sum-table {
border-collapse: collapse;
th{
color:#409eff;
th {
color: #409eff;
}
td,th{
td,
th {
line-height: 30px;
border: solid 1px #409eff8c;
padding: 0px 8px;