diff --git a/pages/patrolGarden/info.vue b/pages/patrolGarden/info.vue index 58a4458..391fa8a 100644 --- a/pages/patrolGarden/info.vue +++ b/pages/patrolGarden/info.vue @@ -63,6 +63,7 @@ + @@ -97,12 +98,15 @@ export default { detailList:[], flagAbnormal:0, pic:'', + plotId:"", + plotName:"", remark:"", }, imgs:[], rules:{ pic:{required:true,message:"请上传凭证!",trigger:'blur'}, - operateDate:{required:true,message:"请选择巡园日期!",trigger:'blur'} + operateDate:{required:true,message:"请选择巡园日期!",trigger:'blur'}, + plotId:{required:true,message:"请选择地块!"}, }, host:host('imgUrl'), eventChannel:null, @@ -158,6 +162,20 @@ export default { } }) }, + selectPlot(){ + uni.navigateTo({ + url:"/pages/patrolGarden/searchPlot", + events:{update:e=>{ + this.formData.plotId=e.map(v=>v.id).join(',') + this.formData.plotName=e.map(v=>v.plotName).join(',') + }}, + success: e=>{ + var id=this.formData.plotId?.split?.(',')?.filter(v=>v)||[] + var name=this.formData.plotName?.split?.(',')?.filter(v=>v)||[] + e.eventChannel.emit("list", id.map((v,k)=>({id:v, plotName:name[k]}))) + } + }) + }, } } \ No newline at end of file diff --git a/pages/patrolGarden/searchPlot.vue b/pages/patrolGarden/searchPlot.vue new file mode 100644 index 0000000..7f48cd0 --- /dev/null +++ b/pages/patrolGarden/searchPlot.vue @@ -0,0 +1,186 @@ + + + diff --git a/router/patrolGarden.js b/router/patrolGarden.js index f7743ec..65bc9d0 100644 --- a/router/patrolGarden.js +++ b/router/patrolGarden.js @@ -30,6 +30,17 @@ module.exports=[ } } }, + { + path:"pages/patrolGarden/searchPlot", + style:{ + navigationBarTitleText:"地块管理", + navigationBarBackgroundColor:"#10C176", + navigationBarTextStyle:"white", + "app-plus":{ + "titleNView":false + } + } + }, { path:"pages/patrolGarden/abnoReport", style:{