import React, { useEffect, useRef, useReducer } from "react";
import { Button, Popconfirm, Switch } from "antd";
import AutoTable from "@/components/AutoTable";
import getPrem from "@/utils/getPrem"; //权限判断fn
import { useRequest } from "umi";
import { doFetch } from "@/utils/doFetch";
const Specialset = (props) => {
let actionRef = useRef(),
ChildRef = null;
function reload() {
actionRef?.current?.reload();
ChildRef?.onRefresh();
}
const { run, loading } = useRequest(doFetch, {
manual: true,
formatResult: (res) => res,
onSuccess: (result, params) => {
if (result.code == "0000") {
reload();
}
},
}),
columns = [
{
title: "类别",
dataIndex: "name",
key: "name",
},
{
title: "操作",
dataIndex: "option_dataindex",
key: "option_dataindex",
valueType: "option",
width: 120,
render: (text, row, _, action) => {
return (