salary-management-front/pc4mobx/hrmSalary/pages/roleManagement/components/roleDetailSetDialog/index.js

496 lines
22 KiB
JavaScript
Raw Normal View History

2024-08-07 09:02:12 +08:00
/*
* 角色详情设置弹窗
*
* @Author: 黎永顺
* @Date: 2024/8/5
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
2024-09-12 16:34:39 +08:00
import { inject, observer } from "mobx-react";
2024-08-07 14:02:27 +08:00
import {
WeaBrowser,
WeaDialog,
WeaFormItem,
2024-09-10 12:23:18 +08:00
WeaInputNumber,
2024-08-07 14:02:27 +08:00
WeaLocaleProvider,
2024-08-08 11:10:24 +08:00
WeaScope,
2024-08-07 14:02:27 +08:00
WeaSelect,
WeaTab,
WeaTable,
2024-09-12 17:50:19 +08:00
WeaTextarea,
WeaTools
2024-08-07 14:02:27 +08:00
} from "ecCom";
2024-08-07 09:02:12 +08:00
import { commonEnumList } from "../../../../apis/archive";
2024-08-20 18:07:03 +08:00
import EditRoleDialog from "./editRoleDialog";
2024-09-27 15:32:21 +08:00
import DetailDialog from "./detailDialog";
2024-08-21 16:00:28 +08:00
import AuthTree from "./authTree";
2024-08-07 14:02:27 +08:00
import * as API from "../../../../apis/taxAgent";
2024-08-08 11:10:24 +08:00
import { Button, Col, message, Modal, Row } from "antd";
2024-08-07 09:02:12 +08:00
import "../index.less";
2024-09-10 12:23:18 +08:00
import CustomBrowser from "../../../../components/CustomBrowser";
2024-09-12 16:34:39 +08:00
import { roleConditions } from "../conditions";
import { getSearchs } from "../../../../util";
2024-08-07 09:02:12 +08:00
const getLabel = WeaLocaleProvider.getLabel;
2024-09-12 17:50:19 +08:00
const getKey = WeaTools.getKey;
2024-08-07 14:02:27 +08:00
const APIFOX = {
"auth.MemberTargetTypeEnum": API.authMemberList,
2024-08-08 11:10:24 +08:00
"save.auth.MemberTargetTypeEnum": API.saveAuthMember,
2024-08-20 16:48:02 +08:00
"delete.auth.MemberTargetTypeEnum": API.deleteAuthMember,
"sync.auth.MemberTargetTypeEnum": API.syncAuthMember,
2024-08-08 11:10:24 +08:00
"auth.DataTargetTypeEnum": API.authDataList,
2024-08-20 16:48:02 +08:00
"save.auth.DataTargetTypeEnum": API.saveAuthData,
"delete.auth.DataTargetTypeEnum": API.deleteAuthData,
"sync.auth.DataTargetTypeEnum": API.syncAuthData
2024-08-07 14:02:27 +08:00
};
2024-08-07 09:02:12 +08:00
2024-09-12 16:34:39 +08:00
@inject("taxAgentStore")
@observer
2024-08-07 09:02:12 +08:00
class Index extends Component {
constructor(props) {
super(props);
this.state = {
2024-09-12 16:34:39 +08:00
selectedKey: "baseinfo", name: "", options: [], enumType: "", selectedRowKeys: [],
2024-08-20 16:48:02 +08:00
replaceDatas: [], loading: { set: false, query: false, async: false, delete: false },
2024-08-20 18:07:03 +08:00
columns: [], dataSource: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
2024-09-10 12:23:18 +08:00
editOperatorDialog: { visible: false, linkOptions: [], record: {} },
2024-09-27 15:32:21 +08:00
detailDialog: { visible: false, roleId: "", selectedKey: "" },
2024-09-12 16:34:39 +08:00
dataTargetSettings: { link: "OR", sortedIndex: null }, conditions: [],
formData: { taxAgentIds: [], sobIds: [] }
2024-08-07 09:02:12 +08:00
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
2024-09-13 14:11:26 +08:00
this.setState({
2024-09-27 15:32:21 +08:00
name: nextProps.name, selectedKey: nextProps.selectedKey || "baseinfo",
detailDialog: {
...this.state.detailDialog, roleId: nextProps.roleId,
selectedKey: nextProps.selectedKey || "baseinfo"
}
2024-09-13 14:11:26 +08:00
}, () => {
2024-09-23 10:37:10 +08:00
!["auth.AuthTargetTypeEnum", "baseinfo"].includes(this.state.selectedKey) && this.getEnumList();
!["auth.AuthTargetTypeEnum", "baseinfo"].includes(this.state.selectedKey) && this.getSettingRoler(nextProps.roleId);
2024-09-13 14:11:26 +08:00
this.state.selectedKey === "baseinfo" && this.getRole(nextProps.roleId);
2024-09-23 10:37:10 +08:00
this.state.selectedKey === "auth.DataTargetTypeEnum" && this.getConnectSymbol();
2024-09-13 14:11:26 +08:00
});
2024-08-08 11:10:24 +08:00
} else {
2024-09-10 12:23:18 +08:00
this.setState({
selectedRowKeys: [], replaceDatas: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
dataTargetSettings: { link: "OR", sortedIndex: "" }
});
2024-08-07 09:02:12 +08:00
}
}
2024-09-12 16:34:39 +08:00
getRole = (id) => {
API.getRole({ id }).then(({ status, data }) => {
if (status) {
this.setState({
conditions: _.map(roleConditions, item => ({
2024-09-12 17:50:19 +08:00
...item, items: _.map(item.items, o => {
if (getKey(o) === "taxAgentIds" || getKey(o) === "sobIds") {
return {
...o, label: getLabel(o.lanId, o.label),
value: _.map(data[getKey(o)], i => String(i.id)).join(","),
browserConditionParam: {
...o.browserConditionParam,
replaceDatas: _.map(data[getKey(o)], i => ({ id: String(i.id), name: i.name }))
}
};
}
return { ...o, label: getLabel(o.lanId, o.label) };
})
})),
formData: {
taxAgentIds: _.map(data["taxAgentIds"], i => ({ id: String(i.id), name: i.name })),
sobIds: _.map(data["sobIds"], i => ({ id: String(i.id), name: i.name }))
}
}, () => {
this.props.taxAgentStore.roleForm.initFormFields(this.state.conditions);
this.props.taxAgentStore.roleForm.updateFields({
name: { value: data.name },
description: { value: data.description }
});
});
2024-09-12 16:34:39 +08:00
}
});
};
2024-08-07 09:02:12 +08:00
getEnumList = () => {
const payload = { enumClass: `com.engine.salary.enums.${this.state.selectedKey}` };
commonEnumList(payload).then(({ status, data }) => {
if (status) this.setState({
options: _.map(data, o => ({ key: o.enum, showname: o.defaultLabel })),
enumType: _.head(data).enum || ""
});
if (!status) this.setState({ options: [], enumType: "" });
});
};
2024-08-07 14:02:27 +08:00
getSettingRoler = (roleId) => {
const { selectedKey, pageInfo } = this.state;
2024-08-08 11:10:24 +08:00
this.setState({ loading: { ...this.state.loading, query: true } });
2024-08-07 14:02:27 +08:00
APIFOX[selectedKey]({ roleId, ...pageInfo }).then(({ status, data }) => {
2024-08-08 11:10:24 +08:00
this.setState({ loading: { ...this.state.loading, query: false } });
2024-08-07 14:02:27 +08:00
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
2024-08-20 18:07:03 +08:00
columns: [
...columns, {
dataIndex: "opt", title: getLabel(111, "操作"), width: 120,
render: (__, record) => (<a href="javascript:void(0);"
onClick={() => this.handleEditOperator(record)}>{getLabel(111, "编辑")}</a>)
}
]
2024-08-07 14:02:27 +08:00
});
}
});
};
2024-09-10 12:23:18 +08:00
handleEditOperator = (record) => {
this.setState({ editOperatorDialog: { ...this.state.editOperatorDialog, visible: true, record } });
};
getConnectSymbol = async () => {
const payload = { enumClass: `com.engine.salary.enums.auth.DataLinkEnum` };
const { data } = await commonEnumList(payload);
const linkOptions = _.map(data, o => ({ key: o.enum, showname: o.defaultLabel }));
this.setState({ editOperatorDialog: { ...this.state.editOperatorDialog, linkOptions } });
2024-08-20 18:07:03 +08:00
};
2024-08-08 11:10:24 +08:00
addOperatorSettings = () => {
const { roleId } = this.props;
2024-09-10 12:23:18 +08:00
const { selectedKey, enumType: targetType, replaceDatas, dataTargetSettings } = this.state;
2024-08-08 11:10:24 +08:00
if (_.isEmpty(replaceDatas)) {
Modal.warning({
title: getLabel(111, "系统提示"),
content: getLabel(111, "请先选择操作对象的值!")
});
return;
}
2024-08-20 16:48:02 +08:00
const payload = _.map(replaceDatas, o => ({
2024-09-10 12:23:18 +08:00
roleId, target: o.id || "", id: o.editId || "",
targetType: o.targetType || targetType,
targetName: o.name || "",
link: o.link || dataTargetSettings.link,
sortedIndex: o.sortedIndex || dataTargetSettings.sortedIndex
2024-08-20 16:48:02 +08:00
}));
2024-08-08 11:10:24 +08:00
this.setState({ loading: { ...this.state.loading, set: true } });
APIFOX[`save.${selectedKey}`](payload).then(({ status, errormsg }) => {
this.setState({ loading: { ...this.state.loading, set: false } });
if (status) {
message.success(getLabel(111, "操作成功!"));
2024-08-21 16:00:28 +08:00
this.setState({ replaceDatas: [] }, () => this.getSettingRoler(roleId));
2024-08-08 11:10:24 +08:00
} else {
message.error(errormsg);
}
});
};
2024-08-20 16:48:02 +08:00
deleteOperatorSettings = () => {
2024-08-08 11:10:24 +08:00
const { roleId } = this.props;
2024-08-20 16:48:02 +08:00
const { selectedKey, selectedRowKeys } = this.state;
if (_.isEmpty(selectedRowKeys)) {
Modal.warning({
title: getLabel(111, "信息确认"),
content: getLabel(111, "确定要删除所选批次吗?")
});
return;
}
this.setState({ loading: { ...this.state.loading, delete: true } });
APIFOX[`delete.${selectedKey}`](selectedRowKeys).then(({ status, errormsg }) => {
this.setState({ loading: { ...this.state.loading, delete: false } });
if (status) {
message.success(getLabel(111, "操作成功!"));
this.setState({ selectedRowKeys: [] }, () => this.getSettingRoler(roleId));
} else {
message.error(errormsg);
}
});
};
2024-08-22 15:42:35 +08:00
saveAuthOpt = () => {
2024-09-12 16:34:39 +08:00
const { roleId } = this.props, { selectedKey } = this.state;
if (selectedKey === "baseinfo") {
this.saveBaseInfo();
return;
}
2024-08-22 15:42:35 +08:00
const { state: { checkedKeys } } = this.authTreeRef;
const payload = {
roleId, opts: _.reduce(checkedKeys, (pre, cur) => {
if (cur.indexOf("query") !== -1 || cur.indexOf("admin") !== -1) {
const [page, opt] = cur.split("-");
return [...pre, { page, opt }];
}
return pre;
}, [])
};
this.setState({ loading: { ...this.state.loading, set: true } });
API.saveAuthOpt(payload).then(({ status, errormsg }) => {
this.setState({ loading: { ...this.state.loading, set: false } });
if (status) {
message.success(getLabel(111, "操作成功!"));
2024-09-27 15:32:21 +08:00
this.props.onSearch && this.props.onSearch();
2024-08-22 15:42:35 +08:00
} else {
message.error(errormsg);
}
});
};
2024-09-12 16:34:39 +08:00
saveBaseInfo = () => {
const { taxAgentStore: { roleForm }, roleId } = this.props;
const { formData } = this.state;
roleForm.validateForm().then(f => {
if (f.isValid) {
const payload = roleForm.getFormParams();
this.setState({ loading: { ...this.state.loading, set: true } });
API.saveAuthRole({ id: roleId, ...payload, ...formData }).then(({ status, errormsg }) => {
this.setState({ loading: { ...this.state.loading, set: false } });
if (status) {
message.success(getLabel(111, "操作成功!"));
2024-09-12 17:50:19 +08:00
this.props.onSearch && this.props.onSearch();
2024-09-12 16:34:39 +08:00
} else {
message.error(errormsg);
}
});
} else {
f.showErrors();
}
});
};
2024-08-20 16:48:02 +08:00
syncAuthData = () => {
const { roleId } = this.props, { selectedKey } = this.state;
2024-08-08 11:10:24 +08:00
this.setState({ async: true });
2024-08-20 16:48:02 +08:00
APIFOX[`sync.${selectedKey}`]({ roleId }).then(({ status, errormsg }) => {
2024-08-08 11:10:24 +08:00
this.setState({ async: false });
if (status) {
message.success(getLabel(111, "操作成功!"));
2024-09-27 15:32:21 +08:00
this.props.onSearch && this.props.onSearch();
2024-08-08 11:10:24 +08:00
} else {
message.error(errormsg);
}
});
};
2024-08-07 09:02:12 +08:00
getOperatorSetting = () => {
2024-09-12 16:34:39 +08:00
const { roleId, taxAgentStore: { roleForm } } = this.props;
const { selectedKey, enumType, replaceDatas, conditions } = this.state;
if (!["auth.AuthTargetTypeEnum", "baseinfo"].includes(selectedKey)) {
2024-08-07 09:02:12 +08:00
let browserType = {};
switch (enumType) {
case "EMP":
browserType = { ...browserType, type: 17, title: getLabel(82246, "人员选择") };
break;
case "DEPARTMENT":
browserType = { ...browserType, type: 57, title: getLabel(111, "部门选择") };
break;
case "JOB":
browserType = { ...browserType, type: 278, title: getLabel(111, "岗位选择") };
break;
case "SUB_COMPANY":
browserType = { ...browserType, type: 164, title: getLabel(111, "分部选择") };
break;
case "ROLE":
browserType = { ...browserType, type: 65, title: getLabel(111, "角色选择") };
break;
case "SQL":
return (<Row className="tax_role_browser_form_item">
2024-08-08 11:10:24 +08:00
<WeaTextarea style={{ width: "100%" }} minRows={3}
value={_.head(replaceDatas) ? _.head(replaceDatas).name : ""}
onChange={v => this.setState({ replaceDatas: [{ id: v, name: v }] })}/>
2024-08-07 09:02:12 +08:00
</Row>);
2024-08-08 11:10:24 +08:00
case "LEVEL":
return (<WeaFormItem label={getLabel(111, "安全级别")} labelCol={{ span: 2 }} wrapperCol={{ span: 5 }}
className="tax_role_browser_form_item">
2024-08-21 16:00:28 +08:00
<WeaScope isMobx value={_.reduce(replaceDatas, (pre, cur) => cur.id.split("-"), [])}
onChange={v => this.setState({ replaceDatas: [{ id: v.join("-"), name: v.join("-") }] })}/>
2024-08-08 11:10:24 +08:00
</WeaFormItem>);
2024-09-10 12:23:18 +08:00
case "SOB":
return (<WeaFormItem label={getLabel(111, "薪资账套")} labelCol={{ span: 2 }} wrapperCol={{ span: 5 }}
className="tax_role_browser_form_item">
<CustomBrowser
fieldConfig={{
viewAttr: 2,
browserConditionParam: {
completeURL: "/api/bs/hrmsalary/salarysob/listAuth", dataParams: { filterType: "QUERY_DATA" },
filterByName: true, tableProps: {}, isSingle: false, searchParamsKey: "name", replaceDatas
}
}}
value={_.map(replaceDatas, o => (o.id))}
onCustomChange={replaceDatas => this.setState({
replaceDatas: _.map(_.values(replaceDatas), o => ({ id: o.id, name: o.name }))
})}
/>
</WeaFormItem>);
2024-09-14 14:28:58 +08:00
case "TAX":
return (<WeaFormItem label={getLabel(111, "扣缴义务人")} labelCol={{ span: 4 }} wrapperCol={{ span: 6 }}
className="tax_role_browser_form_item">
<CustomBrowser
fieldConfig={{
viewAttr: 2,
browserConditionParam: {
completeURL: "/api/bs/hrmsalary/taxAgent/listAuth", dataParams: { filterType: "QUERY_DATA" },
filterByName: true, tableProps: {}, isSingle: false, searchParamsKey: "name", replaceDatas
}
}}
value={_.map(replaceDatas, o => (o.id))}
onCustomChange={replaceDatas => this.setState({
replaceDatas: _.map(_.values(replaceDatas), o => ({ id: o.id, name: o.name }))
})}
/>
</WeaFormItem>);
2024-08-07 09:02:12 +08:00
default:
2024-08-08 11:10:24 +08:00
return (<Row className="tax_role_browser_form_item"></Row>);
2024-08-07 09:02:12 +08:00
}
return (<Row className="tax_role_browser_form_item">
2024-08-08 11:10:24 +08:00
<WeaBrowser {...browserType} isSingle={false} inputStyle={{ width: 150 }} replaceDatas={replaceDatas}
onChange={(__, ___, replaceDatas) => this.setState({ replaceDatas })}/>
2024-08-07 09:02:12 +08:00
</Row>);
2024-09-12 16:34:39 +08:00
} else if (selectedKey === "auth.AuthTargetTypeEnum") {
2024-08-22 15:42:35 +08:00
return (<AuthTree roleId={roleId} ref={dom => this.authTreeRef = dom}/>);
2024-08-07 09:02:12 +08:00
}
2024-09-12 16:34:39 +08:00
return getSearchs(roleForm, conditions, 1, false, this.handleFormChange);
};
handleFormChange = (val) => {
const key = _.keys(val)[0];
if (key === "taxAgentIds" || key === "sobIds") {
this.setState({ formData: { ...this.state.formData, ...val } });
}
2024-08-07 09:02:12 +08:00
};
render() {
2024-09-27 15:32:21 +08:00
const { roleId, taxAgentStore, counts } = this.props;
2024-08-20 16:48:02 +08:00
const {
2024-09-10 12:23:18 +08:00
selectedKey, name, options, enumType, pageInfo, columns, dataSource, loading, selectedRowKeys, editOperatorDialog,
2024-09-27 15:32:21 +08:00
dataTargetSettings, detailDialog
2024-08-20 16:48:02 +08:00
} = this.state;
2024-09-10 12:23:18 +08:00
const { linkOptions } = editOperatorDialog;
2024-08-07 09:02:12 +08:00
const tabs = [
2024-09-27 15:32:21 +08:00
{ title: getLabel(111, "基础信息"), viewcondition: "baseinfo", showcount: true, count: "resources" },
{
title: getLabel(111, "成员设置"), viewcondition: "auth.MemberTargetTypeEnum", showcount: true, count: "members"
},
{ title: getLabel(111, "功能权限"), viewcondition: "auth.AuthTargetTypeEnum", showcount: true, count: "opts" },
{ title: getLabel(111, "数据范围"), viewcondition: "auth.DataTargetTypeEnum", showcount: true, count: "datas" }
2024-08-07 09:02:12 +08:00
];
2024-08-07 14:02:27 +08:00
const pagination = {
...pageInfo,
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange: (current, pageSize) => {
this.setState({
pageInfo: { ...pageInfo, current, pageSize }
}, () => this.getSettingRoler(roleId));
},
onChange: current => {
this.setState({
pageInfo: { ...pageInfo, current }
}, () => this.getSettingRoler(roleId));
}
};
2024-08-20 16:48:02 +08:00
const rowSelection = {
selectedRowKeys, onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
};
2024-08-22 15:42:35 +08:00
const buttons = [
<Button type="primary" onClick={this.syncAuthData} loading={loading.async}>{getLabel(111, "同步")}</Button>,
2024-09-10 16:33:21 +08:00
<Button type="primary" loading={loading.set} onClick={this.saveAuthOpt}>{getLabel(111, "保存")}</Button>
2024-08-22 15:42:35 +08:00
];
2024-09-12 16:34:39 +08:00
["auth.AuthTargetTypeEnum", "baseinfo"].includes(selectedKey) && buttons.shift();
!["auth.AuthTargetTypeEnum", "baseinfo"].includes(selectedKey) && buttons.pop();
2024-09-27 15:32:21 +08:00
!["auth.AuthTargetTypeEnum", "baseinfo"].includes(selectedKey) && buttons.unshift(
<Button type="primary" onClick={() => this.setState({
detailDialog: { ...detailDialog, visible: true }
})}>{selectedKey === "auth.MemberTargetTypeEnum" ? getLabel(111, "成员明细") : getLabel(111, "数据明细")}</Button>
);
2024-08-07 09:02:12 +08:00
return (
<WeaDialog
2024-09-12 16:34:39 +08:00
{...this.props} hasScroll className="tax_role_set_dialog" initLoadCss
title={`${getLabel(111, "编辑业务线")}-(${name})`}
2024-08-22 15:42:35 +08:00
buttons={buttons} style={{
width: 960, height: 606.6, minHeight: 200, minWidth: 380,
maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
}}
2024-08-07 09:02:12 +08:00
>
<div className="tax_role_set_container">
<Row>
<div className="tax_role_form_item">
2024-09-27 15:32:21 +08:00
<WeaTab datas={tabs} keyParam="viewcondition" selectedKey={selectedKey} countParam="count" counts={counts}
2024-08-07 09:02:12 +08:00
onChange={v => this.setState({
2024-09-27 15:32:21 +08:00
selectedKey: v, replaceDatas: [], selectedRowKeys: [],
detailDialog: { ...detailDialog, selectedKey: v }
2024-08-07 14:02:27 +08:00
}, () => {
2024-09-12 16:34:39 +08:00
taxAgentStore.roleForm.resetForm();
const { selectedKey } = this.state;
!["auth.AuthTargetTypeEnum", "baseinfo"].includes(selectedKey) && this.getEnumList();
!["auth.AuthTargetTypeEnum", "baseinfo"].includes(selectedKey) && this.getSettingRoler(roleId);
selectedKey === "auth.DataTargetTypeEnum" && this.getConnectSymbol();
selectedKey === "baseinfo" && this.getRole(roleId);
2024-08-07 14:02:27 +08:00
})}/>
2024-08-21 16:00:28 +08:00
{
2024-09-12 16:34:39 +08:00
!["auth.AuthTargetTypeEnum", "baseinfo"].includes(selectedKey) &&
2024-08-21 16:00:28 +08:00
<WeaSelect options={options} detailtype={3} value={enumType}
onChange={v => this.setState({ enumType: v, replaceDatas: [] })}/>
}
2024-08-07 09:02:12 +08:00
{this.getOperatorSetting()}
2024-08-21 16:00:28 +08:00
{
2024-09-12 16:34:39 +08:00
!["auth.AuthTargetTypeEnum", "baseinfo"].includes(selectedKey) &&
2024-08-21 16:00:28 +08:00
<Row className="tax_role_operator_setting">
2024-09-10 12:23:18 +08:00
{
this.state.selectedKey === "auth.DataTargetTypeEnum" &&
<Col span={16}>
<Row>
<Col span={12}>
<WeaFormItem label={getLabel(111, "连接符")} labelCol={{ span: 8 }} wrapperCol={{ span: 14 }}>
<WeaSelect value={dataTargetSettings.link} options={linkOptions}
onChange={link => this.setState({
dataTargetSettings: { ...dataTargetSettings, link }
})}/>
</WeaFormItem>
</Col>
<Col span={12}>
2024-09-10 16:33:21 +08:00
<WeaFormItem label={getLabel(111, "批次")} labelCol={{ span: 8 }} wrapperCol={{ span: 14 }}>
2024-09-10 12:23:18 +08:00
<WeaInputNumber value={dataTargetSettings.sortedIndex}
onChange={sortedIndex => this.setState({
dataTargetSettings: { ...dataTargetSettings, sortedIndex }
})}/>
</WeaFormItem>
</Col>
</Row>
</Col>
}
<Col span={8} offset={this.state.selectedKey === "auth.DataTargetTypeEnum" ? 0 : 16}>
2024-08-21 16:00:28 +08:00
<Button type="primary" loading={loading.set}
onClick={this.addOperatorSettings}>{getLabel(111, "添加操作者设置")}</Button>
</Col>
</Row>
}
2024-08-07 09:02:12 +08:00
</div>
</Row>
2024-08-07 14:02:27 +08:00
{/*表格*/}
2024-08-21 16:00:28 +08:00
{
2024-09-12 16:34:39 +08:00
!["auth.AuthTargetTypeEnum", "baseinfo"].includes(selectedKey) &&
2024-08-21 16:00:28 +08:00
<Row className="tax_role_operator_setting_table">
<Col span={24} className="setting_table_title">
<div className="wea-f12 text-elli operator">
<span>{getLabel(111, "已设操作者")}</span>
<Button type="ghost" disabled={_.isEmpty(selectedRowKeys)} loading={loading.delete}
onClick={this.deleteOperatorSettings}>{getLabel(111, "批量删除")}</Button>
</div>
<WeaTable rowKey="id" columns={columns} dataSource={dataSource} bordered loading={loading.query}
pagination={pagination} rowSelection={rowSelection}/>
{/* 编辑操作者*/}
<EditRoleDialog {...editOperatorDialog} loading={loading.set}
onChange={replaceDatas => this.setState({ replaceDatas }, () => this.addOperatorSettings())}
onCancel={callback => this.setState({
editOperatorDialog: { ...editOperatorDialog, visible: false, record: {} }
}, () => callback && callback())}/>
2024-09-27 15:32:21 +08:00
{/*成员、数据明细查看*/}
<DetailDialog {...detailDialog}
onCancel={() => this.setState({ detailDialog: { ...detailDialog, visible: false } })}/>
2024-08-21 16:00:28 +08:00
</Col>
</Row>
}
2024-08-07 09:02:12 +08:00
</div>
</WeaDialog>
);
}
}
export default Index;