
import { Button, Popconfirm } from 'antd'
import FormPage from '../../components/FormPage'
import {extendRule, initFilter} from "../../utils/common";

//角色列表页
export default {
  btnEdit:({record,close,loadData,login,dispatch})=> {
    const closeF=()=>{
      close();
      loadData();
    };
    const regClick= async function () {
      await dispatch({
        type: 'custom/save',
        payload: {
          ['roleEditClick'+(record? record.ID:'')]:true
        },
      });
    };
    const data={
      id:(record? record.ID:''),
      close:closeF,
      roleEditClick:login.roleEditClick
    };
    return {
      content: <FormPage formCode={'FM030'} data={data}/>,
      click: regClick
    }
  }

}
