Procházet zdrojové kódy

审核页面初步

XuZinan před 2 roky
rodič
revize
cdeb714ef3
2 změnil soubory, kde provedl 59 přidání a 3 odebrání
  1. 7 3
      config/router.config.js
  2. 52 0
      src/pages/Auth/Auth.js

+ 7 - 3
config/router.config.js

@@ -9,13 +9,12 @@ export default [
       },
       {
         path: '/bom',
-        redirect: '/home'
+        redirect: '/home',
       },
       {
         path: '/home',
         component: './Index',
         routes: [
-         
           {
             path: '/home',
             component: './List/List',
@@ -40,9 +39,14 @@ export default [
             path: '/home/flow-list',
             component: './Flow/List',
           },
+
+          {
+            path: '/home/auth',
+            component: './Auth/Auth',
+          },
         ],
       },
-   
+
       // {
       //   path: '/dd-login/:dingUserId',
       //   component: './DDLogin/index',

+ 52 - 0
src/pages/Auth/Auth.js

@@ -0,0 +1,52 @@
+import React, { useState } from 'react';
+import { Table, Collapse } from 'antd';
+import { connect } from 'umi';
+
+const { Panel } = Collapse;
+
+function Auth(props) {
+  const { dispatch } = props;
+
+  const columns = [
+    { title: '流程名称', dataIndex: 'name' },
+    { title: '所属项目', dataIndex: 'project' },
+  ];
+
+  const flowColumns = [
+    { title: '名称', dataIndex: 'name' },
+    { title: '节点', dataIndex: 'node' },
+    { title: '创建人', dataIndex: 'author' },
+    { title: '分类', dataIndex: 'type' },
+    { title: '状态', dataIndex: 'status' },
+    { title: '印章申请', render: () => '-' },
+    { title: '操作', render: () => <a>加载</a> },
+  ];
+
+  const temp = [{ name: '测试', project: '测试' }];
+
+  const flowTemp = [{ name: '测试', node: '测试', author: '测试', type: '测试', status: '测试' }];
+
+  const renderUnauth = () => (
+    <Table columns={flowColumns} dataSource={flowTemp} pagination={false} />
+  );
+
+  const renderAuth = () => <Table columns={flowColumns} dataSource={flowTemp} pagination={false} />;
+
+  return (
+    <Collapse defaultActiveKey={['0']}>
+      <Panel header="未审批" key="0">
+        <Table
+          columns={columns}
+          dataSource={temp}
+          expandable={{ expandedRowRender: renderUnauth }}
+          pagination={false}
+        />
+      </Panel>
+      <Panel header="已审批" key="1">
+        <Table columns={columns} dataSource={temp} expandable={{ expandedRowRender: renderAuth }} />
+      </Panel>
+    </Collapse>
+  );
+}
+
+export default Auth;