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] 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 @@
-