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{ export default{
groupByCategory, groupByCategory,
@ -111,5 +127,7 @@ export default{
findFormDatasByProcInsId, findFormDatasByProcInsId,
listByCategory, listByCategory,
findFlowLabourList, findFlowLabourList,
findFlowLabourGroupCountByApprove findFlowLabourGroupCountByApprove,
groupFlowBySubDeptType,
listFlowBySubDeptType
} }

View File

@ -185,26 +185,39 @@
</enginChart> </enginChart>
</module-one-1-1> </module-one-1-1>
<module-one-2-1 label="劳务单位资质审批明细" style="position: relative;"> <module-one-2-1 label="劳务单位资质审批明细" style="position: relative;">
<div class="data-list3 scroll">
<table style=" border-collapse: collapse;"> <template v-if="dataList4.length > 0">
<tr class="tr-header"> <div class="data-list3 scroll">
<th>所属项目</th> <table style=" border-collapse: collapse;">
<th style="width:95px">所属总包单位</th> <tr class="tr-header">
<th>申请单位</th> <th>所属项目</th>
<th style="width:60px">所属时间</th> <th style="width:95px">所属总包单位</th>
<th style="width:30px">状态</th> <th>申请单位</th>
</tr> <th>分包类型</th>
<tr v-for="(it,idx) in dataList4" :key="idx"> <th style="width:40px">申请<br />时间</th>
<td>泾河智谷一期一标段</td> <th style="width:40px">状态</th>
<td>中国一冶集团有限公司</td> </tr>
<td>陕西凯德劳务建筑有限公司</td> <tr v-for="(it, idx) in dataList4" :key="idx">
<td>2024-3-4</td> <td>{{ it.businessKeyName }}</td>
<td> <td>{{ it.startDeptName }}</td>
<span v-if="idx<10"></span> <td>{{ it.deptName }}</td>
<span v-else style="color:green">行中</span> <td>{{ it.taskName }}</td>
</td> <td>{{ it.createTime | formatDate }}</td>
</tr> <td>
</table> <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> </div>
</module-one-2-1> </module-one-2-1>
</el-col> </el-col>
@ -238,7 +251,12 @@ export default {
chart1Data: [], chart1Data: [],
elChart2: 0, elChart2: 0,
flowList: [], 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.loadCostList();
this.loadFlow(); this.loadFlow();
this.initChart2(); 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() { initChart2() {
let opt = { "tooltip": { "trigger": "item" }, "series": [{ "top": 10, "type": "pie", "radius": "60%", let postData = {};
"data": [{ "name": "未发起", "value": 6 }, if (this.project && this.project.id > 0) {
{ "name": " 审批中", "value": 4 }, postData.projectId = this.project.id;
{ "name": "审批通过", "value": 15 } } else {
], "label": { "alignTo": "edge", "edgeDistance": "10%", "color": "#fff", "formatter": "{name|{b}}\n{cnt|{c}}", "rich": { "cnt": { "fontSize": 10, "color": "#eee" } } } }] }; postData.id = this.dept.id;
if (this.$refs.chart2 && this.$refs.chart2.init) {
this.$refs.chart2.init(opt);
} }
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() { loadFlow() {
let ajaxs = [ let ajaxs = [
@ -423,7 +476,7 @@ export default {
th { th {
font-size: 14px; font-size: 14px;
color:#409eff; color: #409eff;
border: solid 1px #ffffff52; border: solid 1px #ffffff52;
line-height: 60px; line-height: 60px;
} }
@ -436,21 +489,25 @@ export default {
} }
} }
} }
.data-list3{
max-height: calc(100% - 40px); .data-list3 {
max-height: calc(100% - 70px);
overflow-y: auto; overflow-y: auto;
padding:4px; padding: 4px;
.tr-header{
th{ .tr-header {
color:#409eff; th {
color: #409eff;
} }
} }
td,th{
border: solid 1px #409eff8c; td,
padding: 0px 8px; th {
font-size:12px; border: solid 1px #409eff8c;
line-height: 20px; padding: 0px 8px;
} font-size: 12px;
line-height: 20px;
}
} }
.cost-sum { .cost-sum {
@ -489,10 +546,13 @@ export default {
.sum-table { .sum-table {
border-collapse: collapse; border-collapse: collapse;
th{
color:#409eff; th {
color: #409eff;
} }
td,th{
td,
th {
line-height: 30px; line-height: 30px;
border: solid 1px #409eff8c; border: solid 1px #409eff8c;
padding: 0px 8px; padding: 0px 8px;