From c226fc2a9ec74839bc19e2f0e72abd54e51317c4 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Wed, 20 Nov 2024 15:29:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E5=9B=AD=E8=AE=B0=E5=BD=95=20?= =?UTF-8?q?=E8=81=94=E8=B0=83=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/massif/add_farming.vue | 8 +-- pages/patrolGarden/detail.vue | 13 +++-- pages/patrolGarden/record.vue | 86 ++++++++++++++++++++++++------- static/patrolGarden/handle.png | Bin 0 -> 2751 bytes static/patrolGarden/unhandle.png | Bin 0 -> 2760 bytes 5 files changed, 81 insertions(+), 26 deletions(-) create mode 100644 static/patrolGarden/handle.png create mode 100644 static/patrolGarden/unhandle.png diff --git a/pages/massif/add_farming.vue b/pages/massif/add_farming.vue index c2f2dc6..5961a6d 100644 --- a/pages/massif/add_farming.vue +++ b/pages/massif/add_farming.vue @@ -126,7 +126,9 @@ } } &>.u-swipe-action{ - margin-top:20rpx; + .u-swipe-action-item{ + margin-top:20rpx; + } .u-swipe-action-item__right__button{ display:flex; align-items: center; @@ -189,8 +191,8 @@ {{massif.plotName}} - - + + {{v.goodsType}} {{v.substanceName}} {{v.inputTotal}}{{v.specs[1]}} diff --git a/pages/patrolGarden/detail.vue b/pages/patrolGarden/detail.vue index 1215bd7..ec77d20 100644 --- a/pages/patrolGarden/detail.vue +++ b/pages/patrolGarden/detail.vue @@ -89,7 +89,7 @@ 基地名称 {{detail.baseName}} - + 凭证 @@ -106,6 +106,10 @@ + + 地块名称 + {{record.plotName}} + 位置 {{record.position}} @@ -126,7 +130,6 @@ export default { data(){ return{ map:null, - demo:"", host:host('imgUrl'), detail:{}, record:null, @@ -146,7 +149,10 @@ export default { this.detail=e /* #ifdef APP-PLUS */ - if(this.detail.detailVos){ + + + + if(this.detail?.detailVos?.length>0){ for(var i in this.detail.detailVos){ var marker=new plus.maps.Marker(new plus.maps.Point(this.detail.detailVos[i].lng, this.detail.detailVos[i].lat)) marker.setIcon(`/static/patrolGarden/${({0:'unhandle',1:'handle'})[this.detail.detailVos[i].flagDeal]}.png?i=${i}`) @@ -184,6 +190,7 @@ export default { uni.showToast({title:"修改成功",icon:"success"}) this.detail.detailVos[this.record.index]=this.record this.detail.detailVos[this.record.index].marker.setIcon(`/static/patrolGarden/${({0:'unhandle',1:'handle'})[this.record.flagDeal]}.png?i=${this.record.index}`) + this.eventChannel.emit("update") }else{ uni.showModal({ title:"提示", diff --git a/pages/patrolGarden/record.vue b/pages/patrolGarden/record.vue index b4bef8f..0a7a5c5 100644 --- a/pages/patrolGarden/record.vue +++ b/pages/patrolGarden/record.vue @@ -6,8 +6,18 @@ scroll-view{ flex-grow: 1; 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{ - margin-top:0rpx; + margin:0rpx; &>.title{ display: flex; align-items: center; @@ -97,24 +107,31 @@ - - - - {{v.baseName}} - 无异常 - 异常 - (已处理{{v.deal}}/{{v.detailVos.length}}) - - - - - - {{v.remark}} - - 巡园日期:{{v.operateDate}} - {{v.userName}} - - + + + + + + {{v.baseName}} + 无异常 + 异常 + (已处理{{v.deal}}/{{v.detailVos.length}}) + + + + + + {{v.remark}} + + 巡园日期:{{v.operateDate}} + {{v.userName}} + + + + + + + @@ -140,11 +157,20 @@ export default { this.search() }, methods:{ - async search(type){ + async search(type, i){ if(type=='pageOne'){ this.searchVal.pageNo=1 this.list=[] 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{ + 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(){ uni.navigateTo({ url:"/pages/patrolGarden/info", @@ -175,6 +220,7 @@ export default { toDetail(e){ uni.navigateTo({ url:"/pages/patrolGarden/detail", + events:{update:()=>this.search('pageOne')}, success:res=>{ res.eventChannel.emit('detail',e) } diff --git a/static/patrolGarden/handle.png b/static/patrolGarden/handle.png new file mode 100644 index 0000000000000000000000000000000000000000..97aef1b06f8d1d30a8366b73c47bd58ae981044b GIT binary patch literal 2751 zcmV;w3PAOVP)Pxu>XmDzh~ z5HH+4XU@#d#hqmT+TZW{dwllH?9Mr7me4$6)d7lCHqB(v1QN3kK@&(5NX$AAvvisx zqzNQu9f(;v%@NWBBHw`_rTIfU$Q!1iI@I%M7B_B0f&sdL;)bDdiZ@)K5)3hnfJS9kLh-jVXdF!-6+H>VE<|{$8!t{+D zkkppkr#+7+YDANRLO4<5YH*mJ)il~r9-IGLm<<-yjt!7x(VRrU%>aE(w1{B#{1gLi z6~lQhn2s9nh66dRWR22%5RC7rDM?a=u*L)0_NMKZBo&mnH4Mn$&DI5pgg+u`uQ(lT z)hgQdjk8~CL{gChIrD|t1NV3In-At$AS4@6bdNC^6%ef$)c4ThcP?3ephtU!29W~M zH|IW&1g`)vR$&ccN^L=vX1U|?e+o0mvD%RVNtUcDiSc6qXGB$;qB!p{;ro@e{VPR! zCzXi=NUCJbW5(hr3JNO*5$2cE_L8vlkLrdFL@$`DKr}t$T zn#6Q@Ig@`zbw0|0=*3&V0QC8T>O|wIclcu0xaW^5b5jcBW9{ZAJ2ZM0z(|!z##rm+ zz8+8hSJwHvsvMO9(TnDj(cc_Y)e2c1e#$kRD`dTo_frNWRkChohW{)4Lw68iRyl3A zsVH0t5Pu>G|KY97xIjfxy-kA%ui+y!TE)bd5+Hifyd9vsdRrsa=F4}uhO;QBW?&%t zra5OLk=P2tCxRx^tNj`OK(#vB9lz}D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No@LSfNjq zfo;AX0V4n;6lzOI@%^shNI$-zAZ^{3HRH*Si@<>UT#dBg7Z&TKurt z|3)0AUPX}0ZUT)HUCeNzyp)ZQ8k7&=sY}(V>L?(kKx$A*)+5XaW$HD8PrFbEBCIW^ z?Q4XbdN5WFWbl@GBNAS<9l$V^iN;WCXH`pN_l;dr`%$XuP!7aTELk#V5JxcYuBrnK!$JGd}b%#|3BzklHmRqAdY34GnWEL{IrN3`o~ViNhj^<9ZZqkwQ-m z@9F)90;xf1w-z*JxlT8&@vzX%+6#JWTA1%Q97t@S!~llhi&y|@IFy*ch!v2AL5UHJ z*a7Lh(C4NB>_5FB?78{f0L^iYywn=pu&yJqIb|JNV6tRhOicdn)j(SiPSUh?CT^*u zo!I@0Lo9*R8u{3Qe)`7`w1QaeQ%{*zxc?m3f~yuB3hPrIL^r-bx~l4W&Xqq}g3hVz zW1uDIbGL#tyB^=z1M!PEy)bW#N7aP^9@V!&mLk^EVA861B~sRIRQIvROuTb7k~;JrJ3qp;xXX^xO4keGEKX6ZCXNE1lRIuNsT{s&ifJCffUo@4+3002ovPDHLk FV1jDcB;Ei3 literal 0 HcmV?d00001 diff --git a/static/patrolGarden/unhandle.png b/static/patrolGarden/unhandle.png new file mode 100644 index 0000000000000000000000000000000000000000..add4b84fd9ee3c13ff521b4d91b068b2ccdae83a GIT binary patch literal 2760 zcmV;(3ODtMP)PxgAOP!r89Nfjuh>* ziZ6Xr=xB*JwL0oZ?TEB?O0;hZD4kYHM;x6gMO2u=?FBk*r&>yGFHjYPs<}Nttw?hF ztDA(D(uCae?6Z3ty#4onzwhtmbI-GT&px|Hs2-8(07WXBYBHz-iP)E*3Zx1oVjYNB zI@J+U1ro6iL@b@^2&n>*@4!0~r;X`i9_yA$V?Z>Pfw2UPA)+y!Dl;Eo-~a*p!MtCK z#SYXG?LU3j)&ufU!}W~x2yw=LViea7o2{`nkHPc&w1zBgL>u|9j@uAR8>I9T^~ndUG}rF9gwNMT_ud&-@HC zwI({OXMO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