diff --git a/src/views/rain/inspection/inspection.vue b/src/views/rain/inspection/inspection.vue index 8aba06e..791a4d4 100644 --- a/src/views/rain/inspection/inspection.vue +++ b/src/views/rain/inspection/inspection.vue @@ -110,7 +110,12 @@ - + + + + {{roadName}} + +
@@ -283,7 +288,12 @@ - + + + + {{roadName}} + + {{form.name}} @@ -458,6 +468,28 @@ + + + + + + + + @@ -579,7 +611,29 @@ - + + + + + + + + + { + this.roadloading = false + this.roadsList = res.data + }) + }else{ + this.roadsList=[] + } + }, buildchange(val) { if(Object.prototype.toString.call(val) != '[object Object]'){ this.mapform = ['', '', '']; @@ -1030,7 +1109,9 @@ switch (result.type) { case 1: that.form = result.rain_equipment_info; - that.form.rain_equipment_id = result.rain_equipment_id; + that.form.rain_equipment_id = result.rain_equipment_id; + that.roaddisabled = true + that.roadName = result.rain_equipment_info.road?result.rain_equipment_info.road.name:"" that.idname = "rain_equipment_id" that.mapform = [result.rain_equipment_info.longitude, result.rain_equipment_info.latitude, result.rain_equipment_info.address] let _files = []; @@ -1055,6 +1136,7 @@ break; case 2: that.form = result.building_site_info; + that.roadName = result.building_site_info.road?result.building_site_info.road.name:"" let building_site = result.building_site_info.building_site that.form.building_site_id =building_site.id that.form.address = building_site.address @@ -1157,8 +1239,7 @@ "upload_id": m.upload_id }); } - this.form.files_end_list = listUrlafter - + this.form.files_end_list = listUrlafter this.$refs[formName].validate((valid) => { if (valid) { that.submitAll(that.rainType, that.form[this.idname]) diff --git a/src/views/rain/maintain/maintain.vue b/src/views/rain/maintain/maintain.vue index b9feedf..35785d8 100644 --- a/src/views/rain/maintain/maintain.vue +++ b/src/views/rain/maintain/maintain.vue @@ -90,7 +90,12 @@ - + + + + {{roadName}} + +
@@ -240,7 +245,12 @@ - + + + + {{roadName}} + + {{form.address}} @@ -357,7 +367,12 @@ - + + + + {{roadName}} + + {{form.date}} @@ -454,7 +469,29 @@ - + + + + + + + + + @@ -580,7 +617,29 @@ - + + + + + + + + + @@ -676,8 +735,30 @@ - - + + + + + + + + + + @@ -759,7 +840,10 @@ } from '@/utils/auth' import { listarea - } from '../../../api/basic/area.js' + } from '../../../api/basic/area.js' + import { + listroad + } from '../../../api/basic/road.js' import { getparameteritem } from '../../../api/system/dictionary.js' @@ -829,8 +913,12 @@ files_deal_list: [], date: "", address: "", - - }, + road_id:"" + }, + roadsList:[], + roadName:"", + roaddisabled:false, + roadloading:false, formdetail: { status: 0, end_type: 0, @@ -916,9 +1004,28 @@ // if(this.rainType!=4){ this.form.address = newVal[2]; // } + }, + rainType(){ + this.roadsList = [] } }, - methods: { + methods: { + 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; var clientHeight = document.documentElement.clientHeight @@ -970,8 +1077,7 @@ var that = this; get(obj.id).then(res => { let result = Object.assign(that.form, res); - // this.$set(that.form,res) - console.log(result) + that.rainType = result.type; that.nowstatus = result.status; that.formdetail.id = result.id @@ -999,7 +1105,9 @@ case 1: case 2: that.form = result.circulation_info; - that.form.circulation_id = result.circulation_id; + 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 @@ -1026,7 +1134,9 @@ break; case 3: that.form = result.help_discharge_info; - that.form.help_discharge_id = result.help_discharge_id; + 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 @@ -1054,7 +1164,9 @@ break; case 4: that.form = result.mire_info; - that.form.mire_id = result.mire_id; + 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) { @@ -1069,7 +1181,9 @@ case 5: that.form = result.out_water_info; that.form.out_water_id = result.out_water_id; - that.idname = "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.mapform = [result.out_water_info.longitude, result.out_water_info.latitude, result.out_water_info .address ] @@ -1182,7 +1296,6 @@ var that = this; that.formdetail.status = status - console.log(that.formdetail); // return @@ -1233,7 +1346,6 @@ } }, handlePictureCardPreview(file) { - console.log("file", file) this.dialogImageUrl = file.url; this.dialogVisible = true; }, @@ -1262,7 +1374,6 @@ submitRainType() { var that = this this.rainTypeVisible = false - console.log(this.rainType); if (that.rainType == 1) { that.rainTitle = "雨水管道疏挖" } else if (that.rainType == 2) {