@zgfe/modules-settings 1.2.6-config.1 → 1.2.6
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/constants/api.js +1 -1
- package/es/modules/appSettings/member/index.js +5 -5
- package/es/modules/companySetting/edit/authConfig.js +18 -21
- package/es/modules/companySetting/edit/authConfigCEP.js +5 -7
- package/es/modules/companySetting/edit/userGroup.js +4 -1
- package/es/modules/companySetting/index.js +4 -4
- package/es/modules/companySetting/userGroup/authConfigDetail.js +12 -14
- package/es/utils/functionalPermissions.d.ts +4 -2
- package/es/utils/functionalPermissions.js +3 -4
- package/es/utils/util.js +1 -2
- package/package.json +2 -2
- package/es/modules/companySetting/demo.d.ts +0 -3
- package/es/modules/companySetting/demo.js +0 -21
package/es/constants/api.js
CHANGED
|
@@ -5,7 +5,7 @@ var apis = {
|
|
|
5
5
|
getCurrentUser: '/zg/web/v2/company/currentUser'
|
|
6
6
|
},
|
|
7
7
|
app: {
|
|
8
|
-
queryLeftMenus: '/
|
|
8
|
+
queryLeftMenus: apiPrefix + '/common/proxy/index/getLeftMenusByAppId.jsp',
|
|
9
9
|
deleteApp: apiPrefix + '/common/proxy/user/deleteApp.jsp',
|
|
10
10
|
createApp: apiPrefix + '/system/createApp',
|
|
11
11
|
queryAppList: '/zg/web/v2/data/v2ajaxGetDataByApp',
|
|
@@ -10,13 +10,13 @@ import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
|
10
10
|
import request from '../../../utils/ajax';
|
|
11
11
|
import apis from '../../../constants/api';
|
|
12
12
|
import { useState } from 'react';
|
|
13
|
+
import util from '../../../utils/util';
|
|
13
14
|
import { EyeOutlined } from '@ant-design/icons';
|
|
14
15
|
import SetingModal from './modal';
|
|
15
16
|
var AppMember = function AppMember() {
|
|
16
17
|
var _useContext = useContext(BizGlobalDataContext),
|
|
17
18
|
currentApp = _useContext.currentApp,
|
|
18
|
-
currentUser = _useContext.currentUser
|
|
19
|
-
getMenuRouterByName = _useContext.getMenuRouterByName;
|
|
19
|
+
currentUser = _useContext.currentUser;
|
|
20
20
|
var _useState = useState([]),
|
|
21
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22
22
|
memberList = _useState2[0],
|
|
@@ -132,13 +132,13 @@ var AppMember = function AppMember() {
|
|
|
132
132
|
request(apis.app.queryLeftMenus, {
|
|
133
133
|
method: 'post',
|
|
134
134
|
data: {
|
|
135
|
-
|
|
135
|
+
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
136
136
|
}
|
|
137
137
|
}).then(function (res) {
|
|
138
|
-
var menus = (res === null || res === void 0 ? void 0 : res.
|
|
138
|
+
var menus = (res === null || res === void 0 ? void 0 : res.leftMenus) || [];
|
|
139
139
|
var formatMenus = function formatMenus(menus) {
|
|
140
140
|
menus.forEach(function (item) {
|
|
141
|
-
item.routeName = getMenuRouterByName(item.name);
|
|
141
|
+
item.routeName = util.getMenuRouterByName(item.name);
|
|
142
142
|
if (item.childrens) {
|
|
143
143
|
formatMenus(item.childrens);
|
|
144
144
|
}
|
|
@@ -4,18 +4,15 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
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
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
|
-
import React, { useEffect, useState, forwardRef, useImperativeHandle
|
|
7
|
+
import React, { useEffect, useState, forwardRef, useImperativeHandle } from 'react';
|
|
8
8
|
import './styles/authConfig.less';
|
|
9
9
|
import constants from './../../../utils/constants';
|
|
10
|
+
import funPermissions from './../../../utils/functionalPermissions';
|
|
10
11
|
import AuthGroup from './authGroup';
|
|
11
|
-
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
12
12
|
var AuthConfig = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
13
13
|
var config = props.config,
|
|
14
14
|
appList = props.appList,
|
|
15
15
|
leftMenus = props.leftMenus;
|
|
16
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
17
|
-
menusName = _useContext.menusName,
|
|
18
|
-
funPermissions = _useContext.funPermissions;
|
|
19
16
|
var _useState = useState({}),
|
|
20
17
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
18
|
dataPermissions = _useState2[0],
|
|
@@ -60,7 +57,7 @@ var AuthConfig = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
60
57
|
}
|
|
61
58
|
if (functionalPermissions.checked) {
|
|
62
59
|
funAuth.push({
|
|
63
|
-
resource: funPermissions.all.key,
|
|
60
|
+
resource: funPermissions['standard'].all.key,
|
|
64
61
|
opts: [constants.functionOpts.all]
|
|
65
62
|
});
|
|
66
63
|
functionalPermissions.children && functionalPermissions.children.forEach(function (item) {
|
|
@@ -201,7 +198,7 @@ var AuthConfig = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
201
198
|
});
|
|
202
199
|
// 顶部菜单功能权限
|
|
203
200
|
var loopFormatTopMenu = function loopFormatTopMenu(topMenu, checkAll) {
|
|
204
|
-
var menuFunPerConstants = funPermissions[topMenu.name];
|
|
201
|
+
var menuFunPerConstants = funPermissions['standard'][topMenu.name];
|
|
205
202
|
// 菜单不在权限配置中
|
|
206
203
|
if (!menuFunPerConstants) {
|
|
207
204
|
return null;
|
|
@@ -238,7 +235,7 @@ var AuthConfig = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
238
235
|
indeterminate: !(checkState || !childrenCheckArr.length && !indeterminateArr.length),
|
|
239
236
|
children: childrens
|
|
240
237
|
};
|
|
241
|
-
if (topMenu.name ===
|
|
238
|
+
if (topMenu.name === constants.menusName.market) {
|
|
242
239
|
formatMenu.radio = true;
|
|
243
240
|
formatMenu.children = [{
|
|
244
241
|
describe: '管理员角色',
|
|
@@ -259,7 +256,7 @@ var AuthConfig = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
259
256
|
return formatMenu;
|
|
260
257
|
};
|
|
261
258
|
var menuFun = [];
|
|
262
|
-
var isAll = !!map[funPermissions.all.key];
|
|
259
|
+
var isAll = !!map[funPermissions['standard'].all.key];
|
|
263
260
|
leftMenus.forEach(function (menu) {
|
|
264
261
|
var topMenuFun = loopFormatTopMenu(menu, isAll);
|
|
265
262
|
if (topMenuFun) {
|
|
@@ -269,28 +266,28 @@ var AuthConfig = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
269
266
|
menuFun.push(topMenuFun);
|
|
270
267
|
}
|
|
271
268
|
});
|
|
272
|
-
var settingIsAll = !!map[funPermissions.setting.default.key];
|
|
269
|
+
var settingIsAll = !!map[funPermissions['standard'].setting.default.key];
|
|
273
270
|
var settingChildren = [{
|
|
274
271
|
// ...funPermissions['standard'].setting.company,
|
|
275
|
-
describe: funPermissions.setting.company.describe,
|
|
276
|
-
key: funPermissions.setting.company.key,
|
|
272
|
+
describe: funPermissions['standard'].setting.company.describe,
|
|
273
|
+
key: funPermissions['standard'].setting.company.key,
|
|
277
274
|
disable: false,
|
|
278
275
|
supportVirtualApp: true,
|
|
279
|
-
checked: isAll || settingIsAll || !!map[funPermissions.setting.company.key],
|
|
276
|
+
checked: isAll || settingIsAll || !!map[funPermissions['standard'].setting.company.key],
|
|
280
277
|
children: []
|
|
281
278
|
}, {
|
|
282
279
|
// ...funPermissions['standard'].setting.app,
|
|
283
|
-
describe: funPermissions.setting.app.describe,
|
|
284
|
-
key: funPermissions.setting.app.key,
|
|
280
|
+
describe: funPermissions['standard'].setting.app.describe,
|
|
281
|
+
key: funPermissions['standard'].setting.app.key,
|
|
285
282
|
disable: false,
|
|
286
283
|
supportVirtualApp: true,
|
|
287
|
-
checked: isAll || settingIsAll || !!map[funPermissions.setting.app.key],
|
|
284
|
+
checked: isAll || settingIsAll || !!map[funPermissions['standard'].setting.app.key],
|
|
288
285
|
children: []
|
|
289
286
|
}];
|
|
290
287
|
menuFun.push({
|
|
291
|
-
describe: funPermissions.setting.default.describe,
|
|
292
|
-
key: funPermissions.setting.default.key,
|
|
293
|
-
checked: isAll || !!map[funPermissions.setting.default.key],
|
|
288
|
+
describe: funPermissions['standard'].setting.default.describe,
|
|
289
|
+
key: funPermissions['standard'].setting.default.key,
|
|
290
|
+
checked: isAll || !!map[funPermissions['standard'].setting.default.key],
|
|
294
291
|
indeterminate: settingChildren.some(function (item) {
|
|
295
292
|
return item.checked;
|
|
296
293
|
}),
|
|
@@ -306,8 +303,8 @@ var AuthConfig = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
306
303
|
});
|
|
307
304
|
setFunctionalPermissions({
|
|
308
305
|
describe: '功能权限',
|
|
309
|
-
key: funPermissions.all.key,
|
|
310
|
-
// checked: !!map[funPermissions.all.key],
|
|
306
|
+
key: funPermissions['standard'].all.key,
|
|
307
|
+
// checked: !!map[funPermissions['standard'].all.key],
|
|
311
308
|
checked: checkedArr.length === menuFun.length,
|
|
312
309
|
disable: false,
|
|
313
310
|
supportVirtualApp: true,
|
|
@@ -10,15 +10,13 @@ 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, { useEffect, useState, forwardRef, useImperativeHandle
|
|
13
|
+
import React, { useEffect, useState, forwardRef, useImperativeHandle } from 'react';
|
|
14
14
|
import './styles/authConfig.less';
|
|
15
15
|
import constants from './../../../utils/constants';
|
|
16
|
+
import funPermissions from './../../../utils/functionalPermissions';
|
|
16
17
|
import AuthGroup from './authGroup';
|
|
17
|
-
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
18
18
|
var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
19
19
|
var CEPData = props.CEPData;
|
|
20
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
21
|
-
funPermissions = _useContext.funPermissions;
|
|
22
20
|
var _useState = useState({}),
|
|
23
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24
22
|
dataPermissions = _useState2[0],
|
|
@@ -166,8 +164,8 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
166
164
|
});
|
|
167
165
|
setFunctionalPermissions({
|
|
168
166
|
describe: '功能权限',
|
|
169
|
-
key: funPermissions.all.key,
|
|
170
|
-
// checked: !!map[funPermissions.all.key],
|
|
167
|
+
key: funPermissions['standard'].all.key,
|
|
168
|
+
// checked: !!map[funPermissions['standard'].all.key],
|
|
171
169
|
checked: checkedFunArr.length === dealFunConfigList.length,
|
|
172
170
|
disable: false,
|
|
173
171
|
supportVirtualApp: true,
|
|
@@ -184,7 +182,7 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
184
182
|
setDataPermissions({
|
|
185
183
|
key: 1,
|
|
186
184
|
describe: '数据权限',
|
|
187
|
-
// checked: !!map[funPermissions.all.key],
|
|
185
|
+
// checked: !!map[funPermissions['standard'].all.key],
|
|
188
186
|
checked: checkedAppArr.length === dealAppConfigList.length,
|
|
189
187
|
indeterminate: !(checkedAppArr.length === dealAppConfigList.length || !checkedAppArr.length && !indeterminateAppArr.length),
|
|
190
188
|
children: dealAppConfigList
|
|
@@ -136,7 +136,6 @@ var CompanySettingUserGroup = function CompanySettingUserGroup(props) {
|
|
|
136
136
|
onCancel && onCancel();
|
|
137
137
|
};
|
|
138
138
|
var onSave = function onSave() {
|
|
139
|
-
// "funAuth":[{"resource":"/user/userList","opts":["all"]},{"resource":"/user/userGroup","opts":["all"]},{"resource":"/user/userTags","opts":["all"]},{"resource":"/setting/company","opts":["all"]}]
|
|
140
139
|
if (!constants.regExp.teamAndAppName.test(name)) {
|
|
141
140
|
notification.error({
|
|
142
141
|
message: '请输入1-20个字符'
|
|
@@ -317,6 +316,10 @@ var CompanySettingUserGroup = function CompanySettingUserGroup(props) {
|
|
|
317
316
|
},
|
|
318
317
|
className: "delete-btn"
|
|
319
318
|
}, "\u6E05\u7A7A")), menu);
|
|
319
|
+
},
|
|
320
|
+
filterOption: function filterOption(input, option) {
|
|
321
|
+
var _option$label;
|
|
322
|
+
return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').toLowerCase().includes(input.toLowerCase());
|
|
320
323
|
}
|
|
321
324
|
}))), isAdmin ? /*#__PURE__*/React.createElement("div", {
|
|
322
325
|
className: "encryption-wrap"
|
|
@@ -13,6 +13,7 @@ import React, { useContext, useEffect, useState } from 'react';
|
|
|
13
13
|
import './index.less';
|
|
14
14
|
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
15
15
|
import request from './../../utils/ajax';
|
|
16
|
+
import util from './../../utils/util';
|
|
16
17
|
import api from './../../constants/api';
|
|
17
18
|
import PageLoading from '../../components/pageLoading';
|
|
18
19
|
import { notification } from 'antd';
|
|
@@ -33,8 +34,7 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
33
34
|
// #todo 需要修改主应用传入参数和business-lib数据仓库
|
|
34
35
|
var apisOkNum = 0;
|
|
35
36
|
var _useContext = useContext(BizGlobalDataContext),
|
|
36
|
-
envs = _useContext.envs
|
|
37
|
-
getMenuRouterByName = _useContext.getMenuRouterByName;
|
|
37
|
+
envs = _useContext.envs;
|
|
38
38
|
var _ref = envs || {},
|
|
39
39
|
zgText = _ref.zgText,
|
|
40
40
|
showVirtualApp = _ref.showVirtualApp,
|
|
@@ -213,11 +213,11 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
213
213
|
app_id: data.id
|
|
214
214
|
}
|
|
215
215
|
}).then(function (res) {
|
|
216
|
-
var menus = res && res.
|
|
216
|
+
var menus = res && res.leftMenus || [];
|
|
217
217
|
var menusNameMap = {};
|
|
218
218
|
var formatMenus = function formatMenus(menus) {
|
|
219
219
|
menus.forEach(function (item) {
|
|
220
|
-
item.routeName = getMenuRouterByName(item.name);
|
|
220
|
+
item.routeName = util.getMenuRouterByName(item.name);
|
|
221
221
|
menusNameMap[item.name] = item;
|
|
222
222
|
if (item.childrens) {
|
|
223
223
|
formatMenus(item.childrens);
|
|
@@ -11,13 +11,14 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
11
11
|
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; }
|
|
12
12
|
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; } }
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
-
import React, {
|
|
14
|
+
import React, { useEffect, useState } from 'react';
|
|
15
15
|
import './style/authConfigDetail.less';
|
|
16
16
|
import constants from './../../../utils/constants';
|
|
17
|
+
import functionalPermissions from './../../../utils/functionalPermissions';
|
|
17
18
|
import { notification } from 'antd';
|
|
18
19
|
import request from './../../../utils/ajax';
|
|
19
20
|
import apis from './../../../constants/api';
|
|
20
|
-
|
|
21
|
+
// const { TextArea } = Input;
|
|
21
22
|
var authConfigDetail = function authConfigDetail(props) {
|
|
22
23
|
var name = props.name,
|
|
23
24
|
authConfig = props.authConfig,
|
|
@@ -27,9 +28,6 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
27
28
|
groupId = props.groupId,
|
|
28
29
|
type = props.type,
|
|
29
30
|
serviceType = props.serviceType;
|
|
30
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
31
|
-
menusName = _useContext.menusName,
|
|
32
|
-
funPermissions = _useContext.funPermissions;
|
|
33
31
|
var _useState = useState([]),
|
|
34
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
35
33
|
dataAuth = _useState2[0],
|
|
@@ -139,7 +137,7 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
139
137
|
};
|
|
140
138
|
var loopFormatTopMenu = function loopFormatTopMenu(topMenu) {
|
|
141
139
|
// 菜单不在权限配置中
|
|
142
|
-
if (!
|
|
140
|
+
if (!functionalPermissions['standard'][topMenu.name]) {
|
|
143
141
|
return null;
|
|
144
142
|
}
|
|
145
143
|
var childrenArr = [];
|
|
@@ -152,7 +150,7 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
152
150
|
});
|
|
153
151
|
}
|
|
154
152
|
// 智能触达
|
|
155
|
-
if (topMenu.name ===
|
|
153
|
+
if (topMenu.name === constants.menusName.market) {
|
|
156
154
|
childrenArr = [{
|
|
157
155
|
name: {
|
|
158
156
|
describe: '管理员角色',
|
|
@@ -172,7 +170,7 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
172
170
|
var formatMenu = {
|
|
173
171
|
name: {
|
|
174
172
|
describe: topMenu.nametext,
|
|
175
|
-
key:
|
|
173
|
+
key: functionalPermissions['standard'][topMenu.name].key
|
|
176
174
|
},
|
|
177
175
|
show: false,
|
|
178
176
|
children: childrenArr
|
|
@@ -182,21 +180,21 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
182
180
|
var checkFunPermission = function checkFunPermission(key) {
|
|
183
181
|
// 检查功能模块权限配置,true为有权限,false无权限
|
|
184
182
|
if (!key) return false;
|
|
185
|
-
if (key ===
|
|
183
|
+
if (key === functionalPermissions['standard'].default.key) return true;
|
|
186
184
|
var funAuthConfig = authConfig.funAuth;
|
|
187
185
|
var funAuthKeyArr = funAuthConfig ? funAuthConfig.map(function (item) {
|
|
188
186
|
return item.resource;
|
|
189
187
|
}) : [];
|
|
190
188
|
// 智能触达:管理员、运营人员
|
|
191
189
|
if (['mkt_admin', 'mkt_ops'].includes(key)) {
|
|
192
|
-
var mktKey =
|
|
190
|
+
var mktKey = functionalPermissions['standard'].market.key;
|
|
193
191
|
var mktConfig = funAuthConfig && funAuthConfig.find(function (item) {
|
|
194
192
|
return item.resource === mktKey;
|
|
195
193
|
});
|
|
196
194
|
if (!mktConfig) return false;
|
|
197
195
|
return mktConfig.opts[0] === key;
|
|
198
196
|
}
|
|
199
|
-
if (funAuthKeyArr.includes(
|
|
197
|
+
if (funAuthKeyArr.includes(functionalPermissions['standard'].all.key)) {
|
|
200
198
|
// 功能权限:全选
|
|
201
199
|
return true;
|
|
202
200
|
}
|
|
@@ -233,14 +231,14 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
233
231
|
});
|
|
234
232
|
// 设置菜单
|
|
235
233
|
var setting = {
|
|
236
|
-
name:
|
|
234
|
+
name: functionalPermissions['standard'].setting.default,
|
|
237
235
|
show: false,
|
|
238
236
|
children: [{
|
|
239
|
-
name:
|
|
237
|
+
name: functionalPermissions['standard'].setting.company,
|
|
240
238
|
show: false,
|
|
241
239
|
children: []
|
|
242
240
|
}, {
|
|
243
|
-
name:
|
|
241
|
+
name: functionalPermissions['standard'].setting.app,
|
|
244
242
|
show: false,
|
|
245
243
|
children: []
|
|
246
244
|
}]
|
|
@@ -160,9 +160,6 @@ var standard = _objectSpread({
|
|
|
160
160
|
userPortrait: {
|
|
161
161
|
key: '/analysis/user/userPortrait'
|
|
162
162
|
},
|
|
163
|
-
userJourney: {
|
|
164
|
-
key: '/cxp/userJourney'
|
|
165
|
-
},
|
|
166
163
|
userTags: {
|
|
167
164
|
key: '/analysis/user/userTags'
|
|
168
165
|
},
|
|
@@ -222,4 +219,6 @@ var standard = _objectSpread({
|
|
|
222
219
|
key: '/cxp/userJourney'
|
|
223
220
|
}
|
|
224
221
|
} : {});
|
|
225
|
-
export default
|
|
222
|
+
export default {
|
|
223
|
+
standard: standard
|
|
224
|
+
};
|
package/es/utils/util.js
CHANGED
|
@@ -640,8 +640,7 @@ var util = {
|
|
|
640
640
|
adChannel: 'router-dataAccess-advanced',
|
|
641
641
|
debug: 'router-dataAccess-debug',
|
|
642
642
|
dataset: 'router-cdp-dataset',
|
|
643
|
-
idmapping: 'router-idMapping-list'
|
|
644
|
-
userJourney: 'router-appUserJourney'
|
|
643
|
+
idmapping: 'router-idMapping-list'
|
|
645
644
|
};
|
|
646
645
|
return hash[name] ? hash[name] : 'router-' + name;
|
|
647
646
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-settings",
|
|
3
|
-
"version": "1.2.6
|
|
3
|
+
"version": "1.2.6",
|
|
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": "82477bee1bb8552b87abd40ff6c595e17d099ad6",
|
|
55
55
|
"gitHooks": {
|
|
56
56
|
"pre-commit": "lint-staged"
|
|
57
57
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { BizGlobalDataContext, DemoWrapper } from '@zgfe/business-lib';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import funPermissions from '../../utils/functionalPermissions';
|
|
4
|
-
import constants from '../../utils/constants';
|
|
5
|
-
import util from '../../utils/util';
|
|
6
|
-
import { CompanySetting } from '../..';
|
|
7
|
-
export default (function () {
|
|
8
|
-
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
9
|
-
needMeta: true
|
|
10
|
-
}, /*#__PURE__*/React.createElement(BizGlobalDataContext.Provider, {
|
|
11
|
-
value: {
|
|
12
|
-
funPermissions: funPermissions,
|
|
13
|
-
menusName: constants.menusName,
|
|
14
|
-
getMenuRouterByName: util.getMenuRouterByName
|
|
15
|
-
}
|
|
16
|
-
}, /*#__PURE__*/React.createElement(CompanySetting, {
|
|
17
|
-
showWeChatMenu: true,
|
|
18
|
-
showMarketMenu: true,
|
|
19
|
-
action: ''
|
|
20
|
-
})));
|
|
21
|
-
});
|