hejianhao
2025-02-25 0dd36f42b69f37094c9bf0561501ae07985ef116
management/src/pages/work-order/problem-type/index.jsx
@@ -2,7 +2,7 @@
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 = () => {
@@ -23,7 +23,7 @@
      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={() => {
@@ -33,9 +33,9 @@
              >
                编辑
              </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 () => {
@@ -48,7 +48,7 @@
              >
                删除
              </Button>
            {/* </Access> */}
            </Access>
          </Space>
        );
      },
@@ -74,7 +74,7 @@
          }}
          toolBarRender={(action, selectRows) => [
            <Space>
              {/* <Access accessible={access.pm4 || false}> */}
              <Access accessible={access['/work_order_transaction_management/problem_type_management/add']}>
                <Button
                  type="primary"
                  onClick={() => {
@@ -84,7 +84,7 @@
                >
                  添加
                </Button>
              {/* </Access> */}
              </Access>
            </Space>,
          ]}
        />