@zgfe/modules-settings 1.2.15 → 1.2.16-role.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.
|
@@ -15,6 +15,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
15
15
|
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; } }
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
17
|
import React, { useEffect, useState, useContext } from 'react';
|
|
18
|
+
import { BizUserCondition } from '@zgfe/business-lib';
|
|
18
19
|
import './index.less';
|
|
19
20
|
import util from './../../../utils/util';
|
|
20
21
|
import { Button, Drawer, Form, Input, Radio, Spin, Table, Tooltip, Tree, notification } from 'antd';
|
|
@@ -109,6 +110,14 @@ var RoleList = function RoleList(props) {
|
|
|
109
110
|
_useState34 = _slicedToArray(_useState33, 2),
|
|
110
111
|
usList = _useState34[0],
|
|
111
112
|
setUsList = _useState34[1];
|
|
113
|
+
var _useState35 = useState(false),
|
|
114
|
+
_useState36 = _slicedToArray(_useState35, 2),
|
|
115
|
+
isRoleAuthStatus = _useState36[0],
|
|
116
|
+
setIsRoleAuthStatus = _useState36[1];
|
|
117
|
+
var _useState37 = useState([]),
|
|
118
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
119
|
+
condition = _useState38[0],
|
|
120
|
+
setCondition = _useState38[1];
|
|
112
121
|
var _Form$useForm = Form.useForm(),
|
|
113
122
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
114
123
|
form = _Form$useForm2[0];
|
|
@@ -253,6 +262,9 @@ var RoleList = function RoleList(props) {
|
|
|
253
262
|
return item2 === (item1 === null || item1 === void 0 ? void 0 : item1.id);
|
|
254
263
|
});
|
|
255
264
|
});
|
|
265
|
+
// if (res && res.data && res.data.json) {
|
|
266
|
+
// setCondition(res?.data?.json);
|
|
267
|
+
// }
|
|
256
268
|
onChangeAppIds(usListArr, params === null || params === void 0 ? void 0 : params.id, res === null || res === void 0 ? void 0 : (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.menuCodeMap, res === null || res === void 0 ? void 0 : (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.settingMenuList);
|
|
257
269
|
form.setFieldsValue(_objectSpread(_objectSpread({}, res === null || res === void 0 ? void 0 : res.data), {}, {
|
|
258
270
|
appIds: usListArr === null || usListArr === void 0 ? void 0 : usListArr.map(function (item) {
|
|
@@ -432,6 +444,10 @@ var RoleList = function RoleList(props) {
|
|
|
432
444
|
menuCodeMap: (_menuCodeMap = {}, _defineProperty(_menuCodeMap, 1, _toConsumableArray(new Set([].concat(_toConsumableArray(menuCodeMap.map1), _toConsumableArray(unionArray))))), _defineProperty(_menuCodeMap, 2, _toConsumableArray(new Set([].concat(_toConsumableArray(menuCodeMap.map2), _toConsumableArray(unionArray))))), _menuCodeMap),
|
|
433
445
|
appIds: (usList === null || usList === void 0 ? void 0 : usList.length) === (value === null || value === void 0 ? void 0 : (_value$appIds2 = value.appIds) === null || _value$appIds2 === void 0 ? void 0 : _value$appIds2.length) ? [0].concat(_toConsumableArray(appIdsList)) : appIdsList,
|
|
434
446
|
systemVersion: appVersionFl ? 0 : 1,
|
|
447
|
+
authInfoParam: {
|
|
448
|
+
platform: 0,
|
|
449
|
+
data: condition
|
|
450
|
+
},
|
|
435
451
|
userIds: value === null || value === void 0 ? void 0 : (_value$userIds = value.userIds) === null || _value$userIds === void 0 ? void 0 : _value$userIds.map(function (item) {
|
|
436
452
|
return item === null || item === void 0 ? void 0 : item.id;
|
|
437
453
|
})
|
|
@@ -465,6 +481,9 @@ var RoleList = function RoleList(props) {
|
|
|
465
481
|
});
|
|
466
482
|
});
|
|
467
483
|
};
|
|
484
|
+
function onChangeCondition(condition) {
|
|
485
|
+
setCondition(condition);
|
|
486
|
+
}
|
|
468
487
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
469
488
|
spinning: loading
|
|
470
489
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -496,7 +515,8 @@ var RoleList = function RoleList(props) {
|
|
|
496
515
|
setRoleId(null);
|
|
497
516
|
form.resetFields();
|
|
498
517
|
form.setFieldsValue({
|
|
499
|
-
isEncryption: 0
|
|
518
|
+
isEncryption: 0,
|
|
519
|
+
roleAuthStatus: 0
|
|
500
520
|
});
|
|
501
521
|
queryRoleDataConfigList(null);
|
|
502
522
|
queryRoleUserList(null);
|
|
@@ -646,6 +666,58 @@ var RoleList = function RoleList(props) {
|
|
|
646
666
|
autoExpandParent: true,
|
|
647
667
|
treeData: functionList
|
|
648
668
|
}))), /*#__PURE__*/React.createElement(Form.Item, {
|
|
669
|
+
name: 'roleAuthStatus',
|
|
670
|
+
className: "is-encryption",
|
|
671
|
+
label: /*#__PURE__*/React.createElement(React.Fragment, null, "\u6570\u636E\u8303\u56F4", /*#__PURE__*/React.createElement(Tooltip, {
|
|
672
|
+
overlayStyle: {
|
|
673
|
+
maxWidth: 396
|
|
674
|
+
},
|
|
675
|
+
overlayInnerStyle: {
|
|
676
|
+
color: '#FFF',
|
|
677
|
+
fontSize: 14,
|
|
678
|
+
fontWeight: 400,
|
|
679
|
+
letterSpacing: 0.56
|
|
680
|
+
},
|
|
681
|
+
placement: "top",
|
|
682
|
+
title: '数据范围'
|
|
683
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
684
|
+
style: {
|
|
685
|
+
fontSize: 16,
|
|
686
|
+
margin: '0 24px 0 8px'
|
|
687
|
+
},
|
|
688
|
+
className: "bsicon tishi"
|
|
689
|
+
}))),
|
|
690
|
+
rules: [{
|
|
691
|
+
required: true,
|
|
692
|
+
message: '请选择'
|
|
693
|
+
}]
|
|
694
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, {
|
|
695
|
+
buttonStyle: "outline",
|
|
696
|
+
onChange: function onChange(value) {
|
|
697
|
+
setIsRoleAuthStatus(!!value.target.value);
|
|
698
|
+
}
|
|
699
|
+
}, /*#__PURE__*/React.createElement(Radio, {
|
|
700
|
+
value: 0
|
|
701
|
+
}, "\u6240\u6709\u7528\u6237"), /*#__PURE__*/React.createElement(Radio, {
|
|
702
|
+
value: 1
|
|
703
|
+
}, "\u7B5B\u9009\u7528\u6237"))), isRoleAuthStatus ? /*#__PURE__*/React.createElement("li", {
|
|
704
|
+
className: "group-config condition"
|
|
705
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
706
|
+
className: "config-name"
|
|
707
|
+
}, "\u5B9A\u4E49"), /*#__PURE__*/React.createElement("div", {
|
|
708
|
+
className: "config-value"
|
|
709
|
+
}), /*#__PURE__*/React.createElement(BizUserCondition, {
|
|
710
|
+
openCdpCondition: true,
|
|
711
|
+
openBusinessDataCondition: true,
|
|
712
|
+
openOrderDataCondition: true,
|
|
713
|
+
openTagCondition: true,
|
|
714
|
+
defaultValue: condition,
|
|
715
|
+
onChange: onChangeCondition,
|
|
716
|
+
orConditionNum: 3,
|
|
717
|
+
andConditionNum: 8,
|
|
718
|
+
eventAttrNum: 3,
|
|
719
|
+
isRealTime: true
|
|
720
|
+
})) : null, /*#__PURE__*/React.createElement(Form.Item, {
|
|
649
721
|
name: 'isEncryption',
|
|
650
722
|
className: "is-encryption",
|
|
651
723
|
label: /*#__PURE__*/React.createElement(React.Fragment, null, "\u6570\u636E\u52A0\u5BC6", /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -102,6 +102,24 @@
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
.role-dialog-content {
|
|
105
|
+
.group-config {
|
|
106
|
+
display: flex;
|
|
107
|
+
margin-bottom: 24px;
|
|
108
|
+
padding-left: 120px;
|
|
109
|
+
|
|
110
|
+
.config-name {
|
|
111
|
+
margin-right: 12px;
|
|
112
|
+
color: #5f6085;
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
line-height: 30px;
|
|
115
|
+
white-space: nowrap;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.biz-user-condition-type-label {
|
|
119
|
+
margin-left: -7px;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
105
123
|
.ant-form-item {
|
|
106
124
|
.ant-form-item-control-input {
|
|
107
125
|
width: 484px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-settings",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16-role.1",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@types/lodash": "^4.14.182",
|
|
39
39
|
"@umijs/fabric": "^2.8.1",
|
|
40
40
|
"@umijs/test": "^3.0.5",
|
|
41
|
-
"@zgfe/business-lib": "1.1
|
|
41
|
+
"@zgfe/business-lib": "1.2.9-heyh.1",
|
|
42
42
|
"@zgfe/modules-demo-manage": "^1.0.1",
|
|
43
43
|
"antd": "^4.22.6",
|
|
44
44
|
"dumi": "^1.1.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"umi-request": "^1.4.0",
|
|
52
52
|
"yorkie": "^2.0.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "8bf9dd198a6be9384eb769f6cacf55046c1c236c",
|
|
55
55
|
"gitHooks": {
|
|
56
56
|
"pre-commit": "lint-staged"
|
|
57
57
|
}
|