From 08c244dfcf82ac12583c542a094d0ab66993fcc9 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Thu, 25 Aug 2022 14:43:41 +0800 Subject: [PATCH] up --- App.vue | 3 +- pages.json | 1 + .../raininspection/raininspection.vue | 217 +++++++++++++----- .../raininspectioninfo/raininspectionInfo.vue | 145 +++++++----- .../raininspectionlist/raininspectionList.vue | 14 +- rainmaintain/rainmaintain/rainmaintain.vue | 70 +++--- .../rainmaintaininfo/rainmaintainInfo.vue | 46 ++-- .../rainmaintainlist/rainmaintainList.vue | 31 +-- road/road/road.vue | 27 ++- static/css/fontindex.css | 10 + uni.scss | 2 +- utils/util.js | 2 +- 12 files changed, 381 insertions(+), 187 deletions(-) create mode 100644 static/css/fontindex.css diff --git a/App.vue b/App.vue index 75112a1..be0abd4 100644 --- a/App.vue +++ b/App.vue @@ -17,6 +17,7 @@ diff --git a/pages.json b/pages.json index f4419ac..552ff61 100644 --- a/pages.json +++ b/pages.json @@ -46,6 +46,7 @@ } } + ], "subPackages": [{ "root": "packageA/pages", diff --git a/raininspection/raininspection/raininspection.vue b/raininspection/raininspection/raininspection.vue index 97780a2..b8ea594 100644 --- a/raininspection/raininspection/raininspection.vue +++ b/raininspection/raininspection/raininspection.vue @@ -24,12 +24,12 @@ - + @@ -42,6 +42,12 @@ + + + + + + - + 重新获取 - - - + --> + + + - + {{item.name}} - - - - + + + + + + 重新获取 + + + + + 重新获取 + + + + + + + + + + + + + + - + {{item.name}} @@ -149,7 +179,8 @@ roadName: "", instype: 1, typeShow: false, - askShow: false, + askShow: false, + unusualShow:false, formshow: true, lawshow: false, showInfoId: false, @@ -158,7 +189,8 @@ buildtypeName: "", typeName: "日常雨水设施", askName: "", - lawName: "", + lawName: "", + unusualName:"", buildName: "", confirmText: "确认", dateparams: { @@ -173,54 +205,51 @@ buildTypes: [], buildList: [], lawTypes: [], - askContentList: [], + askContentList: [], + unusualList:[], statuss: [{ - id: 1, + id:1, name: "在建" }, { - id: 2, + id:2, name: "完工" }, ], rainTypes: [{ - id: 1, + id:1, name: "日常雨水设施" }, { - id: 2, + id:2, name: "在建工地" } ], scenes: [{ - id: 0, + id:0, name: "否" }, { - id: 1, + id:1, name: "是" } ], laws: [{ - id: 0, + id:0, name: "否" }, { - id: 1, + id:1, name: "是" } ], unusuals: [{ - id: 0, + id:0, name: "否" }, { - id: 1, - name: "丢失" - }, - { - id: 2, - name: "破损" + id:1, + name: "是" } ] }, @@ -238,7 +267,13 @@ tip: "", address: "", longitude: "", - latitude: "", + latitude: "", + start_address:"", + start_longitude: "", + start_latitude: "", + end_address: "", + end_longitude: "", + end_latitude: "", files_list: [], files_end_list: [], building_site_id: "", @@ -249,24 +284,12 @@ remark: "", is_law: "", break_id: "", - mobile_worksheet_id:"" + mobile_worksheet_id:"", + build_unit:"", + carry_unit:"" }, rules: { - scope: [{ - required: true, - message: '请填写覆盖范围', - trigger: ['blur'], - }], - point_name: [{ - required: true, - message: '请填写点位名称', - trigger: ['blur'], - }], - content: [{ - required: true, - message: '请填写描述', - trigger: ['blur'], - }], + }, apis: { @@ -286,7 +309,8 @@ onLoad(options) { var that = this; this.loadAskContent(); - this.loadLawTypes(); + this.loadLawTypes(); + this.loadUnusualContent(); // this.loadBuild(); this.loadBuildType(); if (options.id) { @@ -321,10 +345,18 @@ } if (loc) { that.form.latitude = JSON.parse(loc).lat; - that.form.longitude = JSON.parse(loc).lon; + that.form.longitude = JSON.parse(loc).lon; + that.form.start_latitude = JSON.parse(loc).lat; + that.form.start_longitude = JSON.parse(loc).lon; + that.form.end_latitude = JSON.parse(loc).lat; + that.form.end_longitude = JSON.parse(loc).lon; } else { that.form.latitude = res.latitude; - that.form.longitude = res.longitude; + that.form.longitude = res.longitude; + that.form.start_latitude = res.latitude; + that.form.start_longitude = res.longitude; + that.form.end_latitude = res.latitude; + that.form.end_longitude = res.longitude; } const url = "https://apis.map.qq.com/ws/geocoder/v1/?key=EUQBZ-MJALU-WZFVR-2HFNW-TIK2K-TNBJI&location=" + @@ -332,7 +364,9 @@ that.$jsonp( url ).then(re => { - that.form.address = re.result.formatted_addresses.recommend + that.form.address = re.result.formatted_addresses.recommend + that.form.start_address = re.result.formatted_addresses.recommend + that.form.end_address = re.result.formatted_addresses.recommend }) } @@ -350,7 +384,6 @@ var that = this // that.rainArr.buildList = [] that.loadBuild() - console.log("123", that.rainArr.buildList) // if(that.rainArr.buildList){ // } @@ -390,7 +423,9 @@ that.form.remark = buildinfo.remark that.form.latitude = buildinfo.latitude; that.form.longitude = buildinfo.longitude; - that.form.address = buildinfo.address; + that.form.address = buildinfo.address; + that.form.build_unit = buildinfo.build_unit + that.form.carry_unit = buildinfo.carry_unit for (var m of that.rainArr.buildTypes) { if (that.form.type == m.id) { that.buildtypeName = m.value @@ -403,6 +438,11 @@ var that = this that.askName = val[0].label that.form.ask_content_id = val[0].value + }, + confirmUnusualType(val) { + var that = this + that.unusualName = val[0].label + that.form.unusual_type_id = val[0].value }, confirmLawType(val) { console.log(val) @@ -428,7 +468,13 @@ that.form.is_law = 0 if (val[0].value == 2) { that.formshow = false - that.lawshow = false + that.lawshow = false + that.form.start_address="" + that.form.start_longitude="" + that.form.start_latitude="" + that.form.end_address="" + that.form.end_longitude="" + that.form.end_latitude="" } console.log("res", that.form) }, @@ -443,6 +489,42 @@ that.form.latitude = res.latitude; } }); + }, + unusualchange(val){ + console.log(val) + var that = this + if(val==1){ + that.form.start_address = ""; + that.form.start_longitude = ""; + that.form.start_latitude = ""; + that.form.end_address = ""; + that.form.end_longitude = ""; + that.form.end_latitude = ""; + } + }, + chooseStartLocation(e) { //打开地图选择位置 + var that = this; + uni.chooseLocation({ + longitude: that.form.start_longitude, + latitude: that.form.start_latitude, + success: res => { + that.form.start_address = res.name; + that.form.start_longitude = res.longitude; + that.form.start_latitude = res.latitude; + } + }); + }, + chooseEndLocation(e) { //打开地图选择位置 + var that = this; + uni.chooseLocation({ + longitude: that.form.end_longitude, + latitude: that.form.end_latitude, + success: res => { + that.form.end_address = res.name; + that.form.end_longitude = res.longitude; + that.form.end_latitude = res.latitude; + } + }); }, toremove(index, lists, name, whatfile) { if (whatfile == "filesList") { @@ -565,6 +647,22 @@ that.util.alert(res); } }); + }, + loadUnusualContent() { + var that = this; + that.util.request({ + api: '/api/admin/parameter/show', + method: "get", + data: { + number: "unusualList" + }, + utilSuccess: function(result) { + that.rainArr.unusualList = result.detail + }, + utilFail: function(res) { + that.util.alert(res); + } + }); }, showInfo(id) { @@ -583,7 +681,8 @@ that.instype = 1 that.form = result.rain_equipment_info; that.form.rain_equipment_id = result.rain_equipment_id; - that.askName = result.rain_equipment_info.ask_content_detail.value + that.askName = result.rain_equipment_info.ask_content_detail.value + that.unusualName = result.rain_equipment_info.unusual_type_detail?result.rain_equipment_info.unusual_type_detail.value:"" that.roadName = result.rain_equipment_info.road ? result.rain_equipment_info .road.name : "" let _files = []; @@ -615,7 +714,9 @@ that.form.building_site_content_id = result.building_site_content_id; that.buildName = result.building_site_info.building_site.name that.form.building_site_id = result.building_site_info.building_site.id - that.form.name = result.building_site_info.building_site.name + that.form.name = result.building_site_info.building_site.name + that.form.build_unit = result.building_site_info.building_site.build_unit + that.form.carry_unit = result.building_site_info.building_site.carry_unit that.form.number = result.building_site_info.building_site.number that.form.type = result.building_site_info.building_site.type that.form.status = result.building_site_info.building_site.status diff --git a/raininspection/raininspectioninfo/raininspectionInfo.vue b/raininspection/raininspectioninfo/raininspectionInfo.vue index 03b8a90..57a50ff 100644 --- a/raininspection/raininspectioninfo/raininspectionInfo.vue +++ b/raininspection/raininspectioninfo/raininspectionInfo.vue @@ -18,115 +18,132 @@ - + 巡查类型: - + {{typeName}} - + 巡查内容: - + {{askName}} - - + - + 所属片区: - + {{areaName}} - + 工地名称: - + {{form.buildName}} - + 工地编号: - + {{form.number}} + + + + 建设单位: + + + {{form.build_unit}} + + + + + 施工单位: + + + {{form.carry_unit}} + - + 工地类型: - + {{form.buildtypeName}} - + 工地状态: - + {{form.statusName}} - + 备注: - + {{form.remark}} - + 是否违法: - + {{form.lawName}} - - 违法内容: + + 违规内容: - + {{form.lawContentName}} + + + + 描述: + + + {{form.content}} + + - - 描述: - - - {{form.content}} - - - - + 现场图片: @@ -136,15 +153,39 @@ - + 是否异常: - + {{form.unsualName}} + + + + 巡查开始点位: + + + {{form.start_address}} + + + + + 巡查结束点位: + + + {{form.end_address}} + + + + + 异常类型: + + + {{form.unsualtypeName}} + - - + + 异常处置建议: @@ -153,15 +194,15 @@ - + 是否现场处理: - + {{form.sceneName}} - + 处理结果: @@ -169,7 +210,7 @@ - + 处理后图片: @@ -252,16 +293,10 @@ that.form = result.rain_equipment_info; that.form.rain_equipment_id = result.rain_equipment_id; that.askName = result.rain_equipment_info.ask_content_detail.value - that.areaName = result.area_info?result.area_info.name:"" - if(result.rain_equipment_info.is_unusual==1){ - that.form.unsualName == "丢失" - }else if(result.rain_equipment_info.is_unusual==2){ - that.form.unsualName == "破损" - }else{ - that.form.unsualName == "否" - } + that.areaName = result.area_info?result.area_info.name:"" + that.form.unsualName=result.rain_equipment_info.is_unusual==1?"是":"否" that.form.sceneName = that.form.is_scene==0?"否":"是" - + that.form.unsualtypeName = result.rain_equipment_info.unusual_type_detail?result.rain_equipment_info.unusual_type_detail.value:"" let _files = []; for (var mod of result.rain_equipment_info.rain_equipment_files) { let m = Object.assign({}, mod); @@ -293,8 +328,8 @@ that.form.name = result.building_site_info.building_site.name that.form.number=result.building_site_info.building_site.number that.form.type=result.building_site_info.building_site.type - - + that.form.build_unit=result.building_site_info.building_site.build_unit + that.form.carry_unit=result.building_site_info.building_site.carry_unit that.form.break_id = result.building_site_info.break_id for(var m of that.buildTypes){ if(result.building_site_info.building_site.type==m.id){ diff --git a/raininspection/raininspectionlist/raininspectionList.vue b/raininspection/raininspectionlist/raininspectionList.vue index befce7f..730718b 100644 --- a/raininspection/raininspectionlist/raininspectionList.vue +++ b/raininspection/raininspectionlist/raininspectionList.vue @@ -25,7 +25,7 @@ :sub-title="item.statusName" :thumb="thumb" thumb-width="36"> - + 地址/排放点: @@ -33,22 +33,22 @@ - + 巡查类型: - + {{item.typeName}} - + 所属片区: - + {{item.area_info?item.area_info.name:''}} - + 所属道路: - + {{item.road_name}} diff --git a/rainmaintain/rainmaintain/rainmaintain.vue b/rainmaintain/rainmaintain/rainmaintain.vue index 8ae370d..f252a70 100644 --- a/rainmaintain/rainmaintain/rainmaintain.vue +++ b/rainmaintain/rainmaintain/rainmaintain.vue @@ -33,14 +33,14 @@ - - + - + @@ -64,14 +64,14 @@ - + {{item.name}} - + {{item.name}} @@ -146,6 +146,14 @@ { id: 5, name: "出水口排查" + }, + { + id: 6, + name: "专项处理" + }, + { + id: 7, + name: "维修" } ], solves: [{ @@ -190,22 +198,22 @@ mobile_worksheet_id:"" }, rules: { - scope: [{ - required: true, - message: '请填写覆盖范围', - trigger: ['blur'], - }], - point_name: [{ - required: true, - message: '请填写点位名称', - trigger: ['blur'], - }], - content: [{ - required: true, - message: '请填写描述', - // 可以单个或者同时写两个触发验证方式 - trigger: ['blur'], - }] + // scope: [{ + // required: true, + // message: '请填写覆盖范围', + // trigger: ['blur'], + // }], + // point_name: [{ + // required: true, + // message: '请填写点位名称', + // trigger: ['blur'], + // }], + // content: [{ + // required: true, + // message: '请填写描述', + // // 可以单个或者同时写两个触发验证方式 + // trigger: ['blur'], + // }] }, apis: { store: [ @@ -214,7 +222,9 @@ "/api/mobile/rain-maintains/circulation-store", "/api/mobile/rain-maintains/help-discharge-store", "/api/mobile/rain-maintains/mire-store", - "/api/mobile/rain-maintains/out-water-store" + "/api/mobile/rain-maintains/out-water-store", + "/api/mobile/rain-maintains/circulation-store", + "/api/mobile/rain-maintains/circulation-store" ], save: [ "", @@ -222,7 +232,9 @@ "/api/mobile/rain-maintains/circulation-save", "/api/mobile/rain-maintains/help-discharge-save", "/api/mobile/rain-maintains/mire-save", - "/api/mobile/rain-maintains/out-water-save" + "/api/mobile/rain-maintains/out-water-save", + "/api/mobile/rain-maintains/circulation-store", + "/api/mobile/rain-maintains/circulation-store" ] } } @@ -415,11 +427,17 @@ switch (result.type) { case 1: - case 2: + case 2: + case 6: + case 7: if (result.type == 1) { that.typeName = "雨水管道疏挖" } else if (result.type == 2) { that.typeName = "雨水管道疏通" + }else if (result.type == 6) { + that.typeName = "专项处理" + }else if (result.type == 7) { + that.typeName = "维修" } that.form = result.circulation_info; diff --git a/rainmaintain/rainmaintaininfo/rainmaintainInfo.vue b/rainmaintain/rainmaintaininfo/rainmaintainInfo.vue index e6ec1c6..a0351f5 100644 --- a/rainmaintain/rainmaintaininfo/rainmaintainInfo.vue +++ b/rainmaintain/rainmaintaininfo/rainmaintainInfo.vue @@ -10,7 +10,7 @@ - + 地址/排放点: @@ -18,18 +18,18 @@ - + 养护类型: - + {{form.typeName}} - + 养护内容: - + {{titleName}} @@ -41,7 +41,7 @@ {{form.number}} - + - + 所属片区: - + {{form.areaName}} - + 描述: @@ -74,7 +74,7 @@ - + 现场图片: @@ -84,23 +84,23 @@ - + 是否解决: - + {{form.solveName}} - + 是否违法: - + {{form.lawName}} - + 临时处理办法: @@ -108,7 +108,7 @@ - + 处理结果: @@ -116,7 +116,7 @@ - + 处理后图片: @@ -191,7 +191,9 @@ that.lists = result switch (result.type) { case 1: - case 2: + case 2: + case 6: + case 7: that.form = result.circulation_info; let _files = []; @@ -222,7 +224,7 @@ that.form.areaName = result.area_info ? result.area_info.name : "" that.form.created_at = result.created_at that.titleName = result.circulation_info.title_detail ? result - .circulation_info.title_detail.value : '' + .circulation_info.title_detail : '' break; case 3: that.lawshow = false @@ -253,7 +255,7 @@ that.form.areaName = result.area_info ? result.area_info.name : "" that.form.created_at = result.created_at that.titleName = result.help_discharge_info.title_detail ? result - .help_discharge_info.title_detail.value : '' + .help_discharge_info.title_detail : '' break; case 4: that.formshow = false @@ -303,7 +305,7 @@ that.form.areaName = result.area_info ? result.area_info.name : "" that.form.created_at = result.created_at that.titleName = result.out_water_info.title_detail ? result.out_water_info - .title_detail.value : '' + .title_detail : '' break; } }, diff --git a/rainmaintain/rainmaintainlist/rainmaintainList.vue b/rainmaintain/rainmaintainlist/rainmaintainList.vue index 8981e57..703bd3f 100644 --- a/rainmaintain/rainmaintainlist/rainmaintainList.vue +++ b/rainmaintain/rainmaintainlist/rainmaintainList.vue @@ -24,7 +24,7 @@ :thumb="thumb" thumb-width="36"> - + 地址/排放点: @@ -32,23 +32,23 @@ - + 养护类型: - + {{item.typeName}} - + 所属片区: - + {{item.area_info?item.area_info.name:""}} - + 所属道路: - + {{item.road_name}} @@ -304,8 +304,17 @@ m.typeName = "雨水管道疏通" m.road_name = m.circulation_info.road ? m.circulation_info.road.name : "" - - break + break + case 6: + m.typeName = "专项处理" + m.road_name = m.circulation_info.road ? m.circulation_info.road.name : + "" + break + case 7: + m.typeName = "维修" + m.road_name = m.circulation_info.road ? m.circulation_info.road.name : + "" + break case 3: m.typeName = "汛期助排" m.road_name = m.help_discharge_info.road ? m.help_discharge_info.road @@ -315,16 +324,12 @@ case 4: m.typeName = "污泥外运" m.road_name = m.mire_info.road ? m.mire_info.road.name : "" - break case 5: m.typeName = "出水口排查" m.road_name = m.out_water_info.road ? m.out_water_info.road.name : "" - break - default: - break; } } diff --git a/road/road/road.vue b/road/road/road.vue index 1c3a4c6..1e4ca43 100644 --- a/road/road/road.vue +++ b/road/road/road.vue @@ -101,7 +101,18 @@ }, methods: { - towhichtype() { + towhichtype() { + if(this.road_id==""){ + uni.showToast({ + icon: "none", + title: "请选择道路", + complete() { + }, + duration: 2000 + }) + return + } + let totype = this.totype let url = "/packageA/pages/generalPatrol/generalPatrol"; if (totype == 'general') { @@ -128,7 +139,17 @@ this.road_id = arr[0] this.road_name = arr[1] }, - tosearch() { + tosearch() { + if(this.keyword==""){ + uni.showToast({ + icon: "none", + title: "请输入关键字", + complete() { + }, + duration: 2000 + }) + return + } // this.latitude = "" // this.longitude = "" this.loadPage(1) @@ -138,7 +159,7 @@ url: "../rainmaintain/rainmaintain?id=" + id }) }, - + loadPage: function(page) { uni.hideKeyboard() var that = this; diff --git a/static/css/fontindex.css b/static/css/fontindex.css new file mode 100644 index 0000000..e3ea7da --- /dev/null +++ b/static/css/fontindex.css @@ -0,0 +1,10 @@ + uni-page-body, + uni-view, + uni-text, + .uni-input-placeholder, + .uni-input-input, + .uni-textarea-textarea, + .uni-textarea-placeholder, + .u-btn{ + font-size: 40rpx!important; + } \ No newline at end of file diff --git a/uni.scss b/uni.scss index 515cb69..37f0b52 100644 --- a/uni.scss +++ b/uni.scss @@ -42,7 +42,7 @@ $uni-border-color:#c8c7cc; /* 文字尺寸 */ $uni-font-size-sm:12px; -$uni-font-size-base:14px; +$uni-font-size-base:16px; $uni-font-size-lg:16; /* 图片尺寸 */ diff --git a/utils/util.js b/utils/util.js index c22eb02..92032b4 100755 --- a/utils/util.js +++ b/utils/util.js @@ -1,7 +1,7 @@ import md5 from "./md5.min"; const HOSTARR = { 'development': 'http://192.168.60.100:9001', - //'development': 'http://patrol.115.langye.net', + // 'development': 'http://patrol.115.langye.net', 'production': 'http://192.168.60.100:9001' }; // 审核状态