From 113d86491b290cc847d6ef34a5561e9b2f09d76e Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: Tue, 30 Jun 2026 08:57:21 +0800
Subject: [PATCH] 修改表格不刷新问题

---
 src/views/analyse/identify/components/identifyDialog.vue |    4 ++--
 src/views/analyse/evaluate/components/evaluateDialog.vue |    4 ++--
 src/views/analyse/identify/components/identifyQuery.vue  |    9 +++++----
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/views/analyse/evaluate/components/evaluateDialog.vue b/src/views/analyse/evaluate/components/evaluateDialog.vue
index 68ec8ff..8dd4468 100644
--- a/src/views/analyse/evaluate/components/evaluateDialog.vue
+++ b/src/views/analyse/evaluate/components/evaluateDialog.vue
@@ -930,12 +930,12 @@
                 let { lecId, lsId, mesId, rsId, ...data} = evaluateDialogState.evaluateForm
                 let res = await evaluateApi().addEvaluate(data);
                 if(res.data.code === 100){
-                    emit('refresh')
                     evaluateDialogState.evaluateDialogVisible = false;
                     ElMessage({
                         type: 'success',
                         message: '评价成功'
                     })
+                  emit('refresh')
                 }else{
                     ElMessage({
                         type: 'warning',
@@ -945,12 +945,12 @@
             }else{
                 let res = await evaluateApi().modEvaluate(evaluateDialogState.evaluateForm)
                 if(res.data.code === 100){
-                    emit('refresh')
                     evaluateDialogState.evaluateDialogVisible = false;
                     ElMessage({
                         type: 'success',
                         message: '编辑成功'
                     })
+                  emit('refresh')
                 }else{
                     ElMessage({
                         type: 'warning',
diff --git a/src/views/analyse/identify/components/identifyDialog.vue b/src/views/analyse/identify/components/identifyDialog.vue
index d403a07..ccfc8ad 100644
--- a/src/views/analyse/identify/components/identifyDialog.vue
+++ b/src/views/analyse/identify/components/identifyDialog.vue
@@ -729,13 +729,13 @@
         let {hazopId, jhaId, phaId, sclId, analogyId, ...data} = identifyDialogState.identifyForm
         let res = await identifyApi().addIdentify(data);
         if (res.data.code === 100) {
-          emit('refresh', 1, res.data.data)
           identifyDialogState.identifyDialogVisible = false;
           ElMessage({
             type: 'success',
             message: '新增成功'
           })
           identifyDialogState.fileList = []
+          emit('refresh', 1, res.data.data)
         } else {
           ElMessage({
             type: 'warning',
@@ -748,13 +748,13 @@
         }
         let res = await identifyApi().modIdentify(identifyDialogState.identifyForm)
         if (res.data.code === 100) {
-          emit('refresh', 2, identifyDialogState.identifyForm)
           identifyDialogState.identifyDialogVisible = false;
           ElMessage({
             type: 'success',
             message: '编辑成功'
           })
           identifyDialogState.fileList = []
+          emit('refresh', 2, identifyDialogState.identifyForm)
         } else {
           ElMessage({
             type: 'warning',
diff --git a/src/views/analyse/identify/components/identifyQuery.vue b/src/views/analyse/identify/components/identifyQuery.vue
index 5ca0561..23e6ca6 100644
--- a/src/views/analyse/identify/components/identifyQuery.vue
+++ b/src/views/analyse/identify/components/identifyQuery.vue
@@ -192,17 +192,18 @@
       type: 'success',
       message: '辨识方法修改成功'
     })
-    identifyQueryState.identifyQueryForm.identificationMethod = identifyQueryState.currentMethod,
-    identifyQueryState.currentMethod = identifyQueryState.currentMethod,
-    emit('refresh')
+    identifyQueryState.identifyQueryForm.identificationMethod = identifyQueryState.currentMethod
+    identifyQueryState.identifyForm.identificationMethod = identifyQueryState.currentMethod
+    identifyQueryState.identifyMethodVisible = false
     await getIdentifyData()
+    emit('refresh')
   }else{
     ElMessage({
       type: 'warning',
       message: res.data.msg
     })
+    identifyQueryState.identifyMethodVisible = false
   }
-  identifyQueryState.identifyMethodVisible = false
 }
 
 const resetData = ()=>{

--
Gitblit v1.9.2