From 3173c73267ba584d72c7862ab159392c5d372216 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Tue, 23 Jul 2024 15:25:29 +0800
Subject: [PATCH] bug修改
---
src/views/safetyReview/projectManage/components/siteCheckRcd.vue | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/src/views/safetyReview/projectManage/components/siteCheckRcd.vue b/src/views/safetyReview/projectManage/components/siteCheckRcd.vue
index 9ec1e3e..b752ba4 100644
--- a/src/views/safetyReview/projectManage/components/siteCheckRcd.vue
+++ b/src/views/safetyReview/projectManage/components/siteCheckRcd.vue
@@ -614,7 +614,7 @@
}
const handleRemove = async (file, uploadFiles,type) => {
-
+ if(file && file.status == 'success') {
ElMessageBox.confirm(
'确定删除该附件?',
'提示',
@@ -623,39 +623,39 @@
cancelButtonText: '取消',
type: 'warning',
})
- .then( async() => {
+ .then(async () => {
const res = await delFile(file.id)
- if(res.code == 200){
+ if (res.code == 200) {
ElMessage({
type: 'success',
message: '文件已删除'
})
- if(type == 1){
+ if (type == 1) {
const index = state.formData.deviceImages.findIndex(v => v.id === file.id)
- state.formData.deviceImages.splice(index,1);
+ state.formData.deviceImages.splice(index, 1);
}
- if(type == 2){
+ if (type == 2) {
const index = state.formData.investingationImages.findIndex(v => v.id === file.id)
- state.formData.investingationImages.splice(index,1);
+ state.formData.investingationImages.splice(index, 1);
}
- if(type == 3){
+ if (type == 3) {
const index = state.formData.companyImages.findIndex(v => v.id === file.id)
- state.formData.companyImages.splice(index,1);
+ state.formData.companyImages.splice(index, 1);
}
- if(type == 5){
+ if (type == 5) {
const index = state.formData.assAccessoryFiles.findIndex(v => v.id === file.id)
- state.formData.assAccessoryFiles.splice(index,1);
+ state.formData.assAccessoryFiles.splice(index, 1);
}
- }else{
+ } else {
ElMessage({
type: 'warning',
message: res.message
})
}
})
- .catch(()=>{
+ .catch(() => {
// if(type == 1){
// getBeforeFiles()
// }
@@ -669,6 +669,7 @@
// getSafetyFiles()
// }
})
+ }
}
--
Gitblit v1.9.2