监管端bug修复:13984
parent
ca1d5df750
commit
4b703c7913
|
@ -908,10 +908,10 @@ export default {
|
|||
requestFN(
|
||||
'/safetyenvironmental/' + this.dialogType,
|
||||
{ ...this.form }
|
||||
).then((data) => {
|
||||
).then(async(data) => {
|
||||
for (let i = 0; i < data.pd.hiddenList.length; i++) {
|
||||
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.uploadImg(this.hdFile[i]['fileHdImgList'], data.pd.hiddenList[i].HIDDEN_ID)
|
||||
await this.uploadVideo(this.hdFile[i]['fileVideoList'], data.pd.hiddenList[i].HIDDEN_ID)
|
||||
}
|
||||
this.$message({
|
||||
message: '保存成功',
|
||||
|
@ -923,6 +923,7 @@ export default {
|
|||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
loading.close()
|
||||
this.goBack()
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
@ -931,6 +932,7 @@ export default {
|
|||
},
|
||||
// 上传隐患视频
|
||||
uploadVideo(list, HIDDEN_ID) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const formData = new FormData()
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
formData.append('FFILE', list[i])
|
||||
|
@ -941,12 +943,15 @@ export default {
|
|||
'/imgfiles/addVideo',
|
||||
formData
|
||||
).then((data) => {
|
||||
resolve()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
// 上传隐患照片
|
||||
uploadImg(list, HIDDEN_ID) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const formData = new FormData()
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
formData.append('FFILE', list[i])
|
||||
|
@ -957,9 +962,12 @@ export default {
|
|||
'/imgfiles/add',
|
||||
formData
|
||||
).then((data) => {
|
||||
resolve()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
goBack() {
|
||||
|
|
Loading…
Reference in New Issue