@zgfe/modules-settings 1.2.2-alpha.0 → 1.2.2-node.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/es/constants/icons/demo.css +0 -0
- package/es/constants/icons/demo_index.html +0 -0
- package/es/constants/icons/iconfont.css +0 -0
- package/es/constants/icons/iconfont.js +0 -0
- package/es/constants/icons/iconfont.json +0 -0
- package/es/constants/icons/iconfont.ttf +0 -0
- package/es/constants/icons/iconfont.woff +0 -0
- package/es/constants/icons/iconfont.woff2 +0 -0
- package/es/modules/appSettings/member/index.js +3 -3
- package/es/modules/companySetting/cost/index.less +0 -0
- package/es/modules/companySetting/edit/authConfig.js +21 -23
- package/es/modules/companySetting/edit/authConfigCEP.js +5 -7
- package/es/modules/companySetting/index.js +3 -3
- package/es/modules/companySetting/userGroup/authConfigDetail.js +14 -14
- package/es/modules/companySetting/wechatBinding/index.less +0 -0
- package/es/modules/systemSetting/notice/index.js +16 -16
- package/es/utils/functionalPermissions.d.ts +5 -2
- package/es/utils/functionalPermissions.js +4 -7
- 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
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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],
|
|
@@ -141,7 +141,7 @@ var AppMember = function AppMember() {
|
|
|
141
141
|
var menus = (res === null || res === void 0 ? void 0 : res.leftMenus) || [];
|
|
142
142
|
var formatMenus = function formatMenus(menus) {
|
|
143
143
|
menus.forEach(function (item) {
|
|
144
|
-
item.routeName = getMenuRouterByName(item.name);
|
|
144
|
+
item.routeName = util.getMenuRouterByName(item.name);
|
|
145
145
|
if (item.childrens) {
|
|
146
146
|
formatMenus(item.childrens);
|
|
147
147
|
}
|
|
File without changes
|
|
@@ -4,18 +4,16 @@ 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 Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
13
13
|
var config = props.config,
|
|
14
14
|
appList = props.appList,
|
|
15
|
+
isMarsUi = props.isMarsUi,
|
|
15
16
|
leftMenus = props.leftMenus;
|
|
16
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
17
|
-
menusName = _useContext.menusName,
|
|
18
|
-
funPermissions = _useContext.funPermissions;
|
|
19
17
|
var _useState = useState({}),
|
|
20
18
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
19
|
dataPermissions = _useState2[0],
|
|
@@ -61,7 +59,7 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
61
59
|
console.log('functionalPermissions');
|
|
62
60
|
if (functionalPermissions.checked) {
|
|
63
61
|
funAuth.push({
|
|
64
|
-
resource: funPermissions.all.key,
|
|
62
|
+
resource: funPermissions[isMarsUi ? 'mars' : 'standard'].all.key,
|
|
65
63
|
opts: [constants.functionOpts.all]
|
|
66
64
|
});
|
|
67
65
|
functionalPermissions.children && functionalPermissions.children.forEach(function (item) {
|
|
@@ -203,7 +201,7 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
203
201
|
console.log(map);
|
|
204
202
|
// 顶部菜单功能权限
|
|
205
203
|
var loopFormatTopMenu = function loopFormatTopMenu(topMenu, checkAll) {
|
|
206
|
-
var menuFunPerConstants = funPermissions[topMenu.name];
|
|
204
|
+
var menuFunPerConstants = funPermissions[isMarsUi ? 'mars' : 'standard'][topMenu.name];
|
|
207
205
|
// 菜单不在权限配置中
|
|
208
206
|
if (!menuFunPerConstants) {
|
|
209
207
|
return null;
|
|
@@ -240,7 +238,7 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
240
238
|
indeterminate: !(checkState || !childrenCheckArr.length && !indeterminateArr.length),
|
|
241
239
|
children: childrens
|
|
242
240
|
};
|
|
243
|
-
if (topMenu.name ===
|
|
241
|
+
if (topMenu.name === constants.menusName.market) {
|
|
244
242
|
formatMenu.radio = true;
|
|
245
243
|
formatMenu.children = [{
|
|
246
244
|
describe: '管理员角色',
|
|
@@ -261,7 +259,7 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
261
259
|
return formatMenu;
|
|
262
260
|
};
|
|
263
261
|
var menuFun = [];
|
|
264
|
-
var isAll = !!map[funPermissions.all.key];
|
|
262
|
+
var isAll = !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].all.key];
|
|
265
263
|
console.log('dskfhk', leftMenus);
|
|
266
264
|
leftMenus.forEach(function (menu) {
|
|
267
265
|
var topMenuFun = loopFormatTopMenu(menu, isAll);
|
|
@@ -272,29 +270,29 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
272
270
|
menuFun.push(topMenuFun);
|
|
273
271
|
}
|
|
274
272
|
});
|
|
275
|
-
var settingIsAll = !!map[funPermissions.setting.default.key];
|
|
273
|
+
var settingIsAll = !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].setting.default.key];
|
|
276
274
|
menuFun.push({
|
|
277
|
-
describe: funPermissions.setting.default.describe,
|
|
278
|
-
key: funPermissions.setting.default.key,
|
|
279
|
-
checked: isAll || !!map[funPermissions.setting.default.key],
|
|
275
|
+
describe: funPermissions[isMarsUi ? 'mars' : 'standard'].setting.default.describe,
|
|
276
|
+
key: funPermissions[isMarsUi ? 'mars' : 'standard'].setting.default.key,
|
|
277
|
+
checked: isAll || !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].setting.default.key],
|
|
280
278
|
indeterminate: false,
|
|
281
279
|
disable: false,
|
|
282
280
|
supportVirtualApp: true,
|
|
283
281
|
children: [{
|
|
284
|
-
// ...funPermissions.setting.company,
|
|
285
|
-
describe: funPermissions.setting.company.describe,
|
|
286
|
-
key: funPermissions.setting.company.key,
|
|
282
|
+
// ...funPermissions[isMarsUi ? 'mars' : 'standard'].setting.company,
|
|
283
|
+
describe: funPermissions[isMarsUi ? 'mars' : 'standard'].setting.company.describe,
|
|
284
|
+
key: funPermissions[isMarsUi ? 'mars' : 'standard'].setting.company.key,
|
|
287
285
|
disable: false,
|
|
288
286
|
supportVirtualApp: true,
|
|
289
|
-
checked: isAll || settingIsAll || !!map[funPermissions.setting.company.key],
|
|
287
|
+
checked: isAll || settingIsAll || !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].setting.company.key],
|
|
290
288
|
children: []
|
|
291
289
|
}, {
|
|
292
|
-
// ...funPermissions.setting.app,
|
|
293
|
-
describe: funPermissions.setting.app.describe,
|
|
294
|
-
key: funPermissions.setting.app.key,
|
|
290
|
+
// ...funPermissions[isMarsUi ? 'mars' : 'standard'].setting.app,
|
|
291
|
+
describe: funPermissions[isMarsUi ? 'mars' : 'standard'].setting.app.describe,
|
|
292
|
+
key: funPermissions[isMarsUi ? 'mars' : 'standard'].setting.app.key,
|
|
295
293
|
disable: false,
|
|
296
294
|
supportVirtualApp: true,
|
|
297
|
-
checked: isAll || settingIsAll || !!map[funPermissions.setting.app.key],
|
|
295
|
+
checked: isAll || settingIsAll || !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].setting.app.key],
|
|
298
296
|
children: []
|
|
299
297
|
}]
|
|
300
298
|
});
|
|
@@ -307,8 +305,8 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
307
305
|
console.log(menuFun);
|
|
308
306
|
setFunctionalPermissions({
|
|
309
307
|
describe: '功能权限',
|
|
310
|
-
key: funPermissions.all.key,
|
|
311
|
-
// checked: !!map[funPermissions.all.key],
|
|
308
|
+
key: funPermissions[isMarsUi ? 'mars' : 'standard'].all.key,
|
|
309
|
+
// checked: !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].all.key],
|
|
312
310
|
checked: checkedArr.length === menuFun.length,
|
|
313
311
|
disable: false,
|
|
314
312
|
supportVirtualApp: true,
|
|
@@ -10,16 +10,14 @@ 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 isMarsUi = props.isMarsUi,
|
|
20
20
|
CEPData = props.CEPData;
|
|
21
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
22
|
-
funPermissions = _useContext.funPermissions;
|
|
23
21
|
var _useState = useState({}),
|
|
24
22
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25
23
|
dataPermissions = _useState2[0],
|
|
@@ -171,8 +169,8 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
171
169
|
});
|
|
172
170
|
setFunctionalPermissions({
|
|
173
171
|
describe: '功能权限',
|
|
174
|
-
key: funPermissions.all.key,
|
|
175
|
-
// checked: !!map[funPermissions.all.key],
|
|
172
|
+
key: funPermissions[isMarsUi ? 'mars' : 'standard'].all.key,
|
|
173
|
+
// checked: !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].all.key],
|
|
176
174
|
checked: checkedFunArr.length === dealFunConfigList.length,
|
|
177
175
|
disable: false,
|
|
178
176
|
supportVirtualApp: true,
|
|
@@ -189,7 +187,7 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
189
187
|
setDataPermissions({
|
|
190
188
|
key: 1,
|
|
191
189
|
describe: '数据权限',
|
|
192
|
-
// checked: !!map[funPermissions.all.key],
|
|
190
|
+
// checked: !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].all.key],
|
|
193
191
|
checked: checkedAppArr.length === dealAppConfigList.length,
|
|
194
192
|
indeterminate: !(checkedAppArr.length === dealAppConfigList.length || !checkedAppArr.length && !indeterminateAppArr.length),
|
|
195
193
|
children: dealAppConfigList
|
|
@@ -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';
|
|
@@ -32,8 +33,7 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
32
33
|
// #todo 需要修改主应用传入参数和business-lib数据仓库
|
|
33
34
|
var apisOkNum = 0;
|
|
34
35
|
var _useContext = useContext(BizGlobalDataContext),
|
|
35
|
-
envs = _useContext.envs
|
|
36
|
-
getMenuRouterByName = _useContext.getMenuRouterByName;
|
|
36
|
+
envs = _useContext.envs;
|
|
37
37
|
var _ref = envs || {},
|
|
38
38
|
zgText = _ref.zgText,
|
|
39
39
|
isMarsUi = _ref.isMarsUi,
|
|
@@ -216,7 +216,7 @@ var CompanySetting = function CompanySetting(props) {
|
|
|
216
216
|
var menusNameMap = {};
|
|
217
217
|
var formatMenus = function formatMenus(menus) {
|
|
218
218
|
menus.forEach(function (item) {
|
|
219
|
-
item.routeName = getMenuRouterByName(item.name);
|
|
219
|
+
item.routeName = util.getMenuRouterByName(item.name);
|
|
220
220
|
menusNameMap[item.name] = item;
|
|
221
221
|
if (item.childrens) {
|
|
222
222
|
formatMenus(item.childrens);
|
|
@@ -11,25 +11,24 @@ 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,
|
|
24
25
|
companyAppList = props.companyAppList,
|
|
25
26
|
leftMenus = props.leftMenus,
|
|
27
|
+
isMarsUi = props.isMarsUi,
|
|
26
28
|
id = props.id,
|
|
27
29
|
groupId = props.groupId,
|
|
28
30
|
type = props.type,
|
|
29
31
|
serviceType = props.serviceType;
|
|
30
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
31
|
-
menusName = _useContext.menusName,
|
|
32
|
-
funPermissions = _useContext.funPermissions;
|
|
33
32
|
var _useState = useState([]),
|
|
34
33
|
_useState2 = _slicedToArray(_useState, 2),
|
|
35
34
|
dataAuth = _useState2[0],
|
|
@@ -47,6 +46,7 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
47
46
|
cepFunConfig = _useState8[0],
|
|
48
47
|
setCepFunConfig = _useState8[1];
|
|
49
48
|
// #todo isAdmin 需要添加
|
|
49
|
+
// console.log('dsfdsfsdfdsfdsfdsf');
|
|
50
50
|
useEffect(function () {
|
|
51
51
|
reworkAppList();
|
|
52
52
|
reworkFunAuth();
|
|
@@ -141,7 +141,7 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
141
141
|
};
|
|
142
142
|
var loopFormatTopMenu = function loopFormatTopMenu(topMenu) {
|
|
143
143
|
// 菜单不在权限配置中
|
|
144
|
-
if (!
|
|
144
|
+
if (!functionalPermissions[isMarsUi ? 'mars' : 'standard'][topMenu.name]) {
|
|
145
145
|
return null;
|
|
146
146
|
}
|
|
147
147
|
var childrenArr = [];
|
|
@@ -154,7 +154,7 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
// 智能触达
|
|
157
|
-
if (topMenu.name ===
|
|
157
|
+
if (topMenu.name === constants.menusName.market) {
|
|
158
158
|
childrenArr = [{
|
|
159
159
|
name: {
|
|
160
160
|
describe: '管理员角色',
|
|
@@ -174,7 +174,7 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
174
174
|
var formatMenu = {
|
|
175
175
|
name: {
|
|
176
176
|
describe: topMenu.nametext,
|
|
177
|
-
key:
|
|
177
|
+
key: functionalPermissions[isMarsUi ? 'mars' : 'standard'][topMenu.name].key
|
|
178
178
|
},
|
|
179
179
|
show: false,
|
|
180
180
|
children: childrenArr
|
|
@@ -184,21 +184,21 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
184
184
|
var checkFunPermission = function checkFunPermission(key) {
|
|
185
185
|
// 检查功能模块权限配置,true为有权限,false无权限
|
|
186
186
|
if (!key) return false;
|
|
187
|
-
if (key ===
|
|
187
|
+
if (key === functionalPermissions[isMarsUi ? 'mars' : 'standard'].default.key) return true;
|
|
188
188
|
var funAuthConfig = authConfig.funAuth;
|
|
189
189
|
var funAuthKeyArr = funAuthConfig ? funAuthConfig.map(function (item) {
|
|
190
190
|
return item.resource;
|
|
191
191
|
}) : [];
|
|
192
192
|
// 智能触达:管理员、运营人员
|
|
193
193
|
if (['mkt_admin', 'mkt_ops'].includes(key)) {
|
|
194
|
-
var mktKey =
|
|
194
|
+
var mktKey = functionalPermissions[isMarsUi ? 'mars' : 'standard'].market.key;
|
|
195
195
|
var mktConfig = funAuthConfig && funAuthConfig.find(function (item) {
|
|
196
196
|
return item.resource === mktKey;
|
|
197
197
|
});
|
|
198
198
|
if (!mktConfig) return false;
|
|
199
199
|
return mktConfig.opts[0] === key;
|
|
200
200
|
}
|
|
201
|
-
if (funAuthKeyArr.includes(
|
|
201
|
+
if (funAuthKeyArr.includes(functionalPermissions[isMarsUi ? 'mars' : 'standard'].all.key)) {
|
|
202
202
|
// 功能权限:全选
|
|
203
203
|
return true;
|
|
204
204
|
}
|
|
@@ -235,14 +235,14 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
235
235
|
});
|
|
236
236
|
// 设置菜单
|
|
237
237
|
var setting = {
|
|
238
|
-
name:
|
|
238
|
+
name: functionalPermissions[isMarsUi ? 'mars' : 'standard'].setting.default,
|
|
239
239
|
show: false,
|
|
240
240
|
children: [{
|
|
241
|
-
name:
|
|
241
|
+
name: functionalPermissions[isMarsUi ? 'mars' : 'standard'].setting.company,
|
|
242
242
|
show: false,
|
|
243
243
|
children: []
|
|
244
244
|
}, {
|
|
245
|
-
name:
|
|
245
|
+
name: functionalPermissions[isMarsUi ? 'mars' : 'standard'].setting.app,
|
|
246
246
|
show: false,
|
|
247
247
|
children: []
|
|
248
248
|
}]
|
|
File without changes
|
|
@@ -13,9 +13,10 @@ import React from 'react';
|
|
|
13
13
|
import { useState } from 'react';
|
|
14
14
|
import { useEffect } from 'react';
|
|
15
15
|
import apis from '../../../constants/api';
|
|
16
|
-
import request
|
|
16
|
+
import request from '../../../utils/ajax';
|
|
17
17
|
import ConfigItem from './configItem';
|
|
18
18
|
import ItemEdit from './edit';
|
|
19
|
+
import { ajax } from '@zgfe/business-lib';
|
|
19
20
|
var Notice = function Notice() {
|
|
20
21
|
var typeMap = new Map([[1, 'email']]);
|
|
21
22
|
var _useState = useState(new Map().set('email', {
|
|
@@ -64,27 +65,26 @@ var Notice = function Notice() {
|
|
|
64
65
|
var formData = new FormData();
|
|
65
66
|
formData.set('type', editSetting.type);
|
|
66
67
|
formData.set('config', JSON.stringify(values));
|
|
67
|
-
|
|
68
|
+
ajax(apis.setting.editNoticeConfig, {
|
|
68
69
|
method: 'post',
|
|
69
|
-
// data: formData,
|
|
70
70
|
data: {
|
|
71
71
|
type: editSetting.type === 'email' ? 1 : null,
|
|
72
72
|
config: JSON.stringify(values)
|
|
73
73
|
}
|
|
74
74
|
}).then(function (res) {
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
75
|
+
if (!res) return;
|
|
76
|
+
notification.success({
|
|
77
|
+
message: '配置成功'
|
|
78
|
+
});
|
|
79
|
+
settingMap.get(editSetting.type).config = values;
|
|
80
|
+
var newSettingMap = new Map(_toConsumableArray(settingMap));
|
|
81
|
+
setSettingMap(newSettingMap);
|
|
82
|
+
setIsEdit(false);
|
|
83
|
+
}).catch(function (err) {
|
|
84
|
+
console.error('配置失败', err);
|
|
85
|
+
notification.error({
|
|
86
|
+
message: '配置失败'
|
|
87
|
+
});
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
90
|
return /*#__PURE__*/React.createElement("div", null, isEdit ? /*#__PURE__*/React.createElement(ItemEdit, {
|
|
@@ -163,9 +163,6 @@ var standard = _objectSpread({
|
|
|
163
163
|
userPortrait: {
|
|
164
164
|
key: '/user/userPortrait'
|
|
165
165
|
},
|
|
166
|
-
userJourney: {
|
|
167
|
-
key: '/cxp/userJourney'
|
|
168
|
-
},
|
|
169
166
|
userTags: {
|
|
170
167
|
key: '/user/userTags'
|
|
171
168
|
},
|
|
@@ -318,9 +315,6 @@ var mars = {
|
|
|
318
315
|
userPortrait: {
|
|
319
316
|
key: '/analysis/user/userPortrait'
|
|
320
317
|
},
|
|
321
|
-
userJourney: {
|
|
322
|
-
key: '/cxp/userJourney'
|
|
323
|
-
},
|
|
324
318
|
custom: {
|
|
325
319
|
key: '/analysis/custom'
|
|
326
320
|
},
|
|
@@ -426,4 +420,7 @@ var mars = {
|
|
|
426
420
|
}
|
|
427
421
|
}
|
|
428
422
|
};
|
|
429
|
-
export default
|
|
423
|
+
export default {
|
|
424
|
+
mars: mars,
|
|
425
|
+
standard: standard
|
|
426
|
+
};
|
package/es/utils/util.js
CHANGED
|
@@ -641,8 +641,7 @@ var util = {
|
|
|
641
641
|
adChannel: 'router-dataAccess-advanced',
|
|
642
642
|
debug: 'router-dataAccess-debug',
|
|
643
643
|
dataset: 'router-cdp-dataset',
|
|
644
|
-
idmapping: 'router-idMapping-list'
|
|
645
|
-
userJourney: 'router-appUserJourney'
|
|
644
|
+
idmapping: 'router-idMapping-list'
|
|
646
645
|
};
|
|
647
646
|
return hash[name] ? hash[name] : 'router-' + name;
|
|
648
647
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-settings",
|
|
3
|
-
"version": "1.2.2-
|
|
3
|
+
"version": "1.2.2-node.0",
|
|
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": "791b7dce1b31a2c683d3225e84e0c51106b64b74",
|
|
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
|
-
});
|