Parcourir la source

右键清除数据

duy il y a 2 ans
Parent
commit
1de7916265
1 fichiers modifiés avec 13 ajouts et 2 suppressions
  1. 13 2
      src/views/data-fill/collapse-form/index.vue

+ 13 - 2
src/views/data-fill/collapse-form/index.vue

@@ -642,7 +642,7 @@ const setTableFormMenu = (info) => {
     newArr.push({ label: '关联试验数据', key: 'test' })
     newArr.push({ label: '关联试验文件', key: 'file' })
     newArr.push({ label: '公式参数', key: 'formula' })
-    newArr.push({ label: '清除数据', key: 'clear' })
+    // newArr.push({ label: '清除数据', key: 'clear' })
     tableFormMenu.value = newArr
 }
 
@@ -673,7 +673,18 @@ const handleMenuSelect = async ({ key }) => {
     } else if (key === 'clear') {
         const { pkeyId } = tableFormItemNode.value
         const refs = await getFormRef(pkeyId)
-        refs?.getTableFormInfo(0)
+        // refs?.getTableFormInfo(1)
+        window?.$messageBox?.alert('请谨慎考虑是否要 清除数据?', '清除数据?', {
+            type: 'error',
+            showCancelButton: true,
+            confirmButtonText: '确定删除',
+            cancelButtonText: '取消',
+            callback: (action) => {
+                if (action === 'confirm') {
+                       refs?.getTableFormInfo(1)
+                }
+            },
+        })
      
     }
 }