From a4806f305cbe5aa0acd1568acb7e2c8a73f1d05b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=BF=94=E5=AE=87-=E6=97=85=E7=AE=A1=E5=AE=B6?= <153298343@qq.com> Date: Fri, 12 Aug 2022 08:58:05 +0800 Subject: [PATCH] up --- src/views/rain/maintain/maintain.vue | 519 +++++++++++++-------------- 1 file changed, 250 insertions(+), 269 deletions(-) diff --git a/src/views/rain/maintain/maintain.vue b/src/views/rain/maintain/maintain.vue index 296c116..083f8b0 100644 --- a/src/views/rain/maintain/maintain.vue +++ b/src/views/rain/maintain/maintain.vue @@ -12,14 +12,15 @@ - +
- + 编辑 - - -
-
- - + + +
+
+ +
雨水管道疏挖 @@ -56,23 +58,27 @@ 已退回 缺陷办结 -
-
- 待复核 - 已复核 - -
-
- 无 +
+
+ 待复核 + 已复核 + +
+
+ 无
{{scope.row[column.field]?scope.row[column.field].name:""}}
+
+ {{getUserName(scope.row)}} +
-
{{scope.row[column.field]}}
+
{{scope.row[column.field]}} +
@@ -104,11 +110,11 @@ - - - - {{roadName}} - + + + + {{roadName}} + @@ -259,11 +265,11 @@ - - - - {{roadName}} - + + + + {{roadName}} + @@ -381,11 +387,11 @@ - - - - {{roadName}} - + + + + {{roadName}} + @@ -463,13 +469,17 @@ 取 消 审核 - + 缺陷办结 - 办结 - - 保存 + 办结 + + 保存 - 退回 + 退回 @@ -485,28 +495,16 @@ - - - - - - - - + + + + + + + + @@ -556,8 +554,7 @@
@@ -604,8 +601,7 @@ - @@ -633,28 +629,16 @@ - - - - - - - - + + + + + + + + @@ -679,8 +663,7 @@
@@ -719,8 +702,7 @@ - @@ -751,28 +733,16 @@ - - - - - - - - + + + + + + + + @@ -794,8 +764,7 @@
@@ -827,36 +796,37 @@ - - -
- - - - - - - - - - - - - - - - - - - - - -
- - + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
@@ -879,7 +849,7 @@ storemire, savemire, storewater, - savewater, + savewater, review } from '../../../api/rain/maintain.js' import { @@ -887,9 +857,9 @@ } from '@/utils/auth' import { listarea - } from '../../../api/basic/area.js' - import { - listroad + } from '../../../api/basic/area.js' + import { + listroad } from '../../../api/basic/road.js' import { getparameteritem @@ -903,20 +873,20 @@ AvueMap }, data() { - return { - reviewFormVisible: false, - reviewList:[], - reviewForm:{ - ids:[], - audit_status:0, - audit_reamrk:"" - }, - reviewStatusList:[{ - id:0, - value:"待复核" - },{ - id:1, - value:"已复核" + return { + reviewFormVisible: false, + reviewList: [], + reviewForm: { + ids: [], + audit_status: 0, + audit_reamrk: "" + }, + reviewStatusList: [{ + id: 0, + value: "待复核" + }, { + id: 1, + value: "已复核" }], tableHeight: 0, rainTypeVisible: false, @@ -974,18 +944,18 @@ files_deal_list: [], date: "", address: "", - road_id:"" - }, - roadsList:[], - roadName:"", - roaddisabled:false, - roadloading:false, + road_id: "" + }, + roadsList: [], + roadName: "", + roaddisabled: false, + roadloading: false, formdetail: { status: 0, end_type: 0, content: "" - }, - wf_type:0, + }, + wf_type: 0, rules: { content: [{ @@ -1000,7 +970,8 @@ title: "地址/排放点", type: "string", align: "left", - width: 360 + width: 360, + fixed: "left" }, { field: "area_info", @@ -1015,13 +986,13 @@ type: "type", align: "center", width: 180 - }, - { - field: "end_type", - title: "有无违法转办", - type: "end_type", - align: "center", - width: 180 + }, + { + field: "end_type", + title: "有无违法转办", + type: "end_type", + align: "center", + width: 180 }, { field: "status", @@ -1029,13 +1000,13 @@ type: "status", align: "center", width: 180 - }, - { - field: "audit_status", - title: "复核状态", - type: "audit_status", - align: "center", - width: 180 + }, + { + field: "audit_status", + title: "复核状态", + type: "audit_status", + align: "center", + width: 180 }, // { // field: "end_type", @@ -1045,7 +1016,7 @@ // width:160 // }, { - field: "admin", + field: "userName", title: "提交人", type: "admin", align: "center", @@ -1056,7 +1027,8 @@ title: "提交日期", type: "string", align: "center", - width: 180 + width: 180, + fixed: "right" }, { field: "操作", @@ -1080,65 +1052,75 @@ // if(this.rainType!=4){ this.form.address = newVal[2]; // } - }, - rainType(){ - this.roadsList = [] + }, + rainType() { + this.roadsList = [] } }, - methods: { - handleSelectionChange(val){ - console.log(val) - this.reviewList = val - }, - review(){ - let data = this.reviewList - let idsArr = []; - if(data.length>0){ - for(var m of data){ - idsArr.push(m.id) - } - this.reviewForm.ids = idsArr - this.reviewFormVisible = true - - }else{ - this.$message({ - message: '请选择需要复核的信息', - type: 'warning' - }); - } - }, - submitReviewForm(){ - var that = this - console.log(that.reviewForm); - - review({ - ids:that.reviewForm.ids, - audit_status:that.reviewForm.audit_status, - audit_reamrk:that.reviewForm.audit_reamrk - }).then(response => { - this.$Message.success('操作成功'); - that.load(); - that.reviewFormVisible = false; - }).catch(error => { - console.log(error) - reject(error) - }); - }, - chooseRoad(val){ - this.form.road_id = val - }, - remoteMethod(query){ - if(query!=''){ - this.roadloading = true - listroad({ - name:query - }).then(res => { - this.roadloading = false - this.roadsList = res.data - }) - }else{ - this.roadsList=[] - } + methods: { + getUserName(row) { + if (row.admin) { + return row.admin.name; + } else if (row.user) { + return row.user.name; + } else { + return "未知"; + } + + }, + handleSelectionChange(val) { + console.log(val) + this.reviewList = val + }, + review() { + let data = this.reviewList + let idsArr = []; + if (data.length > 0) { + for (var m of data) { + idsArr.push(m.id) + } + this.reviewForm.ids = idsArr + this.reviewFormVisible = true + + } else { + this.$message({ + message: '请选择需要复核的信息', + type: 'warning' + }); + } + }, + submitReviewForm() { + var that = this + console.log(that.reviewForm); + + review({ + ids: that.reviewForm.ids, + audit_status: that.reviewForm.audit_status, + audit_reamrk: that.reviewForm.audit_reamrk + }).then(response => { + this.$Message.success('操作成功'); + that.load(); + that.reviewFormVisible = false; + }).catch(error => { + console.log(error) + reject(error) + }); + }, + chooseRoad(val) { + this.form.road_id = val + }, + remoteMethod(query) { + if (query != '') { + this.roadloading = true + listroad({ + name: query + }).then(res => { + this.roadloading = false + this.roadsList = res.data + }) + } else { + this.roadsList = [] + } }, initLoad() { var that = this; @@ -1194,8 +1176,8 @@ that.rainType = result.type; that.nowstatus = result.status; - that.formdetail.id = result.id - that.formdetail.end_type = result.end_type + that.formdetail.id = result.id + that.formdetail.end_type = result.end_type that.wf_type = result.end_type if (result.rain_maintain_logs) { for (var k of result.rain_maintain_logs) { @@ -1221,9 +1203,9 @@ case 1: case 2: that.form = result.circulation_info; - that.form.circulation_id = result.circulation_id; - that.roaddisabled = true - that.roadName = result.circulation_info.road?result.circulation_info.road.name:"" + that.form.circulation_id = result.circulation_id; + that.roaddisabled = true + that.roadName = result.circulation_info.road ? result.circulation_info.road.name : "" that.idname = "circulation_id" that.mapform = [result.circulation_info.longitude, result.circulation_info.latitude, result .circulation_info.address @@ -1250,9 +1232,9 @@ break; case 3: that.form = result.help_discharge_info; - that.form.help_discharge_id = result.help_discharge_id; - that.roaddisabled = true - that.roadName = result.help_discharge_info.road?result.help_discharge_info.road.name:"" + that.form.help_discharge_id = result.help_discharge_id; + that.roaddisabled = true + that.roadName = result.help_discharge_info.road ? result.help_discharge_info.road.name : "" that.idname = "help_discharge_id" that.mapform = [result.help_discharge_info.longitude, result.help_discharge_info.latitude, result .help_discharge_info.address @@ -1280,9 +1262,9 @@ break; case 4: that.form = result.mire_info; - that.form.mire_id = result.mire_id; - that.roaddisabled = true - that.roadName = result.mire_info.road?result.mire_info.road.name:"" + that.form.mire_id = result.mire_id; + that.roaddisabled = true + that.roadName = result.mire_info.road ? result.mire_info.road.name : "" that.idname = "mire_id"; let mire_files = []; for (var mod of result.mire_info.mire_files) { @@ -1297,9 +1279,9 @@ case 5: that.form = result.out_water_info; that.form.out_water_id = result.out_water_id; - that.idname = "out_water_id" - that.roaddisabled = true - that.roadName = result.out_water_info.road?result.out_water_info.road.name:"" + that.idname = "out_water_id" + that.roaddisabled = true + that.roadName = result.out_water_info.road ? result.out_water_info.road.name : "" that.mapform = [result.out_water_info.longitude, result.out_water_info.latitude, result.out_water_info .address ] @@ -1475,14 +1457,14 @@ file.photoType = "after" this.dealFilesList = fileList } - this.$message({ - message: '上传成功', - type: 'success' - }); - }, - - handleError(err,file,fileList){ - this.$message.error('上传失败,重新上传'); + this.$message({ + message: '上传成功', + type: 'success' + }); + }, + + handleError(err, file, fileList) { + this.$message.error('上传失败,重新上传'); }, resetrainType() { this.rainTypeVisible = false @@ -1623,6 +1605,5 @@ .vm10 .el-select__caret.el-input__icon.el-icon-arrow-up { line-height: 30px; - } - + }