@zgfe/modules-settings 1.2.2-node.0 → 1.2.3-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/es/constants/api.js +3 -3
  2. package/es/modules/appSettings/member/index.js +7 -11
  3. package/es/modules/appSettings/member/modal.d.ts +0 -1
  4. package/es/modules/appSettings/member/modal.js +0 -4
  5. package/es/modules/companySetting/edit/authConfig.d.ts +0 -1
  6. package/es/modules/companySetting/edit/authConfig.js +17 -18
  7. package/es/modules/companySetting/edit/authConfigCEP.d.ts +0 -1
  8. package/es/modules/companySetting/edit/authConfigCEP.js +4 -5
  9. package/es/modules/companySetting/edit/user.d.ts +0 -1
  10. package/es/modules/companySetting/edit/user.js +1 -4
  11. package/es/modules/companySetting/edit/userGroup.d.ts +0 -1
  12. package/es/modules/companySetting/edit/userGroup.js +1 -6
  13. package/es/modules/companySetting/index.js +12 -14
  14. package/es/modules/companySetting/user/index.d.ts +0 -1
  15. package/es/modules/companySetting/user/index.js +0 -5
  16. package/es/modules/companySetting/userGroup/authConfigDetail.d.ts +0 -1
  17. package/es/modules/companySetting/userGroup/authConfigDetail.js +8 -9
  18. package/es/modules/companySetting/userGroup/groupItem.d.ts +0 -1
  19. package/es/modules/companySetting/userGroup/groupItem.js +0 -2
  20. package/es/modules/companySetting/userGroup/index.d.ts +0 -1
  21. package/es/modules/companySetting/userGroup/index.js +0 -3
  22. package/es/modules/companySetting/virtualApp/index.js +0 -4
  23. package/es/modules/companySetting/virtualApp/panels/sourceItem.js +1 -1
  24. package/es/modules/systemSetting/notice/index.js +16 -16
  25. package/es/utils/functionalPermissions.d.ts +0 -1
  26. package/es/utils/functionalPermissions.js +5 -207
  27. package/package.json +2 -2
