From 710293d536b8610271b2d9a7d990a75859a456d2 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Mon, 31 Oct 2022 13:52:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=BA=E5=91=98=E6=9D=83?= =?UTF-8?q?=E9=99=90=E4=B8=A4=E4=B8=AA=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/columnPermission/index.js | 129 ++++++++++++++++++ .../components/featureDefine/index.js | 54 ++++++++ pc4mobx/organization/index.js | 4 + pc4mobx/organization/public/i18n.js | 4 +- 4 files changed, 190 insertions(+), 1 deletion(-) create mode 100644 pc4mobx/organization/components/columnPermission/index.js create mode 100644 pc4mobx/organization/components/featureDefine/index.js diff --git a/pc4mobx/organization/components/columnPermission/index.js b/pc4mobx/organization/components/columnPermission/index.js new file mode 100644 index 0000000..958f8b2 --- /dev/null +++ b/pc4mobx/organization/components/columnPermission/index.js @@ -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 [ + + ]; + }; + getDropMenuDatas = () => { + return [ + { + key: "add", + icon: , + 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 ( +
+ console.log(key)} + > + } + iconBgcolor="#217346" + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => console.log(e)} + /> + + +
+ ); + } +} + +export default ColumnPermission; diff --git a/pc4mobx/organization/components/featureDefine/index.js b/pc4mobx/organization/components/featureDefine/index.js new file mode 100644 index 0000000..ac0ce02 --- /dev/null +++ b/pc4mobx/organization/components/featureDefine/index.js @@ -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 [ + , + + ]; + }; + getDropMenuDatas = () => { + return [ + { + key: "add", + icon: , + content: "新建" + }, + { + key: "edit", + icon: , + content: "修改", + onClick: key => alert(`点击了搜索 key = ${key}`) + } + ]; + }; + + render() { + return ( +
+ console.log(key)} + > + } + iconBgcolor="#217346" + loading={true} + buttons={this.getTopMenuBtns()} + showDropIcon={true} + dropMenuDatas={this.getDropMenuDatas()} + onDropMenuClick={(e) => console.log(e)} + /> + +
+ ); + } +} + +export default FeatureDefine; diff --git a/pc4mobx/organization/index.js b/pc4mobx/organization/index.js index e12005d..61dc0d7 100644 --- a/pc4mobx/organization/index.js +++ b/pc4mobx/organization/index.js @@ -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 = ( + + ); diff --git a/pc4mobx/organization/public/i18n.js b/pc4mobx/organization/public/i18n.js index 6fa00b6..e4e6362 100644 --- a/pc4mobx/organization/public/i18n.js +++ b/pc4mobx/organization/public/i18n.js @@ -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, //虚拟人力资源 } -} \ No newline at end of file +}