Browse Source

引用表单后删除刷新表格数据

duy 2 years ago
parent
commit
6389e89d97
1 changed files with 10 additions and 3 deletions
  1. 10 3
      src/views/data-fill/division.vue

+ 10 - 3
src/views/data-fill/division.vue

@@ -1198,6 +1198,9 @@ const addingFormClick = () => {
     if (isLeaf) {
         addingFormLoading.value = false
         addingFormModal.value = true
+        dialogTableData.value=[]
+        dialogTableRef.value?.clearSelection();
+        selectItems.value=[]
     } else {
         window?.$message?.warning('请先选择一个最子级的节点')
     }
@@ -1219,7 +1222,9 @@ const deltableexcel = async (row) => {
                         })
                         if (!error && code === 200) {
                             window?.$message?.success('删除成功')
-                            window?.location?.reload()  //刷新页面
+                            // window?.location?.reload()  //刷新页面
+                            searchNodeAllTableApi(treeItemInfo.value['primaryKeyId'])
+
                         } else {
                             window?.$message?.warning(msg)
                         }
@@ -1230,7 +1235,8 @@ const deltableexcel = async (row) => {
             const {error, code, msg} = await divisionApi.removeWbsTreeContract({id: row.pkeyId, stats: 0})
             if (!error && code === 200) {
                 window?.$message?.success('删除成功')
-                window?.location?.reload()  //刷新页面
+                searchNodeAllTableApi(treeItemInfo.value['primaryKeyId'])
+                // window?.location?.reload()  //刷新页面
             } else {
                 window?.$message?.warning(msg)
             }
@@ -1460,7 +1466,8 @@ const addingFormSave = async () => {
         if (!error && code === 200) {
             window.$message?.success('操作成功')
             addingFormModal.value = false
-            window?.location?.reload()  //刷新页面
+            // window?.location?.reload()  //刷新页面
+            searchNodeAllTableApi(treeItemInfo.value['primaryKeyId'])
         }
     } else {
         window.$message?.warning('请先勾选数据')