@zgfe/modules-settings 1.2.20-role.5 → 1.2.21-test.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/modules/companySetting/demo.js +2 -2
- package/es/modules/companySetting/index.js +0 -1
- package/es/modules/companySetting/role/index.js +4 -55
- package/es/modules/companySetting/role/index.less +0 -39
- package/es/requests/role.d.ts +0 -2
- package/package.json +2 -2
- package/es/modules/companySetting/role/setDataRangeDialog/index.d.ts +0 -9
- package/es/modules/companySetting/role/setDataRangeDialog/index.js +0 -77
- package/es/modules/companySetting/role/setDataRangeDialog/index.less +0 -30
|
@@ -6,13 +6,13 @@ import util from '../../utils/util';
|
|
|
6
6
|
import { CompanySetting } from '../..';
|
|
7
7
|
export default (function () {
|
|
8
8
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
9
|
-
defaultApp:
|
|
9
|
+
defaultApp: 99844
|
|
10
10
|
}, /*#__PURE__*/React.createElement(BizGlobalDataContext.Provider, {
|
|
11
11
|
value: {
|
|
12
12
|
funPermissions: funPermissions,
|
|
13
13
|
menusName: constants.menusName,
|
|
14
14
|
getMenuRouterByName: util.getMenuRouterByName,
|
|
15
|
-
authority:
|
|
15
|
+
authority: sessionStorage.getItem('authorityList') ? JSON.parse(sessionStorage.getItem('authorityList')) : {}
|
|
16
16
|
}
|
|
17
17
|
}, /*#__PURE__*/React.createElement(CompanySetting, {
|
|
18
18
|
action: ''
|
|
@@ -537,7 +537,6 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
537
537
|
className: "company-setting-tabs",
|
|
538
538
|
destroyInactiveTabPane: true,
|
|
539
539
|
activeKey: activeKey,
|
|
540
|
-
// activeKey={'userGroup'}
|
|
541
540
|
onChange: changeTab,
|
|
542
541
|
items: items.filter(function (item) {
|
|
543
542
|
return item.hidden !== true;
|
|
@@ -21,7 +21,6 @@ import { Button, Drawer, Form, Input, Radio, Spin, Table, Tooltip, Tree, notific
|
|
|
21
21
|
import moment from 'moment';
|
|
22
22
|
import { BizDialog, BizSelect, IconFont, BizGlobalDataContext } from '@zgfe/business-lib';
|
|
23
23
|
import { addRole, queryRoleDataConfig, queryRoleDetails, queryRoleMenuTree, queryRolePage, queryCompanyUser, updateRole, deleteRole } from '../../../requests/role';
|
|
24
|
-
// import SetDataRangeDialog from './setDataRangeDialog';
|
|
25
24
|
var RoleList = function RoleList(props) {
|
|
26
25
|
// 弹窗
|
|
27
26
|
var _useState = useState(false),
|
|
@@ -111,16 +110,6 @@ var RoleList = function RoleList(props) {
|
|
|
111
110
|
_useState36 = _slicedToArray(_useState35, 2),
|
|
112
111
|
selectArr = _useState36[0],
|
|
113
112
|
setSelectArr = _useState36[1];
|
|
114
|
-
var _useState37 = useState([]),
|
|
115
|
-
_useState38 = _slicedToArray(_useState37, 2),
|
|
116
|
-
appList = _useState38[0],
|
|
117
|
-
setAppList = _useState38[1];
|
|
118
|
-
var _useState39 = useState(false),
|
|
119
|
-
_useState40 = _slicedToArray(_useState39, 2),
|
|
120
|
-
isModalOpen = _useState40[0],
|
|
121
|
-
setIsModalOpen = _useState40[1];
|
|
122
|
-
// const [dataRangeDialogTitle, setDataRangeDialogTitle] = useState<ReactNode>('');
|
|
123
|
-
// const [currentAppId, setCurrentAppId] = useState<number>(0);
|
|
124
113
|
var _Form$useForm = Form.useForm(),
|
|
125
114
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
126
115
|
form = _Form$useForm2[0];
|
|
@@ -330,7 +319,7 @@ var RoleList = function RoleList(props) {
|
|
|
330
319
|
var queryRoleDetailsList = function queryRoleDetailsList(params) {
|
|
331
320
|
queryRoleDetails(params).then(function (res) {
|
|
332
321
|
if (res === null || res === void 0 ? void 0 : res.data) {
|
|
333
|
-
var _res$data5, _res$data6
|
|
322
|
+
var _res$data5, _res$data6;
|
|
334
323
|
var usListArr = usList === null || usList === void 0 ? void 0 : usList.filter(function (item1) {
|
|
335
324
|
var _res$data3;
|
|
336
325
|
return res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.appIds.some(function (item2) {
|
|
@@ -360,7 +349,6 @@ var RoleList = function RoleList(props) {
|
|
|
360
349
|
};
|
|
361
350
|
})
|
|
362
351
|
}));
|
|
363
|
-
setAppList((res === null || res === void 0 ? void 0 : (_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : _res$data7.appIds) || []);
|
|
364
352
|
setCreatedAppPanel(true);
|
|
365
353
|
}
|
|
366
354
|
}).catch(function (err) {
|
|
@@ -442,9 +430,6 @@ var RoleList = function RoleList(props) {
|
|
|
442
430
|
var arr = e.map(function (item) {
|
|
443
431
|
return item.appVersion;
|
|
444
432
|
});
|
|
445
|
-
setAppList(e.map(function (item) {
|
|
446
|
-
return item.app_id;
|
|
447
|
-
}) || []);
|
|
448
433
|
setSelectArr(arr);
|
|
449
434
|
if (arr.includes(1) && arr.includes(2) && arr.includes(3)) {
|
|
450
435
|
// 三种应用都存在
|
|
@@ -531,7 +516,7 @@ var RoleList = function RoleList(props) {
|
|
|
531
516
|
id: 3
|
|
532
517
|
}]);
|
|
533
518
|
} else if (arr.includes(2) && arr.includes(3)) {
|
|
534
|
-
//
|
|
519
|
+
// 城商行和证券同时存在
|
|
535
520
|
setAppVersionFl(arr.includes(2) && arr.includes(3));
|
|
536
521
|
onSystemVersion({
|
|
537
522
|
label: '城商行',
|
|
@@ -701,37 +686,6 @@ var RoleList = function RoleList(props) {
|
|
|
701
686
|
});
|
|
702
687
|
});
|
|
703
688
|
};
|
|
704
|
-
function renderLabel(node, option) {
|
|
705
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
706
|
-
className: "custom-item"
|
|
707
|
-
}, node, !appList.includes(option.app_id) ? null : /*#__PURE__*/React.createElement("div", {
|
|
708
|
-
onClick: function onClick(e) {
|
|
709
|
-
// setCurrentAppId(option.app_id);
|
|
710
|
-
// setDataRangeDialogTitle(node);
|
|
711
|
-
setIsModalOpen(true);
|
|
712
|
-
e.stopPropagation();
|
|
713
|
-
},
|
|
714
|
-
className: "custom-item-right"
|
|
715
|
-
}, "\u8BBE\u7F6E\u6570\u636E\u8303\u56F4", /*#__PURE__*/React.createElement(Tooltip, {
|
|
716
|
-
overlayStyle: {
|
|
717
|
-
maxWidth: 396
|
|
718
|
-
},
|
|
719
|
-
overlayInnerStyle: {
|
|
720
|
-
color: '#FFF',
|
|
721
|
-
fontSize: 14,
|
|
722
|
-
fontWeight: 400,
|
|
723
|
-
letterSpacing: 0.56
|
|
724
|
-
},
|
|
725
|
-
placement: "top",
|
|
726
|
-
title: '您可以设定当前角色可以查看应用下的哪些数据'
|
|
727
|
-
}, /*#__PURE__*/React.createElement("i", {
|
|
728
|
-
style: {
|
|
729
|
-
fontSize: 16,
|
|
730
|
-
marginLeft: '8px'
|
|
731
|
-
},
|
|
732
|
-
className: "bsicon tishi"
|
|
733
|
-
}))));
|
|
734
|
-
}
|
|
735
689
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
736
690
|
spinning: loading
|
|
737
691
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -763,8 +717,7 @@ var RoleList = function RoleList(props) {
|
|
|
763
717
|
setRoleId(null);
|
|
764
718
|
form.resetFields();
|
|
765
719
|
form.setFieldsValue({
|
|
766
|
-
isEncryption: 0
|
|
767
|
-
roleAuthStatus: 0
|
|
720
|
+
isEncryption: 0
|
|
768
721
|
});
|
|
769
722
|
queryRoleDataConfigList(null);
|
|
770
723
|
queryRoleUserList(null);
|
|
@@ -795,7 +748,6 @@ var RoleList = function RoleList(props) {
|
|
|
795
748
|
borderTop: '1px solid #F2F3F4'
|
|
796
749
|
},
|
|
797
750
|
onClose: function onClose() {
|
|
798
|
-
setAppList([]);
|
|
799
751
|
setCreatedAppPanel(false);
|
|
800
752
|
setMenuCodeMap({
|
|
801
753
|
map1: [],
|
|
@@ -809,7 +761,6 @@ var RoleList = function RoleList(props) {
|
|
|
809
761
|
},
|
|
810
762
|
footer: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
811
763
|
onClick: function onClick() {
|
|
812
|
-
setAppList([]);
|
|
813
764
|
setCreatedAppPanel(false);
|
|
814
765
|
setMenuCodeMap({
|
|
815
766
|
map1: [],
|
|
@@ -877,9 +828,7 @@ var RoleList = function RoleList(props) {
|
|
|
877
828
|
},
|
|
878
829
|
placeholder: '请选择应用权限',
|
|
879
830
|
labelField: "app_name",
|
|
880
|
-
keyField: "id"
|
|
881
|
-
overlayClassName: isModalOpen ? 'label-group-overlay' : '',
|
|
882
|
-
customLabel: renderLabel
|
|
831
|
+
keyField: "id"
|
|
883
832
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
884
833
|
label: "\u529F\u80FD\u6743\u9650",
|
|
885
834
|
className: "menuCode-map"
|
|
@@ -101,34 +101,7 @@
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.custom-item {
|
|
105
|
-
display: flex;
|
|
106
|
-
justify-content: space-between;
|
|
107
|
-
|
|
108
|
-
.tishi {
|
|
109
|
-
color: #9aa1a9;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
104
|
.role-dialog-content {
|
|
114
|
-
.group-config {
|
|
115
|
-
display: flex;
|
|
116
|
-
margin-bottom: 24px;
|
|
117
|
-
padding-left: 120px;
|
|
118
|
-
|
|
119
|
-
.config-name {
|
|
120
|
-
margin-right: 12px;
|
|
121
|
-
color: #5f6085;
|
|
122
|
-
font-size: 14px;
|
|
123
|
-
line-height: 30px;
|
|
124
|
-
white-space: nowrap;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.biz-user-condition-type-label {
|
|
128
|
-
margin-left: -7px;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
105
|
.ant-form-item {
|
|
133
106
|
.ant-form-item-control-input {
|
|
134
107
|
width: 484px;
|
|
@@ -245,15 +218,3 @@
|
|
|
245
218
|
}
|
|
246
219
|
}
|
|
247
220
|
}
|
|
248
|
-
|
|
249
|
-
.ant-tooltip {
|
|
250
|
-
z-index: 9999;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.label-group-overlay {
|
|
254
|
-
display: none;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.set-data-dialog {
|
|
258
|
-
width: 2000px;
|
|
259
|
-
}
|
package/es/requests/role.d.ts
CHANGED
|
@@ -9,8 +9,6 @@ export declare const queryRolePage: (data: {
|
|
|
9
9
|
userIds: number[];
|
|
10
10
|
menuCodeMap: {};
|
|
11
11
|
settingMenuList: [];
|
|
12
|
-
authGroupList: [];
|
|
13
|
-
roleAuthStatus: number;
|
|
14
12
|
}> | null>, queryRoleDataConfig: (data: {
|
|
15
13
|
id: number | null;
|
|
16
14
|
}) => Promise<import("@zgfe/business-lib/es/utils/type").InterfaceApiResult<unknown> | null>, queryRoleMenuTree: (data: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-settings",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.21-test.1",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"umi-request": "^1.4.0",
|
|
52
52
|
"yorkie": "^2.0.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "e6c65fdb566ac620a33579c88a1143341d55dda1",
|
|
55
55
|
"gitHooks": {
|
|
56
56
|
"pre-commit": "lint-staged"
|
|
57
57
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
declare const SetDataRangeDialog: React.FC<{
|
|
4
|
-
isModalOpen: boolean;
|
|
5
|
-
setIsModalOpen: Function;
|
|
6
|
-
dataRangeDialogTitle: ReactNode;
|
|
7
|
-
currentAppId: number;
|
|
8
|
-
}>;
|
|
9
|
-
export default SetDataRangeDialog;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { useState } from 'react';
|
|
8
|
-
import { Radio } from 'antd';
|
|
9
|
-
import { BizDialog, DemoWrapper, BizUserCondition } from '@zgfe/business-lib';
|
|
10
|
-
import './index.less';
|
|
11
|
-
var SetDataRangeDialog = function SetDataRangeDialog(props) {
|
|
12
|
-
// authInfoParam: {
|
|
13
|
-
// platform: 0,
|
|
14
|
-
// data: JSON.stringify({ color: '#8db3e2', name: 0, groupType: 0, json: condition }),
|
|
15
|
-
// },///
|
|
16
|
-
// },///
|
|
17
|
-
var isModalOpen = props.isModalOpen,
|
|
18
|
-
setIsModalOpen = props.setIsModalOpen,
|
|
19
|
-
dataRangeDialogTitle = props.dataRangeDialogTitle,
|
|
20
|
-
currentAppId = props.currentAppId;
|
|
21
|
-
var _useState = useState(0),
|
|
22
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
-
isRoleAuthStatus = _useState2[0],
|
|
24
|
-
setIsRoleAuthStatus = _useState2[1];
|
|
25
|
-
var _useState3 = useState([]),
|
|
26
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
27
|
-
condition = _useState4[0],
|
|
28
|
-
setCondition = _useState4[1];
|
|
29
|
-
function onChangeCondition(condition) {
|
|
30
|
-
console.log('condition', condition);
|
|
31
|
-
setCondition(condition);
|
|
32
|
-
}
|
|
33
|
-
return /*#__PURE__*/React.createElement(BizDialog, {
|
|
34
|
-
className: "set-data-dialog",
|
|
35
|
-
title: dataRangeDialogTitle,
|
|
36
|
-
open: isModalOpen,
|
|
37
|
-
closable: true,
|
|
38
|
-
style: {
|
|
39
|
-
minWidth: isRoleAuthStatus ? '1200px' : '520px'
|
|
40
|
-
},
|
|
41
|
-
onCancel: function onCancel() {
|
|
42
|
-
return setIsModalOpen(false);
|
|
43
|
-
}
|
|
44
|
-
}, /*#__PURE__*/React.createElement(Radio.Group, {
|
|
45
|
-
buttonStyle: "outline",
|
|
46
|
-
defaultValue: isRoleAuthStatus,
|
|
47
|
-
onChange: function onChange(value) {
|
|
48
|
-
console.log(value.target.value);
|
|
49
|
-
setIsRoleAuthStatus(value.target.value);
|
|
50
|
-
}
|
|
51
|
-
}, /*#__PURE__*/React.createElement(Radio, {
|
|
52
|
-
value: 0
|
|
53
|
-
}, "\u5168\u90E8\u6570\u636E"), /*#__PURE__*/React.createElement(Radio, {
|
|
54
|
-
value: 1
|
|
55
|
-
}, "\u7B5B\u9009\u7528\u6237\uFF08", currentAppId, "\uFF09")), isRoleAuthStatus ? /*#__PURE__*/React.createElement("li", {
|
|
56
|
-
className: "group-config condition"
|
|
57
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
58
|
-
className: "config-name"
|
|
59
|
-
}, "\u5B9A\u4E49"), /*#__PURE__*/React.createElement("div", {
|
|
60
|
-
className: "config-value"
|
|
61
|
-
}), /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
62
|
-
defaultApp: currentAppId
|
|
63
|
-
}, /*#__PURE__*/React.createElement(BizUserCondition, {
|
|
64
|
-
openCdpCondition: true,
|
|
65
|
-
openBusinessDataCondition: true,
|
|
66
|
-
openOrderDataCondition: true,
|
|
67
|
-
openTagCondition: true,
|
|
68
|
-
userTagsData: [],
|
|
69
|
-
defaultValue: condition,
|
|
70
|
-
onChange: onChangeCondition,
|
|
71
|
-
orConditionNum: 3,
|
|
72
|
-
andConditionNum: 8,
|
|
73
|
-
eventAttrNum: 3,
|
|
74
|
-
isRealTime: true
|
|
75
|
-
}))) : null);
|
|
76
|
-
};
|
|
77
|
-
export default SetDataRangeDialog;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.set-data-dialog {
|
|
2
|
-
.ant-card-head-title {
|
|
3
|
-
display: none;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.group-config {
|
|
7
|
-
display: flex;
|
|
8
|
-
margin-top: 26px;
|
|
9
|
-
|
|
10
|
-
.config-name {
|
|
11
|
-
margin-right: 20px;
|
|
12
|
-
color: #5f6085;
|
|
13
|
-
font-size: 14px;
|
|
14
|
-
white-space: nowrap;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.ant-card {
|
|
18
|
-
width: 100%;
|
|
19
|
-
border: none;
|
|
20
|
-
|
|
21
|
-
.ant-card-head {
|
|
22
|
-
display: none;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.biz-user-condition {
|
|
26
|
-
background-color: #fff;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|