| | |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, Space } from 'antd'; |
| | | import { useRef, useState } from 'react'; |
| | | import { useAccess,Access } from 'umi'; |
| | | import { useAccess, Access } from 'umi'; |
| | | import AddAndEdit from './components/addAndEdit'; |
| | | import { addAndEdit, del, getList } from './service'; |
| | | const Account = () => { |
| | |
| | | render: (text, record) => { |
| | | return ( |
| | | <Space> |
| | | {/* <Access accessible={access.pm5 || false}> */} |
| | | <Access accessible={access['/work_order_transaction_management/problem_type_management/edit']}> |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | |
| | | > |
| | | 编辑 |
| | | </Button> |
| | | {/* </Access> */} |
| | | {/* <Access accessible={access.pm5 || false}> */} |
| | | <Button |
| | | </Access> |
| | | <Access accessible={access['/work_order_transaction_management/problem_type_management/del']}> |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | showDelConfirm(async () => { |
| | |
| | | > |
| | | 删除 |
| | | </Button> |
| | | {/* </Access> */} |
| | | </Access> |
| | | </Space> |
| | | ); |
| | | }, |
| | |
| | | }} |
| | | toolBarRender={(action, selectRows) => [ |
| | | <Space> |
| | | {/* <Access accessible={access.pm4 || false}> */} |
| | | <Access accessible={access['/work_order_transaction_management/problem_type_management/add']}> |
| | | <Button |
| | | type="primary" |
| | | onClick={() => { |
| | |
| | | > |
| | | 添加 |
| | | </Button> |
| | | {/* </Access> */} |
| | | </Access> |
| | | </Space>, |
| | | ]} |
| | | /> |