This commit is contained in:
shijingjing
2022-05-05 11:44:10 +08:00
parent 34f3233ed0
commit 07a78300e4
4 changed files with 15 additions and 26 deletions

View File

@@ -184,7 +184,8 @@
</div>
</div>
<div class="upload">
<AiUploader :def.sync="photo" multiple placeholder="上传图片" :limit="1" action="/admin/file/add2" :disabled="isEdit"/>
<!-- :disabled="isEdit" -->
<AiUploader :def.sync="photo" multiple placeholder="上传图片" :limit="1" action="/admin/file/add2"/>
</div>
</div>
@@ -615,7 +616,7 @@ export default {
this.form.photo = this.form.files[0].url
}
if (this.photo.length) {
this.form.photo = this.photo[0].accessUrl
this.form.photo = this.photo[0].url
}
this.form.girdId = this.girdInfo.girdId
@@ -636,12 +637,17 @@ export default {
submit() {
if(!this.isEdit) {
if (!this.form.riskType) {
return this.$u.toast('请选择风险因素')
}
}
if (this.photo.length) {
this.form.photo = this.photo[0].url
}
this.basicsCheckList.map((item, index) => {
if (item.checked) {
this.basicsList.push(index)
@@ -718,11 +724,13 @@ export default {
...this.form,
...res.data
}
this.photo = [{url: this.form.photo}]
// this.photo = [{url: this.form.photo}]
if (this.form.photo) {
this.form.files = [{url: this.form.photo}]
this.photo = [{url: this.form.photo}] || []
// this.form.files = [{url: this.form.photo}]
}
}
})
},