|
@ -6,8 +6,18 @@ |
|
|
scroll-view{ |
|
|
scroll-view{ |
|
|
flex-grow: 1; |
|
|
flex-grow: 1; |
|
|
height:1rpx; |
|
|
height:1rpx; |
|
|
|
|
|
|
|
|
|
|
|
.u-swipe-action{ |
|
|
|
|
|
.u-swipe-action-item{ |
|
|
|
|
|
margin:0 30rpx 30rpx; |
|
|
|
|
|
} |
|
|
|
|
|
.u-swipe-action-item__right__button{ |
|
|
|
|
|
display:flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
.card{ |
|
|
.card{ |
|
|
margin-top:0rpx; |
|
|
margin:0rpx; |
|
|
&>.title{ |
|
|
&>.title{ |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
@ -97,24 +107,31 @@ |
|
|
</d-navbar> |
|
|
</d-navbar> |
|
|
<d-search v-model="searchVal.search" @search="search('pageOne')"/> |
|
|
<d-search v-model="searchVal.search" @search="search('pageOne')"/> |
|
|
<scroll-view scroll-y @scrolltolower="search()"> |
|
|
<scroll-view scroll-y @scrolltolower="search()"> |
|
|
<view class="card" v-for="(v,k) in list" :key="k" @click="toDetail(v)"> |
|
|
<u-swipe-action> |
|
|
<view class="title"> |
|
|
<u-swipe-action-item v-for="(v,k) in list" :key="k"> |
|
|
<text class="icon"/> |
|
|
<view class="card" @click="toDetail(v)"> |
|
|
<text class="name over">{{v.baseName}}</text> |
|
|
<view class="title"> |
|
|
<text v-if="v.flagAbnormal==0" class="statu no">无异常</text> |
|
|
<text class="icon"/> |
|
|
<text v-else class="statu unusual">异常</text> |
|
|
<text class="name over">{{v.baseName}}</text> |
|
|
<text v-if="v.flagAbnormal==1" class="deal">(已处理{{v.deal}}/{{v.detailVos.length}})</text> |
|
|
<text v-if="v.flagAbnormal==0" class="statu no">无异常</text> |
|
|
<text class="plant-youbian"/> |
|
|
<text v-else class="statu unusual">异常</text> |
|
|
</view> |
|
|
<text v-if="v.flagAbnormal==1" class="deal">(已处理{{v.deal}}/{{v.detailVos.length}})</text> |
|
|
<view class="imgs"> |
|
|
<text class="plant-youbian"/> |
|
|
<image v-for="(v1,k1) in v.pic.slice(0,4)" :style="{'--c':v.pic.length-4>0?`'+${v.pic.length-4}'`:''}" :key="k1" mode="aspectFill" :src="`${host}/${v1}`"/> |
|
|
</view> |
|
|
</view> |
|
|
<view class="imgs"> |
|
|
<u-read-more toggle closetext="展开" showHeight="80rpx" textIndent="0em" style="margin-top:10rpx;">{{v.remark}}</u-read-more> |
|
|
<image v-for="(v1,k1) in v.pic.slice(0,4)" :style="{'--c':v.pic.length-4>0?`'+${v.pic.length-4}'`:''}" :key="k1" mode="aspectFill" :src="`${host}/${v1}`"/> |
|
|
<view class="foot"> |
|
|
</view> |
|
|
<text>巡园日期:{{v.operateDate}}</text> |
|
|
<u-read-more toggle closetext="展开" showHeight="80rpx" textIndent="0em" style="margin-top:10rpx;">{{v.remark}}</u-read-more> |
|
|
<text>{{v.userName}}</text> |
|
|
<view class="foot"> |
|
|
</view> |
|
|
<text>巡园日期:{{v.operateDate}}</text> |
|
|
</view> |
|
|
<text>{{v.userName}}</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view slot="button" class="u-swipe-action-item__right__button"> |
|
|
|
|
|
<button class="cu-btn bg-red" style="margin:auto;" @click="del(k)">删除</button> |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-swipe-action-item> |
|
|
|
|
|
</u-swipe-action> |
|
|
<view style="border:1rpx solid transparent;"/> |
|
|
<view style="border:1rpx solid transparent;"/> |
|
|
<u-empty :show="list.length<=0" text="未查询到相关信息" width="50%" icon="/static/noData.png"/> |
|
|
<u-empty :show="list.length<=0" text="未查询到相关信息" width="50%" icon="/static/noData.png"/> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
@ -140,11 +157,20 @@ export default { |
|
|
this.search() |
|
|
this.search() |
|
|
}, |
|
|
}, |
|
|
methods:{ |
|
|
methods:{ |
|
|
async search(type){ |
|
|
async search(type, i){ |
|
|
if(type=='pageOne'){ |
|
|
if(type=='pageOne'){ |
|
|
this.searchVal.pageNo=1 |
|
|
this.searchVal.pageNo=1 |
|
|
this.list=[] |
|
|
this.list=[] |
|
|
this.total=0 |
|
|
this.total=0 |
|
|
|
|
|
}else if(type=='del'){ |
|
|
|
|
|
if(this.list.length>this.searchVal.pageSize+3){ |
|
|
|
|
|
this.total-- |
|
|
|
|
|
this.list.splice(i,1) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.searchVal.pageNo=1 |
|
|
|
|
|
this.list=[] |
|
|
|
|
|
this.total=0 |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
if(this.total==0||this.list.length<this.total){ |
|
|
if(this.total==0||this.list.length<this.total){ |
|
|
var res=await request("/api/basetour/queryTourListByBaseId",{ |
|
|
var res=await request("/api/basetour/queryTourListByBaseId",{ |
|
@ -166,6 +192,25 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
del(index){ |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
title:"提示", |
|
|
|
|
|
content:"确定删除?", |
|
|
|
|
|
success:async e=>{ |
|
|
|
|
|
if(e.confirm){ |
|
|
|
|
|
var res=await request("/api/basetour/deleteById",{ |
|
|
|
|
|
params:{id:this.list[index].id} |
|
|
|
|
|
}) |
|
|
|
|
|
if(res.statu){ |
|
|
|
|
|
uni.showToast({title:"删除成功!",icon:"success"}) |
|
|
|
|
|
this.search('del',index) |
|
|
|
|
|
}else{ |
|
|
|
|
|
uni.showToast({title:"删除失败!",icon:"error"}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
toAddPage(){ |
|
|
toAddPage(){ |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url:"/pages/patrolGarden/info", |
|
|
url:"/pages/patrolGarden/info", |
|
@ -175,6 +220,7 @@ export default { |
|
|
toDetail(e){ |
|
|
toDetail(e){ |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url:"/pages/patrolGarden/detail", |
|
|
url:"/pages/patrolGarden/detail", |
|
|
|
|
|
events:{update:()=>this.search('pageOne')}, |
|
|
success:res=>{ |
|
|
success:res=>{ |
|
|
res.eventChannel.emit('detail',e) |
|
|
res.eventChannel.emit('detail',e) |
|
|
} |
|
|
} |
|
|