新增人员权限两个页面

This commit is contained in:
18652063575 2022-10-31 13:52:22 +08:00
parent f4f27c8ad0
commit 710293d536
4 changed files with 190 additions and 1 deletions

View File

@ -0,0 +1,129 @@
import React, { Component } from "react";
import { WeaRightMenu, WeaTableEdit, WeaTop } from "ecCom";
import { Button } from "antd";
import { i18n } from "../../public/i18n";
class ColumnPermission extends Component {
getTopMenuBtns = () => {
return [
<Button type="primary">调整</Button>
];
};
getDropMenuDatas = () => {
return [
{
key: "add",
icon: <i className="icon-search"/>,
content: "调整"
}
];
};
render() {
const columns = [
{
title: "栏目",
dataIndex: "column",
key: "column",
com: [
{ label: "", type: "TEXT", viewAttr: 1, key: "column" }
]
},
{
title: "是否启用",
dataIndex: "isused",
key: "isused",
com: [
{
type: "CHECKBOX",
key: "isused",
viewAttr: 1,
}
]
},
{
title: "所有人可见",
dataIndex: "all",
key: "all",
com: [
{
type: "CHECKBOX",
key: "all"
}
]
},
{
title: "上级可见",
dataIndex: "highVisible",
key: "highVisible",
com: [
{
type: "CHECKBOX",
key: "highVisible"
}
]
},
{
title: "所有上级可见",
dataIndex: "allVisible",
key: "allVisible",
com: [
{
type: "CHECKBOX",
key: "allVisible"
}
]
},
{
title: "查看自定义",
dataIndex: "customRole",
key: "customRole",
com: [
{ label: "", type: "TEXT", viewAttr: 1, key: "customRole" }
]
}
];
const datas = [
{
id: "1",
column: "基本信息",
isused: false,
all: false,
highVisible: true,
allVisible: false,
customRole: "角色1",
}
];
return (
<div style={{ height: "100%" }}>
<WeaRightMenu
ecId={`${this && this.props && this.props.ecId || ""}_WeaRightMenu@k6oc4u`}
datas={[]}
onClick={key => console.log(key)}
>
<WeaTop
ecId={`${this && this.props && this.props.ecId || ""}_WeaTop@bj98s7`}
title={i18n.label.cardView()}
icon={<i className="icon-coms-hrm"/>}
iconBgcolor="#217346"
loading={true}
buttons={this.getTopMenuBtns()}
showDropIcon={true}
dropMenuDatas={this.getDropMenuDatas()}
onDropMenuClick={(e) => console.log(e)}
/>
<WeaTableEdit
columns={columns}
datas={datas}
showAdd={false}
showCopy={false}
showDelete={false}
showTitle={false}
/>
</WeaRightMenu>
</div>
);
}
}
export default ColumnPermission;

View File

@ -0,0 +1,54 @@
import React, { Component } from "react";
import { WeaRightMenu, WeaTop } from "ecCom";
import { Button } from "antd";
import { i18n } from "../../public/i18n";
class FeatureDefine extends Component {
getTopMenuBtns = () => {
return [
<Button type="primary">新建</Button>,
<Button type="ghost">修改</Button>
];
};
getDropMenuDatas = () => {
return [
{
key: "add",
icon: <i className="icon-search"/>,
content: "新建"
},
{
key: "edit",
icon: <i className="icon-search"/>,
content: "修改",
onClick: key => alert(`点击了搜索 key = ${key}`)
}
];
};
render() {
return (
<div style={{ height: "100%" }}>
<WeaRightMenu
ecId={`${this && this.props && this.props.ecId || ""}_WeaRightMenu@k6oc4u`}
datas={[]}
onClick={key => console.log(key)}
>
<WeaTop
ecId={`${this && this.props && this.props.ecId || ""}_WeaTop@bj98s7`}
title={i18n.label.personCardFun()}
icon={<i className="icon-coms-hrm"/>}
iconBgcolor="#217346"
loading={true}
buttons={this.getTopMenuBtns()}
showDropIcon={true}
dropMenuDatas={this.getDropMenuDatas()}
onDropMenuClick={(e) => console.log(e)}
/>
</WeaRightMenu>
</div>
);
}
}
export default FeatureDefine;

View File

@ -33,6 +33,8 @@ import StaffWorkflowSet from "./components/staff/StaffWorkflowSet"
import ResourceBasicInfo from "./components/resource/ResourceBasicInfo";
import ResourceCard from "./components/resource/ResourceCard";
import ManagerDetach from "./components/detach/ManagerDetach";
import ColumnPermission from "./components/columnPermission";
import FeatureDefine from "./components/featureDefine";
import stores from "./stores";
import "./style/index";
@ -98,6 +100,8 @@ const Routes = (
<Route key="resourceBasicInfo" path="resourceBasicInfo" component={ResourceBasicInfo} />
<Route key="resourceCard" path="resourceCard/:id" component={ResourceCard} />
<Route key="managerDetach" path="managerDetach" component={ManagerDetach} />
<Route key="columnPermission" path="columnPermission" component={ColumnPermission} />
<Route key="featureDefine" path="featureDefine" component={FeatureDefine} />
</Route>
);

View File

@ -798,6 +798,8 @@ export const i18n = {
selectReserveNumber: () => getLabel(530310, '选择预留编号'),
newReserveNumber: () => getLabel(530311, '新建预留编号'),
reNumber: () => getLabel(530312, '重新生成编号'),
cardView: () => getLabel(530312, '卡片查看权限管理'),
personCardFun: () => getLabel(530312, '人员卡片功能定义'),
batchUnblock: () => getLabel(534247, '批量解锁人员'),
confirmBatchUnblock: () => getLabel(534247, "是否确认批量解锁人员?"),
'529914': () => getLabel('529914', '密级防篡改'),
@ -1097,4 +1099,4 @@ export const i18n = {
HRM_ENGINE_ORGANIZATION_RESOURCE: 2, //人力资源
HRM_ENGINE_ORGANIZATION_VIRTUAL_RESOURCE: 1010, //虚拟人力资源
}
}
}