监管端bug修复:13984

2024年1月24日测试
limingyu 2024-02-03 16:09:25 +08:00
parent ca1d5df750
commit 4b703c7913
1 changed files with 35 additions and 27 deletions

View File

@ -908,10 +908,10 @@ export default {
requestFN( requestFN(
'/safetyenvironmental/' + this.dialogType, '/safetyenvironmental/' + this.dialogType,
{ ...this.form } { ...this.form }
).then((data) => { ).then(async(data) => {
for (let i = 0; i < data.pd.hiddenList.length; i++) { for (let i = 0; i < data.pd.hiddenList.length; i++) {
this.uploadImg(this.hdFile[i]['fileHdImgList'], data.pd.hiddenList[i].HIDDEN_ID) await this.uploadImg(this.hdFile[i]['fileHdImgList'], data.pd.hiddenList[i].HIDDEN_ID)
this.uploadVideo(this.hdFile[i]['fileVideoList'], data.pd.hiddenList[i].HIDDEN_ID) await this.uploadVideo(this.hdFile[i]['fileVideoList'], data.pd.hiddenList[i].HIDDEN_ID)
} }
this.$message({ this.$message({
message: '保存成功', message: '保存成功',
@ -923,6 +923,7 @@ export default {
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
loading.close() loading.close()
this.goBack()
}) })
} else { } else {
return false return false
@ -931,35 +932,42 @@ export default {
}, },
// //
uploadVideo(list, HIDDEN_ID) { uploadVideo(list, HIDDEN_ID) {
const formData = new FormData() return new Promise((resolve, reject) => {
for (var i = 0; i < list.length; i++) { const formData = new FormData()
formData.append('FFILE', list[i]) for (var i = 0; i < list.length; i++) {
} formData.append('FFILE', list[i])
formData.append('FOREIGN_KEY', HIDDEN_ID) }
formData.append('TYPE', 102) formData.append('FOREIGN_KEY', HIDDEN_ID)
upload( formData.append('TYPE', 102)
'/imgfiles/addVideo', upload(
formData '/imgfiles/addVideo',
).then((data) => { formData
}).catch((e) => { ).then((data) => {
this.listLoading = false resolve()
}).catch((e) => {
this.listLoading = false
})
}) })
}, },
// //
uploadImg(list, HIDDEN_ID) { uploadImg(list, HIDDEN_ID) {
const formData = new FormData() return new Promise((resolve, reject) => {
for (var i = 0; i < list.length; i++) { const formData = new FormData()
formData.append('FFILE', list[i]) for (var i = 0; i < list.length; i++) {
} formData.append('FFILE', list[i])
formData.append('FOREIGN_KEY', HIDDEN_ID) }
formData.append('TYPE', 3) formData.append('FOREIGN_KEY', HIDDEN_ID)
upload( formData.append('TYPE', 3)
'/imgfiles/add', upload(
formData '/imgfiles/add',
).then((data) => { formData
}).catch((e) => { ).then((data) => {
this.listLoading = false resolve()
}).catch((e) => {
this.listLoading = false
})
}) })
}, },
goBack() { goBack() {