@zgfe/modules-settings 1.2.4 → 1.2.6-config.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.
@@ -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';
14
13
  import { EyeOutlined } from '@ant-design/icons';
15
14
  import SetingModal from './modal';
16
15
  var AppMember = function AppMember() {
17
16
  var _useContext = useContext(BizGlobalDataContext),
18
17
  currentApp = _useContext.currentApp,
19
- currentUser = _useContext.currentUser;
18
+ currentUser = _useContext.currentUser,
19
+ getMenuRouterByName = _useContext.getMenuRouterByName;
20
20
  var _useState = useState([]),
21
21
  _useState2 = _slicedToArray(_useState, 2),
22
22
  memberList = _useState2[0],
@@ -138,7 +138,7 @@ var AppMember = function AppMember() {
138
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 = util.getMenuRouterByName(item.name);
141
+ item.routeName = getMenuRouterByName(item.name);
142
142
  if (item.childrens) {
143
143
  formatMenus(item.childrens);
144
144
  }
@@ -85,7 +85,6 @@ var appList = function appList(props) {
85
85
  var columns = [{
86
86
  title: '应用名称',
87
87
  render: function render(data) {
88
- // console.log(appName, data)
89
88
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
90
89
  className: "app-name",
91
90
  title: data.appName || '',
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: () => React.JSX.Element;
3
+ export default _default;
@@ -0,0 +1,21 @@
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
+ });
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import './styles/authConfig.less';
3
3
  import { AppListItem, Config, LeftMenusItem } from '../../../types';
4
- declare const Info: React.FC<{
4
+ declare const AuthConfig: React.FC<{
5
5
  config: Config;
6
6
  appList: Array<AppListItem>;
7
7
  leftMenus: LeftMenusItem[];
8
8
  ref: any;
9
9
  }>;
10
- export default Info;
10
+ export default AuthConfig;
@@ -4,15 +4,18 @@ 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 } from 'react';
7
+ import React, { useEffect, useState, forwardRef, useImperativeHandle, useContext } from 'react';
8
8
  import './styles/authConfig.less';
9
9
  import constants from './../../../utils/constants';
10
- import funPermissions from './../../../utils/functionalPermissions';
11
10
  import AuthGroup from './authGroup';
12
- var Info = /*#__PURE__*/forwardRef(function (props, ref) {
11
+ import { BizGlobalDataContext } from '@zgfe/business-lib';
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;
16
19
  var _useState = useState({}),
17
20
  _useState2 = _slicedToArray(_useState, 2),
18
21
  dataPermissions = _useState2[0],
@@ -55,10 +58,9 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
55
58
  }
56
59
  });
57
60
  }
58
- console.log('functionalPermissions');
59
61
  if (functionalPermissions.checked) {
60
62
  funAuth.push({
61
- resource: funPermissions['standard'].all.key,
63
+ resource: funPermissions.all.key,
62
64
  opts: [constants.functionOpts.all]
63
65
  });
64
66
  functionalPermissions.children && functionalPermissions.children.forEach(function (item) {
@@ -197,10 +199,9 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
197
199
  funAuth.forEach(function (item) {
198
200
  map[item.resource] = item.opts[0];
199
201
  });
200
- console.log(map);
201
202
  // 顶部菜单功能权限
202
203
  var loopFormatTopMenu = function loopFormatTopMenu(topMenu, checkAll) {
203
- var menuFunPerConstants = funPermissions['standard'][topMenu.name];
204
+ var menuFunPerConstants = funPermissions[topMenu.name];
204
205
  // 菜单不在权限配置中
205
206
  if (!menuFunPerConstants) {
206
207
  return null;
@@ -237,7 +238,7 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
237
238
  indeterminate: !(checkState || !childrenCheckArr.length && !indeterminateArr.length),
238
239
  children: childrens
239
240
  };
240
- if (topMenu.name === constants.menusName.market) {
241
+ if (topMenu.name === (menusName === null || menusName === void 0 ? void 0 : menusName.market)) {
241
242
  formatMenu.radio = true;
242
243
  formatMenu.children = [{
243
244
  describe: '管理员角色',
@@ -258,8 +259,7 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
258
259
  return formatMenu;
259
260
  };
260
261
  var menuFun = [];
261
- var isAll = !!map[funPermissions['standard'].all.key];
262
- console.log('dskfhk', leftMenus);
262
+ var isAll = !!map[funPermissions.all.key];
263
263
  leftMenus.forEach(function (menu) {
264
264
  var topMenuFun = loopFormatTopMenu(menu, isAll);
265
265
  if (topMenuFun) {
@@ -269,31 +269,34 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
269
269
  menuFun.push(topMenuFun);
270
270
  }
271
271
  });
272
- var settingIsAll = !!map[funPermissions['standard'].setting.default.key];
272
+ var settingIsAll = !!map[funPermissions.setting.default.key];
273
+ var settingChildren = [{
274
+ // ...funPermissions['standard'].setting.company,
275
+ describe: funPermissions.setting.company.describe,
276
+ key: funPermissions.setting.company.key,
277
+ disable: false,
278
+ supportVirtualApp: true,
279
+ checked: isAll || settingIsAll || !!map[funPermissions.setting.company.key],
280
+ children: []
281
+ }, {
282
+ // ...funPermissions['standard'].setting.app,
283
+ describe: funPermissions.setting.app.describe,
284
+ key: funPermissions.setting.app.key,
285
+ disable: false,
286
+ supportVirtualApp: true,
287
+ checked: isAll || settingIsAll || !!map[funPermissions.setting.app.key],
288
+ children: []
289
+ }];
273
290
  menuFun.push({
274
- describe: funPermissions['standard'].setting.default.describe,
275
- key: funPermissions['standard'].setting.default.key,
276
- checked: isAll || !!map[funPermissions['standard'].setting.default.key],
277
- indeterminate: false,
291
+ describe: funPermissions.setting.default.describe,
292
+ key: funPermissions.setting.default.key,
293
+ checked: isAll || !!map[funPermissions.setting.default.key],
294
+ indeterminate: settingChildren.some(function (item) {
295
+ return item.checked;
296
+ }),
278
297
  disable: false,
279
298
  supportVirtualApp: true,
280
- children: [{
281
- // ...funPermissions['standard'].setting.company,
282
- describe: funPermissions['standard'].setting.company.describe,
283
- key: funPermissions['standard'].setting.company.key,
284
- disable: false,
285
- supportVirtualApp: true,
286
- checked: isAll || settingIsAll || !!map[funPermissions['standard'].setting.company.key],
287
- children: []
288
- }, {
289
- // ...funPermissions['standard'].setting.app,
290
- describe: funPermissions['standard'].setting.app.describe,
291
- key: funPermissions['standard'].setting.app.key,
292
- disable: false,
293
- supportVirtualApp: true,
294
- checked: isAll || settingIsAll || !!map[funPermissions['standard'].setting.app.key],
295
- children: []
296
- }]
299
+ children: settingChildren
297
300
  });
298
301
  var checkedArr = menuFun.filter(function (item) {
299
302
  return item.checked;
@@ -301,11 +304,10 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
301
304
  var indeterminateArr = menuFun.filter(function (item) {
302
305
  return item.indeterminate;
303
306
  });
304
- console.log(menuFun);
305
307
  setFunctionalPermissions({
306
308
  describe: '功能权限',
307
- key: funPermissions['standard'].all.key,
308
- // checked: !!map[funPermissions['standard'].all.key],
309
+ key: funPermissions.all.key,
310
+ // checked: !!map[funPermissions.all.key],
309
311
  checked: checkedArr.length === menuFun.length,
310
312
  disable: false,
311
313
  supportVirtualApp: true,
@@ -327,4 +329,4 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
327
329
  }
328
330
  }));
329
331
  });
330
- export default Info;
332
+ export default AuthConfig;
@@ -10,13 +10,15 @@ 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 } from 'react';
13
+ import React, { useEffect, useState, forwardRef, useImperativeHandle, useContext } from 'react';
14
14
  import './styles/authConfig.less';
15
15
  import constants from './../../../utils/constants';
16
- import funPermissions from './../../../utils/functionalPermissions';
17
16
  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;
20
22
  var _useState = useState({}),
21
23
  _useState2 = _slicedToArray(_useState, 2),
22
24
  dataPermissions = _useState2[0],
@@ -91,7 +93,6 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
91
93
  });
92
94
  }
93
95
  var cepFunAuth = [];
94
- console.log('functionalPermissions', functionalPermissions);
95
96
  functionalPermissions.children && functionalPermissions.children.forEach(function (item) {
96
97
  if (item.checked) {
97
98
  if (item.radio) {
@@ -152,14 +153,11 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
152
153
  allFunConfigList = _CEPData[0],
153
154
  allAppList = _CEPData[1],
154
155
  checkAll = _CEPData[2];
155
- console.log(CEPData);
156
156
  var _ref = checkAll || {},
157
157
  checkAppList = _ref.appList,
158
158
  checkFunConfigList = _ref.funConfig;
159
159
  var dealFunConfigList = dealDateAddChecked(allFunConfigList || [], checkFunConfigList || []);
160
- console.log(JSON.stringify(dealFunConfigList));
161
160
  dealFunConfigList = dealDateAddIndeterminate(dealFunConfigList || [], checkFunConfigList || []);
162
- console.log(JSON.stringify(dealFunConfigList));
163
161
  var checkedFunArr = dealFunConfigList.filter(function (item) {
164
162
  return item.checked;
165
163
  });
@@ -168,8 +166,8 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
168
166
  });
169
167
  setFunctionalPermissions({
170
168
  describe: '功能权限',
171
- key: funPermissions['standard'].all.key,
172
- // checked: !!map[funPermissions['standard'].all.key],
169
+ key: funPermissions.all.key,
170
+ // checked: !!map[funPermissions.all.key],
173
171
  checked: checkedFunArr.length === dealFunConfigList.length,
174
172
  disable: false,
175
173
  supportVirtualApp: true,
@@ -186,7 +184,7 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
186
184
  setDataPermissions({
187
185
  key: 1,
188
186
  describe: '数据权限',
189
- // checked: !!map[funPermissions['standard'].all.key],
187
+ // checked: !!map[funPermissions.all.key],
190
188
  checked: checkedAppArr.length === dealAppConfigList.length,
191
189
  indeterminate: !(checkedAppArr.length === dealAppConfigList.length || !checkedAppArr.length && !indeterminateAppArr.length),
192
190
  children: dealAppConfigList
@@ -50,7 +50,6 @@ var AuthGroup = function AuthGroup(props) {
50
50
  }
51
51
  });
52
52
  var dealObj = dealData(dealGroup);
53
- console.log(dealObj);
54
53
  setGroup(dealObj);
55
54
  onChange && onChange(dealObj);
56
55
  };
@@ -83,7 +83,6 @@ var AuthModule = function AuthModule(props) {
83
83
  });
84
84
  }
85
85
  var dealArr = util.clone(functionGroups);
86
- console.log('ddd');
87
86
  dealArr.forEach(function (item, index) {
88
87
  if (data.radio) {
89
88
  item.checked = checked && !index;
@@ -158,7 +157,6 @@ var AuthModule = function AuthModule(props) {
158
157
  dealData.checked = false;
159
158
  dealData.indeterminate = true;
160
159
  }
161
- console.log('dealData', dealData);
162
160
  onChange && onChange(dealData);
163
161
  };
164
162
  return data ? /*#__PURE__*/React.createElement("div", {
@@ -86,7 +86,6 @@ var multiAuthModule = function multiAuthModule(props) {
86
86
  dealData.checked = false;
87
87
  dealData.indeterminate = true;
88
88
  }
89
- console.log('dealData', dealData);
90
89
  onChange && onChange(dealData);
91
90
  };
92
91
  var onGroupChange = function onGroupChange(e, index, initArr) {
@@ -108,13 +108,10 @@ var Info = function Info(props) {
108
108
  onCancel && onCancel();
109
109
  };
110
110
  var onSaveCallback = function onSaveCallback() {
111
- // if (currentTab === 'io'){
112
- // "funAuth":[{"resource":"/user/userList","opts":["all"]},{"resource":"/user/userGroup","opts":["all"]},{"resource":"/user/userTags","opts":["all"]},{"resource":"/setting/company","opts":["all"]}]
113
111
  var authConfig = serviceType !== 2 ? refAuthConfig.current.getFormData() : {};
114
112
  var groupIdArr = groups.map(function (item) {
115
113
  return item.id;
116
114
  });
117
- console.log(authConfig);
118
115
  if (serviceType === 2) {
119
116
  var dealData = refAuthCEPConfig.current.getFormData();
120
117
  authConfig.dataAuth = dealData.dataAuth;
@@ -186,7 +183,6 @@ var Info = function Info(props) {
186
183
  });
187
184
  if (currentTab === 'cep') {
188
185
  var _authConfig = refAuthCEPConfig.current.getFormData();
189
- console.log(_authConfig);
190
186
  // let groupIdArr = groups.map((item) => {
191
187
  // return item.id;
192
188
  // });
@@ -229,7 +229,6 @@ var CompanySettingUserGroup = function CompanySettingUserGroup(props) {
229
229
  });
230
230
  if (currentTab === 'cep') {
231
231
  var _authConfig = refAuthCEPConfig.current.getFormData();
232
- console.log(_authConfig);
233
232
  // let groupIdArr = groups.map((item) => {
234
233
  // return item.id;
235
234
  // });
@@ -13,7 +13,6 @@ 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';
17
16
  import api from './../../constants/api';
18
17
  import PageLoading from '../../components/pageLoading';
19
18
  import { notification } from 'antd';
@@ -34,7 +33,8 @@ var CompanySetting = function CompanySetting(props) {
34
33
  // #todo 需要修改主应用传入参数和business-lib数据仓库
35
34
  var apisOkNum = 0;
36
35
  var _useContext = useContext(BizGlobalDataContext),
37
- envs = _useContext.envs;
36
+ envs = _useContext.envs,
37
+ getMenuRouterByName = _useContext.getMenuRouterByName;
38
38
  var _ref = envs || {},
39
39
  zgText = _ref.zgText,
40
40
  showVirtualApp = _ref.showVirtualApp,
@@ -217,7 +217,7 @@ var CompanySetting = function CompanySetting(props) {
217
217
  var menusNameMap = {};
218
218
  var formatMenus = function formatMenus(menus) {
219
219
  menus.forEach(function (item) {
220
- item.routeName = util.getMenuRouterByName(item.name);
220
+ item.routeName = getMenuRouterByName(item.name);
221
221
  menusNameMap[item.name] = item;
222
222
  if (item.childrens) {
223
223
  formatMenus(item.childrens);
@@ -545,12 +545,9 @@ var CompanySetting = function CompanySetting(props) {
545
545
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
546
546
  while (1) switch (_context4.prev = _context4.next) {
547
547
  case 0:
548
- console.log('delVirtualAppCallback', res, formData);
549
- // 对外提供的api, 在设置模块-》虚拟应用-》虚拟应用列表页面 删除成功时调用
550
- // 用来处理同步主应用可能需要的刷新的逻辑, 可不传
551
- _context4.next = 3;
548
+ _context4.next = 2;
552
549
  return updateUserAuth(formData);
553
- case 3:
550
+ case 2:
554
551
  getSettingData();
555
552
  settingCallback && settingCallback('settingDelVirtualAppCallback', res);
556
553
  // 与主应用同步信息 下面为老代码逻辑
@@ -590,7 +587,7 @@ var CompanySetting = function CompanySetting(props) {
590
587
  // this.$store.dispatch(actions.user.getCurrentUser)
591
588
  // // 更新应用列表数据
592
589
  // this.$store.dispatch(actions.app.queryAppList)
593
- case 5:
590
+ case 4:
594
591
  case "end":
595
592
  return _context4.stop();
596
593
  }
@@ -174,7 +174,6 @@ var User = function User(props) {
174
174
  });
175
175
  };
176
176
  var showUserEditAuthEvent = function showUserEditAuthEvent(userData) {
177
- console.log('userData', userData);
178
177
  setUserEditAuthState(true);
179
178
  setUserEditAuthData(userData);
180
179
  };
@@ -504,6 +503,7 @@ var User = function User(props) {
504
503
  dataSource: showMembers,
505
504
  columns: columns,
506
505
  total: showMembers.length,
506
+ rowKey: "id",
507
507
  pageSize: showMembers.length / 10
508
508
  }), /*#__PURE__*/React.createElement("div", null, isAdmin ? /*#__PURE__*/React.createElement("div", {
509
509
  style: {
@@ -11,14 +11,13 @@ 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, { useEffect, useState } from 'react';
14
+ import React, { useContext, useEffect, useState } from 'react';
15
15
  import './style/authConfigDetail.less';
16
16
  import constants from './../../../utils/constants';
17
- import functionalPermissions from './../../../utils/functionalPermissions';
18
17
  import { notification } from 'antd';
19
18
  import request from './../../../utils/ajax';
20
19
  import apis from './../../../constants/api';
21
- // const { TextArea } = Input;
20
+ import { BizGlobalDataContext } from '@zgfe/business-lib';
22
21
  var authConfigDetail = function authConfigDetail(props) {
23
22
  var name = props.name,
24
23
  authConfig = props.authConfig,
@@ -28,6 +27,9 @@ var authConfigDetail = function authConfigDetail(props) {
28
27
  groupId = props.groupId,
29
28
  type = props.type,
30
29
  serviceType = props.serviceType;
30
+ var _useContext = useContext(BizGlobalDataContext),
31
+ menusName = _useContext.menusName,
32
+ funPermissions = _useContext.funPermissions;
31
33
  var _useState = useState([]),
32
34
  _useState2 = _slicedToArray(_useState, 2),
33
35
  dataAuth = _useState2[0],
@@ -45,7 +47,6 @@ var authConfigDetail = function authConfigDetail(props) {
45
47
  cepFunConfig = _useState8[0],
46
48
  setCepFunConfig = _useState8[1];
47
49
  // #todo isAdmin 需要添加
48
- // console.log('dsfdsfsdfdsfdsfdsf');
49
50
  useEffect(function () {
50
51
  reworkAppList();
51
52
  reworkFunAuth();
@@ -90,9 +91,7 @@ var authConfigDetail = function authConfigDetail(props) {
90
91
  setCepAppList(appList || []);
91
92
  // 用checked的数据和全部数据进行匹配
92
93
  var dealFunConfigList = dealDateAddChecked(CEPAllFunConfigList || [], funConfig || []);
93
- // console.log(JSON.stringify(dealFunConfigList));
94
94
  dealFunConfigList = dealDateAddIndeterminate(dealFunConfigList || [], funConfig || []);
95
- // console.log(JSON.stringify(dealFunConfigList));
96
95
  dealFunConfigList = dealFunConfigList.filter(function (item) {
97
96
  return item.checked || item.indeterminate;
98
97
  });
@@ -140,7 +139,7 @@ var authConfigDetail = function authConfigDetail(props) {
140
139
  };
141
140
  var loopFormatTopMenu = function loopFormatTopMenu(topMenu) {
142
141
  // 菜单不在权限配置中
143
- if (!functionalPermissions['standard'][topMenu.name]) {
142
+ if (!funPermissions[topMenu.name]) {
144
143
  return null;
145
144
  }
146
145
  var childrenArr = [];
@@ -153,7 +152,7 @@ var authConfigDetail = function authConfigDetail(props) {
153
152
  });
154
153
  }
155
154
  // 智能触达
156
- if (topMenu.name === constants.menusName.market) {
155
+ if (topMenu.name === (menusName === null || menusName === void 0 ? void 0 : menusName.market)) {
157
156
  childrenArr = [{
158
157
  name: {
159
158
  describe: '管理员角色',
@@ -173,7 +172,7 @@ var authConfigDetail = function authConfigDetail(props) {
173
172
  var formatMenu = {
174
173
  name: {
175
174
  describe: topMenu.nametext,
176
- key: functionalPermissions['standard'][topMenu.name].key
175
+ key: funPermissions[topMenu.name].key
177
176
  },
178
177
  show: false,
179
178
  children: childrenArr
@@ -183,21 +182,21 @@ var authConfigDetail = function authConfigDetail(props) {
183
182
  var checkFunPermission = function checkFunPermission(key) {
184
183
  // 检查功能模块权限配置,true为有权限,false无权限
185
184
  if (!key) return false;
186
- if (key === functionalPermissions['standard'].default.key) return true;
185
+ if (key === funPermissions.default.key) return true;
187
186
  var funAuthConfig = authConfig.funAuth;
188
187
  var funAuthKeyArr = funAuthConfig ? funAuthConfig.map(function (item) {
189
188
  return item.resource;
190
189
  }) : [];
191
190
  // 智能触达:管理员、运营人员
192
191
  if (['mkt_admin', 'mkt_ops'].includes(key)) {
193
- var mktKey = functionalPermissions['standard'].market.key;
192
+ var mktKey = funPermissions.market.key;
194
193
  var mktConfig = funAuthConfig && funAuthConfig.find(function (item) {
195
194
  return item.resource === mktKey;
196
195
  });
197
196
  if (!mktConfig) return false;
198
197
  return mktConfig.opts[0] === key;
199
198
  }
200
- if (funAuthKeyArr.includes(functionalPermissions['standard'].all.key)) {
199
+ if (funAuthKeyArr.includes(funPermissions.all.key)) {
201
200
  // 功能权限:全选
202
201
  return true;
203
202
  }
@@ -234,14 +233,14 @@ var authConfigDetail = function authConfigDetail(props) {
234
233
  });
235
234
  // 设置菜单
236
235
  var setting = {
237
- name: functionalPermissions['standard'].setting.default,
236
+ name: funPermissions.setting.default,
238
237
  show: false,
239
238
  children: [{
240
- name: functionalPermissions['standard'].setting.company,
239
+ name: funPermissions.setting.company,
241
240
  show: false,
242
241
  children: []
243
242
  }, {
244
- name: functionalPermissions['standard'].setting.app,
243
+ name: funPermissions.setting.app,
245
244
  show: false,
246
245
  children: []
247
246
  }]
@@ -48,7 +48,6 @@ var Config = function Config(props) {
48
48
  app_id: app_id,
49
49
  event_id: event_id
50
50
  } : null;
51
- console.log('dealData', dealData, index);
52
51
  setConfigData(dealData);
53
52
  };
54
53
  var strMiddleSplit = function strMiddleSplit(str, num) {
@@ -63,7 +62,6 @@ var Config = function Config(props) {
63
62
  return str;
64
63
  };
65
64
  var getSourceAppEventIdArr = function getSourceAppEventIdArr(sourceAppId) {
66
- console.log('sourceAppIdMap', sourceAppIdMap, sourceApps);
67
65
  var sourceData = sourceAppIdMap[sourceAppId] || {};
68
66
  return sourceData.source_event_id || [];
69
67
  };
@@ -74,12 +72,10 @@ var Config = function Config(props) {
74
72
  return item;
75
73
  })))
76
74
  };
77
- console.log(params);
78
75
  selfRequest(api.app.editVirtualApp, {
79
76
  method: 'post',
80
77
  data: params
81
78
  }).then(function (res) {
82
- console.log('res', res);
83
79
  if (res.code === 10001) {
84
80
  notification.success({
85
81
  message: '修改成功!'
@@ -117,7 +117,6 @@ var VirtualApp = function VirtualApp(props) {
117
117
  message: '创建成功'
118
118
  });
119
119
  setStatus('list');
120
- console.log('dsddsdssdsddsds');
121
120
  var dealAuthConfig = util.clone(authConfig);
122
121
  if (!(dealAuthConfig.dataAuth.length === 1 && dealAuthConfig.dataAuth[0].appId === 0)) {
123
122
  dealAuthConfig.dataAuth.unshift({
@@ -161,7 +160,6 @@ var VirtualApp = function VirtualApp(props) {
161
160
  var gotoConfig = function gotoConfig(data) {
162
161
  setSelectApp(data);
163
162
  setIsConfig(true);
164
- console.log(data);
165
163
  };
166
164
  return isConfig && selectApp ? /*#__PURE__*/React.createElement(Config, {
167
165
  sourceApps: sourceApps,
@@ -73,7 +73,6 @@ var VirtualApp = function VirtualApp(props) {
73
73
  message: '删除成功!'
74
74
  });
75
75
  setDeleteDialogShow(false);
76
- console.log('toDelete');
77
76
  var dealAuthConfig = util.clone(authConfig);
78
77
  if (!(dealAuthConfig.dataAuth.length === 1 && dealAuthConfig.dataAuth[0].appId === 0)) {
79
78
  var index = dealAuthConfig.dataAuth.findIndex(function (item) {
@@ -33,7 +33,6 @@ var VirtualApp = function VirtualApp(props) {
33
33
  checkedSelf = _useState8[0],
34
34
  setCheckedSelf = _useState8[1];
35
35
  useEffect(function () {
36
- console.log(sourceEventsId);
37
36
  setChosenDataSource(sourceEventsId);
38
37
  }, []);
39
38
  useEffect(function () {
@@ -94,7 +93,6 @@ var VirtualApp = function VirtualApp(props) {
94
93
  return option.title.indexOf(inputValue) > -1;
95
94
  };
96
95
  var handleChange = function handleChange(targetKeys) {
97
- console.log(targetKeys);
98
96
  setChosenDataSource(targetKeys);
99
97
  onChange(checkedSelf ? targetKeys : null, sourceAppId, checkedSelf);
100
98
  };
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- standard: any;
3
- };
4
- export default _default;
1
+ declare const standard: any;
2
+ export default standard;
@@ -160,6 +160,9 @@ var standard = _objectSpread({
160
160
  userPortrait: {
161
161
  key: '/analysis/user/userPortrait'
162
162
  },
163
+ userJourney: {
164
+ key: '/cxp/userJourney'
165
+ },
163
166
  userTags: {
164
167
  key: '/analysis/user/userTags'
165
168
  },
@@ -219,6 +222,4 @@ var standard = _objectSpread({
219
222
  key: '/cxp/userJourney'
220
223
  }
221
224
  } : {});
222
- export default {
223
- standard: standard
224
- };
225
+ export default standard;
package/es/utils/util.js CHANGED
@@ -581,7 +581,6 @@ var util = {
581
581
  for (var i = 0; i < binaryStr.length; i++) {
582
582
  binaryArray[i] = binaryStr.charCodeAt(i);
583
583
  }
584
- console.log(binaryArray);
585
584
  var blob = new Blob([binaryArray], {
586
585
  type: res.groups.mime
587
586
  });
@@ -641,7 +640,8 @@ var util = {
641
640
  adChannel: 'router-dataAccess-advanced',
642
641
  debug: 'router-dataAccess-debug',
643
642
  dataset: 'router-cdp-dataset',
644
- idmapping: 'router-idMapping-list'
643
+ idmapping: 'router-idMapping-list',
644
+ userJourney: 'router-appUserJourney'
645
645
  };
646
646
  return hash[name] ? hash[name] : 'router-' + name;
647
647
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-settings",
3
- "version": "1.2.4",
3
+ "version": "1.2.6-config.0",
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.50",
41
+ "@zgfe/business-lib": "^1.1.59",
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": "835cfcc1e1f2d5447234ecf114751aa72aaf3719",
54
+ "gitHead": "80a18c40ecb14ed929d3fb5a22343e0ffff7a1c5",
55
55
  "gitHooks": {
56
56
  "pre-commit": "lint-staged"
57
57
  }