diff --git a/src/api/flow/index.js b/src/api/flow/index.js index 237479a..8356ae8 100644 --- a/src/api/flow/index.js +++ b/src/api/flow/index.js @@ -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 } diff --git a/src/pages/engin/auditingPage.vue b/src/pages/engin/auditingPage.vue index 1d96788..dea4850 100644 --- a/src/pages/engin/auditingPage.vue +++ b/src/pages/engin/auditingPage.vue @@ -185,26 +185,39 @@ -
- - - - - - - - - - - - - - - -
所属项目所属总包单位申请单位所属时间状态
泾河智谷(一期)一标段中国一冶集团有限公司陕西凯德劳务建筑有限公司2024-3-4 - 进行中 - 行中 -
+ + +
+ +
暂无数据
+
@@ -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" } } } }] }; - if (this.$refs.chart2 && this.$refs.chart2.init) { - this.$refs.chart2.init(opt); + 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; } @@ -435,22 +488,26 @@ export default { line-height: 40px; } } - } - .data-list3{ - max-height: calc(100% - 40px); + } + + .data-list3 { + max-height: calc(100% - 70px); overflow-y: auto; - padding:4px; - .tr-header{ - th{ - color:#409eff; - } - } - td,th{ - border: solid 1px #409eff8c; - padding: 0px 8px; - font-size:12px; - line-height: 20px; + padding: 4px; + + .tr-header { + th { + color: #409eff; } + } + + td, + th { + border: solid 1px #409eff8c; + padding: 0px 8px; + font-size: 12px; + line-height: 20px; + } } .cost-sum { @@ -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; diff --git a/src/pages/index.vue b/src/pages/index.vue index 6edf55c..c89c2f8 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -611,13 +611,17 @@ export default { }); }, qualityNavClick(n) { + let dt1=this.$dt((+new Date())-30*24*3600*1000); + let dt2=this.$dt(new Date()); this.qualityNav = n; if (n == 0) { this.qualityNavTitle = "安全隐患总数"; let postData = { deptId: this.deptInfo?.id || 0, - roleType: 0 - }; + roleType: 0, + startDate:this.$dt(dt1).format("YYYY-MM-DD"), + endDate:this.$dt(dt2).format("YYYY-MM-DD"), + }; this.$api.problemmodify.safetySummary(postData).then(d => { let tmps= (d || []).map(it => { return { @@ -639,7 +643,9 @@ export default { } else { let postData = { deptId: this.deptInfo?.id || 0, - roleType: 0 + roleType: 0, + startDate:this.$dt(dt1).format("YYYY-MM-DD"), + endDate:this.$dt(dt2).format("YYYY-MM-DD"), }; this.qualityNavTitle = "质量隐患总数"; this.$api.problemmodify.qualitySummary(postData).then(d => { diff --git a/src/pages/projectDetail.vue b/src/pages/projectDetail.vue index 5b32e85..28731a9 100644 --- a/src/pages/projectDetail.vue +++ b/src/pages/projectDetail.vue @@ -120,13 +120,18 @@