|
|
@ -65,12 +65,17 @@ |
|
|
|
<d-form label="记录人" disabled v-model="formData.userName"/> |
|
|
|
<d-form label="巡园日期" required field="operateDate" type="calendar" v-model="formData.operateDate"/> |
|
|
|
<d-form label="是否异常" required type="radio" :columns="[{label:'是',value:1},{label:'否',value:0}]" v-model="formData.flagAbnormal"/> |
|
|
|
<view class="handle" :class="{un:v.flagDeal==0}" v-for="(v,k) in formData.detailList" :key="k"> |
|
|
|
<image :src="`${host}/${(v.pic||'').split(',').filter(v=>v)[0]}`"/> |
|
|
|
<view class="content"> |
|
|
|
<view class="doubleLine" style="--n:3;">{{v.remark}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<u-swipe-action> |
|
|
|
<u-swipe-action-item v-for="(v,k) in formData.detailList" :key="k" :options="[{text:'删除',style:{backgroundColor:'#EE263A'}}]" @click="formData.detailList.splice($event.index,1)"> |
|
|
|
<view class="handle" :class="{un:v.flagDeal==0}" v-for="(v,k) in formData.detailList" :key="k" @click="toAbnormal(k)"> |
|
|
|
<image :src="`${host}/${(v.pic||'').split(',').filter(v=>v)[0]}`"/> |
|
|
|
<view class="content"> |
|
|
|
<view class="position">详情地址:{{v.position}}</view> |
|
|
|
<view class="doubleLine" style="--n:3;">{{v.remark}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</u-swipe-action-item> |
|
|
|
</u-swipe-action> |
|
|
|
<button class="cu-btn round bg-green shadow add" v-if="formData.flagAbnormal==1" @click="toAbnormal">+{{formData.detailList.length>0?'继续':''}}添加异常</button> |
|
|
|
|
|
|
|
<d-form label="凭证" :required="formData.flagAbnormal==0" field="pic" type="upImg" :value="imgs" @imgs="formData.pic=$event" :num="3"/> |
|
|
@ -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(){ |
|
|
|