pyt
2025-02-26 403da33c30fc628c1608b96d95efdc12e70c3b06
management/src/pages/work-order/problem-type/index.jsx
@@ -1,10 +1,10 @@
import { buildProTableDataSource, sendRequest, showDelConfirm } from '@/utils/antdUtils';
import { buildProTableDataSource, sendRequest, showDelConfirm1 } from '@/utils/antdUtils';
import { PageContainer, ProTable } from '@ant-design/pro-components';
import { Button, Space } from 'antd';
import { useRef, useState } from 'react';
import { useAccess, Access } from 'umi';
import AddAndEdit from './components/addAndEdit';
import { addAndEdit, del, getList } from './service';
import { add,Edit, del, getList } from './service';
const Account = () => {
  const actionRef = useRef();
  const addViewRef = useRef();
@@ -15,7 +15,7 @@
  const columns = [
    {
      title: '问题类型名称',
      dataIndex: 'categoryName',
      dataIndex: 'name',
    },
    {
      title: '操作',
@@ -38,7 +38,7 @@
              <Button
                type="link"
                onClick={() => {
                  showDelConfirm(async () => {
                  showDelConfirm1(async () => {
                    let status = await sendRequest(del, record.id);
                    if (status) {
                      actionRef.current.reload();
@@ -93,14 +93,14 @@
          visible={modalVisible}
          onCancel={() => handleModalVisible(false)}
          onSave={async (fileds) => {
            const success = await sendRequest(addAndEdit, fileds);
            const success = await sendRequest(add, fileds);
            if (success) {
              handleModalVisible(false);
              actionRef.current.reload();
            }
          }}
          onUpdate={async (fileds) => {
            const success = await sendRequest(addAndEdit, fileds);
            const success = await sendRequest(Edit, fileds);
            if (success) {
              handleModalVisible(false);
              actionRef.current.reload();