From 2545591f32fa766f32fa6eda7c56d864e7e54055 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, 14 Oct 2022 09:59:31 +0800 Subject: [PATCH 1/3] up --- pages.json | 358 ++++++++++++++++++----------------- pages/index/index.vue | 24 +++ raininspection/plan/plan.vue | 246 ++++++++++++++++++++++++ rainmaintain/plan/plan.vue | 22 +++ utils/util.js | 4 +- 5 files changed, 478 insertions(+), 176 deletions(-) create mode 100644 raininspection/plan/plan.vue create mode 100644 rainmaintain/plan/plan.vue diff --git a/pages.json b/pages.json index 552ff61..9dfa0e9 100644 --- a/pages.json +++ b/pages.json @@ -1,179 +1,189 @@ -{ - "easycom": { - "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" - }, - "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages - - { - "path": "pages/login/login", - "style": { - "navigationBarTitleText": "巡查登录", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - }, - { - "path": "pages/index/index", - "style": { - "navigationBarTitleText": "巡查养护", - "app-plus": { //uni-app项目对应节点名称为"app-plus" - "titleNView": { - "autoBackButton":false, - "buttons": [ - { - "float": "left", - "type": "home" - } - ] - } - } - } - }, { - "path": "pages/mine/mine", - "style": { - "navigationBarTitleText": "我的", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "road/road/road", - "style" : - { - "navigationBarTitleText": "选择道路", - "enablePullDownRefresh": false - } - - } - - ], - "subPackages": [{ - "root": "packageA/pages", - "pages": [{ - "path": "generalPatrol/generalPatrol", - "style": { - "navigationBarTitleText": "通用巡查", - "enablePullDownRefresh": false - } - - }, { - "path": "generalList/generalList", - "style": { - "navigationBarTitleText": "通用巡查", - "enablePullDownRefresh": false - } - - }, { - "path": "generalPatrol/viewPatrol", - "style": { - "navigationBarTitleText": "通用巡查", - "enablePullDownRefresh": false - - } - - }] - }, { - "root": "packageB/pages", - "pages": [{ - "path": "dailyInspection/dailyInspection", - "style": { - "navigationBarTitleText": "日常监管巡查", - "enablePullDownRefresh": false - } - - },{ - "path": "dailyList/dailyList", - "style": { - "navigationBarTitleText": "日常监管巡查", - "enablePullDownRefresh": true - } - },{ - "path": "dailyInfo/dailyInfo", - "style": { - "navigationBarTitleText": "日常监管巡查", - "enablePullDownRefresh": false - - } - }] - },{ - "root": "rainmaintain", - "pages": [{ - "path": "rainmaintain/rainmaintain", - "style": { - "navigationBarTitleText": "雨管养护", - "enablePullDownRefresh": false - } - }, { - "path": "rainmaintainlist/rainmaintainList", - "style": { - "navigationBarTitleText": "雨管养护", - "enablePullDownRefresh": true, - "disableScroll": true - } - }, { - "path": "rainmaintaininfo/rainmaintainInfo", - "style": { - "navigationBarTitleText": "雨管养护", - "enablePullDownRefresh": false, - "disableScroll": true +{ + "easycom": { + "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" + }, + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages - } - }] - },{ - "root": "raininspection", - "pages": [{ - "path": "raininspection/raininspection", - "style": { - "navigationBarTitleText": "雨管巡查", - "enablePullDownRefresh": false - } - }, { - "path": "raininspectionlist/raininspectionList", - "style": { - "navigationBarTitleText": "雨管巡查", - "enablePullDownRefresh": true, - "disableScroll": true - } - }, { - "path": "raininspectioninfo/raininspectionInfo", - "style": { - "navigationBarTitleText": "雨管巡查", - "enablePullDownRefresh": false, - "disableScroll": true + { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "巡查登录", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "巡查养护", + "app-plus": { //uni-app项目对应节点名称为"app-plus" + "titleNView": { + "autoBackButton": false, + "buttons": [{ + "float": "left", + "type": "home" + }] + } } - }] - }, { - "root": "order/order", - "pages": [{ - "path": "order/order", - "style": { - "navigationBarTitleText": "我的工单", - "enablePullDownRefresh": false - } - - },{ - "path": "orderList/orderList", - "style": { - "navigationBarTitleText": "我的工单", + } + }, { + "path": "pages/mine/mine", + "style": { + "navigationBarTitleText": "我的", + "enablePullDownRefresh": false + } + + }, { + "path": "road/road/road", + "style": { + "navigationBarTitleText": "选择道路", + "enablePullDownRefresh": false + } + + } + + ], + "subPackages": [{ + "root": "packageA/pages", + "pages": [{ + "path": "generalPatrol/generalPatrol", + "style": { + "navigationBarTitleText": "通用巡查", + "enablePullDownRefresh": false + } + + }, { + "path": "generalList/generalList", + "style": { + "navigationBarTitleText": "通用巡查", + "enablePullDownRefresh": false + } + + }, { + "path": "generalPatrol/viewPatrol", + "style": { + "navigationBarTitleText": "通用巡查", + "enablePullDownRefresh": false + + } + + }] + }, { + "root": "packageB/pages", + "pages": [{ + "path": "dailyInspection/dailyInspection", + "style": { + "navigationBarTitleText": "日常监管巡查", + "enablePullDownRefresh": false + } + + }, { + "path": "dailyList/dailyList", + "style": { + "navigationBarTitleText": "日常监管巡查", + "enablePullDownRefresh": true + } + }, { + "path": "dailyInfo/dailyInfo", + "style": { + "navigationBarTitleText": "日常监管巡查", + "enablePullDownRefresh": false + + } + }] + }, { + "root": "rainmaintain", + "pages": [{ + "path": "rainmaintain/rainmaintain", + "style": { + "navigationBarTitleText": "雨管养护", + "enablePullDownRefresh": false + } + }, { + "path": "rainmaintainlist/rainmaintainList", + "style": { + "navigationBarTitleText": "雨管养护", + "enablePullDownRefresh": true, + "disableScroll": true + } + }, { + "path": "rainmaintaininfo/rainmaintainInfo", + "style": { + "navigationBarTitleText": "雨管养护", + "enablePullDownRefresh": false, + "disableScroll": true + + } + }, { + "path": "plan/plan", + "style": { + "navigationBarTitleText": "养护计划", + "enablePullDownRefresh": false + } + + }] + }, { + "root": "raininspection", + "pages": [{ + "path": "raininspection/raininspection", + "style": { + "navigationBarTitleText": "雨管巡查", + "enablePullDownRefresh": false + } + }, { + "path": "raininspectionlist/raininspectionList", + "style": { + "navigationBarTitleText": "雨管巡查", "enablePullDownRefresh": true, - "disableScroll": true - } - },{ - "path": "orderInfo/orderInfo", - "style": { - "navigationBarTitleText": "我的工单", - "enablePullDownRefresh": false, - "disableScroll": true - - } - }] - }], - "globalStyle": { - "navigationBarTextStyle": "white", - "navigationBarTitleText": "巡查养护", - "navigationBarBackgroundColor": "#0385e5", - "backgroundColor": "#F8F8F8" - } + "disableScroll": true + } + }, { + "path": "raininspectioninfo/raininspectionInfo", + "style": { + "navigationBarTitleText": "雨管巡查", + "enablePullDownRefresh": false, + "disableScroll": true + + } + }, { + "path": "plan/plan", + "style": { + "navigationBarTitleText": "巡查计划", + "enablePullDownRefresh": false + } + + }] + }, { + "root": "order/order", + "pages": [{ + "path": "order/order", + "style": { + "navigationBarTitleText": "我的工单", + "enablePullDownRefresh": false + } + + }, { + "path": "orderList/orderList", + "style": { + "navigationBarTitleText": "我的工单", + "enablePullDownRefresh": true, + "disableScroll": true + } + }, { + "path": "orderInfo/orderInfo", + "style": { + "navigationBarTitleText": "我的工单", + "enablePullDownRefresh": false, + "disableScroll": true + + } + }] + }], + "globalStyle": { + "navigationBarTextStyle": "white", + "navigationBarTitleText": "巡查养护", + "navigationBarBackgroundColor": "#0385e5", + "backgroundColor": "#F8F8F8" + } } diff --git a/pages/index/index.vue b/pages/index/index.vue index 5ade41f..977defc 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -8,12 +8,24 @@ + + + + 巡查计划 + + 雨管巡查 + + + + 养护计划 + + @@ -123,6 +135,18 @@ } }); }, + + toviewplan(type) { + var url = '/raininspection/plan/plan'; + if (type == 2) { + url = "/rainmaintain/plan/plan" + } + uni.navigateTo({ + url: url + }) + + + }, toview(type) { let url = "/packageA/pages/generalPatrol/generalPatrol"; // let url = "/road/road/road?type=general" diff --git a/raininspection/plan/plan.vue b/raininspection/plan/plan.vue new file mode 100644 index 0000000..4ebb688 --- /dev/null +++ b/raininspection/plan/plan.vue @@ -0,0 +1,246 @@ + + + + + + + diff --git a/rainmaintain/plan/plan.vue b/rainmaintain/plan/plan.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/rainmaintain/plan/plan.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/utils/util.js b/utils/util.js index 2c792d1..c22eb02 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://192.168.60.100:9001', + //'development': 'http://patrol.115.langye.net', 'production': 'http://192.168.60.100:9001' }; // 审核状态 From 65dae297166ef9a7cfa48ed392fd6191ca429c3d 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: Mon, 17 Oct 2022 17:21:24 +0800 Subject: [PATCH 2/3] up --- main.js | 3 + package.json | 1 + pages.json | 16 ++ pages/index/index.vue | 2 + raininspection/plan/plan.vue | 106 ++++++++----- rainmaintain/plan/plan.vue | 297 ++++++++++++++++++++++++++++++++--- road/road/road.vue | 75 ++++----- utils/util.js | 4 +- 8 files changed, 407 insertions(+), 97 deletions(-) diff --git a/main.js b/main.js index 4fd4782..423320d 100644 --- a/main.js +++ b/main.js @@ -31,5 +31,8 @@ Vue.prototype.util = util; import gcoord from "@/utils/gcoord.js"; Vue.prototype.gcoord = gcoord; +import moment from "moment" +Vue.prototype.$moment = moment; + import {VueJsonp} from 'vue-jsonp' //中间有忘记大括号出现install undefind问题 Vue.use(VueJsonp) diff --git a/package.json b/package.json index 960f981..f68dc21 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "dependencies": { + "moment": "^2.29.4", "uview-ui": "^1.8.4", "vue-jsonp": "^2.0.0" } diff --git a/pages.json b/pages.json index f747d13..d1f0fab 100644 --- a/pages.json +++ b/pages.json @@ -114,6 +114,14 @@ "enablePullDownRefresh": false // "disableScroll": true + } + }, { + "path": "plan/plan", + "style": { + "navigationBarTitleText": "雨管养护", + "enablePullDownRefresh": false + // "disableScroll": true + } }] }, { @@ -138,6 +146,14 @@ "enablePullDownRefresh": false // "disableScroll": true + } + }, { + "path": "plan/plan", + "style": { + "navigationBarTitleText": "雨管巡查", + "enablePullDownRefresh": false + // "disableScroll": true + } }] }, { diff --git a/pages/index/index.vue b/pages/index/index.vue index 977defc..4a94084 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -20,6 +20,8 @@ 雨管巡查 + + diff --git a/raininspection/plan/plan.vue b/raininspection/plan/plan.vue index 4ebb688..40068c4 100644 --- a/raininspection/plan/plan.vue +++ b/raininspection/plan/plan.vue @@ -2,52 +2,69 @@ - + - - + + - - 地址/排放点: - - - {{item.address}} + + {{item.name}} - 巡查类型: + 巡查频率: - {{item.typeName}} + 每{{item.day}}一个循环 所属片区: - {{item.area_info?item.area_info.name:''}} + {{item.area_info?item.area_info.name:''}} + + + + 开始日期: + + + {{item.start_date}} - 所属道路: + 结束日期: - {{item.road_name}} + {{item.end_date}} - + +
所属道路
+ +
+
+ {{mod.road.name}} +
+
+ 去巡查 + +
+
+
- + @@ -68,20 +85,20 @@ backgroundColor: '#0385e5' }, mask: false, - loadStatus:"loadmore", - loadText:{ - loadmore:"加载更多", - nomore:"已经到底了" + loadStatus: "loadmore", + loadText: { + loadmore: "加载更多", + nomore: "已经到底了" }, dataList: [], thumb: "/static/img/location.png", currentPage: 0, - lastPage:0, - + lastPage: 0, + } }, onReachBottom: function(e) { - if(this.currentPage>=this.lastPage){ + if (this.currentPage >= this.lastPage) { this.loadStatus = "nomore" return; } @@ -97,19 +114,25 @@ this.loadPage(1); }, methods: { - openmask(){ - this.mask=true + toInspection(road_id, road_name) { + let url = "/raininspection/raininspection/raininspection?roadid=" + road_id + "&roadname=" + road_name + uni.navigateTo({ + url: url + }) + }, + openmask() { + this.mask = true // this.isPullDown(false); }, - closemask(){ - this.mask=false + closemask() { + this.mask = false // this.isPullDown(true); }, tosearch() { this.loadPage(1) this.$refs.uDropdown.close(); }, - + loadPage: function(page) { uni.hideKeyboard() var that = this; @@ -119,14 +142,14 @@ customLoading: false, data: { page: page, - page_size: 4, + page_size: 4, ...that.serachEntity }, utilSuccess: function(r) { var res = r.data; that.lastPage = r.last_page; uni.stopPullDownRefresh(); // 服务器总条数 < 每页条数, 会将第一页的条数重新返回 - if(r.total<5){ + if (r.total < 5) { that.loadStatus = "nomore"; } var hasNoMore = that.dataList.length < 4 && page > 1; @@ -190,7 +213,8 @@ margin: 10rpx 0; font-size: 28rpx; } - .u-card{ + + .u-card { z-index: 1; } @@ -201,16 +225,20 @@ background: #0385e5; padding: 20rpx; } - .overflowmask{ + + .overflowmask { overflow: hidden; } - .loadmore{ - padding:24rpx!important + + .loadmore { + padding: 24rpx !important } - .listfixed{ + + .listfixed { position: fixed; - width:100%; + width: 100%; } + .u-config-wrap { padding: 30rpx; } @@ -243,4 +271,4 @@ } } } - + diff --git a/rainmaintain/plan/plan.vue b/rainmaintain/plan/plan.vue index 8183fd0..27e31f7 100644 --- a/rainmaintain/plan/plan.vue +++ b/rainmaintain/plan/plan.vue @@ -1,22 +1,277 @@ - - - - - + + + diff --git a/road/road/road.vue b/road/road/road.vue index 7183bde..01034d6 100644 --- a/road/road/road.vue +++ b/road/road/road.vue @@ -1,6 +1,5 @@