|
|
@ -10,6 +10,7 @@ |
|
|
|
<u-form class="card inline" errorType="toast" :model="formData" ref="form" :rules="rules" labelWidth="auto"> |
|
|
|
<d-form label="当前位置" type="map" @position="formData.lat=$event.latitude;formData.lng=$event.longitude"/> |
|
|
|
<d-form label="位置详情" required field="position" v-model="formData.position"/> |
|
|
|
<d-form label="地块" type="navigate" required field="plotId" :value="formData.plotName" :btnFun="selectPlot"/> |
|
|
|
<d-form label="凭证" required field="pic" :num="3" :value="imgs" type="upImg" @imgs="formData.pic=$event"/> |
|
|
|
<d-form label="描述" type="textarea" v-model="formData.remark"/> |
|
|
|
<d-form label="是否处理" type="radio" :columns="[{label:'是',value:1},{label:'否',value:0}]" v-model="formData.flagDeal"/> |
|
|
@ -28,11 +29,14 @@ export default { |
|
|
|
remark:"", |
|
|
|
pic:'', |
|
|
|
flagDeal:0, |
|
|
|
plotId:"", |
|
|
|
plotName:"", |
|
|
|
}, |
|
|
|
imgs:[], |
|
|
|
rules:{ |
|
|
|
pic:{required:true,message:"请上传凭证!",trigger:'blur'}, |
|
|
|
position:{required:true,message:"请输入位置详情!",trigger:"blur"}, |
|
|
|
plotId:{required:true,message:"请选择地块!"}, |
|
|
|
}, |
|
|
|
eventChannel:null, |
|
|
|
} |
|
|
@ -53,6 +57,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]}))) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |