浏览代码

修改流程配置删除

tengmingxue 1 年之前
父节点
当前提交
590c9f64f1
共有 1 个文件被更改,包括 27 次插入9 次删除
  1. 27 9
      src/views/dataAdmin/dataAdmin/configProcess/index.vue

+ 27 - 9
src/views/dataAdmin/dataAdmin/configProcess/index.vue

@@ -19,6 +19,10 @@
       <!-- 表格操作栏 -->
       <template #action="{ record }">
         <TableAction :actions="[
+          {
+            label: '查看',
+            onClick: handleView.bind(null, record),
+          },
           {
             label: '编辑',
             onClick: handleEdit.bind(null, record),
@@ -27,15 +31,12 @@
             label: '删除',
             color: 'error',
             ifShow: true,
-            popConfirm: {
-              title: '是否确认删除',
-              confirm: handleDeleteOrBatchDelete.bind(null, record),
-            },
-          },
-          {
-            label: '详情',
-            onClick: handleView.bind(null, record),
-          },
+            onClick: handleDeletes.bind(null, record),
+            // popConfirm: {
+            //   title: '是否确认删除',
+            //   confirm: handleDelete.bind(null, record),
+            // },
+          }
         ]" />
       </template>
       <!-- <template #pdate="{ record }">
@@ -68,6 +69,7 @@ import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
 import AddProcess from './AddProcess.vue';
 import { useMessage } from '/@/hooks/web/useMessage';
 import Moment from 'moment';
+import uiTool from '/@/utils/uiTool';
 import {
   queryFlowInfoPage,
   queryFlowInfoById,
@@ -198,6 +200,21 @@ export default defineComponent({
 
     function changeCheck(row) {
       //console.log(row);
+    };
+
+    function handleDeletes(node,record){
+      uiTool.delModal('确定删除流程信息?', async () => {
+        var ids = node?.ID
+        if (ids) {
+          const res = await delFlowInfo(ids);
+          if (res?.status !== '-1') {
+            reload();
+            createMessage.success('删除成功!', 1);
+          } else {
+            createMessage.error('删除失败!失败原因:' + res?.message, 1);
+          }
+        }
+      });
     }
 
     return {
@@ -213,6 +230,7 @@ export default defineComponent({
       hasBatchDelete,
       handleDeleteOrBatchDelete,
       changeCheck,
+      handleDeletes,
     };
   },
 });