diff --git a/pages/patrolGarden/abnoReport.vue b/pages/patrolGarden/abnoReport.vue index a106874..489df18 100644 --- a/pages/patrolGarden/abnoReport.vue +++ b/pages/patrolGarden/abnoReport.vue @@ -10,7 +10,7 @@ - + @@ -39,6 +39,10 @@ export default { }, onLoad(){ this.eventChannel=this.getOpenerEventChannel() + this.eventChannel.on("detail",e=>{ + this.formData=e + this.imgs=(e.pic||"").split(',').filter(v=>v) + }) }, methods:{ submit(){ diff --git a/pages/patrolGarden/info.vue b/pages/patrolGarden/info.vue index db628d2..58a4458 100644 --- a/pages/patrolGarden/info.vue +++ b/pages/patrolGarden/info.vue @@ -65,12 +65,17 @@ - - - - {{v.remark}} - - + + + + + + 详情地址:{{v.position}} + {{v.remark}} + + + + @@ -116,10 +121,21 @@ export default { this.eventChannel=this.getOpenerEventChannel() }, methods:{ - toAbnormal(){ + toAbnormal(index){ uni.navigateTo({ url:"/pages/patrolGarden/abnoReport", - events:{update:e=>this.formData.detailList.push(e)} + events:{update:e=>{ + if(/\d+/.test(index)){ + this.formData.detailList[index]=e + }else{ + this.formData.detailList.push(e) + } + }}, + success:e=>{ + if(/\d+/.test(index)){ + e.eventChannel.emit("detail",this.formData.detailList[index]) + } + } }) }, submit(){