|
|
|
|
@ -4,24 +4,24 @@
|
|
|
|
|
<view class="box-header">
|
|
|
|
|
<view class="search-wrap">
|
|
|
|
|
<!-- 如果使用u-search组件,必须要给v-model绑定一个变量 -->
|
|
|
|
|
<u-search v-model="keyword" placeholder="请输入关键词" @search="tosearch()" height="56"
|
|
|
|
|
<u-search v-model="serachEntity.keyword" placeholder="请输入关键词" @custom="tosearch()" @search="tosearch()" height="56"
|
|
|
|
|
:action-style="{color: '#fff'}">
|
|
|
|
|
</u-search>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view :class="mask?'list listfixed':'list'" style="padding-top: 100rpx;">
|
|
|
|
|
<u-dropdown ref="uDropdown" @open="openmask" @close="closemask" :class="mask?'':'overflowmask'" >
|
|
|
|
|
<u-dropdown-item v-model="typeId" :title="typeStatus==''?'养护类型':typeStatus" @change="toChangeTypeStatus"
|
|
|
|
|
:options="typeList">
|
|
|
|
|
<u-dropdown ref="uDropdown" @open="openmask" @close="closemask" :class="mask?'':'overflowmask'">
|
|
|
|
|
<u-dropdown-item v-model="serachEntity.type" :title="typeStatus==''?'养护类型':typeStatus"
|
|
|
|
|
@change="toChangeTypeStatus" :options="typeList">
|
|
|
|
|
</u-dropdown-item>
|
|
|
|
|
<u-dropdown-item v-model="statusId" :title="proStatus==''?'状态':proStatus" @change="toChangeStatus"
|
|
|
|
|
:options="statusList">
|
|
|
|
|
<u-dropdown-item v-model="serachEntity.status" :title="proStatus==''?'状态':proStatus"
|
|
|
|
|
@change="toChangeStatus" :options="statusList">
|
|
|
|
|
</u-dropdown-item>
|
|
|
|
|
</u-dropdown>
|
|
|
|
|
<block v-for="(item, index) in dataList">
|
|
|
|
|
<u-card :title="item.created_at" padding="20" margin="20rpx" :border="true"
|
|
|
|
|
:sub-title="item.statusName" :thumb="thumb" thumb-width="36">
|
|
|
|
|
<u-card :title="item.created_at" padding="20" margin="20rpx" :border="true" :sub-title="item.statusName"
|
|
|
|
|
:thumb="thumb" thumb-width="36">
|
|
|
|
|
<view class="" slot="body" @click="todetail(item.id)">
|
|
|
|
|
<u-row gutter="16">
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
@ -42,7 +42,8 @@
|
|
|
|
|
<view class="demo-layout bg-purple">所属片区:</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="9">
|
|
|
|
|
<view class="demo-layout bg-purple-light">{{item.area_info?item.area_info.name:""}}</view>
|
|
|
|
|
<view class="demo-layout bg-purple-light">{{item.area_info?item.area_info.name:""}}
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="3">
|
|
|
|
|
<view class="demo-layout bg-purple">所属道路:</view>
|
|
|
|
|
@ -62,25 +63,25 @@
|
|
|
|
|
</view>
|
|
|
|
|
<view class="footer" slot="foot">
|
|
|
|
|
<block v-if="item.status==0">
|
|
|
|
|
<u-button :custom-style="editStyle" type="primary" size="medium"
|
|
|
|
|
@click="toedit(item.id)" :ripple="true">编辑
|
|
|
|
|
<u-button :custom-style="editStyle" type="primary" size="medium" @click="toedit(item.id)"
|
|
|
|
|
:ripple="true">编辑
|
|
|
|
|
</u-button>
|
|
|
|
|
</block>
|
|
|
|
|
<block v-if="item.status!=0">
|
|
|
|
|
<u-button :custom-style="editStyle" type="primary" size="medium"
|
|
|
|
|
@click="todetail(item.id)" :ripple="true">查看
|
|
|
|
|
<u-button :custom-style="editStyle" type="primary" size="medium" @click="todetail(item.id)"
|
|
|
|
|
:ripple="true">查看
|
|
|
|
|
</u-button>
|
|
|
|
|
</block>
|
|
|
|
|
<block >
|
|
|
|
|
<u-button type="error" size="medium" @click="del(item.id)"
|
|
|
|
|
:custom-style="customStyle" :ripple="true">删除
|
|
|
|
|
<block>
|
|
|
|
|
<u-button type="error" size="medium" @click="del(item.id)" :custom-style="customStyle"
|
|
|
|
|
:ripple="true">删除
|
|
|
|
|
</u-button>
|
|
|
|
|
</block>
|
|
|
|
|
</view>
|
|
|
|
|
</u-card>
|
|
|
|
|
|
|
|
|
|
</block>
|
|
|
|
|
<u-loadmore class="loadmore" :status="loadStatus" :load-text="loadText"/>
|
|
|
|
|
<u-loadmore class="loadmore" :status="loadStatus" :load-text="loadText" />
|
|
|
|
|
<u-empty text="暂无数据" margin-top="200" v-if="dataList.length==0" mode="list"></u-empty>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
@ -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 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|
|
|
|
|
|