diff --git a/packageA/pages/generalList/generalList.vue b/packageA/pages/generalList/generalList.vue
index 8418a2a..7f7e84a 100644
--- a/packageA/pages/generalList/generalList.vue
+++ b/packageA/pages/generalList/generalList.vue
@@ -4,32 +4,27 @@
-
-
-
-
-
- {{item.label}}
-
-
- 确定
-
+
+
-
+
+
-
+
@@ -52,7 +47,7 @@
{{item.feedback_department.name}}
-
+
@@ -61,7 +56,7 @@
{{item.road_name}}
-
+
@@ -73,21 +68,21 @@
-
+
@@ -103,54 +98,46 @@
backgroundColor: '#0385e5'
},
mask: false,
- loadStatus:"loadmore",
- loadText:{
- loadmore:"加载更多",
- nomore:"已经到底了"
+ loadStatus: "loadmore",
+ loadText: {
+ loadmore: "加载更多",
+ nomore: "已经到底了"
},
dataList: [],
- thumb: "/static/img/location.png",
currentPage: 0,
- lastPage:0,
- editStyle:{
- fontSize:'30rpx'
+ lastPage: 0,
+ editStyle: {
+ fontSize: '30rpx'
},
customStyle: {
marginLeft: '20px',
- fontSize:'30rpx'
+ fontSize: '30rpx'
+ },
+ searchEntity: {
+ status: "",
+ ask_type_id: "",
+ keyword: "",
+ statusName: "",
+ ask_type: ""
},
- currentRole: "inspector", //前端用户角色:inspector巡查员,manager管理员,operator现场处置人员
- value1Arr: [],
- value1: "",
- value2: '',
- value3: '',
- value3v: '',
- keyword: "",
- title: "",
- stat: [],
- options1: [],
- options2: [],
- options3: [{
+ askTypeArr: [],
+ statusArr: [{
label: "所有",
- value: "所有",
- v: ""
+ value: "",
}, {
- label: "待处理",
- value: "待处理",
- v: "save"
+ label: "已提交",
+ value: "1"
}, {
- label: "处理中",
- value: "处理中",
- v: "ongong"
+ label: "已审核",
+ value: "2"
}, {
- label: "已处理",
- value: "已处理",
- v: "finashed"
+ label: "已办结",
+ value: "3"
}]
}
},
onReachBottom: function(e) {
- if(this.currentPage>=this.lastPage){
+ if (this.currentPage >= this.lastPage) {
this.loadStatus = "nomore"
return;
}
@@ -163,33 +150,65 @@
var that = this;
},
onLoad(options) {
+ let that = this;
this.loadPage(1);
+ this.loadType({
+ 'number': "general_type",
+ }, function(res) {
+ console.log(res)
+ var arr = [];
+ arr.push({
+ label: "所有",
+ value: "",
+ })
+ for (var m of res) {
+ arr.push({
+ label: m.value,
+ value: m.id,
+ })
+ }
+ that.askTypeArr = arr;
+ });
},
methods: {
- openmask(){
- this.mask=true
+ loadType(data, call) {
+ let that = this;
+ this.util.request({
+ api: '/api/admin/parameter/show',
+ data: data,
+ utilSuccess: function(res) {
+ call(res.detail)
+ },
+ utilFail: function(res) {
+ this.util.alert(res);
+ }
+ });
+ },
+ openmask() {
+ this.mask = true
// this.isPullDown(false);
},
- closemask(){
- this.mask=false
+ closemask() {
+ this.mask = false
// this.isPullDown(true);
},
toChangeStatus: function(value) {
- var jsonSearch = this.options3.filter(function(e) {
+ var jsonSearch = this.statusArr.filter(function(e) {
return e.value == value;
});
- this.value3v = jsonSearch[0].v;
- console.log(jsonSearch)
+ this.searchEntity.statusName = jsonSearch[0].label;
+ this.loadPage(1)
+ this.$refs.uDropdown.close();
+ },
+ toChangeAsk: function(value) {
+ var jsonSearch = this.askTypeArr.filter(function(e) {
+ return e.value == value;
+ });
+ this.searchEntity.ask_type = jsonSearch[0].label;
this.loadPage(1)
this.$refs.uDropdown.close();
},
tosearch() {
- this.value1Arr = [];
- for (var m of this.options1) {
- if (m.active) {
- this.value1Arr.push(m.value);
- }
- }
this.loadPage(1)
this.$refs.uDropdown.close();
},
@@ -197,18 +216,18 @@
this.options1[index].active = !this.options1[index].active;
},
- toedit(id){
+ toedit(id) {
uni.navigateTo({
- url:"../generalPatrol/generalPatrol?id="+id
+ url: "../generalPatrol/generalPatrol?id=" + id
})
},
-
+
todetail: function(id) {
uni.navigateTo({
url: "../generalPatrol/viewPatrol?id=" + id
})
},
-
+
loadPage: function(page) {
uni.hideKeyboard()
var that = this;
@@ -219,13 +238,13 @@
data: {
page: page,
page_size: 4,
- keyword: that.keyword
+ ...that.searchEntity
},
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;
@@ -248,8 +267,8 @@
}
for (var m of dataList) {
m.created_at = m.created_at.split("T")[0]
- m.road_name = m.road?m.road.name:""
- switch(m.status){
+ m.road_name = m.road ? m.road.name : ""
+ switch (m.status) {
case 1:
m.statusName = "已提交"
break
@@ -262,9 +281,9 @@
case 4:
m.statusName = "已办结"
break
-
+
default:
-
+
break;
}
}
@@ -285,43 +304,43 @@
}
});
},
- del(id){
- var that = this;
- uni.showModal({
- title: '提示',
- content: '是否确定删除?',
- success(res) {
- if(res.confirm){
- that.util.request({
- api: '/api/mobile/common-inspection/destroy',
- customLoading: false,
- method:"get",
- data: {
- id:id
- },
- utilSuccess: function(r) {
- uni.showToast({
- icon: "none",
- title: "提交成功",
- complete() {
- that.loadPage(1)
- },
- duration: 2000
- })
- },
- utilFail:function(r) {
- this.util.alert(res);
- },
-
- })
- }else if(res.cancel){
-
- }
- }
-
-
-
- })
+ del(id) {
+ var that = this;
+ uni.showModal({
+ title: '提示',
+ content: '是否确定删除?',
+ success(res) {
+ if (res.confirm) {
+ that.util.request({
+ api: '/api/mobile/common-inspection/destroy',
+ customLoading: false,
+ method: "get",
+ data: {
+ id: id
+ },
+ utilSuccess: function(r) {
+ uni.showToast({
+ icon: "none",
+ title: "提交成功",
+ complete() {
+ that.loadPage(1)
+ },
+ duration: 2000
+ })
+ },
+ utilFail: function(r) {
+ this.util.alert(res);
+ },
+
+ })
+ } else if (res.cancel) {
+
+ }
+ }
+
+
+
+ })
}
}
@@ -352,7 +371,8 @@
margin: 10rpx 0;
font-size: 28rpx;
}
- .u-card{
+
+ .u-card {
z-index: 1;
}
@@ -363,16 +383,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;
}
@@ -405,4 +429,4 @@
}
}
}
-
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 41dcbf9..78f58ad 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -8,30 +8,30 @@
-
+
雨管巡查
-
+
雨管养护
-
-
-
+
@@ -42,7 +42,7 @@
-
+
通用巡查
@@ -62,20 +62,54 @@
data() {
return {
title: '',
- userInfo: {}
+ userInfo: {
+ allow_menu_list: -1
+ },
+ isshowty: false,
+ isshowxc: false,
+ isshowyh: false,
+ isshowrc: false
}
},
onLoad() {
this.loadInfo();
- },
- mounted() {
- var a = document.getElementsByClassName('uni-page-head-btn')[0]
- a.style.display = 'none';
- },
- onNavigationBarButtonTap(val) {
- window.android.finish();
+ },
+ mounted() {
+ var a = document.getElementsByClassName('uni-page-head-btn')[0]
+ a.style.display = 'none';
+ },
+ watch: {
+ userInfo: {
+ // 每个属性值发生变化就会调用这个函数
+ handler(newVal, oldVal) {
+ this.isshowty = this.hasMenu(4);
+ this.isshowxc = this.hasMenu(1);
+ this.isshowyh = this.hasMenu(2);
+ this.isshowrc = this.hasMenu(3);
+ },
+ // 立即处理 进入页面就触发
+ immediate: true,
+ // 深度监听 属性的变化
+ deep: true
+ }
+ },
+ onNavigationBarButtonTap(val) {
+ window.android.finish();
},
methods: {
+ hasMenu(menu_id) {
+ if (this.userInfo.allow_menu_list == -1) return false;
+ if (this.userInfo.allow_menu_list.length == 0) {
+ return true;
+ } else {
+ let list = this.userInfo.allow_menu_list.filter((item) => {
+ return item == menu_id;
+ });
+
+ return list > 0;
+
+ }
+ },
loadInfo() {
let that = this;
this.util.request({
@@ -90,25 +124,25 @@
});
},
toview(type) {
- // let url = "/packageA/pages/generalPatrol/generalPatrol";
+ // let url = "/packageA/pages/generalPatrol/generalPatrol";
let url = "/road/road/road?type=general"
if (type == 2) {
url = "/pages/mine/mine"
- }
- if (type == 3) {
- // url = "/road/road/road?type=daily"
- url = "/packageB/pages/dailyInspection/dailyInspection"
- }
- if (type == 4) {
- url = "/road/road/road?type=rainmaintain"
- // url = "/rainmaintain/rainmaintain/rainmaintain"
- }
- if (type == 5) {
- url = "/road/road/road?type=raininspection"
- // url = "/raininspection/raininspection/raininspection"
- }
- // if (type == 6) {
- // url = "/order/order/order/order"
+ }
+ if (type == 3) {
+ // url = "/road/road/road?type=daily"
+ url = "/packageB/pages/dailyInspection/dailyInspection"
+ }
+ if (type == 4) {
+ url = "/road/road/road?type=rainmaintain"
+ // url = "/rainmaintain/rainmaintain/rainmaintain"
+ }
+ if (type == 5) {
+ url = "/road/road/road?type=raininspection"
+ // url = "/raininspection/raininspection/raininspection"
+ }
+ // if (type == 6) {
+ // url = "/order/order/order/order"
// }
uni.navigateTo({
url: url
diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue
index de03647..6c93b3c 100644
--- a/pages/mine/mine.vue
+++ b/pages/mine/mine.vue
@@ -8,40 +8,40 @@
-
+
我的巡查
-
+
我的养护
-
-
-
-
-
-
-
- 我的工单
-
-
+
+
+ 我的工单
+
+
+
+
+
+
+
我的日常监督巡查
-
+
@@ -56,13 +56,47 @@
data() {
return {
title: '',
- userInfo: {}
+ userInfo: {
+ allow_menu_list: -1
+ },
+ isshowty: false,
+ isshowxc: false,
+ isshowyh: false,
+ isshowrc: false
}
},
onLoad() {
this.loadInfo();
},
+ watch: {
+ userInfo: {
+ // 每个属性值发生变化就会调用这个函数
+ handler(newVal, oldVal) {
+ this.isshowty = this.hasMenu(4);
+ this.isshowxc = this.hasMenu(1);
+ this.isshowyh = this.hasMenu(2);
+ this.isshowrc = this.hasMenu(3);
+ },
+ // 立即处理 进入页面就触发
+ immediate: true,
+ // 深度监听 属性的变化
+ deep: true
+ }
+ },
methods: {
+ hasMenu(menu_id) {
+ if (this.userInfo.allow_menu_list == -1) return false;
+ if (this.userInfo.allow_menu_list.length == 0) {
+ return true;
+ } else {
+ let list = this.userInfo.allow_menu_list.filter((item) => {
+ return item == menu_id;
+ });
+
+ return list > 0;
+
+ }
+ },
loadInfo() {
let that = this;
this.util.request({
@@ -80,15 +114,15 @@
let url = "/packageA/pages/generalList/generalList";
if (type == 2) {
url = "/packageB/pages/dailyList/dailyList"
- }
- if (type == 3) {
- url = "/rainmaintain/rainmaintainlist/rainmaintainList"
- }
- if (type == 4) {
- url = "/raininspection/raininspectionlist/raininspectionList"
- }
- if (type == 5) {
- url = "/order/order/orderList/orderList"
+ }
+ if (type == 3) {
+ url = "/rainmaintain/rainmaintainlist/rainmaintainList"
+ }
+ if (type == 4) {
+ url = "/raininspection/raininspectionlist/raininspectionList"
+ }
+ if (type == 5) {
+ url = "/order/order/orderList/orderList"
}
uni.navigateTo({
url: url
diff --git a/raininspection/raininspectionlist/raininspectionList.vue b/raininspection/raininspectionlist/raininspectionList.vue
index b16ce16..befce7f 100644
--- a/raininspection/raininspectionlist/raininspectionList.vue
+++ b/raininspection/raininspectionlist/raininspectionList.vue
@@ -4,7 +4,7 @@
-
-
@@ -93,6 +93,11 @@
export default {
data() {
return {
+ serachEntity: {
+ keyword: "",
+ status: "",
+ type: ""
+ },
background: {
backgroundColor: '#0385e5'
},
@@ -221,8 +226,8 @@
customLoading: false,
data: {
page: page,
- page_size: 4,
- keyword: that.keyword
+ page_size: 4,
+ ...that.serachEntity
},
utilSuccess: function(r) {
var res = r.data;
diff --git a/rainmaintain/rainmaintain/rainmaintain.vue b/rainmaintain/rainmaintain/rainmaintain.vue
index 85ee41e..f828273 100644
--- a/rainmaintain/rainmaintain/rainmaintain.vue
+++ b/rainmaintain/rainmaintain/rainmaintain.vue
@@ -17,7 +17,7 @@
-
+
@@ -29,17 +29,17 @@
重新获取
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -106,16 +106,16 @@
otherData: {
token: ""
},
- roadName: "",
- aboutShow:false,
+ roadName: "",
+ aboutShow: false,
typeShow: false,
dateShow: false,
formshow: true,
lawshow: true,
- showInfoId: false,
- askName:"",
- askShow:false,
- numShow:false,
+ showInfoId: false,
+ askName: "",
+ askShow: false,
+ numShow: false,
typeName: "雨水管道疏挖",
dateparams: {
year: true,
@@ -125,8 +125,8 @@
minute: true,
second: true,
},
- rainArr: {
- askContentList:[],
+ rainArr: {
+ askContentList: [],
rainTypes: [{
id: 1,
name: "雨水管道疏挖"
@@ -183,10 +183,10 @@
files_list: [],
files_deal_list: [],
date: "",
- address: "",
- scope:"",
- point_name:"",
- title_id:""
+ address: "",
+ scope: "",
+ point_name: "",
+ title_id: ""
},
rules: {
content: [{
@@ -202,7 +202,7 @@
"/api/mobile/rain-maintains/circulation-store",
"/api/mobile/rain-maintains/circulation-store",
"/api/mobile/rain-maintains/help-discharge-store",
- "/api/mobile/rain-maintains/mire-store",
+ "/api/mobile/rain-maintains/mire-store",
"/api/mobile/rain-maintains/out-water-store"
],
save: [
@@ -210,7 +210,7 @@
"/api/mobile/rain-maintains/circulation-save",
"/api/mobile/rain-maintains/circulation-save",
"/api/mobile/rain-maintains/help-discharge-save",
- "/api/mobile/rain-maintains/mire-save",
+ "/api/mobile/rain-maintains/mire-save",
"/api/mobile/rain-maintains/out-water-save"
]
}
@@ -226,7 +226,7 @@
if (options.roadid) {
this.form.road_id = options.roadid
this.roadName = options.roadname
- }
+ }
that.loadAskContent();
@@ -278,15 +278,15 @@
that.typeName = val[0].label
that.form.type = val[0].value
that.formshow = true
- that.lawshow = true
- that.aboutShow = false
+ that.lawshow = true
+ that.aboutShow = false
that.numShow = false
- that.filesList = [];
- that.askName = ""
- that.form.title_id=""
+ that.filesList = [];
+ that.askName = ""
+ that.form.title_id = ""
this.$refs.uUpload.clear();
- that.dealFilesList = [];
- that.form.scope = ""
+ that.dealFilesList = [];
+ that.form.scope = ""
that.form.point_name = ""
if (that.form.is_solve == 1) {
this.$refs.uUploaddeal.clear();
@@ -300,35 +300,36 @@
that.form.longitude = ""
}
if (val[0].value == 3 || val[0].value == 4) {
- that.lawshow = false
+ that.lawshow = false
+ that.aboutShow = true
+ }
+ if (val[0].value == 5) {
that.aboutShow = true
- }
- if (val[0].value == 5) {
- that.aboutShow = true
- that.numShow = true
+ that.numShow = true
}
+ that.loadAskContent();
console.log("res", that.form)
- },
- confirmAskType(e){
- console.log(e)
- this.askName = e[0].label
- this.form.title_id = e[0].value
- },
- loadAskContent() {
- var that = this;
- that.util.request({
- api: '/api/admin/parameter/show',
- method: "get",
- data: {
- number: "maintainContent"
- },
- utilSuccess: function(result) {
- that.rainArr.askContentList = result.detail
- },
- utilFail: function(res) {
- that.util.alert(res);
- }
- });
+ },
+ confirmAskType(e) {
+ console.log(e)
+ this.askName = e[0].label
+ this.form.title_id = e[0].value
+ },
+ loadAskContent() {
+ var that = this;
+ that.util.request({
+ api: '/api/admin/parameter/show',
+ method: "get",
+ data: {
+ number: "maintainContent" + "_" + that.form.type
+ },
+ utilSuccess: function(result) {
+ that.rainArr.askContentList = result.detail
+ },
+ utilFail: function(res) {
+ that.util.alert(res);
+ }
+ });
},
chooseLocation(e) { //打开地图选择位置
var that = this;
@@ -409,9 +410,11 @@
that.form = result.circulation_info;
that.form.circulation_id = result.circulation_id;
- that.roadName = result.circulation_info.road?result.circulation_info.road.name:""
- that.askName = result.circulation_info.title_detail?result.circulation_info.title_detail.value:""
-
+ that.roadName = result.circulation_info.road ? result.circulation_info.road
+ .name : ""
+ that.askName = result.circulation_info.title_detail ? result.circulation_info
+ .title_detail.value : ""
+
let _files = [];
for (var mod of result.circulation_info.circulation_files) {
let m = Object.assign({}, mod);
@@ -433,37 +436,39 @@
that.dealFilesList = _filesafter;
that.form.type = result.type
console.log(that.form)
- break;
- case 5:
- that.typeName = "出水口排查"
- that.numShow = true
- that.aboutShow = true
- that.form = result.out_water_info;
- that.form.out_water_id = result.out_water_id
- that.roadName = result.out_water_info.road?result.out_water_info.road.name:""
- that.askName = result.out_water_info.title_detail?result.out_water_info.title_detail.value:""
- let water_files = [];
- for (var mod of result.out_water_info.out_water_files) {
- let m = Object.assign({}, mod);
- m.url = mod.files.url;
- m.id = mod.files.id;
- m.photoType = "before";
- water_files.push(m);
- }
- that.filesList = water_files;
-
- let water_filesafter = [];
- for (var mod of result.out_water_info.out_water_deal_files) {
- let m = Object.assign({}, mod);
- m.url = mod.files.url;
- m.id = mod.files.id;
- m.photoType = "after";
- water_filesafter.push(m);
- }
- that.dealFilesList = water_filesafter;
- that.form.type = result.type
- console.log(that.form)
-
+ break;
+ case 5:
+ that.typeName = "出水口排查"
+ that.numShow = true
+ that.aboutShow = true
+ that.form = result.out_water_info;
+ that.form.out_water_id = result.out_water_id
+ that.roadName = result.out_water_info.road ? result.out_water_info.road.name :
+ ""
+ that.askName = result.out_water_info.title_detail ? result.out_water_info
+ .title_detail.value : ""
+ let water_files = [];
+ for (var mod of result.out_water_info.out_water_files) {
+ let m = Object.assign({}, mod);
+ m.url = mod.files.url;
+ m.id = mod.files.id;
+ m.photoType = "before";
+ water_files.push(m);
+ }
+ that.filesList = water_files;
+
+ let water_filesafter = [];
+ for (var mod of result.out_water_info.out_water_deal_files) {
+ let m = Object.assign({}, mod);
+ m.url = mod.files.url;
+ m.id = mod.files.id;
+ m.photoType = "after";
+ water_filesafter.push(m);
+ }
+ that.dealFilesList = water_filesafter;
+ that.form.type = result.type
+ console.log(that.form)
+
break
case 3:
that.typeName = "汛期助排"
@@ -554,7 +559,7 @@
}
this.$refs.uForm.validate(valid => {
- console.log("form",that.form)
+ console.log("form", that.form)
// return;
if (valid) {
console.log('验证通过');
diff --git a/rainmaintain/rainmaintaininfo/rainmaintainInfo.vue b/rainmaintain/rainmaintaininfo/rainmaintainInfo.vue
index 6fc4233..e6ec1c6 100644
--- a/rainmaintain/rainmaintaininfo/rainmaintainInfo.vue
+++ b/rainmaintain/rainmaintaininfo/rainmaintainInfo.vue
@@ -2,9 +2,9 @@
-
+
@@ -24,38 +24,38 @@
{{form.typeName}}
-
-
-
- 养护内容:
-
-
- {{titleName}}
-
-
-
-
- 排水口编号:
-
-
- {{form.number}}
-
-
-
-
- 覆盖范围:
-
-
- {{form.scope}}米
-
-
-
-
- 点位名称:
-
-
- {{form.point_name}}
-
+
+
+
+ 养护内容:
+
+
+ {{titleName}}
+
+
+
+
+ 排水口编号:
+
+
+ {{form.number}}
+
+
+
+
+ 覆盖范围:
+
+
+ {{form.scope}}米
+
+
+
+
+ 点位名称:
+
+
+ {{form.point_name}}
+
@@ -78,7 +78,8 @@
现场图片:
-
+
@@ -119,23 +120,24 @@
处理后图片:
-
+
-
-
-
-
+
+
+
+
-
+
-
+
-
-
+
+
@@ -145,164 +147,174 @@
export default {
data() {
return {
- formshow:true,
- lawshow:true,
- titleName:"",
- watershow:false,
- lists:{},
- form:{},
- filesList:[],
- dealFilesList:[],
-
+ formshow: true,
+ lawshow: true,
+ titleName: "",
+ watershow: false,
+ lists: {},
+ form: {},
+ filesList: [],
+ dealFilesList: [],
+
}
},
-
-
-
+
+
+
onLoad(options) {
- if(options.id){
+ if (options.id) {
this.loadInfo(options.id)
}
},
- methods: {
- imgListPreview(item){
- var urlList = []
- urlList.push(item) //push中的参数为 :src="item.img_url" 中的图片地址
- uni.previewImage({
- indicator:"number",
- loop:true,
- urls: urlList
- })
-
+ methods: {
+ imgListPreview(item) {
+ var urlList = []
+ urlList.push(item) //push中的参数为 :src="item.img_url" 中的图片地址
+ uni.previewImage({
+ indicator: "number",
+ loop: true,
+ urls: urlList
+ })
+
},
loadInfo: function(id) {
var that = this;
this.util.request({
- method:"get",
+ method: "get",
api: '/api/mobile/rain-maintains/show',
customLoading: false,
data: {
- id:id
+ id: id
},
-
+
utilSuccess: function(result) {
that.lists = result
- switch(result.type){
- case 1:
- case 2:
-
- that.form = result.circulation_info;
- let _files = [];
- for (var mod of result.circulation_info.circulation_files) {
- let m = Object.assign({}, mod);
- m.url = mod.files.url;
- m.id = mod.files.id;
- m.photoType = "before";
- _files.push(m);
- }
- that.filesList = _files;
-
- let _filesafter = [];
- for (var mod of result.circulation_info.circulation_deal_files) {
- let m = Object.assign({}, mod);
- m.url = mod.files.url;
- m.id = mod.files.id;
- m.photoType = "after";
- _filesafter.push(m);
- }
- that.dealFilesList = _filesafter;
- that.form.type = result.type
- result.circulation_info.is_solve==0 ? that.form.solveName="否":that.form.solveName="是"
- result.circulation_info.is_law==0 ? that.form.lawName="否":that.form.lawName="是"
- 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:''
- break;
- case 3:
- that.lawshow = false
- that.form = result.help_discharge_info;
- let discharge_files = [];
- for (var mod of result.help_discharge_info.help_discharge_files) {
- let m = Object.assign({}, mod);
- m.url = mod.files.url;
- m.id = mod.files.id;
- m.photoType = "before";
- discharge_files.push(m);
- }
- that.filesList = discharge_files;
-
- let discharge_filesafter = [];
- for (var mod of result.help_discharge_info.help_discharge_deal_files) {
- let m = Object.assign({}, mod);
- m.url = mod.files.url;
- m.id = mod.files.id;
- m.photoType = "after";
- discharge_filesafter.push(m);
- }
- that.dealFilesList = discharge_filesafter;
- that.form.type = result.type
- that.form.typeName = "汛期助排"
- result.help_discharge_info.is_solve==0 ? that.form.solveName="否":that.form.solveName="是"
- that.form.areaName = result.area_info?result.area_info.name:""
- that.form.created_at = result.created_at
- break;
- case 4:
- that.formshow = false
- that.form = result.mire_info;
- let mire_files = [];
- for (var mod of result.mire_info.mire_files) {
- let m = Object.assign({}, mod);
- m.url = mod.files.url;
- m.id = mod.files.id;
- m.photoType = "before";
- mire_files.push(m);
- }
- that.filesList =mire_files;
- that.form.type = result.type
- that.form.typeName = "污泥外运"
- that.form.areaName = result.area_info?result.area_info.name:""
- that.form.created_at = result.created_at
- break;
- case 5:
- that.watershow = true
- that.form = result.out_water_info;
- let water_files = [];
- for (var mod of result.out_water_info.out_water_files) {
- let m = Object.assign({}, mod);
- m.url = mod.files.url;
- m.id = mod.files.id;
- m.photoType = "before";
- water_files.push(m);
- }
- that.filesList = water_files;
-
- let water_filesafter = [];
- for (var mod of result.out_water_info.out_water_deal_files) {
- let m = Object.assign({}, mod);
- m.url = mod.files.url;
- m.id = mod.files.id;
- m.photoType = "after";
- water_filesafter.push(m);
- }
- that.dealFilesList = water_filesafter;
- that.form.type = result.type
- that.form.typeName = "出水口排查"
- result.out_water_info.is_solve==0 ? that.form.solveName="否":that.form.solveName="是"
- result.out_water_info.is_law==0 ? that.form.lawName="否":that.form.lawName="是"
- 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:''
- break;
+ switch (result.type) {
+ case 1:
+ case 2:
+
+ that.form = result.circulation_info;
+ let _files = [];
+ for (var mod of result.circulation_info.circulation_files) {
+ let m = Object.assign({}, mod);
+ m.url = mod.files.url;
+ m.id = mod.files.id;
+ m.photoType = "before";
+ _files.push(m);
+ }
+ that.filesList = _files;
+
+ let _filesafter = [];
+ for (var mod of result.circulation_info.circulation_deal_files) {
+ let m = Object.assign({}, mod);
+ m.url = mod.files.url;
+ m.id = mod.files.id;
+ m.photoType = "after";
+ _filesafter.push(m);
+ }
+ that.dealFilesList = _filesafter;
+ that.form.type = result.type
+ that.form.typeName = result.type == 1 ? "雨水管道疏挖" : "雨水管道疏通"
+ result.circulation_info.is_solve == 0 ? that.form.solveName = "否" : that
+ .form.solveName = "是"
+ result.circulation_info.is_law == 0 ? that.form.lawName = "否" : that.form
+ .lawName = "是"
+ 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 : ''
+ break;
+ case 3:
+ that.lawshow = false
+ that.form = result.help_discharge_info;
+ let discharge_files = [];
+ for (var mod of result.help_discharge_info.help_discharge_files) {
+ let m = Object.assign({}, mod);
+ m.url = mod.files.url;
+ m.id = mod.files.id;
+ m.photoType = "before";
+ discharge_files.push(m);
+ }
+ that.filesList = discharge_files;
+
+ let discharge_filesafter = [];
+ for (var mod of result.help_discharge_info.help_discharge_deal_files) {
+ let m = Object.assign({}, mod);
+ m.url = mod.files.url;
+ m.id = mod.files.id;
+ m.photoType = "after";
+ discharge_filesafter.push(m);
+ }
+ that.dealFilesList = discharge_filesafter;
+ that.form.type = result.type
+ that.form.typeName = "汛期助排"
+ result.help_discharge_info.is_solve == 0 ? that.form.solveName = "否" : that
+ .form.solveName = "是"
+ 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 : ''
+ break;
+ case 4:
+ that.formshow = false
+ that.form = result.mire_info;
+ let mire_files = [];
+ for (var mod of result.mire_info.mire_files) {
+ let m = Object.assign({}, mod);
+ m.url = mod.files.url;
+ m.id = mod.files.id;
+ m.photoType = "before";
+ mire_files.push(m);
+ }
+ that.filesList = mire_files;
+ that.form.type = result.type
+ that.form.typeName = "污泥外运"
+ that.form.areaName = result.area_info ? result.area_info.name : ""
+ that.form.created_at = result.created_at
+ break;
+ case 5:
+ that.watershow = true
+ that.form = result.out_water_info;
+ let water_files = [];
+ for (var mod of result.out_water_info.out_water_files) {
+ let m = Object.assign({}, mod);
+ m.url = mod.files.url;
+ m.id = mod.files.id;
+ m.photoType = "before";
+ water_files.push(m);
+ }
+ that.filesList = water_files;
+
+ let water_filesafter = [];
+ for (var mod of result.out_water_info.out_water_deal_files) {
+ let m = Object.assign({}, mod);
+ m.url = mod.files.url;
+ m.id = mod.files.id;
+ m.photoType = "after";
+ water_filesafter.push(m);
+ }
+ that.dealFilesList = water_filesafter;
+ that.form.type = result.type
+ that.form.typeName = "出水口排查"
+ result.out_water_info.is_solve == 0 ? that.form.solveName = "否" : that.form
+ .solveName = "是"
+ result.out_water_info.is_law == 0 ? that.form.lawName = "否" : that.form
+ .lawName = "是"
+ 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 : ''
+ break;
}
},
utilFail: function(res) {
-
+
this.util.alert(res);
}
});
}
-
+
}
@@ -331,19 +343,22 @@
margin: 10rpx 0;
font-size: 28rpx;
}
- .u-card{
+
+ .u-card {
z-index: 1;
}
+
diff --git a/rainmaintain/rainmaintainlist/rainmaintainList.vue b/rainmaintain/rainmaintainlist/rainmaintainList.vue
index f0212c4..8981e57 100644
--- a/rainmaintain/rainmaintainlist/rainmaintainList.vue
+++ b/rainmaintain/rainmaintainlist/rainmaintainList.vue
@@ -4,24 +4,24 @@
-
-
+
+
-
+
-
+
@@ -42,7 +42,8 @@
所属片区:
- {{item.area_info?item.area_info.name:""}}
+ {{item.area_info?item.area_info.name:""}}
+
所属道路:
@@ -62,25 +63,25 @@
-
+
@@ -95,56 +96,66 @@
background: {
backgroundColor: '#0385e5'
},
+ serachEntity: {
+ keyword: "",
+ status: "",
+ type: ""
+ },
mask: false,
- loadStatus:"loadmore",
- loadText:{
- loadmore:"加载更多",
- nomore:"已经到底了"
+ loadStatus: "loadmore",
+ loadText: {
+ loadmore: "加载更多",
+ nomore: "已经到底了"
},
dataList: [],
thumb: "/static/img/location.png",
currentPage: 0,
- lastPage:0,
- editStyle:{
- fontSize:'30rpx'
+ lastPage: 0,
+ editStyle: {
+ fontSize: '30rpx'
},
customStyle: {
marginLeft: '20px',
- fontSize:'30rpx'
+ fontSize: '30rpx'
},
value1Arr: [],
keyword: "",
title: "",
stat: [],
- statusId:"",
- proStatus:"",
- typeId:"",
- typeStatus:"",
+ statusId: "",
+ proStatus: "",
+ typeId: "",
+ typeStatus: "",
typeList: [{
- label: "所有",
- value: ''
- }, {
- value:1,
- label:"雨水管道疏挖"
- },
- {
- value:2,
- label:"雨水管道疏通"
- },
- {
- value:3,
- label:"汛期助排"
- },
- {
- value:4,
- label:"污泥外运"
- }],
+ label: "所有",
+ value: ''
+ }, {
+ value: 1,
+ label: "雨水管道疏挖"
+ },
+ {
+ value: 2,
+ label: "雨水管道疏通"
+ },
+ {
+ value: 3,
+ label: "汛期助排"
+ },
+ {
+ value: 4,
+ label: "污泥外运"
+ },
+ {
+ value: 5,
+ label: "出水口排查"
+ }
+ ],
statusList: [{
label: "所有",
value: ''
}, {
label: "待审核",
- value: "0"
+ value: 0
}, {
label: "已审核",
value: 1
@@ -154,14 +165,11 @@
}, {
label: "已退回",
value: 3
- }, {
- label: "缺陷办结",
- value: 4
}]
}
},
onReachBottom: function(e) {
- if(this.currentPage>=this.lastPage){
+ if (this.currentPage >= this.lastPage) {
this.loadStatus = "nomore"
return;
}
@@ -177,12 +185,12 @@
this.loadPage(1);
},
methods: {
- openmask(){
- this.mask=true
+ openmask() {
+ this.mask = true
// this.isPullDown(false);
},
- closemask(){
- this.mask=false
+ closemask() {
+ this.mask = false
// this.isPullDown(true);
},
tosearch() {
@@ -190,18 +198,18 @@
this.$refs.uDropdown.close();
},
toChangeStatus: function(value) {
- for(var m of this.statusList){
- if(value == m.value){
+ for (var m of this.statusList) {
+ if (value == m.value) {
this.proStatus = m.label
}
}
- console.log(this.proStatus )
+ console.log(this.proStatus)
this.loadPage(1);
this.$refs.uDropdown.close();
},
toChangeTypeStatus: function(value) {
- for(var m of this.typeList){
- if(value == m.value){
+ for (var m of this.typeList) {
+ if (value == m.value) {
this.typeStatus = m.label
}
}
@@ -212,9 +220,9 @@
this.options1[index].active = !this.options1[index].active;
},
- toedit(id){
+ toedit(id) {
uni.navigateTo({
- url:"../rainmaintain/rainmaintain?id="+id
+ url: "../rainmaintain/rainmaintain?id=" + id
})
},
todetail: function(id) {
@@ -222,10 +230,10 @@
url: "../rainmaintaininfo/rainmaintainInfo?id=" + id
})
},
- loadAllArea(){
-
+ loadAllArea() {
+
},
-
+
loadPage: function(page) {
uni.hideKeyboard()
var that = this;
@@ -236,14 +244,13 @@
data: {
page: page,
page_size: 4,
- keyword: that.keyword,
- area_id:that.areaId
+ ...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;
@@ -266,7 +273,7 @@
}
for (var m of dataList) {
m.created_at = m.created_at.split("T")[0]
- switch(m.status){
+ switch (m.status) {
case 0:
m.statusName = "待审核"
break
@@ -282,39 +289,42 @@
case 4:
m.statusName = "缺陷办结"
break
-
+
default:
-
+
break;
}
- switch(m.type){
+ switch (m.type) {
case 1:
m.typeName = "雨水管道疏挖"
- m.road_name = m.circulation_info.road?m.circulation_info.road.name:""
+ m.road_name = m.circulation_info.road ? m.circulation_info.road.name :
+ ""
break
case 2:
m.typeName = "雨水管道疏通"
- m.road_name = m.circulation_info.road?m.circulation_info.road.name:""
-
+ 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.name:""
-
+ m.road_name = m.help_discharge_info.road ? m.help_discharge_info.road
+ .name : ""
+
break
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
-
+ 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;
}
}
@@ -335,43 +345,43 @@
}
});
},
- del(id){
- var that = this;
- uni.showModal({
- title: '提示',
- content: '是否确定删除?',
- success(res) {
- if(res.confirm){
- that.util.request({
- api: '/api/mobile/rain-maintains/destroy',
- customLoading: false,
- method:"get",
- data: {
- id:id
- },
- utilSuccess: function(r) {
- uni.showToast({
- icon: "none",
- title: "提交成功",
- complete() {
- that.loadPage(1)
- },
- duration: 2000
- })
- },
- utilFail:function(r) {
- this.util.alert(res);
- },
-
- })
- }else if(res.cancel){
-
- }
- }
-
-
-
- })
+ del(id) {
+ var that = this;
+ uni.showModal({
+ title: '提示',
+ content: '是否确定删除?',
+ success(res) {
+ if (res.confirm) {
+ that.util.request({
+ api: '/api/mobile/rain-maintains/destroy',
+ customLoading: false,
+ method: "get",
+ data: {
+ id: id
+ },
+ utilSuccess: function(r) {
+ uni.showToast({
+ icon: "none",
+ title: "提交成功",
+ complete() {
+ that.loadPage(1)
+ },
+ duration: 2000
+ })
+ },
+ utilFail: function(r) {
+ this.util.alert(res);
+ },
+
+ })
+ } else if (res.cancel) {
+
+ }
+ }
+
+
+
+ })
}
}
@@ -402,7 +412,8 @@
margin: 10rpx 0;
font-size: 28rpx;
}
- .u-card{
+
+ .u-card {
z-index: 1;
}
@@ -413,16 +424,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;
}
@@ -455,4 +470,4 @@
}
}
}
-
+