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/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 @@ - @@ -12,10 +12,10 @@ - - @@ -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/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 @@ } } } - +