@zgfe/modules-settings 1.0.1-a.8 → 1.1.0
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/{dist/esm → es}/components/pageLoading/index.d.ts +1 -0
- package/{dist/esm → es}/components/pageLoading/index.js +2 -2
- package/es/components/pageLoading/index.less +7 -0
- package/es/components/settingTabs/demo/index.d.ts +3 -0
- package/es/components/settingTabs/demo/index.js +20 -0
- package/{dist/esm → es}/components/settingTabs/index.d.ts +4 -5
- package/{dist/esm → es}/components/settingTabs/index.js +61 -10
- package/{dist/esm → es}/components/settingTabs/index.less +16 -7
- package/es/components/settingTabs/types.d.ts +7 -0
- package/es/components/settingTabs/types.js +1 -0
- package/{dist/esm → es}/constants/api.d.ts +3 -0
- package/{dist/esm → es}/constants/api.js +4 -3
- package/{dist/esm → es}/constants/icons/iconfont.js +0 -0
- package/es/index.js +4 -0
- package/{dist/esm → es}/modules/appSettings/appInfo/index.js +41 -23
- package/{dist/esm → es}/modules/appSettings/dataAccessFilter/index.js +8 -9
- package/{dist/esm/modules/personalSetting → es/modules/appSettings}/index.d.ts +0 -1
- package/es/modules/appSettings/index.js +52 -0
- package/{dist/esm → es}/modules/appSettings/member/index.js +44 -54
- package/{dist/esm → es}/modules/appSettings/virtualSource/index.js +30 -36
- package/{dist/esm → es}/modules/appSettings/virtualSource/styles/table.less +1 -1
- package/es/modules/companySetting/appList/index.d.ts +21 -0
- package/{dist/esm → es}/modules/companySetting/appList/index.js +40 -31
- package/{dist/esm → es}/modules/companySetting/appList/index.less +1 -8
- package/es/modules/companySetting/cost/index.d.ts +9 -0
- package/{dist/esm → es}/modules/companySetting/cost/index.js +6 -6
- package/{dist/esm → es}/modules/companySetting/cost/index.less +1 -1
- package/es/modules/companySetting/cost/types.d.ts +63 -0
- package/es/modules/companySetting/cost/types.js +1 -0
- package/es/modules/companySetting/edit/authConfig.d.ts +11 -0
- package/{dist/esm → es}/modules/companySetting/edit/authConfig.js +15 -14
- package/{dist/esm → es}/modules/companySetting/edit/authConfigCEP.d.ts +3 -5
- package/{dist/esm → es}/modules/companySetting/edit/authConfigCEP.js +18 -68
- package/{dist/esm → es}/modules/companySetting/edit/authGroup.d.ts +2 -1
- package/{dist/esm → es}/modules/companySetting/edit/authGroup.js +9 -10
- package/es/modules/companySetting/edit/authModule.d.ts +8 -0
- package/{dist/esm → es}/modules/companySetting/edit/authModule.js +12 -18
- package/{dist/esm → es}/modules/companySetting/edit/multiAuthModule.d.ts +3 -2
- package/{dist/esm → es}/modules/companySetting/edit/multiAuthModule.js +9 -17
- package/es/modules/companySetting/edit/user.d.ts +15 -0
- package/{dist/esm → es}/modules/companySetting/edit/user.js +60 -53
- package/es/modules/companySetting/edit/userGroup.d.ts +16 -0
- package/{dist/esm → es}/modules/companySetting/edit/userGroup.js +78 -73
- package/es/modules/companySetting/index.d.ts +11 -0
- package/es/modules/companySetting/index.js +740 -0
- package/{dist/esm → es}/modules/companySetting/info/index.d.ts +3 -3
- package/{dist/esm → es}/modules/companySetting/info/index.js +8 -5
- package/{dist/esm → es}/modules/companySetting/info/index.less +1 -1
- package/{dist/esm → es}/modules/companySetting/style/common.less +3 -3
- package/es/modules/companySetting/style/reset.less +117 -0
- package/es/modules/companySetting/user/index.d.ts +21 -0
- package/{dist/esm → es}/modules/companySetting/user/index.js +62 -64
- package/{dist/esm → es}/modules/companySetting/user/index.less +8 -8
- package/es/modules/companySetting/user/invite.d.ts +15 -0
- package/{dist/esm → es}/modules/companySetting/user/invite.js +8 -12
- package/es/modules/companySetting/userGroup/authConfigDetail.d.ts +15 -0
- package/{dist/esm → es}/modules/companySetting/userGroup/authConfigDetail.js +62 -82
- package/es/modules/companySetting/userGroup/groupItem.d.ts +13 -0
- package/{dist/esm → es}/modules/companySetting/userGroup/groupItem.js +11 -11
- package/es/modules/companySetting/userGroup/index.d.ts +15 -0
- package/{dist/esm → es}/modules/companySetting/userGroup/index.js +9 -8
- package/{dist/esm → es}/modules/companySetting/userGroup/style/index.less +1 -1
- package/es/modules/companySetting/virtualApp/config.d.ts +12 -0
- package/{dist/esm → es}/modules/companySetting/virtualApp/config.js +7 -7
- package/es/modules/companySetting/virtualApp/index.d.ts +15 -0
- package/{dist/esm → es}/modules/companySetting/virtualApp/index.js +12 -14
- package/es/modules/companySetting/virtualApp/panels/list.d.ts +15 -0
- package/{dist/esm → es}/modules/companySetting/virtualApp/panels/list.js +10 -10
- package/es/modules/companySetting/virtualApp/panels/sourceItem.d.ts +10 -0
- package/{dist/esm → es}/modules/companySetting/virtualApp/panels/sourceItem.js +4 -6
- package/{dist/esm → es}/modules/companySetting/virtualApp/styles/config.less +2 -1
- package/{dist/esm → es}/modules/companySetting/virtualApp/styles/index.less +1 -1
- package/{dist/esm → es}/modules/companySetting/virtualApp/styles/table.less +1 -1
- package/{dist/esm → es}/modules/companySetting/wechatBinding/index.js +11 -11
- package/{dist/esm → es}/modules/companySetting/wechatBinding/index.less +1 -1
- package/es/modules/personalSetting/images/banner.png +0 -0
- package/es/modules/personalSetting/images/unbinding.png +0 -0
- package/{dist/esm/modules/appSettings → es/modules/personalSetting}/index.d.ts +0 -1
- package/es/modules/personalSetting/index.js +40 -0
- package/{dist/esm → es}/modules/personalSetting/info/index.js +10 -10
- package/{dist/esm → es}/modules/personalSetting/reset/index.js +39 -39
- package/es/modules/personalSetting/styles/unbinding.less +73 -0
- package/es/modules/personalSetting/unbinding/index.d.ts +4 -0
- package/es/modules/personalSetting/unbinding/index.js +104 -0
- package/{dist/esm → es}/modules/systemSetting/index.d.ts +0 -1
- package/{dist/esm → es}/modules/systemSetting/index.js +8 -4
- package/es/modules/systemSetting/notice/configItem/index.d.ts +8 -0
- package/{dist/esm → es}/modules/systemSetting/notice/configItem/index.js +5 -5
- package/{dist/esm → es}/modules/systemSetting/notice/edit/index.d.ts +2 -8
- package/{dist/esm → es}/modules/systemSetting/notice/edit/index.js +29 -22
- package/es/modules/systemSetting/notice/index.d.ts +9 -0
- package/{dist/esm → es}/modules/systemSetting/notice/index.js +12 -11
- package/es/types/app.d.ts +140 -0
- package/es/types/app.js +1 -0
- package/es/types/companySetting.d.ts +199 -0
- package/es/types/companySetting.js +1 -0
- package/es/types/index.d.ts +4 -0
- package/es/types/index.js +4 -0
- package/es/types/personal.d.ts +21 -0
- package/es/types/personal.js +1 -0
- package/es/types/system.d.ts +38 -0
- package/es/types/system.js +1 -0
- package/{dist/esm → es}/utils/constants.js +0 -64
- package/{dist/esm → es}/utils/functionalPermissions.js +0 -1
- package/package.json +7 -7
- package/dist/esm/components/pageLoading/index.less +0 -11
- package/dist/esm/constants/styles/base.sass +0 -9
- package/dist/esm/constants/styles/cleverUI.css +0 -7
- package/dist/esm/constants/styles/constants.sass +0 -60
- package/dist/esm/constants/styles/customUITheme.sass +0 -54
- package/dist/esm/constants/styles/reset.sass +0 -61
- package/dist/esm/index.js +0 -4
- package/dist/esm/modules/appSettings/demo/index.d.ts +0 -3
- package/dist/esm/modules/appSettings/demo/index.js +0 -6
- package/dist/esm/modules/appSettings/index.js +0 -88
- package/dist/esm/modules/appSettings/index.less +0 -21
- package/dist/esm/modules/companySetting/appList/index.d.ts +0 -21
- package/dist/esm/modules/companySetting/cost/index.d.ts +0 -8
- package/dist/esm/modules/companySetting/edit/authConfig.d.ts +0 -10
- package/dist/esm/modules/companySetting/edit/authModule.d.ts +0 -7
- package/dist/esm/modules/companySetting/edit/user.d.ts +0 -14
- package/dist/esm/modules/companySetting/edit/userGroup.d.ts +0 -15
- package/dist/esm/modules/companySetting/index.d.ts +0 -14
- package/dist/esm/modules/companySetting/index.js +0 -718
- package/dist/esm/modules/companySetting/user/index.d.ts +0 -19
- package/dist/esm/modules/companySetting/user/invite.d.ts +0 -10
- package/dist/esm/modules/companySetting/userGroup/authConfigDetail.d.ts +0 -16
- package/dist/esm/modules/companySetting/userGroup/groupItem.d.ts +0 -11
- package/dist/esm/modules/companySetting/userGroup/index.d.ts +0 -14
- package/dist/esm/modules/companySetting/virtualApp/config.d.ts +0 -11
- package/dist/esm/modules/companySetting/virtualApp/index.d.ts +0 -12
- package/dist/esm/modules/companySetting/virtualApp/panels/list.d.ts +0 -12
- package/dist/esm/modules/companySetting/virtualApp/panels/sourceItem.d.ts +0 -10
- package/dist/esm/modules/personalSetting/index.js +0 -62
- package/dist/esm/modules/personalSetting/index.less +0 -2
- package/dist/esm/modules/systemSetting/index.less +0 -2
- package/dist/esm/modules/systemSetting/notice/configItem/index.d.ts +0 -7
- package/dist/esm/modules/systemSetting/notice/index.d.ts +0 -3
- /package/{dist/esm → es}/components/demo.d.ts +0 -0
- /package/{dist/esm → es}/components/demo.js +0 -0
- /package/{dist/esm → es}/constants/icons/demo.css +0 -0
- /package/{dist/esm → es}/constants/icons/demo_index.html +0 -0
- /package/{dist/esm → es}/constants/icons/iconfont.css +0 -0
- /package/{dist/esm → es}/constants/icons/iconfont.json +0 -0
- /package/{dist/esm → es}/constants/icons/iconfont.ttf +0 -0
- /package/{dist/esm → es}/constants/icons/iconfont.woff +0 -0
- /package/{dist/esm → es}/constants/icons/iconfont.woff2 +0 -0
- /package/{dist/esm → es}/global.d.ts +0 -0
- /package/{dist/esm → es}/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/appSettings/appInfo/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/appSettings/dataAccessFilter/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/appSettings/dataAccessFilter/index.less +0 -0
- /package/{dist/esm → es}/modules/appSettings/member/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/appSettings/secretKey/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/appSettings/secretKey/index.js +0 -0
- /package/{dist/esm → es}/modules/appSettings/virtualSource/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/appSettings/virtualSource/styles/index.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/edit/styles/authConfig.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/edit/styles/authGroup.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/edit/styles/authModule.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/edit/styles/user.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/edit/styles/userGroup.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/index.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/userGroup/index.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/userGroup/style/authConfigDetail.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/virtualApp/styles/list.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/virtualApp/styles/sourceItem.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/wechatBinding/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/personalSetting/info/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/personalSetting/reset/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/systemSetting/notice/configItem/index.less +0 -0
- /package/{dist/esm → es}/modules/systemSetting/notice/edit/index.less +0 -0
- /package/{dist/esm → es}/utils/ajax.d.ts +0 -0
- /package/{dist/esm → es}/utils/ajax.js +0 -0
- /package/{dist/esm → es}/utils/base64.d.ts +0 -0
- /package/{dist/esm → es}/utils/base64.js +0 -0
- /package/{dist/esm → es}/utils/constants.d.ts +0 -0
- /package/{dist/esm → es}/utils/functionalPermissions.d.ts +0 -0
- /package/{dist/esm → es}/utils/util.d.ts +0 -0
- /package/{dist/esm → es}/utils/util.js +0 -0
|
@@ -5,10 +5,10 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
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
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useEffect, useState, forwardRef, useImperativeHandle } from 'react';
|
|
8
|
-
import
|
|
9
|
-
import constants from
|
|
10
|
-
import funPermissions from
|
|
11
|
-
import AuthGroup from
|
|
8
|
+
import './styles/authConfig.less';
|
|
9
|
+
import constants from './../../../utils/constants';
|
|
10
|
+
import funPermissions from './../../../utils/functionalPermissions';
|
|
11
|
+
import AuthGroup from './authGroup';
|
|
12
12
|
var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
13
13
|
var config = props.config,
|
|
14
14
|
appList = props.appList,
|
|
@@ -37,9 +37,9 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
37
37
|
plats: [0]
|
|
38
38
|
});
|
|
39
39
|
} else if (dataPermissions.indeterminate) {
|
|
40
|
-
dataPermissions.children.forEach(function (item) {
|
|
40
|
+
dataPermissions.children && dataPermissions.children.forEach(function (item) {
|
|
41
41
|
if (item.isVirtualApp && (item.checked || item.indeterminate)) {
|
|
42
|
-
item.children.forEach(function (virtualApp) {
|
|
42
|
+
item.children && item.children.forEach(function (virtualApp) {
|
|
43
43
|
if (virtualApp.checked) {
|
|
44
44
|
dataAuth.push({
|
|
45
45
|
appId: virtualApp.key,
|
|
@@ -62,11 +62,11 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
62
62
|
resource: funPermissions[isMarsUi ? 'mars' : 'standard'].all.key,
|
|
63
63
|
opts: [constants.functionOpts.all]
|
|
64
64
|
});
|
|
65
|
-
functionalPermissions.children.forEach(function (item) {
|
|
65
|
+
functionalPermissions.children && functionalPermissions.children.forEach(function (item) {
|
|
66
66
|
if (item.radio) {
|
|
67
67
|
funAuth.push({
|
|
68
68
|
resource: item.key,
|
|
69
|
-
opts: item.children.filter(function (child) {
|
|
69
|
+
opts: item.children && item.children.filter(function (child) {
|
|
70
70
|
return child.checked;
|
|
71
71
|
}).map(function (obj) {
|
|
72
72
|
return obj.key;
|
|
@@ -81,12 +81,12 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
} else if (functionalPermissions.indeterminate) {
|
|
84
|
-
functionalPermissions.children.forEach(function (item) {
|
|
84
|
+
functionalPermissions.children && functionalPermissions.children.forEach(function (item) {
|
|
85
85
|
if (item.checked) {
|
|
86
86
|
if (item.radio) {
|
|
87
87
|
funAuth.push({
|
|
88
88
|
resource: item.key,
|
|
89
|
-
opts: item.children.filter(function (child) {
|
|
89
|
+
opts: item.children && item.children.filter(function (child) {
|
|
90
90
|
return child.checked;
|
|
91
91
|
}).map(function (obj) {
|
|
92
92
|
return obj.key;
|
|
@@ -99,7 +99,7 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
} else if (item.indeterminate) {
|
|
102
|
-
item.children.forEach(function (obj) {
|
|
102
|
+
item.children && item.children.forEach(function (obj) {
|
|
103
103
|
if (obj.checked) {
|
|
104
104
|
funAuth.push({
|
|
105
105
|
resource: obj.key,
|
|
@@ -158,7 +158,7 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
158
158
|
key: item.id,
|
|
159
159
|
describe: item.appName,
|
|
160
160
|
checked: isAll || appIds.includes(item.id),
|
|
161
|
-
isVirtualApp: item.appType && item.appType === 'virtual',
|
|
161
|
+
isVirtualApp: !!(item.appType && item.appType === 'virtual'),
|
|
162
162
|
indeterminate: false,
|
|
163
163
|
children: []
|
|
164
164
|
};
|
|
@@ -199,7 +199,6 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
199
199
|
map[item.resource] = item.opts[0];
|
|
200
200
|
});
|
|
201
201
|
console.log(map);
|
|
202
|
-
|
|
203
202
|
// 顶部菜单功能权限
|
|
204
203
|
var loopFormatTopMenu = function loopFormatTopMenu(topMenu, checkAll) {
|
|
205
204
|
var menuFunPerConstants = funPermissions[isMarsUi ? 'mars' : 'standard'][topMenu.name];
|
|
@@ -264,7 +263,9 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
264
263
|
console.log('dskfhk', leftMenus);
|
|
265
264
|
leftMenus.forEach(function (menu) {
|
|
266
265
|
var topMenuFun = loopFormatTopMenu(menu, isAll);
|
|
267
|
-
|
|
266
|
+
if (topMenuFun) {
|
|
267
|
+
topMenuFun.auth = map[topMenuFun.key] || map['/'];
|
|
268
|
+
}
|
|
268
269
|
if (topMenuFun) {
|
|
269
270
|
menuFun.push(topMenuFun);
|
|
270
271
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './styles/authConfig.less';
|
|
3
|
+
import { CheckAll, DataListItem } from '../../../types';
|
|
3
4
|
declare const AuthConfigCEP: React.FC<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
isMarsUi: Boolean;
|
|
7
|
-
leftMenus: [];
|
|
8
|
-
CEPData: any[];
|
|
5
|
+
isMarsUi: boolean;
|
|
6
|
+
CEPData: [Array<DataListItem>, Array<DataListItem>, CheckAll];
|
|
9
7
|
ref: any;
|
|
10
8
|
}>;
|
|
11
9
|
export default AuthConfigCEP;
|
|
@@ -10,51 +10,31 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
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; }
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { Input } from 'antd';
|
|
19
|
-
import AuthGroup from "./authGroup";
|
|
20
|
-
var TextArea = Input.TextArea;
|
|
13
|
+
import React, { useEffect, useState, forwardRef, useImperativeHandle } from 'react';
|
|
14
|
+
import './styles/authConfig.less';
|
|
15
|
+
import constants from './../../../utils/constants';
|
|
16
|
+
import funPermissions from './../../../utils/functionalPermissions';
|
|
17
|
+
import AuthGroup from './authGroup';
|
|
21
18
|
var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
22
|
-
var
|
|
23
|
-
appList = props.appList,
|
|
24
|
-
isMarsUi = props.isMarsUi,
|
|
25
|
-
leftMenus = props.leftMenus,
|
|
19
|
+
var isMarsUi = props.isMarsUi,
|
|
26
20
|
CEPData = props.CEPData;
|
|
27
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
28
|
-
currentApp = _useContext.currentApp,
|
|
29
|
-
currentUser = _useContext.currentUser,
|
|
30
|
-
isDemo = _useContext.isDemo;
|
|
31
21
|
var _useState = useState({}),
|
|
32
22
|
_useState2 = _slicedToArray(_useState, 2),
|
|
33
23
|
dataPermissions = _useState2[0],
|
|
34
24
|
setDataPermissions = _useState2[1];
|
|
35
|
-
var _useState3 = useState(
|
|
25
|
+
var _useState3 = useState({}),
|
|
36
26
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var _useState5 = useState({}),
|
|
40
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
41
|
-
functionalPermissions = _useState6[0],
|
|
42
|
-
setFunctionalPermissions = _useState6[1];
|
|
27
|
+
functionalPermissions = _useState4[0],
|
|
28
|
+
setFunctionalPermissions = _useState4[1];
|
|
43
29
|
useImperativeHandle(ref, function () {
|
|
44
30
|
return {
|
|
45
31
|
getFormData: function getFormData() {
|
|
46
32
|
var dataAuth = [];
|
|
47
33
|
var funAuth = [];
|
|
48
|
-
// if (dataPermissions.checked) {
|
|
49
|
-
// dataAuth.push({
|
|
50
|
-
// appId: 0,
|
|
51
|
-
// plats: [0]
|
|
52
|
-
// })
|
|
53
|
-
// } else
|
|
54
34
|
if (dataPermissions.checked || dataPermissions.indeterminate) {
|
|
55
|
-
dataPermissions.children.forEach(function (item) {
|
|
35
|
+
dataPermissions.children && dataPermissions.children.forEach(function (item) {
|
|
56
36
|
if (item.isVirtualApp && (item.checked || item.indeterminate)) {
|
|
57
|
-
item.children.forEach(function (virtualApp) {
|
|
37
|
+
item.children && item.children.forEach(function (virtualApp) {
|
|
58
38
|
if (virtualApp.checked) {
|
|
59
39
|
dataAuth.push({
|
|
60
40
|
appId: virtualApp.key,
|
|
@@ -71,41 +51,13 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
71
51
|
}
|
|
72
52
|
});
|
|
73
53
|
}
|
|
74
|
-
console.log('functionalPermissions');
|
|
75
|
-
|
|
76
|
-
// if (functionalPermissions.checked) {
|
|
77
|
-
// funAuth.push({
|
|
78
|
-
// resource: funPermissions[isMarsUi ? 'mars' : 'standard'].all.key,
|
|
79
|
-
// opts: [constants.functionOpts.all]
|
|
80
|
-
// })
|
|
81
|
-
// functionalPermissions.children.forEach(item => {
|
|
82
|
-
// if (item.radio) {
|
|
83
|
-
// funAuth.push({
|
|
84
|
-
// resource: item.key,
|
|
85
|
-
// opts: item.children
|
|
86
|
-
// .filter(child => {
|
|
87
|
-
// return child.checked
|
|
88
|
-
// })
|
|
89
|
-
// .map(obj => {
|
|
90
|
-
// return obj.key
|
|
91
|
-
// })
|
|
92
|
-
// })
|
|
93
|
-
// }
|
|
94
|
-
// if (item.key === '/diypage') {
|
|
95
|
-
// funAuth.push({
|
|
96
|
-
// resource: item.key,
|
|
97
|
-
// opts: [item.auth]
|
|
98
|
-
// })
|
|
99
|
-
// }
|
|
100
|
-
// })
|
|
101
|
-
// } else
|
|
102
54
|
if (functionalPermissions.checked || functionalPermissions.indeterminate) {
|
|
103
|
-
functionalPermissions.children.forEach(function (item) {
|
|
55
|
+
functionalPermissions.children && functionalPermissions.children.forEach(function (item) {
|
|
104
56
|
if (item.checked) {
|
|
105
57
|
if (item.radio) {
|
|
106
58
|
funAuth.push({
|
|
107
59
|
resource: item.key,
|
|
108
|
-
opts: item.children.filter(function (child) {
|
|
60
|
+
opts: item.children && item.children.filter(function (child) {
|
|
109
61
|
return child.checked;
|
|
110
62
|
}).map(function (obj) {
|
|
111
63
|
return obj.key;
|
|
@@ -118,7 +70,7 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
118
70
|
});
|
|
119
71
|
}
|
|
120
72
|
} else if (item.indeterminate) {
|
|
121
|
-
item.children.forEach(function (obj) {
|
|
73
|
+
item.children && item.children.forEach(function (obj) {
|
|
122
74
|
if (obj.checked) {
|
|
123
75
|
funAuth.push({
|
|
124
76
|
resource: obj.key,
|
|
@@ -141,13 +93,13 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
141
93
|
}
|
|
142
94
|
var cepFunAuth = [];
|
|
143
95
|
console.log('functionalPermissions', functionalPermissions);
|
|
144
|
-
functionalPermissions.children.forEach(function (item) {
|
|
96
|
+
functionalPermissions.children && functionalPermissions.children.forEach(function (item) {
|
|
145
97
|
if (item.checked) {
|
|
146
98
|
if (item.radio) {
|
|
147
99
|
cepFunAuth.push({
|
|
148
100
|
resource: item.key,
|
|
149
101
|
href: item.href,
|
|
150
|
-
opts: item.children.filter(function (child) {
|
|
102
|
+
opts: item.children && item.children.filter(function (child) {
|
|
151
103
|
return child.checked;
|
|
152
104
|
}).map(function (obj) {
|
|
153
105
|
return obj.key;
|
|
@@ -241,7 +193,6 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
241
193
|
children: dealAppConfigList
|
|
242
194
|
});
|
|
243
195
|
};
|
|
244
|
-
|
|
245
196
|
// 为数据打上checked标签
|
|
246
197
|
var dealDateAddChecked = function dealDateAddChecked(dataList, checkoutList) {
|
|
247
198
|
var checked = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
@@ -261,18 +212,17 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
261
212
|
};
|
|
262
213
|
});
|
|
263
214
|
};
|
|
264
|
-
|
|
265
215
|
// 为数据打上indeterminate标签
|
|
266
216
|
var dealDateAddIndeterminate = function dealDateAddIndeterminate(dataList, checkoutList) {
|
|
267
217
|
var indeterminate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
268
218
|
if (!dataList.length) return [];
|
|
269
219
|
return dataList.map(function (item) {
|
|
270
220
|
var child = dealDateAddIndeterminate(item.children || [], checkoutList);
|
|
271
|
-
var indeterminate = child.filter(function (item) {
|
|
221
|
+
var indeterminate = !!(child.filter(function (item) {
|
|
272
222
|
return item.checked || item.indeterminate;
|
|
273
223
|
}).length < child.length && child.filter(function (item) {
|
|
274
224
|
return item.checked || item.indeterminate;
|
|
275
|
-
}).length;
|
|
225
|
+
}).length);
|
|
276
226
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
277
227
|
indeterminate: indeterminate
|
|
278
228
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './styles/authGroup.less';
|
|
3
|
+
import { DataPermissionsItem } from '../../../types';
|
|
3
4
|
declare const AuthGroup: React.FC<{
|
|
4
5
|
value?: {};
|
|
5
|
-
onChange:
|
|
6
|
+
onChange: (data: DataPermissionsItem) => void;
|
|
6
7
|
}>;
|
|
7
8
|
export default AuthGroup;
|
|
@@ -11,11 +11,10 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import React, { useEffect, useState } from 'react';
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import util from
|
|
17
|
-
import AuthModule from
|
|
18
|
-
var TextArea = Input.TextArea;
|
|
14
|
+
import './styles/authGroup.less';
|
|
15
|
+
import { Checkbox } from 'antd';
|
|
16
|
+
import util from './../../../utils/util';
|
|
17
|
+
import AuthModule from './authModule';
|
|
19
18
|
var AuthGroup = function AuthGroup(props) {
|
|
20
19
|
var value = props.value,
|
|
21
20
|
onChange = props.onChange;
|
|
@@ -56,15 +55,15 @@ var AuthGroup = function AuthGroup(props) {
|
|
|
56
55
|
onChange && onChange(dealObj);
|
|
57
56
|
};
|
|
58
57
|
var dealData = function dealData(dealObj) {
|
|
59
|
-
var checkedArr = dealObj.children.filter(function (item) {
|
|
58
|
+
var checkedArr = dealObj.children && dealObj.children.filter(function (item) {
|
|
60
59
|
return item.checked;
|
|
61
60
|
});
|
|
62
|
-
var indeterminateArr = dealObj.children.filter(function (item) {
|
|
61
|
+
var indeterminateArr = dealObj.children && dealObj.children.filter(function (item) {
|
|
63
62
|
return item.indeterminate;
|
|
64
63
|
});
|
|
65
64
|
return _objectSpread(_objectSpread({}, dealObj), {}, {
|
|
66
|
-
checked: checkedArr.length === dealObj.children.length,
|
|
67
|
-
indeterminate: !(checkedArr.length === dealObj.children.length || !checkedArr.length && !indeterminateArr.length)
|
|
65
|
+
checked: (checkedArr || []).length === (dealObj.children || []).length,
|
|
66
|
+
indeterminate: !((checkedArr || []).length === (dealObj.children || []).length || !(checkedArr || []).length && !(indeterminateArr || []).length)
|
|
68
67
|
});
|
|
69
68
|
};
|
|
70
69
|
return group && group.key ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -77,7 +76,7 @@ var AuthGroup = function AuthGroup(props) {
|
|
|
77
76
|
onGroupChange(e);
|
|
78
77
|
},
|
|
79
78
|
indeterminate: group.indeterminate
|
|
80
|
-
}, group.describe)), group.children.map(function (item) {
|
|
79
|
+
}, group.describe)), group.children && group.children.map(function (item) {
|
|
81
80
|
return /*#__PURE__*/React.createElement(AuthModule, {
|
|
82
81
|
key: item.key,
|
|
83
82
|
data: item,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './styles/authModule.less';
|
|
3
|
+
import { DataPermissionsItem } from '../../../types';
|
|
4
|
+
declare const AuthModule: React.FC<{
|
|
5
|
+
data: DataPermissionsItem;
|
|
6
|
+
onChange: (data: DataPermissionsItem) => void;
|
|
7
|
+
}>;
|
|
8
|
+
export default AuthModule;
|
|
@@ -10,14 +10,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
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; }
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import MultiAuthModule from "./multiAuthModule";
|
|
13
|
+
import React, { useEffect, useState } from 'react';
|
|
14
|
+
import './styles/authModule.less';
|
|
15
|
+
import { Checkbox } from 'antd';
|
|
16
|
+
import util from './../../../utils/util';
|
|
17
|
+
import MultiAuthModule from './multiAuthModule';
|
|
19
18
|
import { BizSelect } from '@zgfe/business-lib';
|
|
20
|
-
var TextArea = Input.TextArea;
|
|
21
19
|
var authStore = [{
|
|
22
20
|
label: '仅查看',
|
|
23
21
|
value: 'read_only'
|
|
@@ -28,10 +26,6 @@ var authStore = [{
|
|
|
28
26
|
var AuthModule = function AuthModule(props) {
|
|
29
27
|
var data = props.data,
|
|
30
28
|
onChange = props.onChange;
|
|
31
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
32
|
-
currentApp = _useContext.currentApp,
|
|
33
|
-
currentUser = _useContext.currentUser,
|
|
34
|
-
isDemo = _useContext.isDemo;
|
|
35
29
|
var _useState = useState(false),
|
|
36
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
37
31
|
all = _useState2[0],
|
|
@@ -66,13 +60,13 @@ var AuthModule = function AuthModule(props) {
|
|
|
66
60
|
}, [all]);
|
|
67
61
|
var init = function init() {
|
|
68
62
|
if (!data || !data.key) return;
|
|
69
|
-
setAll(data.checked);
|
|
63
|
+
setAll(!!data.checked);
|
|
70
64
|
setFunctionGroups(util.clone(data.children));
|
|
71
|
-
setIndeterminate(data.indeterminate);
|
|
72
|
-
var childrenDisable = data.children.filter(function (childItem) {
|
|
65
|
+
setIndeterminate(!!data.indeterminate);
|
|
66
|
+
var childrenDisable = data.children && data.children.filter(function (childItem) {
|
|
73
67
|
return childItem.disable;
|
|
74
68
|
});
|
|
75
|
-
setCheckAllDisable(!!childrenDisable.length);
|
|
69
|
+
setCheckAllDisable(!!(childrenDisable || []).length);
|
|
76
70
|
};
|
|
77
71
|
var reworkStringLen = function reworkStringLen() {
|
|
78
72
|
var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
@@ -93,7 +87,7 @@ var AuthModule = function AuthModule(props) {
|
|
|
93
87
|
dealArr.forEach(function (item, index) {
|
|
94
88
|
if (data.radio) {
|
|
95
89
|
item.checked = checked && !index;
|
|
96
|
-
if (data.children.map(function (childItem) {
|
|
90
|
+
if (data.children && data.children.map(function (childItem) {
|
|
97
91
|
return childItem.checked;
|
|
98
92
|
}).includes(true)) {
|
|
99
93
|
if (checked && data.children[index].checked) {
|
|
@@ -126,7 +120,7 @@ var AuthModule = function AuthModule(props) {
|
|
|
126
120
|
});
|
|
127
121
|
if (!(dealData || functionGroups).length) return;
|
|
128
122
|
var dealAll = data.radio ? temp.length : temp.length === (dealData || functionGroups).length;
|
|
129
|
-
setAll(dealAll);
|
|
123
|
+
setAll(!!dealAll);
|
|
130
124
|
var dealIndeterminate;
|
|
131
125
|
if (!dealAll && temp.length) {
|
|
132
126
|
dealIndeterminate = true;
|
|
@@ -139,7 +133,7 @@ var AuthModule = function AuthModule(props) {
|
|
|
139
133
|
}
|
|
140
134
|
setIndeterminate(dealIndeterminate);
|
|
141
135
|
setFunctionGroups(dealData || functionGroups);
|
|
142
|
-
change(dealAll, dealIndeterminate, dealData || functionGroups);
|
|
136
|
+
change(!!dealAll, dealIndeterminate, dealData || functionGroups);
|
|
143
137
|
};
|
|
144
138
|
var onMultiModuleChange = function onMultiModuleChange(data) {
|
|
145
139
|
var dealData = util.clone(functionGroups);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './styles/authModule.less';
|
|
3
|
+
import { DataPermissionsItem } from '../../../types';
|
|
3
4
|
declare const multiAuthModule: React.FC<{
|
|
4
|
-
data
|
|
5
|
-
onChange:
|
|
5
|
+
data: DataPermissionsItem;
|
|
6
|
+
onChange: (data: DataPermissionsItem) => void;
|
|
6
7
|
}>;
|
|
7
8
|
export default multiAuthModule;
|
|
@@ -11,10 +11,10 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import React, { useEffect, useState } from 'react';
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import util from
|
|
17
|
-
|
|
14
|
+
import './styles/authModule.less';
|
|
15
|
+
import { Checkbox } from 'antd';
|
|
16
|
+
import util from './../../../utils/util';
|
|
17
|
+
// const { TextArea } = Input;
|
|
18
18
|
var multiAuthModule = function multiAuthModule(props) {
|
|
19
19
|
var data = props.data,
|
|
20
20
|
onChange = props.onChange;
|
|
@@ -36,26 +36,18 @@ var multiAuthModule = function multiAuthModule(props) {
|
|
|
36
36
|
setFunctionGroups = _useState8[1];
|
|
37
37
|
useEffect(function () {
|
|
38
38
|
init();
|
|
39
|
-
// if (!data.radio) {
|
|
40
|
-
// if (data.checked) {
|
|
41
|
-
// onAllChange(null, data.checked);
|
|
42
|
-
// } else {
|
|
43
|
-
// onGroupChange(null, null, util.clone(data.children));
|
|
44
|
-
// }
|
|
45
|
-
// };
|
|
46
39
|
}, [props.data]);
|
|
47
40
|
var init = function init() {
|
|
48
41
|
if (!data || !data.key) return;
|
|
49
|
-
setAll(data.checked);
|
|
42
|
+
setAll(!!data.checked);
|
|
50
43
|
setFunctionGroups(util.clone(data.children));
|
|
51
|
-
setIndeterminate(data.indeterminate);
|
|
52
|
-
var childrenDisable = data.children.filter(function (childItem) {
|
|
44
|
+
setIndeterminate(!!data.indeterminate);
|
|
45
|
+
var childrenDisable = data.children && data.children.filter(function (childItem) {
|
|
53
46
|
return childItem.disable;
|
|
54
47
|
});
|
|
55
|
-
setCheckAllDisable(!!childrenDisable.length);
|
|
48
|
+
setCheckAllDisable(!!(childrenDisable || []).length);
|
|
56
49
|
};
|
|
57
50
|
// init();
|
|
58
|
-
|
|
59
51
|
var onAllChange = function onAllChange(e, initChecked) {
|
|
60
52
|
setIndeterminate(false);
|
|
61
53
|
var checked = initChecked ? initChecked : e ? e.target.checked : all;
|
|
@@ -64,7 +56,7 @@ var multiAuthModule = function multiAuthModule(props) {
|
|
|
64
56
|
dealArr.forEach(function (item, index) {
|
|
65
57
|
if (data.radio) {
|
|
66
58
|
item.checked = checked && !index;
|
|
67
|
-
if (data.children.map(function (childItem) {
|
|
59
|
+
if (data.children && data.children.map(function (childItem) {
|
|
68
60
|
return childItem.checked;
|
|
69
61
|
}).includes(true)) {
|
|
70
62
|
if (checked && data.children[index].checked) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './styles/user.less';
|
|
3
|
+
import { AllGroupInfosItem, AllMembersItem, AppListItem, LeftMenusItem } from '../../../types';
|
|
4
|
+
declare const Info: React.FC<{
|
|
5
|
+
ENVIRONMENT: string;
|
|
6
|
+
data: AllMembersItem;
|
|
7
|
+
allGroupInfos: Array<AllGroupInfosItem>;
|
|
8
|
+
companyAppList: AppListItem[];
|
|
9
|
+
isMarsUi: boolean;
|
|
10
|
+
leftMenus: LeftMenusItem[];
|
|
11
|
+
serviceType: number;
|
|
12
|
+
onCancel: () => void;
|
|
13
|
+
changeUserAuthCallback: (id: number) => void;
|
|
14
|
+
}>;
|
|
15
|
+
export default Info;
|