From 1a849ece21ffffb76924345327a253cb87b5eecb Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Fri, 23 Sep 2022 12:01:19 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=9F=A5=E5=85=BB=E6=8A=A4=E8=AE=A1?=
=?UTF-8?q?=E5=88=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/rain/inspection/plan.vue | 88 ++++++++++++++++++++--
src/views/rain/maintain/plan.vue | 115 +++++++++++++++++++----------
2 files changed, 160 insertions(+), 43 deletions(-)
diff --git a/src/views/rain/inspection/plan.vue b/src/views/rain/inspection/plan.vue
index 698af5b..47d5de2 100644
--- a/src/views/rain/inspection/plan.vue
+++ b/src/views/rain/inspection/plan.vue
@@ -27,6 +27,11 @@
{{scope.row['start_date']}}至{{scope.row['end_date']}}
+
+
+ {{item.road?item.road.name:""}}
+
+
{{scope.row[column.field]}}
@@ -38,7 +43,7 @@
-
+
@@ -73,6 +78,23 @@
+
+
+
+
+
+
@@ -147,6 +169,9 @@
import {
listarea
} from '../../../api/basic/area.js'
+ import {
+ listroad
+ } from '../../../api/basic/road.js'
import { getparameteritem } from '../../../api/system/dictionary.js'
import LxHeader from "@/components/LxHeader/index.vue";
@@ -188,9 +213,12 @@
start_date:"",
end_date:"",
responsible_id:"",
- remark:""
- },
-
+ remark:"",
+ roads_list:[]
+ },
+ roadArr:[],
+ roadList:[],
+ roadloading:false,
rules: {
name:[{
required: true,
@@ -225,6 +253,13 @@
width:180,
align: "center"
},
+ {
+ field: "road_name",
+ title: "巡查道路",
+ type: "road_name",
+ width:180,
+ align: "center"
+ },
{
field: "day",
title: "循环机制",
@@ -265,11 +300,13 @@
}
],
}
+ },
+ mounted() {
+
},
created() {
this.initLoad();
this.load();
-
},
methods: {
initLoad() {
@@ -298,6 +335,13 @@
console.log(error)
reject(error)
});
+ listroad({
+ page:1,
+ page_size:999
+ }).then(res => {
+ // this.roadloading = false
+ this.roadList = res.data
+ })
// getparameteritem('plan-type').then(res => {
// that.plantypes = res.detail
// })
@@ -321,6 +365,9 @@
m.item_type_name = k.value
}
}
+ if(m.roads.length>0){
+ m.road_name = m.roads
+ }
m.area_name = m.area_info.name
m.responsibleName = m.responsible?m.responsible.name :""
}
@@ -339,6 +386,9 @@
// this.$set(that.form,res);
that.form = result;
that.dateRange = [result.start_date,result.end_date]
+ for(var m of result.roads){
+ this.roadArr.push(m.road_id)
+ }
}).catch(error => {
//reject(error)
@@ -347,6 +397,7 @@
edit(obj) {
this.form = this.$options.data().form
+ this.roadArr=[]
if (obj) {
this.info(obj)
}
@@ -376,7 +427,17 @@
submitForm(formName) {
this.form.start_date = this.dateRange[0]
this.form.end_date = this.dateRange[1]
- var that = this;
+ var that = this;
+ console.log(this.roadArr)
+ if(this.roadArr.length>0){
+ for(var m of this.roadArr){
+ this.form.roads_list.push({
+ road_id:m
+ })
+ }
+ }
+ console.log(this.form)
+ // return
this.$refs[formName].validate((valid) => {
if (valid) {
if (that.form.id) {
@@ -406,9 +467,24 @@
resetForm(formName) {
var that = this;
that.dateRange = [];
+ this.roadArr = []
this.$refs[formName].resetFields();
that.dialogFormVisible = false;
+ },
+ filterRoadMethod(query,item){
+ return item.name.indexOf(query) > -1;
+ // if (query != '') {
+ // this.roadloading = true
+ // listroad({
+ // name: query
+ // }).then(res => {
+ // this.roadloading = false
+ // this.roadList = res.data
+ // })
+ // } else {
+ // this.roadList = []
+ // }
}
}
}
diff --git a/src/views/rain/maintain/plan.vue b/src/views/rain/maintain/plan.vue
index bec5def..68b97b2 100644
--- a/src/views/rain/maintain/plan.vue
+++ b/src/views/rain/maintain/plan.vue
@@ -9,6 +9,8 @@
+
+
-
- 点击上传
-
@@ -65,18 +52,55 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 点击上传
+
+
+
+
+
+
+
+
+
-
+
+
+ 所属片区:{{plan_area_name}}
-
+
@@ -326,12 +340,16 @@
}]
},
fileData:[],
+ plan_area_id:"",
+ plan_area_name:"",
+ dialogPlanVisible:false,
dialogFileVisible:false,
filecolumns:[{
field: "序号",
title: "序号",
type: "string",
align: "left",
+ width:80
},{
field: "路名",
title: "路名",
@@ -357,6 +375,16 @@
title: "支管",
type: "string",
align: "left",
+ },{
+ field: "inspection_well",
+ title: "窨井",
+ type: "string",
+ align: "left",
+ },{
+ field: "side_well",
+ title: "边井",
+ type: "string",
+ align: "left",
}],
columns: [{
@@ -619,6 +647,7 @@
},
handleSuccess(response, file, fileList){
// this.fileList = response
+
var nowyear = ""
var k = 0
for(var i=0;i{
this.$Message.success('操作成功');
this.fileList = []
- this.fileData = []
+ this.fileData = []
+ this.plan_area_id=""
this.load();
this.dialogFileVisible = false
}).catch(error=>{
@@ -687,6 +727,7 @@
resetFile(){
this.fileList = []
this.fileData = []
+ this.plan_area_id=""
this.dialogFileVisible = false
}
}