@@ -2,13 +2,13 @@ var apiPrefix = '/analysis/api'; // node服务api接口前缀
2
2
  var apis = {
3
3
  // new
4
4
  user: {
5
- getCurrentUser: apiPrefix + '/common/proxy/company/currentUser.jsp'
5
+ getCurrentUser: '/zg/web/v2/company/currentUser'
6
6
  },
7
7
  app: {
8
8
  queryLeftMenus: apiPrefix + '/common/proxy/index/getLeftMenusByAppId.jsp',
9
9
  deleteApp: apiPrefix + '/common/proxy/user/deleteApp.jsp',
10
10
  createApp: apiPrefix + '/system/createApp',
11
- queryAppList: apiPrefix + '/common/proxy/data/v2ajaxGetDataByApp.jsp',
11
+ queryAppList: '/zg/web/v2/data/v2ajaxGetDataByApp',
12
12
  queryPackageInfo: apiPrefix + '/system/packageInfo',
13
13
  queryVirtualApps: apiPrefix + '/common/proxy/user/sourceApp.jsp',
14
14
  getCompanyAppList: apiPrefix + '/common/proxy/user/getCompanyAppList.jsp',
@@ -47,7 +47,7 @@ var apis = {
47
47
  editNoticeConfig: apiPrefix + '/systemSettings/setNoticeSettings'
48
48
  },
49
49
  eventMeta: {
50
- queryEventMeta: apiPrefix + '/common/proxy/data/queryEventMetasOfGroup.jsp'
50
+ queryEventMeta: '/zg/web/v2/data/queryEventMetasOfGroup'
51
51
  },
52
52
  // 多因子认证
53
53
  mfa: {
@@ -39,16 +39,12 @@ var AppMember = function AppMember() {
39
39
  setLeftMenus = _useState10[1];
40
40
  var _useState11 = useState(false),
41
41
  _useState12 = _slicedToArray(_useState11, 2),
42
- isMarsUi = _useState12[0],
43
- setIsMarsUi = _useState12[1];
44
- var _useState13 = useState(false),
42
+ isModalOpen = _useState12[0],
43
+ setIsModalOpen = _useState12[1];
44
+ var _useState13 = useState({}),
45
45
  _useState14 = _slicedToArray(_useState13, 2),
46
- isModalOpen = _useState14[0],
47
- setIsModalOpen = _useState14[1];
48
- var _useState15 = useState({}),
49
- _useState16 = _slicedToArray(_useState15, 2),
50
- modalData = _useState16[0],
51
- setModalData = _useState16[1];
46
+ modalData = _useState14[0],
47
+ setModalData = _useState14[1];
52
48
  var setingModalhandle = function setingModalhandle(data, dealArr) {
53
49
  setModalData({
54
50
  data: data,
@@ -129,7 +125,8 @@ var AppMember = function AppMember() {
129
125
  request(apis.app.queryAppList, {
130
126
  method: 'get'
131
127
  }).then(function (res) {
132
- setCompanyAppList((res === null || res === void 0 ? void 0 : res.applist) || []);
128
+ var _res$data;
129
+ setCompanyAppList((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.appList) || []);
133
130
  });
134
131
  // 请求左侧菜单
135
132
  request(apis.app.queryLeftMenus, {
@@ -196,7 +193,6 @@ var AppMember = function AppMember() {
196
193
  setIsModalOpen: setIsModalOpen,
197
194
  companyAppList: companyAppList,
198
195
  leftMenus: leftMenus,
199
- isMarsUi: isMarsUi,
200
196
  data: modalData.data,
201
197
  dealArr: modalData.dealArr
202
198
  }));
@@ -7,7 +7,6 @@ declare const SetingModal: React.FC<{
7
7
  data: any;
8
8
  companyAppList: AppListItem[];
9
9
  leftMenus: LeftMenusItem[];
10
- isMarsUi: boolean;
11
10
  dealArr: any;
12
11
  }>;
13
12
  export default SetingModal;
@@ -11,7 +11,6 @@ var SetingModal = function SetingModal(props) {
11
11
  data = props.data,
12
12
  companyAppList = props.companyAppList,
13
13
  leftMenus = props.leftMenus,
14
- isMarsUi = props.isMarsUi,
15
14
  dealArr = props.dealArr;
16
15
  return /*#__PURE__*/React.createElement(Modal, {
17
16
  className: "seting-modal-box",
@@ -30,7 +29,6 @@ var SetingModal = function SetingModal(props) {
30
29
  authConfig: data.authConfig.defaultAuth,
31
30
  companyAppList: companyAppList,
32
31
  leftMenus: leftMenus,
33
- isMarsUi: isMarsUi,
34
32
  id: data.id,
35
33
  type: 1,
36
34
  serviceType: currentUser === null || currentUser === void 0 ? void 0 : currentUser.serviceType
@@ -44,7 +42,6 @@ var SetingModal = function SetingModal(props) {
44
42
  key: item.id,
45
43
  authConfig: item.authConfig,
46
44
  leftMenus: leftMenus,
47
- isMarsUi: isMarsUi,
48
45
  companyAppList: companyAppList,
49
46
  name: item === null || item === void 0 ? void 0 : item.groupName,
50
47
  groupId: item.id,
@@ -57,7 +54,6 @@ var SetingModal = function SetingModal(props) {
57
54
  funAuth: []
58
55
  },
59
56
  leftMenus: leftMenus,
60
- isMarsUi: isMarsUi,
61
57
  companyAppList: companyAppList,
62
58
  name: '',
63
59
  type: 2,
@@ -4,7 +4,6 @@ import { AppListItem, Config, LeftMenusItem } from '../../../types';
4
4
  declare const Info: React.FC<{
5
5
  config: Config;
6
6
  appList: Array<AppListItem>;
7
- isMarsUi: boolean;
8
7
  leftMenus: LeftMenusItem[];
9
8
  ref: any;
10
9
  }>;
@@ -12,7 +12,6 @@ import AuthGroup from './authGroup';
12
12
  var Info = /*#__PURE__*/forwardRef(function (props, ref) {
13
13
  var config = props.config,
14
14
  appList = props.appList,
15
- isMarsUi = props.isMarsUi,
16
15
  leftMenus = props.leftMenus;
17
16
  var _useState = useState({}),
18
17
  _useState2 = _slicedToArray(_useState, 2),
@@ -59,7 +58,7 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
59
58
  console.log('functionalPermissions');
60
59
  if (functionalPermissions.checked) {
61
60
  funAuth.push({
62
- resource: funPermissions[isMarsUi ? 'mars' : 'standard'].all.key,
61
+ resource: funPermissions['standard'].all.key,
63
62
  opts: [constants.functionOpts.all]
64
63
  });
65
64
  functionalPermissions.children && functionalPermissions.children.forEach(function (item) {
@@ -201,7 +200,7 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
201
200
  console.log(map);
202
201
  // 顶部菜单功能权限
203
202
  var loopFormatTopMenu = function loopFormatTopMenu(topMenu, checkAll) {
204
- var menuFunPerConstants = funPermissions[isMarsUi ? 'mars' : 'standard'][topMenu.name];
203
+ var menuFunPerConstants = funPermissions['standard'][topMenu.name];
205
204
  // 菜单不在权限配置中
206
205
  if (!menuFunPerConstants) {
207
206
  return null;
@@ -259,7 +258,7 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
259
258
  return formatMenu;
260
259
  };
261
260
  var menuFun = [];
262
- var isAll = !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].all.key];
261
+ var isAll = !!map[funPermissions['standard'].all.key];
263
262
  console.log('dskfhk', leftMenus);
264
263
  leftMenus.forEach(function (menu) {
265
264
  var topMenuFun = loopFormatTopMenu(menu, isAll);
@@ -270,29 +269,29 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
270
269
  menuFun.push(topMenuFun);
271
270
  }
272
271
  });
273
- var settingIsAll = !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].setting.default.key];
272
+ var settingIsAll = !!map[funPermissions['standard'].setting.default.key];
274
273
  menuFun.push({
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],
274
+ describe: funPermissions['standard'].setting.default.describe,
275
+ key: funPermissions['standard'].setting.default.key,
276
+ checked: isAll || !!map[funPermissions['standard'].setting.default.key],
278
277
  indeterminate: false,
279
278
  disable: false,
280
279
  supportVirtualApp: true,
281
280
  children: [{
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,
281
+ // ...funPermissions['standard'].setting.company,
282
+ describe: funPermissions['standard'].setting.company.describe,
283
+ key: funPermissions['standard'].setting.company.key,
285
284
  disable: false,
286
285
  supportVirtualApp: true,
287
- checked: isAll || settingIsAll || !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].setting.company.key],
286
+ checked: isAll || settingIsAll || !!map[funPermissions['standard'].setting.company.key],
288
287
  children: []
289
288
  }, {
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,
289
+ // ...funPermissions['standard'].setting.app,
290
+ describe: funPermissions['standard'].setting.app.describe,
291
+ key: funPermissions['standard'].setting.app.key,
293
292
  disable: false,
294
293
  supportVirtualApp: true,
295
- checked: isAll || settingIsAll || !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].setting.app.key],
294
+ checked: isAll || settingIsAll || !!map[funPermissions['standard'].setting.app.key],
296
295
  children: []
297
296
  }]
298
297
  });
@@ -305,8 +304,8 @@ var Info = /*#__PURE__*/forwardRef(function (props, ref) {
305
304
  console.log(menuFun);
306
305
  setFunctionalPermissions({
307
306
  describe: '功能权限',
308
- key: funPermissions[isMarsUi ? 'mars' : 'standard'].all.key,
309
- // checked: !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].all.key],
307
+ key: funPermissions['standard'].all.key,
308
+ // checked: !!map[funPermissions['standard'].all.key],
310
309
  checked: checkedArr.length === menuFun.length,
311
310
  disable: false,
312
311
  supportVirtualApp: true,
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import './styles/authConfig.less';
3
3
  import { CheckAll, DataListItem } from '../../../types';
4
4
  declare const AuthConfigCEP: React.FC<{
5
- isMarsUi: boolean;
6
5
  CEPData: [Array<DataListItem>, Array<DataListItem>, CheckAll];
7
6
  ref: any;
8
7
  }>;
@@ -16,8 +16,7 @@ import constants from './../../../utils/constants';
16
16
  import funPermissions from './../../../utils/functionalPermissions';
17
17
  import AuthGroup from './authGroup';
18
18
  var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
19
- var isMarsUi = props.isMarsUi,
20
- CEPData = props.CEPData;
19
+ var CEPData = props.CEPData;
21
20
  var _useState = useState({}),
22
21
  _useState2 = _slicedToArray(_useState, 2),
23
22
  dataPermissions = _useState2[0],
@@ -169,8 +168,8 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
169
168
  });
170
169
  setFunctionalPermissions({
171
170
  describe: '功能权限',
172
- key: funPermissions[isMarsUi ? 'mars' : 'standard'].all.key,
173
- // checked: !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].all.key],
171
+ key: funPermissions['standard'].all.key,
172
+ // checked: !!map[funPermissions['standard'].all.key],
174
173
  checked: checkedFunArr.length === dealFunConfigList.length,
175
174
  disable: false,
176
175
  supportVirtualApp: true,
@@ -187,7 +186,7 @@ var AuthConfigCEP = /*#__PURE__*/forwardRef(function (props, ref) {
187
186
  setDataPermissions({
188
187
  key: 1,
189
188
  describe: '数据权限',
190
- // checked: !!map[funPermissions[isMarsUi ? 'mars' : 'standard'].all.key],
189
+ // checked: !!map[funPermissions['standard'].all.key],
191
190
  checked: checkedAppArr.length === dealAppConfigList.length,
192
191
  indeterminate: !(checkedAppArr.length === dealAppConfigList.length || !checkedAppArr.length && !indeterminateAppArr.length),
193
192
  children: dealAppConfigList
@@ -6,7 +6,6 @@ declare const Info: React.FC<{
6
6
  data: AllMembersItem;
7
7
  allGroupInfos: Array<AllGroupInfosItem>;
8
8
  companyAppList: AppListItem[];
9
- isMarsUi: boolean;
10
9
  leftMenus: LeftMenusItem[];
11
10
  serviceType: number;
12
11
  onCancel: () => void;
@@ -23,7 +23,6 @@ var Info = function Info(props) {
23
23
  data = props.data,
24
24
  allGroupInfos = props.allGroupInfos,
25
25
  companyAppList = props.companyAppList,
26
- isMarsUi = props.isMarsUi,
27
26
  leftMenus = props.leftMenus,
28
27
  serviceType = props.serviceType,
29
28
  onCancel = props.onCancel,
@@ -277,15 +276,13 @@ var Info = function Info(props) {
277
276
  ref: refAuthConfig,
278
277
  config: data.authConfig ? data.authConfig.defaultAuth : {},
279
278
  appList: companyAppList,
280
- isMarsUi: isMarsUi,
281
279
  leftMenus: leftMenus
282
280
  })) : null, !serviceType || serviceType === 2 ? /*#__PURE__*/React.createElement(Tabs.TabPane, {
283
281
  tab: "CEP",
284
282
  key: "cep"
285
283
  }, /*#__PURE__*/React.createElement(AuthConfigCEP, {
286
284
  ref: refAuthCEPConfig,
287
- CEPData: CEPData,
288
- isMarsUi: isMarsUi
285
+ CEPData: CEPData
289
286
  })) : null), /*#__PURE__*/React.createElement("div", {
290
287
  className: "company-setting-footer"
291
288
  }, /*#__PURE__*/React.createElement(Button, {
@@ -6,7 +6,6 @@ declare const CompanySettingUserGroup: React.FC<{
6
6
  data: AllGroupInfosItem | undefined;
7
7
  allGroupInfos: Array<AllGroupInfosItem>;
8
8
  companyAppList: AppListItem[];
9
- isMarsUi: boolean;
10
9
  leftMenus: LeftMenusItem[];
11
10
  isAdmin: boolean;
12
11
  serviceType: number;
@@ -24,7 +24,6 @@ var CompanySettingUserGroup = function CompanySettingUserGroup(props) {
24
24
  data = props.data,
25
25
  allGroupInfos = props.allGroupInfos,
26
26
  companyAppList = props.companyAppList,
27
- isMarsUi = props.isMarsUi,
28
27
  leftMenus = props.leftMenus,
29
28
  isAdmin = props.isAdmin,
30
29
  serviceType = props.serviceType,
@@ -353,17 +352,13 @@ var CompanySettingUserGroup = function CompanySettingUserGroup(props) {
353
352
  ref: refAuthConfig,
354
353
  config: data && data.authConfig || {},
355
354
  appList: companyAppList,
356
- isMarsUi: isMarsUi,
357
355
  leftMenus: leftMenus
358
356
  })) : null, !serviceType || serviceType === 2 ? /*#__PURE__*/React.createElement(Tabs.TabPane, {
359
357
  tab: "CEP",
360
358
  key: "cep"
361
359
  }, /*#__PURE__*/React.createElement(AuthConfigCEP, {
362
360
  ref: refAuthCEPConfig,
363
- CEPData: CEPData,
364
- // config={data.authConfig}
365
- // appList={companyAppList}
366
- isMarsUi: isMarsUi
361
+ CEPData: CEPData
367
362
  })) : null), /*#__PURE__*/React.createElement("div", {
368
363
  className: "company-setting-footer"
369
364
  }, /*#__PURE__*/React.createElement(Button, {
@@ -36,7 +36,6 @@ var CompanySetting = function CompanySetting(props) {
36
36
  envs = _useContext.envs;
37
37
  var _ref = envs || {},
38
38
  zgText = _ref.zgText,
39
- isMarsUi = _ref.isMarsUi,
40
39
  showVirtualApp = _ref.showVirtualApp,
41
40
  showDataDaily = _ref.showDataDaily,
42
41
  ENVIRONMENT = _ref.ENVIRONMENT;
@@ -162,7 +161,8 @@ var CompanySetting = function CompanySetting(props) {
162
161
  request(api.user.getCurrentUser, {
163
162
  method: 'get'
164
163
  }).then(function (res) {
165
- var data = (res || {}).user;
164
+ var _res$data;
165
+ var data = res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.user;
166
166
  if (!data) return;
167
167
  data.isCreator = data.id === data.userId;
168
168
  data.isDemoAccount = data.email === 'demo@zhugeio.com';
@@ -180,16 +180,16 @@ var CompanySetting = function CompanySetting(props) {
180
180
  request(api.app.queryAppList, {
181
181
  method: 'get'
182
182
  }).then(function (res) {
183
- setCompanyAppList(res && res.applist || []);
183
+ setCompanyAppList(res && res.data.appList || []);
184
184
  if (settingCurrentUser && authConfig && authConfig.dataAuth) {
185
185
  var appIds = authConfig.dataAuth.map(function (item) {
186
186
  return item.appId;
187
187
  });
188
188
  if (appIds.includes(0) || isAdmin) {
189
- setAppList(res && res.applist || []);
189
+ setAppList(res && res.data.appList || []);
190
190
  } else {
191
191
  var result = [];
192
- res && res.applist && res.applist.forEach(function (item) {
192
+ res && res.data.appList && res.data.appList.forEach(function (item) {
193
193
  if (appIds.includes(item.id)) {
194
194
  result.push(item);
195
195
  }
@@ -197,7 +197,7 @@ var CompanySetting = function CompanySetting(props) {
197
197
  setAppList(result);
198
198
  }
199
199
  } else {
200
- setAppList(res && res.applist || []);
200
+ setAppList(res && res.data.appList || []);
201
201
  }
202
202
  apisOkNum += 1;
203
203
  setPageReady(apisOkNum);
@@ -640,7 +640,7 @@ var CompanySetting = function CompanySetting(props) {
640
640
  companyName: companyName,
641
641
  changeCompanyNameCallback: changeCompanyNameCallback
642
642
  }),
643
- hidden: isMarsUi
643
+ hidden: false
644
644
  }, {
645
645
  key: 'userGroup',
646
646
  label: '用户组',
@@ -649,13 +649,12 @@ var CompanySetting = function CompanySetting(props) {
649
649
  companyAppList: companyAppList,
650
650
  allGroupInfos: allGroupInfos,
651
651
  leftMenus: leftMenus,
652
- isMarsUi: isMarsUi,
653
652
  isAdmin: isAdmin,
654
653
  delGroupCallback: delGroupCallback,
655
654
  updateGroupAuthCallback: updateGroupAuthCallback,
656
655
  serviceType: serviceType
657
656
  }),
658
- hidden: isMarsUi
657
+ hidden: false
659
658
  }, {
660
659
  key: 'user',
661
660
  label: '用户',
@@ -667,7 +666,6 @@ var CompanySetting = function CompanySetting(props) {
667
666
  companyAppList: companyAppList,
668
667
  allGroupInfos: allGroupInfos,
669
668
  leftMenus: leftMenus,
670
- isMarsUi: isMarsUi,
671
669
  removeUserCallback: removeUserCallback,
672
670
  changeUserAuthCallback: changeUserAuthCallback,
673
671
  createMembersCallback: createMembersCallback,
@@ -675,7 +673,7 @@ var CompanySetting = function CompanySetting(props) {
675
673
  isAdmin: isAdmin,
676
674
  serviceType: serviceType
677
675
  }),
678
- hidden: isMarsUi
676
+ hidden: false
679
677
  }, {
680
678
  key: 'appList',
681
679
  label: '应用',
@@ -696,7 +694,7 @@ var CompanySetting = function CompanySetting(props) {
696
694
  gotoAppPanel: gotoAppPanel,
697
695
  closeCreateCallback: closeCreateCallback
698
696
  }),
699
- hidden: isMarsUi
697
+ hidden: false
700
698
  }, {
701
699
  key: 'virtualApp',
702
700
  label: '虚拟应用',
@@ -709,7 +707,7 @@ var CompanySetting = function CompanySetting(props) {
709
707
  delVirtualAppCallback: delVirtualAppCallback,
710
708
  editVirtualAppCallback: editVirtualAppCallback
711
709
  }),
712
- hidden: !showVirtualApp || isMarsUi
710
+ hidden: !showVirtualApp
713
711
  }, {
714
712
  key: 'cost',
715
713
  label: '套餐',
@@ -718,7 +716,7 @@ var CompanySetting = function CompanySetting(props) {
718
716
  companyAppList: companyAppList,
719
717
  companyId: companyId
720
718
  }),
721
- hidden: isMarsUi
719
+ hidden: false
722
720
  }, {
723
721
  key: 'weChatBinding',
724
722
  label: '微信账号绑定',
@@ -10,7 +10,6 @@ declare const User: React.FC<{
10
10
  groupHashList: GroupHashList;
11
11
  companyAppList: AppListItem[];
12
12
  leftMenus: LeftMenusItem[];
13
- isMarsUi: boolean;
14
13
  isAdmin: boolean;
15
14
  serviceType: number;
16
15
  removeUserCallback: (delIndex: number) => void;
@@ -28,7 +28,6 @@ var User = function User(props) {
28
28
  groupHashList = props.groupHashList,
29
29
  companyAppList = props.companyAppList,
30
30
  leftMenus = props.leftMenus,
31
- isMarsUi = props.isMarsUi,
32
31
  isAdmin = props.isAdmin,
33
32
  serviceType = props.serviceType,
34
33
  removeUserCallback = props.removeUserCallback,
@@ -385,7 +384,6 @@ var User = function User(props) {
385
384
  authConfig: data.authConfig ? data.authConfig.defaultAuth : {},
386
385
  companyAppList: companyAppList,
387
386
  leftMenus: leftMenus,
388
- isMarsUi: isMarsUi,
389
387
  id: data.id,
390
388
  type: 1,
391
389
  serviceType: serviceType
@@ -402,7 +400,6 @@ var User = function User(props) {
402
400
  key: item.id,
403
401
  authConfig: item.authConfig ? item.authConfig : {},
404
402
  leftMenus: leftMenus,
405
- isMarsUi: isMarsUi,
406
403
  companyAppList: companyAppList,
407
404
  name: item.groupName,
408
405
  groupId: item.id,
@@ -415,7 +412,6 @@ var User = function User(props) {
415
412
  funAuth: []
416
413
  },
417
414
  leftMenus: leftMenus,
418
- isMarsUi: isMarsUi,
419
415
  companyAppList: companyAppList,
420
416
  name: '',
421
417
  type: 2,
@@ -471,7 +467,6 @@ var User = function User(props) {
471
467
  onCancel: function onCancel() {
472
468
  return setUserEditAuthState(false);
473
469
  },
474
- isMarsUi: isMarsUi,
475
470
  leftMenus: leftMenus,
476
471
  changeUserAuthCallback: function changeUserAuthCallback(id) {
477
472
  getMenbers();
@@ -6,7 +6,6 @@ declare const authConfigDetail: React.FC<{
6
6
  authConfig: Config;
7
7
  companyAppList: AppListItem[];
8
8
  leftMenus: LeftMenusItem[];
9
- isMarsUi: boolean;
10
9
  id?: number;
11
10
  groupId?: number;
12
11
  type: number;
@@ -24,7 +24,6 @@ var authConfigDetail = function authConfigDetail(props) {
24
24
  authConfig = props.authConfig,
25
25
  companyAppList = props.companyAppList,
26
26
  leftMenus = props.leftMenus,
27
- isMarsUi = props.isMarsUi,
28
27
  id = props.id,
29
28
  groupId = props.groupId,
30
29
  type = props.type,
@@ -141,7 +140,7 @@ var authConfigDetail = function authConfigDetail(props) {
141
140
  };
142
141
  var loopFormatTopMenu = function loopFormatTopMenu(topMenu) {
143
142
  // 菜单不在权限配置中
144
- if (!functionalPermissions[isMarsUi ? 'mars' : 'standard'][topMenu.name]) {
143
+ if (!functionalPermissions['standard'][topMenu.name]) {
145
144
  return null;
146
145
  }
147
146
  var childrenArr = [];
@@ -174,7 +173,7 @@ var authConfigDetail = function authConfigDetail(props) {
174
173
  var formatMenu = {
175
174
  name: {
176
175
  describe: topMenu.nametext,
177
- key: functionalPermissions[isMarsUi ? 'mars' : 'standard'][topMenu.name].key
176
+ key: functionalPermissions['standard'][topMenu.name].key
178
177
  },
179
178
  show: false,
180
179
  children: childrenArr
@@ -184,21 +183,21 @@ var authConfigDetail = function authConfigDetail(props) {
184
183
  var checkFunPermission = function checkFunPermission(key) {
185
184
  // 检查功能模块权限配置,true为有权限,false无权限
186
185
  if (!key) return false;
187
- if (key === functionalPermissions[isMarsUi ? 'mars' : 'standard'].default.key) return true;
186
+ if (key === functionalPermissions['standard'].default.key) return true;
188
187
  var funAuthConfig = authConfig.funAuth;
189
188
  var funAuthKeyArr = funAuthConfig ? funAuthConfig.map(function (item) {
190
189
  return item.resource;
191
190
  }) : [];
192
191
  // 智能触达:管理员、运营人员
193
192
  if (['mkt_admin', 'mkt_ops'].includes(key)) {
194
- var mktKey = functionalPermissions[isMarsUi ? 'mars' : 'standard'].market.key;
193
+ var mktKey = functionalPermissions['standard'].market.key;
195
194
  var mktConfig = funAuthConfig && funAuthConfig.find(function (item) {
196
195
  return item.resource === mktKey;
197
196
  });
198
197
  if (!mktConfig) return false;
199
198
  return mktConfig.opts[0] === key;
200
199
  }
201
- if (funAuthKeyArr.includes(functionalPermissions[isMarsUi ? 'mars' : 'standard'].all.key)) {
200
+ if (funAuthKeyArr.includes(functionalPermissions['standard'].all.key)) {
202
201
  // 功能权限:全选
203
202
  return true;
204
203
  }
@@ -235,14 +234,14 @@ var authConfigDetail = function authConfigDetail(props) {
235
234
  });
236
235
  // 设置菜单
237
236
  var setting = {
238
- name: functionalPermissions[isMarsUi ? 'mars' : 'standard'].setting.default,
237
+ name: functionalPermissions['standard'].setting.default,
239
238
  show: false,
240
239
  children: [{
241
- name: functionalPermissions[isMarsUi ? 'mars' : 'standard'].setting.company,
240
+ name: functionalPermissions['standard'].setting.company,
242
241
  show: false,
243
242
  children: []
244
243
  }, {
245
- name: functionalPermissions[isMarsUi ? 'mars' : 'standard'].setting.app,
244
+ name: functionalPermissions['standard'].setting.app,
246
245
  show: false,
247
246
  children: []
248
247
  }]
@@ -5,7 +5,6 @@ declare const GroupItem: React.FC<{
5
5
  groupData: AllGroupInfosItem;
6
6
  companyAppList: AppListItem[];
7
7
  leftMenus: LeftMenusItem[];
8
- isMarsUi: boolean;
9
8
  serviceType: number;
10
9
  showGroupEditAuthEvent: (data: AllGroupInfosItem) => void;
11
10
  delGroupCallback: (id: number) => void;
@@ -19,7 +19,6 @@ var GroupItem = function GroupItem(props) {
19
19
  var groupData = props.groupData,
20
20
  companyAppList = props.companyAppList,
21
21
  leftMenus = props.leftMenus,
22
- isMarsUi = props.isMarsUi,
23
22
  serviceType = props.serviceType,
24
23
  showGroupEditAuthEvent = props.showGroupEditAuthEvent,
25
24
  delGroupCallback = props.delGroupCallback;
@@ -93,7 +92,6 @@ var GroupItem = function GroupItem(props) {
93
92
  authConfig: groupData.authConfig || {},
94
93
  companyAppList: companyAppList,
95
94
  leftMenus: leftMenus,
96
- isMarsUi: isMarsUi,
97
95
  groupId: groupData.id,
98
96
  type: 2,
99
97
  serviceType: serviceType
@@ -6,7 +6,6 @@ declare const UserGroup: React.FC<{
6
6
  allGroupInfos: AllGroupInfosItem[];
7
7
  companyAppList: AppListItem[];
8
8
  leftMenus: LeftMenusItem[];
9
- isMarsUi: boolean;
10
9
  isAdmin: boolean;
11
10
  serviceType: number;
12
11
  delGroupCallback: (id: number) => void;
@@ -17,7 +17,6 @@ var UserGroup = function UserGroup(props) {
17
17
  allGroupInfos = props.allGroupInfos,
18
18
  companyAppList = props.companyAppList,
19
19
  leftMenus = props.leftMenus,
20
- isMarsUi = props.isMarsUi,
21
20
  isAdmin = props.isAdmin,
22
21
  serviceType = props.serviceType,
23
22
  delGroupCallback = props.delGroupCallback,
@@ -100,7 +99,6 @@ var UserGroup = function UserGroup(props) {
100
99
  leftMenus: leftMenus,
101
100
  isAdmin: isAdmin,
102
101
  id: id,
103
- isMarsUi: isMarsUi,
104
102
  onCancel: function onCancel() {
105
103
  return setGroupEditAuthState(false);
106
104
  },
@@ -137,7 +135,6 @@ var UserGroup = function UserGroup(props) {
137
135
  showGroupEditAuthEvent: showGroupEditAuthEvent,
138
136
  companyAppList: companyAppList,
139
137
  leftMenus: leftMenus,
140
- isMarsUi: isMarsUi,
141
138
  delGroupCallback: delGroupCallback,
142
139
  serviceType: serviceType
143
140
  });
@@ -87,10 +87,6 @@ var VirtualApp = function VirtualApp(props) {
87
87
  setVirtualAppList(list);
88
88
  setVirtualAppsIdMap(idMap);
89
89
  setReady(true);
90
- // context.commit(mutations.virtualApp.updateVirtualApps, {
91
- // list,
92
- // idMap
93
- // })
94
90
  }).catch(function (err) {
95
91
  notification.error({
96
92
  message: '查询虚拟应用失败'
@@ -52,7 +52,7 @@ var VirtualApp = function VirtualApp(props) {
52
52
  selfRequest(api.eventMeta.queryEventMeta, {
53
53
  method: 'post',
54
54
  data: {
55
- app_id: sourceAppId,
55
+ appId: sourceAppId,
56
56
  plat: 0
57
57
  }
58
58
  }).then(function (res) {
@@ -13,10 +13,9 @@ 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 from '../../../utils/ajax';
16
+ import request, { urlRequest } from '../../../utils/ajax';
17
17
  import ConfigItem from './configItem';
18
18
  import ItemEdit from './edit';
19
- import { ajax } from '@zgfe/business-lib';
20
19
  var Notice = function Notice() {
21
20
  var typeMap = new Map([[1, 'email']]);
22
21
  var _useState = useState(new Map().set('email', {
@@ -65,26 +64,27 @@ var Notice = function Notice() {
65
64
  var formData = new FormData();
66
65
  formData.set('type', editSetting.type);
67
66
  formData.set('config', JSON.stringify(values));
68
- ajax(apis.setting.editNoticeConfig, {
67
+ urlRequest(apis.setting.editNoticeConfig, {
69
68
  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 (!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
- });
75
+ if ((res === null || res === void 0 ? void 0 : res.status) === 200) {
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
+ } else {
84
+ notification.error({
85
+ message: '配置失败'
86
+ });
87
+ }
88
88
  });
89
89
  };
90
90
  return /*#__PURE__*/React.createElement("div", null, isEdit ? /*#__PURE__*/React.createElement(ItemEdit, {
@@ -1,5 +1,4 @@
1
1
  declare const _default: {
2
- mars: any;
3
2
  standard: any;
4
3
  };
5
4
  export default _default;
@@ -149,22 +149,19 @@ var standard = _objectSpread({
149
149
  key: '/diypage'
150
150
  },
151
151
  user: {
152
- key: '/user'
152
+ key: '/analysis/user'
153
153
  },
154
- // cep: {
155
- // key: '/cep',
156
- // },
157
154
  userList: {
158
- key: '/user/userList'
155
+ key: '/analysis/user/userList'
159
156
  },
160
157
  userGroup: {
161
- key: '/user/userGroup'
158
+ key: '/analysis/user/userGroup'
162
159
  },
163
160
  userPortrait: {
164
- key: '/user/userPortrait'
161
+ key: '/analysis/user/userPortrait'
165
162
  },
166
163
  userTags: {
167
- key: '/user/userTags'
164
+ key: '/analysis/user/userTags'
168
165
  },
169
166
  // market: {
170
167
  // key: '/market',
@@ -222,205 +219,6 @@ var standard = _objectSpread({
222
219
  key: '/cxp/userJourney'
223
220
  }
224
221
  } : {});
225
- var mars = {
226
- default: {
227
- key: 'default' // 默认权限
228
- },
229
-
230
- all: {
231
- key: '/' // 功能权限
232
- },
233
-
234
- panel: {
235
- key: '/panel'
236
- },
237
- dataPanel: {
238
- key: '/panel/dataPanel'
239
- },
240
- dataview: {
241
- key: '/panel/dataview'
242
- },
243
- analysis: {
244
- key: '/analysis'
245
- },
246
- dataV: {
247
- key: '/panel/dataV'
248
- },
249
- crossScreen: {
250
- key: '/panel/crossScreen'
251
- },
252
- scene: {
253
- key: '/scene'
254
- },
255
- customScene: {
256
- key: '/scene/customScene'
257
- },
258
- userGrowth: {
259
- key: '/scene/userGrowth'
260
- },
261
- basic: {
262
- key: '/analysis/basic'
263
- },
264
- wholeAnalysis: {
265
- key: '/analysis/basic/wholeAnalysis'
266
- },
267
- retention: {
268
- key: '/analysis/basic/retention'
269
- },
270
- source: {
271
- key: '/analysis/source'
272
- },
273
- channel: {
274
- key: '/analysis/source/channel'
275
- },
276
- behavior: {
277
- key: '/analysis/behavior'
278
- },
279
- eventAnalysis: {
280
- key: '/analysis/behavior/eventAnalysis'
281
- },
282
- page: {
283
- key: '/analysis/behavior/page'
284
- },
285
- zgSee: {
286
- key: '/analysis/behavior/zgSee'
287
- },
288
- conversion: {
289
- key: '/analysis/conversion'
290
- },
291
- funnel: {
292
- key: '/analysis/conversion/funnel'
293
- },
294
- pathAnalysis: {
295
- key: '/analysis/conversion/pathAnalysis'
296
- },
297
- revenue: {
298
- key: '/analysis/conversion/revenue'
299
- },
300
- stickiness: {
301
- key: '/analysis/conversion/stickiness'
302
- },
303
- user: {
304
- key: '/analysis/user'
305
- },
306
- cep: {
307
- key: '/analysis/cep'
308
- },
309
- userList: {
310
- key: '/analysis/user/userList'
311
- },
312
- userGroup: {
313
- key: '/analysis/user/userGroup'
314
- },
315
- userPortrait: {
316
- key: '/analysis/user/userPortrait'
317
- },
318
- custom: {
319
- key: '/analysis/custom'
320
- },
321
- diy: {
322
- key: '/analysis/custom/diy'
323
- },
324
- sqlQuery: {
325
- key: '/analysis/custom/sqlQuery'
326
- },
327
- advertisement: {
328
- key: '/advertisement'
329
- },
330
- sem: {
331
- key: '/advertisement/sem'
332
- },
333
- digital: {
334
- key: '/advertisement/digital'
335
- },
336
- landing: {
337
- key: '/advertisement/landing'
338
- },
339
- wechat: {
340
- key: '/wechat'
341
- },
342
- wxWhole: {
343
- key: '/wechat/wxWhole'
344
- },
345
- wxMini: {
346
- key: '/wechat/wxMini'
347
- },
348
- wxMarketing: {
349
- key: '/wechat/wxMarketing'
350
- },
351
- wxFlow: {
352
- key: '/wechat/wxFlow'
353
- },
354
- market: {
355
- key: '/market'
356
- },
357
- manage: {
358
- key: '/manage'
359
- },
360
- dataAccess: {
361
- key: '/manage/dataAccess'
362
- },
363
- guide: {
364
- key: '/manage/dataAccess/guide'
365
- },
366
- adChannel: {
367
- key: '/manage/dataAccess/adChannel'
368
- },
369
- eventTracking: {
370
- key: '/manage/eventTracking'
371
- },
372
- iteration: {
373
- key: '/manage/iteration'
374
- },
375
- debug: {
376
- key: '/manage/iteration/debug'
377
- },
378
- crash: {
379
- key: '/manage/iteration/crash'
380
- },
381
- version: {
382
- key: '/manage/iteration/version'
383
- },
384
- // 开始:zhuge 模块
385
- warning: {
386
- key: '/manage/warning'
387
- },
388
- diypage: {
389
- key: '/diypage'
390
- },
391
- // crossScreen: {
392
- // key: '/panel/crossScreen'
393
- // },
394
- // scene: {
395
- // key: '/scene'
396
- // },
397
- // userGrowth: {
398
- // key: '/scene/userGrowth'
399
- // },
400
- // 结束 :zhuge 模块
401
- config: {
402
- key: '/manage/config'
403
- },
404
- setting: {
405
- default: {
406
- describe: '设置',
407
- key: '/setting'
408
- },
409
- company: {
410
- describe: '公司设置',
411
- key: '/setting/company'
412
- },
413
- app: {
414
- describe: '应用设置',
415
- key: '/setting/app'
416
- },
417
- system: {
418
- describe: '系统设置',
419
- key: '/setting/system'
420
- }
421
- }
422
- };
423
222
  export default {
424
- mars: mars,
425
223
  standard: standard
426
224
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-settings",
3
- "version": "1.2.2-node.0",
3
+ "version": "1.2.3-alpha.1",
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": "791b7dce1b31a2c683d3225e84e0c51106b64b74",
54
+ "gitHead": "b445a1cbce82a1059bd87c069b813ea25452bbab",
55
55
  "gitHooks": {
56
56
  "pre-commit": "lint-staged"
57
57
  }