优化文件上传 未发布版本

master
lion 8 months ago
parent 97636e6984
commit e2ae92ee7f

@ -46,7 +46,7 @@
<u-upload @on-remove="(index, lists, name)=>{onRemove(index, lists, name,item)}" <u-upload @on-remove="(index, lists, name)=>{onRemove(index, lists, name,item)}"
@on-success="(data, index, lists, name)=>{onSuccess(data, index, lists, name,item)}" @on-success="(data, index, lists, name)=>{onSuccess(data, index, lists, name,item)}"
@on-uploaded="(lists, name)=>{onUploaded(lists, name,item)}" :form-data="formData" @on-uploaded="(lists, name)=>{onUploaded(lists, name,item)}" :form-data="formData"
:action="action" :show-progress="false" :file-list="item.fileListArr" :action="action" :show-progress="true" :file-list="item.fileListArr"
max-count="9"></u-upload> max-count="9"></u-upload>
</block> </block>
</u-form-item> </u-form-item>
@ -308,7 +308,6 @@
// item.value b // item.value b
const exists = _arr.includes(item1.value); const exists = _arr.includes(item1.value);
// checked // checked
console.log("exists", exists)
item1.checked = exists; item1.checked = exists;
}); });
} }

@ -75,16 +75,20 @@
this.sign_id = res.detail.id this.sign_id = res.detail.id
if (res.detail.data && res.detail.data.length > 0) { if (res.detail.data && res.detail.data.length > 0) {
res.detail.data.map(item => { res.detail.data.map(item => {
this.course_forms.map(forms=>{ this.course_forms.map((forms,index)=>{
if(item.field==forms.field){ if(item.field==forms.field){
forms.value = item.value?item.value:'' forms.value = item.value?item.value:''
if(forms.edit_input==='files'){
this.$set(forms,'fileListArr',item.fileListArr?item.fileListArr:[])
this.$set(forms,'fileList',item.fileList?item.fileList:[])
}
} }
}) })
// if (item.value === null) { // if (item.value === null) {
// item.value = '' // item.value = ''
// } // }
}) })
console.log("this.course_forms",this.course_forms)
// this.course_forms = res.detail.data.sort((a, b) => (a.sort - b.sort)) // this.course_forms = res.detail.data.sort((a, b) => (a.sort - b.sort))
} }
}, },
@ -196,7 +200,6 @@
}, 1500) }, 1500)
}) })
} }
}).catch(err => { }).catch(err => {
console.log("err", err) console.log("err", err)
that.isLocked = false that.isLocked = false
@ -204,6 +207,8 @@
}, },
// //
async updateApplyCourse() { async updateApplyCourse() {
// console.log("this.apply_form",this.apply_form)
// return
let that = this let that = this
this.$u.api.courseUpdateSign({ this.$u.api.courseUpdateSign({
id: this.sign_id, id: this.sign_id,

@ -293,7 +293,7 @@
} }
&-noinfo { &-noinfo {
width: calc(100% -160rpx); width: calc(100% - 160rpx);
position: absolute; position: absolute;
top: calc(50% - 340rpx); top: calc(50% - 340rpx);
left: 50%; left: 50%;

Loading…
Cancel
Save