From 2773eee4542243fe77dd980e969be5907e2239ab Mon Sep 17 00:00:00 2001 From: haha Date: Sat, 25 May 2024 21:59:19 +0800 Subject: [PATCH] update code --- public/css/new.css | 3 + public/index.html | 2 +- src/api/problemmodify/index.js | 4 +- src/pages/components/ProblemmodifyDetail.vue | 33 +- src/pages/components/ProblemmodifyList.vue | 351 +++++++++++++++++++ src/pages/projectQuality.vue | 130 ++----- src/pages/projectSafety.vue | 108 ++---- 7 files changed, 441 insertions(+), 190 deletions(-) create mode 100644 src/pages/components/ProblemmodifyList.vue diff --git a/public/css/new.css b/public/css/new.css index 486e4a2..63337a3 100644 --- a/public/css/new.css +++ b/public/css/new.css @@ -15,4 +15,7 @@ align-items: center; justify-content: center; flex-flow: column; +} +.my-module-title{ + background: url(../images/one/2x1.png) no-repeat;background-size: 100%; } \ No newline at end of file diff --git a/public/index.html b/public/index.html index d0bd3ba..614cd7c 100644 --- a/public/index.html +++ b/public/index.html @@ -9,7 +9,7 @@ - + diff --git a/src/api/problemmodify/index.js b/src/api/problemmodify/index.js index 4a28eaf..728615e 100644 --- a/src/api/problemmodify/index.js +++ b/src/api/problemmodify/index.js @@ -48,9 +48,9 @@ const getMonitAndWarning=(deptId,projectId=0)=>{ } -const listSspProblemmodify=data=>{ +const listSspProblemmodify=(data,pageSize,pageNum)=>{ return request({ - url: `bgscreen/problemmodify/listSspProblemmodify`, + url: `bgscreen/problemmodify/listSspProblemmodify?pageNum=${pageNum}&pageSize=${pageSize}`, method: 'post', data:data }) diff --git a/src/pages/components/ProblemmodifyDetail.vue b/src/pages/components/ProblemmodifyDetail.vue index bdf0e60..103b42c 100644 --- a/src/pages/components/ProblemmodifyDetail.vue +++ b/src/pages/components/ProblemmodifyDetail.vue @@ -42,8 +42,8 @@
整改超时({{ count['5'] }})
-
+
-
+ +
暂无数据
@@ -153,7 +156,10 @@ export default { dataTable: [], dicts: [], checkStateDicts: [], - selDate: [] + selDate: [], + size: 10, + index: 1, + total: 0, }; }, @@ -169,20 +175,28 @@ export default { let tmps = this.checkStateDicts.filter(d => d.dictValue == v); return tmps.length > 0 ? tmps[0].dictLabel : ''; }, + handleCurrentChange(n) { + this.index = n; + this.getData(); + }, doNav(n, init) { if (n == this.nav && !init) { return; } - this.nav = n; + this.nav = n; + this.index=1; + this.getData(); + }, + getData(){ let postData = { projectId: this.row.projectId, infoType: this.infoType, roleType: this.roleType }; - if (n == 5) { + if (this.nav == 5) { postData.activeName = 'zgcs' } else { - postData.checkState = n + postData.checkState = this.nav } if (this.selDate.length > 0) { postData.startDate = this.$dt(this.selDate[0]).format("YYYY-MM-DD"); @@ -191,9 +205,10 @@ export default { postData.endDate = this.$dt(this.selDate[1]).format("YYYY-MM-DD"); } this.loading=true; - this.$api.problemmodify.listSspProblemmodify(postData).then(d => { + this.$api.problemmodify.listSspProblemmodify(postData,this.size,this.index).then(d => { this.loading=false; - this.dataTable = (d.data || []).map(it => { + this.total=d.total; + this.dataTable = (d.rows || []).map(it => { if (it.updateTime) { let dt1 = +this.$dt(this.$dt(it.nickedTime).format("YYYY-MM-DD")); let dt2 = +this.$dt(this.$dt(it.updateTime).format("YYYY-MM-DD")); diff --git a/src/pages/components/ProblemmodifyList.vue b/src/pages/components/ProblemmodifyList.vue new file mode 100644 index 0000000..7446e1e --- /dev/null +++ b/src/pages/components/ProblemmodifyList.vue @@ -0,0 +1,351 @@ + + + + \ No newline at end of file diff --git a/src/pages/projectQuality.vue b/src/pages/projectQuality.vue index 1591380..3f5f5f7 100644 --- a/src/pages/projectQuality.vue +++ b/src/pages/projectQuality.vue @@ -33,12 +33,12 @@
-
- - -
质量隐患类型分析
- -
+
+
质量隐患明细
+ +
+
+
项目质量隐患占比({{ summaryPrjTotal }}) @@ -48,22 +48,15 @@ @row-click="doProbleRowClick" :row-style="rowStyle" class="elTable"> - + @@ -104,14 +97,8 @@
- - + +
@@ -125,14 +112,8 @@
- - + +
@@ -146,14 +127,8 @@
- - + +
@@ -167,17 +142,9 @@
- - - + + +
@@ -214,45 +181,7 @@ - - +
@@ -279,6 +208,7 @@ import materialSealChart from "./quality/materialSealChart.vue"; import materialSealListDlg from "./quality/materialSealListDlg.vue"; import projectChecking from "./quality/projectChecking.vue"; import debounce from "lodash.debounce"; +import ProblemmodifyList from './components/ProblemmodifyList.vue' export default { components: { materialSealListDlg, @@ -288,7 +218,7 @@ export default { materialSealDetialDlg, checkDetectionDlg, measuredDlg, - projectChecking, + projectChecking,ProblemmodifyList }, data() { return { @@ -438,7 +368,7 @@ export default { "projectChange", debounce((res) => { this.projectInfo = res; - this.doDeptChane(); + this.dtChange(); this.checkDetection(0); this.doMeasuredNav(0, "汇总"); this.groupByApprove(); @@ -448,7 +378,7 @@ export default { "deptChange", debounce((dept) => { this.dept = dept; - this.doDeptChane(); + this.dtChange(); this.checkDetection(0); this.doMeasuredNav(0, "汇总"); this.groupByApprove(); @@ -457,8 +387,14 @@ export default { if (this.$root.hasInitHeader) { this.initMe(); } + setTimeout(()=>{ + this.dtChange(); + },400); }, methods: { + isTypeBuser(){ + return this.$root.isTypeBuser; + }, showMaterialSealDlg() { this.$refs.msListDlg.showDialog({ deptId: this.dept?.id || 0, @@ -469,8 +405,7 @@ export default { initMe() { this.projectInfo = this.$root.project || {}; this.dept = this.$root.dept || {}; - this.prjs = this.$root.projects || []; - this.doDeptChane(); + this.prjs = this.$root.projects || []; this.checkDetection(0); this.doMeasuredNav(0, "汇总"); this.groupByApprove(); @@ -558,6 +493,9 @@ export default { return " ".substring(0, 3 - n.length) + n; }, dtChange() { + if(this.isTypeBuser() && this.$refs.probList){ + this.$refs.probList.loadData(1, this.safeNav, this.selDate); + } this.doDeptChane(); }, doDeptChane() { @@ -666,7 +604,7 @@ export default { doSafeNav(n, t) { this.safeNav = n; this.safeText = t; - this.doDeptChane(); + this.dtChange(); }, //查询举牌验收 doProjectChecking() { diff --git a/src/pages/projectSafety.vue b/src/pages/projectSafety.vue index 246fa65..086d3e2 100644 --- a/src/pages/projectSafety.vue +++ b/src/pages/projectSafety.vue @@ -22,12 +22,13 @@
-
+
+
安全隐患明细
+ +
+
- -
安全隐患类型分析
- -
+
项目安全隐患占比({{ summaryPrjTotal @@ -80,75 +81,13 @@ - - + - - +
@@ -157,7 +96,6 @@ @row-click="doSpecialRowClick"> -