Explorar el Código

分类相关提交

Renxy hace 2 años
padre
commit
4fcff5a2ed

+ 2 - 2
config/config.js

@@ -141,8 +141,8 @@ export default {
   proxy: {
     '/api': {
       // target: 'http://192.168.20.152:8888/',
-      // target: 'http://120.55.44.4:8896/',
-      target: 'http://47.96.12.136:8888/',
+      target: 'http://120.55.44.4:8896/',
+      // target: 'http://47.96.12.136:8888/',
       // target: 'http://47.96.12.136:8896/',
       // target: 'http://oraysmart.com:8889/',
       // target: 'http://oraysmart.com:8888/api',

+ 52 - 45
src/pages/Detail/FilesModal.js

@@ -11,7 +11,7 @@ import { getToken, GetTokenFromUrl } from '@/utils/utils';
 // 历史清单
 function FilesModal(props) {
   const {
-    versionId,
+    projectId,
     visible,
     onClose,
     onUpload,
@@ -24,40 +24,50 @@ function FilesModal(props) {
     typeOptions,
   } = props;
   const [value, setValue] = useState();
-  
+  const [showData, setShowData] = useState();
+
+  useEffect(() => {
+    if (!value) {
+      setShowData(data);
+      return;
+    }
+    const newData = data.filter(item => item.classify_id == value);
+    setShowData(newData);
+  }, [data, value]);
+
   const uploadProps = useMemo(() => {
-  const token = getToken() || GetTokenFromUrl();
-  const uploadProps = {
-    name: 'file',
-    showUploadList: false,
-    action: `/api/v1/purchase/attachment/${versionId}`,
-    headers: {
-      'JWT-TOKEN': token,
-    },
-    data: {
-      type:value
-    },
-    beforeUpload (file) {
-      if (!value) {
-        message.error('请先选择附件分类')
-        return false
-      };
-    }, 
-    onChange(info) {
-      if (info.file.status !== 'uploading') {
-        console.log(info.file, info.fileList);
-      }
-      if (info.file.status === 'done') {
-        message.success(`${info.file.name} 文件上传成功`);
-        queryFiles();
-      } else if (info.file.status === 'error') {
-        message.error(`${info.file.name} 文件上传失败`);
-      }
-    },
-  };
-  return uploadProps;
-  }, [value, versionId]);
-  
+    const token = getToken() || GetTokenFromUrl();
+    const uploadProps = {
+      name: 'file',
+      showUploadList: false,
+      action: `/api/v1/purchase/attachment/${projectId}`,
+      headers: {
+        'JWT-TOKEN': token,
+      },
+      data: {
+        classify_id: value,
+      },
+      beforeUpload(file) {
+        if (!value) {
+          message.error('请先选择附件分类');
+          return false;
+        }
+      },
+      onChange(info) {
+        if (info.file.status !== 'uploading') {
+          console.log(info.file, info.fileList);
+        }
+        if (info.file.status === 'done') {
+          message.success(`${info.file.name} 文件上传成功`);
+          queryFiles();
+        } else if (info.file.status === 'error') {
+          message.error(`${info.file.name} 文件上传失败`);
+        }
+      },
+    };
+    return uploadProps;
+  }, [value, projectId]);
+
   const columns = [
     {
       title: '预览',
@@ -80,8 +90,8 @@ function FilesModal(props) {
     },
     {
       title: '分类',
-      dataIndex: 'CreatorUser',
-      render: record => record.CName || '',
+      dataIndex: 'classify_id',
+      render: id => typeOptions.find(item => item.id == id)?.name,
     },
     {
       title: '操作',
@@ -111,22 +121,19 @@ function FilesModal(props) {
             删除
           </a>
         </>
-      ), 
+      ),
     },
   ];
-
-  const handleClickChange = (value) => {
-    
-  };
   return (
     <Modal title="附件列表" width="70%" onCancel={onClose} visible={visible} footer={false}>
-      <Space style={{ display: 'flex', marginBottom: '20px'}}>
+      <Space style={{ display: 'flex', marginBottom: '20px' }}>
         <div>附件类型:</div>
         <Select
-          style={{width:400}}
+          style={{ width: 400 }}
           value={value}
+          allowClear
           options={typeOptions}
-          onChange={(value)=>setValue(value)}
+          onChange={value => setValue(value)}
         />
         <Upload {...uploadProps}>
           <Button type="primary" loading={loading}>
@@ -134,7 +141,7 @@ function FilesModal(props) {
           </Button>
         </Upload>
       </Space>
-      <Table rowKey="id" columns={columns} dataSource={data} loading={loading} />
+      <Table rowKey="id" columns={columns} dataSource={showData} loading={loading} />
     </Modal>
   );
 }

+ 169 - 58
src/pages/Detail/FlowModal.js

@@ -1,16 +1,36 @@
 import React, { useEffect, useState, useRef, useMemo, memo } from 'react';
-import { Modal, Input, Select, List, Row, Col, Table, message, Steps, Space, Button, Popover, Cascader, AutoComplete } from 'antd';
+import {
+  Modal,
+  Input,
+  Select,
+  List,
+  Row,
+  Col,
+  Table,
+  message,
+  Steps,
+  Space,
+  Button,
+  Popover,
+  Cascader,
+  AutoComplete,
+} from 'antd';
 import Flow from '@/components/Flow/index';
 import { connect } from 'dva';
 import { GetTokenFromUrl, getToken } from '@/utils/utils';
 import { MODELS, useXFlowApp, useModelAsync } from '@antv/xflow';
 import { CheckOutlined } from '@ant-design/icons';
-import { queryDelPurchaseExcel, queryDingInstanceDetail, queryRecordSheet, queryVserionByNode } from '@/services/boom';
+import {
+  queryDelPurchaseExcel,
+  queryDingInstanceDetail,
+  queryRecordSheet,
+  queryVserionByNode,
+} from '@/services/boom';
 import { async } from '@antv/x6/lib/registry/marker/async';
 import VersionModal from './VersionModal';
 import AuditFlow from './AuditFlow';
 
-const { Option }=Select
+const { Option } = Select;
 const { Step } = Steps;
 
 const { TextArea } = Input;
@@ -18,13 +38,13 @@ const localData = JSON.parse(localStorage.ggDetaiData || '{}');
 const PAGE_SIZE = 8;
 
 // 提交
-function FlowModal (props) {
+function FlowModal(props) {
   let token = getToken();
   const SELECT_TYPE = {
     NAME: '0',
     TYPE: '1',
     CREATOR: '2',
-  }
+  };
   const {
     visible,
     version,
@@ -39,16 +59,16 @@ function FlowModal (props) {
     onCommit,
     currentUser,
     typeOptions,
-    userList
+    userList,
   } = props;
   const [data, setData] = useState([]);
-  const [showData, setShowData] = useState([])
+  const [showData, setShowData] = useState([]);
   const [nodeLoading, setNodeLoading] = useState(false);
   const [pageSize, setPageSize] = useState(PAGE_SIZE);
   const [stepsData, setStepsData] = useState([]);
   const [versionVisible, setVersionVisible] = useState(false);
-  const [selectType, setSelectType] = useState(SELECT_TYPE.NAME)
-  const [inputValue, setInputValue] = useState('')
+  const [selectType, setSelectType] = useState(SELECT_TYPE.NAME);
+  const [inputValue, setInputValue] = useState('');
 
   const graphData = useMemo(() => {
     if (!flowDetail) return;
@@ -202,7 +222,7 @@ function FlowModal (props) {
     return [
       {
         title: '名称',
-        width: '45%',
+        width: '25%',
         render: item => (
           <span style={{ color: item.audit_status != 0 ? '#9b9b9b' : '' }}>
             {item.id == version.id && !item.isParent && (
@@ -216,18 +236,98 @@ function FlowModal (props) {
       },
       {
         title: '创建人',
-        render: item =>(
-          <span>{userList.find(cur => cur.ID == item.author)?.CName || '-'}</span>
-        )
+        width: '15%',
+        render: item => {
+          return (
+            item.isParent && (
+              <span>{userList.find(cur => cur.ID == item.author)?.CName || '-'}</span>
+            )
+          );
+        },
       },
       {
         title: '分类',
-        width:'25%',
-        render: item => (
-          <span>
-            {typeOptions.find(cur=>cur.id == item.classify_id)?.name}
-          </span>
-        )
+        width: '15%',
+        render: item => {
+          return (
+            item.isParent && (
+              <span>{typeOptions.find(cur => cur.id == item.classify_id)?.name}</span>
+            )
+          );
+        },
+      },
+      {
+        title: '状态',
+        width: '15%',
+        render: item => {
+          if (!item.flow_id && item.isParent) return;
+          let style = { color: getColor(item) };
+          let txt = '';
+          let dom = '';
+          switch (item.audit_status) {
+            case 0:
+              txt = '未提交';
+              break;
+            case 1:
+              txt = '待审批';
+              break;
+            case 2:
+              txt = '已拒绝';
+              break;
+            case 3:
+              txt = '已通过';
+              break;
+            case 4:
+              txt = '已提交';
+              break;
+          }
+          if (item.status == 1) txt = '已失效';
+
+          // 显示拒绝原因
+          if (item.audit_comment) {
+            dom = (
+              <Popover content={item.audit_comment} title="原因">
+                {txt}
+              </Popover>
+            );
+          } else {
+            dom = txt;
+          }
+          return item.audit_status != 0 ? (
+            <Button onClick={() => onDelVersion(item)}>{dom}</Button>
+          ) : (
+            <span style={style}>{dom}</span>
+          );
+        },
+      },
+      {
+        title: '操作',
+        width: '20%',
+        render: item =>
+          (item.flow_id || !item.isParent) &&
+          item.id != version.id && (
+            <Space>
+              <a
+                onClick={() => {
+                  console.log(item);
+                  onChangeVersion(item);
+                  onClose();
+                }}
+              >
+                加载
+              </a>
+              {item.audit_status == 0 &&
+              item.author == currentUser.ID && ( //自己创建的&&未提交的清单自己可以删除
+                  <a
+                    onClick={() => {
+                      onDelVersion({ excel_id: item.id });
+                    }}
+                  >
+                    删除
+                  </a>
+                )}
+            </Space>
+          ),
       },
     ];
   }, [version]);
@@ -276,9 +376,13 @@ function FlowModal (props) {
 
           // 显示拒绝原因
           if (item.audit_comment) {
-            dom = <Popover content={item.audit_comment} title="原因">{txt}</Popover>
+            dom = (
+              <Popover content={item.audit_comment} title="原因">
+                {txt}
+              </Popover>
+            );
           } else {
-            dom = txt
+            dom = txt;
           }
           return item.audit_status != 0 ? (
             <Button onClick={() => onDelVersion(item)}>{dom}</Button>
@@ -303,46 +407,48 @@ function FlowModal (props) {
               >
                 加载
               </a>
-              {item.audit_status == 0 && item.author == currentUser.ID && //自己创建的&&未提交的清单自己可以删除
-                (<a
-                  onClick={() => {onDelVersion({excel_id:item.id})}}
-                >
-                  删除
-                </a>
-              )}
+              {item.audit_status == 0 &&
+              item.author == currentUser.ID && ( //自己创建的&&未提交的清单自己可以删除
+                  <a
+                    onClick={() => {
+                      onDelVersion({ excel_id: item.id });
+                    }}
+                  >
+                    删除
+                  </a>
+                )}
             </Space>
-            
           ),
       },
     ];
   }, [version]);
 
-  const onChange = (value) => {
+  const onChange = value => {
     updateSteps([]);
   };
 
   useEffect(() => {
-    if(!inputValue){
+    if (!inputValue) {
       setShowData(data);
       return;
     }
     let resultData = [...data];
     switch (selectType) {
       case SELECT_TYPE.NAME:
-        resultData = data.filter(item=>item.version_name.includes(inputValue))
+        resultData = data.filter(item => item.version_name.includes(inputValue));
         break;
       case SELECT_TYPE.TYPE:
-        const classify = typeOptions.find(item => item.name.includes(inputValue))
+        const classify = typeOptions.find(item => item.name.includes(inputValue));
         if (classify) {
-          resultData = data.filter(item=>item.classify_id ==classify.id )
+          resultData = data.filter(item => item.classify_id == classify.id);
         }
         break;
       case SELECT_TYPE.CREATOR:
-        resultData = data.filter(item=>item.AuthorInfo?.CName.includes(inputValue))
+        resultData = data.filter(item => item.AuthorInfo?.CName.includes(inputValue));
         break;
     }
-    setShowData(resultData)
-  }, [inputValue, data])
+    setShowData(resultData);
+  }, [inputValue, data]);
 
   return (
     <>
@@ -372,44 +478,49 @@ function FlowModal (props) {
                 </Button>
               )}
             </div>
-            
+
             <div style={{ display: 'flex' }}>
               <Select
                 defaultValue={selectType}
                 style={{ width: '30%' }}
-                onChange={
-                  (value) => {
-                    setSelectType(value);
-                    setInputValue("");
-                  }}
+                onChange={value => {
+                  setSelectType(value);
+                  setInputValue('');
+                }}
               >
                 <Option value={SELECT_TYPE.NAME}>名称:</Option>
                 <Option value={SELECT_TYPE.TYPE}>分类:</Option>
                 <Option value={SELECT_TYPE.CREATOR}>创建人:</Option>
               </Select>
-              <Input placeholder='请输入' value={inputValue} onChange={ (e)=> setInputValue(e.target.value)} />
-              <Button type='primary' style={{ marginLeft:'10px'}}>搜索</Button>
+              <Input
+                placeholder="请输入"
+                value={inputValue}
+                onChange={e => setInputValue(e.target.value)}
+              />
+              <Button type="primary" style={{ marginLeft: '10px' }}>
+                搜索
+              </Button>
             </div>
-            <div style={{ width: '100%', marginTop:'10px' }}>
+            <div style={{ width: '100%', marginTop: '10px' }}>
               <Table
                 style={{ maxHeight: '80%' }}
                 columns={columns}
                 dataSource={showData} //data
                 loading={nodeLoading}
                 bordered={false}
-                pagination={{ position: ['none', 'none'],pageSize: 999, onChange }}
+                pagination={{ position: ['none', 'none'], pageSize: 999, onChange }}
                 scroll={{ y: 65 * pageSize }}
-                childrenColumnName='none'
-                expandable={{
-                  expandedRowRender: (record) => (
-                    <Table
-                      columns={childColumns}
-                      dataSource={record.children}
-                      pagination={{ position: ['none', 'none'] }}
-                    />
-                  ),
-                  rowExpandable: (record) => record.children?.length > 0,
-                }}
+                // childrenColumnName="none"
+                // expandable={{
+                //   expandedRowRender: record => (
+                //     <Table
+                //       columns={columns}
+                //       dataSource={record.children}
+                //       pagination={{ position: ['none', 'none'] }}
+                //     />
+                //   ),
+                //   rowExpandable: record => record.children?.length > 0,
+                // }}
               />
             </div>
             {stepsData.map((item, idx) => (

+ 32 - 25
src/pages/Detail/Index.js

@@ -649,7 +649,6 @@ function Detail(props) {
         break;
     }
   };
-  console.log("=========================", version, classifyList)
 
   const renderBtns = () => {
     // 判断是否为比对模式
@@ -693,12 +692,12 @@ function Detail(props) {
             .some(id => currentUser.roleList?.find(role => role.ID == id));
         }
         const uidsStr = classifyList.find(item => item.classify_id == version.classify_id)?.uid;
-        if (uidsStr && uidsStr.split(",")?.findIndex(item=> item ==currentUser.ID) < 0) {
-          bool = false
+        if (uidsStr && uidsStr.split(',')?.findIndex(item => item == currentUser.ID) < 0) {
+          bool = false;
         }
         return bool;
       };
-      // console.log('是否有权限提交流转   ', getIsSubmit());
+      console.log('是否有权限提交流转   ', getIsSubmit());
       if (getIsSubmit() && version.audit_status != 3)
         menuList.push(<Menu.Item key="commitAudit">提交流转</Menu.Item>);
 
@@ -799,7 +798,7 @@ function Detail(props) {
       type: 'detail/queryFiles',
       payload: {
         // excel_id: id || excelId,
-        excel_id: version.id,
+        excel_id: projectId,
       },
     });
   };
@@ -814,7 +813,7 @@ function Detail(props) {
         'JWT-TOKEN': token,
       },
       data: {
-        type:'file'
+        type: 'file',
       },
       onChange(info) {
         if (info.file.status !== 'uploading') {
@@ -962,18 +961,26 @@ function Detail(props) {
     });
   };
 
-  const onDelVersion = async(data) => {
-    const res = await queryDelPurchaseExcel(data)
-    if (res.code == 200) {
-      message.success("删除成功")
-      dispatch({
-        type: 'xflow/queryBoomFlowDetail',
-        payload: {
-          id: templateId,
-        },
-      });
-    }
-  }
+  const onDelVersion = data => {
+    Modal.confirm({
+      title: '提示',
+      content: `是否确认删除清单?`,
+      okText: '确定',
+      cancelText: '取消',
+      onOk: async () => {
+        const res = await queryDelPurchaseExcel(data);
+        if (res.code == 200) {
+          message.success('删除成功');
+          dispatch({
+            type: 'xflow/queryBoomFlowDetail',
+            payload: {
+              id: templateId,
+            },
+          });
+        }
+      },
+    });
+  };
 
   useEffect(() => {
     dispatch({
@@ -998,16 +1005,16 @@ function Detail(props) {
       type: 'user/fetchDepV2',
     });
     dispatch({
-      type: 'detail/queryClassify'
-    })
+      type: 'detail/queryClassify',
+    });
 
     dispatch({
       type: 'detail/queryBindClassify',
       payload: {
         project_id: projectId,
-      }
-    })
-    
+      },
+    });
+
     // dispatch({
     //   type: 'detail/queryListParentByUser',
     //   payload: {
@@ -1172,10 +1179,10 @@ function Detail(props) {
         onOk={onAudit}
       />
       <FilesModal
-        versionId={version.id}
+        projectId={projectId}
         typeOptions={typeOptions}
         loading={getFilesLoading()}
-        visible={fileVisible} 
+        visible={fileVisible}
         onClose={() => setFileVisible(false)}
         queryFiles={queryFiles}
         // uploadProps={getUploadProps()}

+ 14 - 10
src/pages/Flow/Audit.js

@@ -22,10 +22,10 @@ function Audit(props) {
     formData,
     flowDetail,
     simpleFlowDteail,
-    currentUser
+    currentUser,
   } = props;
   const ref = useRef();
-  const permission = currentUser.Permission
+  const permission = currentUser.Permission;
 
   const curItem = useMemo(() => {
     let item = localStorage.getItem('currentAudit');
@@ -34,16 +34,16 @@ function Audit(props) {
 
   const editMode = useMemo(() => {
     // 判断是否有权限
-    if(permission['func-01-point-bom-flow']) {
-      return 1
+    if (permission['func-01-point-bom-flow']) {
+      return 1;
     }
     // 判断是否为创建者
-    if(flowDetail.Creator == currentUser.ID) {
-      return 1
+    if (currentUser.IsSuper) {
+      return 1;
     }
 
-    return 2
-  },[permission,flowDetail])
+    return 2;
+  }, [permission, flowDetail]);
 
   useEffect(() => {
     dispatch({
@@ -61,7 +61,7 @@ function Audit(props) {
       type: 'user/fetchDepV2',
     });
   }, []);
-  
+
   const onChange = values => {
     dispatch({
       type: 'xflow/save',
@@ -103,7 +103,11 @@ function Audit(props) {
           <AuditForm value={formData} onChange={values => onChange(values)} />
         </TabPane>
         <TabPane tab="流程控制" key="2">
-          <Flow meta={{ type: 'edit', editMode, flowId: curItem.id }} flowDetail={flowDetail} ref={ref} />
+          <Flow
+            meta={{ type: 'edit', editMode, flowId: curItem.id }}
+            flowDetail={flowDetail}
+            ref={ref}
+          />
         </TabPane>
       </Tabs>
       <Button

+ 10 - 9
src/pages/Flow/List.js

@@ -8,7 +8,7 @@ import Link from 'umi/link';
 const { Option } = Select;
 
 function List(props) {
-  const { userList, list, dispatch, projectList, permission } = props;
+  const { userList, list, dispatch, projectList, permission, currentUser } = props;
   const [visible, setVisible] = useState(false);
   const columns = [
     {
@@ -19,9 +19,9 @@ function List(props) {
       title: '所属项目',
       dataIndex: 'ProjectId',
       render: projectId => {
-        let project = projectList.find(item => item.id == projectId)
-        if(project) return `${project.project_name}(${project.project_full_code})`
-      }
+        let project = projectList.find(item => item.id == projectId);
+        if (project) return `${project.project_name}(${project.project_full_code})`;
+      },
     },
     {
       title: '操作',
@@ -41,11 +41,11 @@ function List(props) {
       callback: () => {
         setVisible(false);
         dispatch({
-          type:'flow/queryDefaultBindClassify',
+          type: 'flow/queryDefaultBindClassify',
           payload: {
-            project_id: values.project_id
+            project_id: values.project_id,
           },
-        })
+        });
       },
     });
   };
@@ -72,11 +72,11 @@ function List(props) {
         <Button type="primary" style={{ marginRight: 20 }} onClick={() => setVisible(true)}>
           新增工作流
         </Button>
-        {/* {permission['func-01-point-bom-flow'] && ( */}
+        {(permission['func-01-point-bom-flow'] || currentUser.IsSuper) && (
           <Link to="/home/audit-list">
             <Button type="primary">审批流管理</Button>
           </Link>
-        {/* )} */}
+        )}
       </div>
 
       <Table rowKey="Id" dataSource={list} columns={columns} />
@@ -93,6 +93,7 @@ function List(props) {
 export default connect(({ user, flow, loading }) => ({
   userList: user.list,
   permission: user.currentUser.Permission,
+  currentUser: user.currentUser,
   list: flow.flowList,
   projectList: flow.projectList,
   loading: loading.models.purchaseList2,

+ 38 - 24
src/pages/List/List.js

@@ -1,9 +1,15 @@
 import React, { useState, useEffect } from 'react';
-import { message, Table} from 'antd';
+import { message, Modal, Table } from 'antd';
 import { connect } from 'dva';
 import router from 'umi/router';
 import FlowModal from '../Detail/FlowModal';
-import { queryAddBindClassify, queryBindClassify, queryBoomFlowDetail, queryDelPurchaseExcel, queryRecordSheet } from '@/services/boom';
+import {
+  queryAddBindClassify,
+  queryBindClassify,
+  queryBoomFlowDetail,
+  queryDelPurchaseExcel,
+  queryRecordSheet,
+} from '@/services/boom';
 import { getToken } from '@/utils/utils';
 import ClassifyModal from './ClassifyModal';
 
@@ -39,9 +45,9 @@ function List(props) {
       width: '35%',
       render: item => {
         if (!item.is_parent) return '';
-        let p = project.list.find(p => p.id == item.project_id)
-        if(p) return `${p.project_name}(${p.project_full_code})`
-      }
+        let p = project.list.find(p => p.id == item.project_id);
+        if (p) return `${p.project_name}(${p.project_full_code})`;
+      },
     },
     {
       title: '操作',
@@ -51,9 +57,9 @@ function List(props) {
             <a
               onClick={async () => {
                 try {
-                  const data = await queryBindClassify({ project_id: record.project_id}); //record.project_id 
-                  setData({ project_id: record.project_id, classify:data});
-                  setVisible(true)
+                  const data = await queryBindClassify({ project_id: record.project_id }); //record.project_id
+                  setData({ project_id: record.project_id, classify: data });
+                  setVisible(true);
                 } catch (error) {}
               }}
             >
@@ -83,7 +89,7 @@ function List(props) {
       },
     },
   ];
-  
+
   const queryList = page => {
     console.log(page);
     dispatch({
@@ -115,8 +121,8 @@ function List(props) {
       type: 'user/queryDepV2',
     });
     dispatch({
-      type: 'list/queryClassify'
-    })
+      type: 'list/queryClassify',
+    });
   }, []);
 
   const changeVersion = item => {
@@ -171,19 +177,27 @@ function List(props) {
     });
   };
 
-  const handleChange = async(data) => {
-    const res = await queryAddBindClassify(data)
-  }
+  const handleChange = async data => {
+    const res = await queryAddBindClassify(data);
+  };
 
-  const onDelVersion = async(data) => {
-    const res = await queryDelPurchaseExcel(data)
-    if (res.code == 200) {
-      message.success("删除成功")
-      const data = await queryBoomFlowDetail({ id: version.template_id });
-      console.log(data);
-      setFlowDetail(data);
-    }
-  }
+  const onDelVersion = async data => {
+    Modal.confirm({
+      title: '提示',
+      content: `是否确认删除清单?`,
+      okText: '确定',
+      cancelText: '取消',
+      onOk: async () => {
+        const res = await queryDelPurchaseExcel(data);
+        if (res.code == 200) {
+          message.success('删除成功');
+          const data = await queryBoomFlowDetail({ id: version.template_id });
+          console.log(data);
+          setFlowDetail(data);
+        }
+      },
+    });
+  };
 
   return (
     <div>
@@ -204,7 +218,7 @@ function List(props) {
         version={version}
         onCommit={onCommit}
         onChangeVersion={version => changeVersion(version)}
-        onDelVersion ={onDelVersion}
+        onDelVersion={onDelVersion}
       />
       <ClassifyModal
         visible={visible}