|
@@ -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;
|