@zgfe/modules-settings 1.0.1-a.8 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/esm → es}/components/pageLoading/index.d.ts +1 -0
- package/{dist/esm → es}/components/pageLoading/index.js +2 -2
- package/es/components/pageLoading/index.less +7 -0
- package/es/components/settingTabs/demo/index.d.ts +3 -0
- package/es/components/settingTabs/demo/index.js +20 -0
- package/{dist/esm → es}/components/settingTabs/index.d.ts +4 -5
- package/{dist/esm → es}/components/settingTabs/index.js +61 -10
- package/{dist/esm → es}/components/settingTabs/index.less +16 -7
- package/es/components/settingTabs/types.d.ts +7 -0
- package/es/components/settingTabs/types.js +1 -0
- package/{dist/esm → es}/constants/api.d.ts +3 -0
- package/{dist/esm → es}/constants/api.js +4 -3
- package/{dist/esm → es}/constants/icons/iconfont.js +0 -0
- package/es/index.js +4 -0
- package/{dist/esm → es}/modules/appSettings/appInfo/index.js +41 -23
- package/{dist/esm → es}/modules/appSettings/dataAccessFilter/index.js +8 -9
- package/{dist/esm/modules/personalSetting → es/modules/appSettings}/index.d.ts +0 -1
- package/es/modules/appSettings/index.js +52 -0
- package/{dist/esm → es}/modules/appSettings/member/index.js +44 -54
- package/{dist/esm → es}/modules/appSettings/virtualSource/index.js +30 -36
- package/{dist/esm → es}/modules/appSettings/virtualSource/styles/table.less +1 -1
- package/es/modules/companySetting/appList/index.d.ts +21 -0
- package/{dist/esm → es}/modules/companySetting/appList/index.js +40 -31
- package/{dist/esm → es}/modules/companySetting/appList/index.less +1 -8
- package/es/modules/companySetting/cost/index.d.ts +9 -0
- package/{dist/esm → es}/modules/companySetting/cost/index.js +6 -6
- package/{dist/esm → es}/modules/companySetting/cost/index.less +1 -1
- package/es/modules/companySetting/cost/types.d.ts +63 -0
- package/es/modules/companySetting/cost/types.js +1 -0
- package/es/modules/companySetting/edit/authConfig.d.ts +11 -0
- package/{dist/esm → es}/modules/companySetting/edit/authConfig.js +15 -14
- package/{dist/esm → es}/modules/companySetting/edit/authConfigCEP.d.ts +3 -5
- package/{dist/esm → es}/modules/companySetting/edit/authConfigCEP.js +18 -68
- package/{dist/esm → es}/modules/companySetting/edit/authGroup.d.ts +2 -1
- package/{dist/esm → es}/modules/companySetting/edit/authGroup.js +9 -10
- package/es/modules/companySetting/edit/authModule.d.ts +8 -0
- package/{dist/esm → es}/modules/companySetting/edit/authModule.js +12 -18
- package/{dist/esm → es}/modules/companySetting/edit/multiAuthModule.d.ts +3 -2
- package/{dist/esm → es}/modules/companySetting/edit/multiAuthModule.js +9 -17
- package/es/modules/companySetting/edit/user.d.ts +15 -0
- package/{dist/esm → es}/modules/companySetting/edit/user.js +60 -53
- package/es/modules/companySetting/edit/userGroup.d.ts +16 -0
- package/{dist/esm → es}/modules/companySetting/edit/userGroup.js +78 -73
- package/es/modules/companySetting/index.d.ts +11 -0
- package/es/modules/companySetting/index.js +740 -0
- package/{dist/esm → es}/modules/companySetting/info/index.d.ts +3 -3
- package/{dist/esm → es}/modules/companySetting/info/index.js +8 -5
- package/{dist/esm → es}/modules/companySetting/info/index.less +1 -1
- package/{dist/esm → es}/modules/companySetting/style/common.less +3 -3
- package/es/modules/companySetting/style/reset.less +117 -0
- package/es/modules/companySetting/user/index.d.ts +21 -0
- package/{dist/esm → es}/modules/companySetting/user/index.js +62 -64
- package/{dist/esm → es}/modules/companySetting/user/index.less +8 -8
- package/es/modules/companySetting/user/invite.d.ts +15 -0
- package/{dist/esm → es}/modules/companySetting/user/invite.js +8 -12
- package/es/modules/companySetting/userGroup/authConfigDetail.d.ts +15 -0
- package/{dist/esm → es}/modules/companySetting/userGroup/authConfigDetail.js +62 -82
- package/es/modules/companySetting/userGroup/groupItem.d.ts +13 -0
- package/{dist/esm → es}/modules/companySetting/userGroup/groupItem.js +11 -11
- package/es/modules/companySetting/userGroup/index.d.ts +15 -0
- package/{dist/esm → es}/modules/companySetting/userGroup/index.js +9 -8
- package/{dist/esm → es}/modules/companySetting/userGroup/style/index.less +1 -1
- package/es/modules/companySetting/virtualApp/config.d.ts +12 -0
- package/{dist/esm → es}/modules/companySetting/virtualApp/config.js +7 -7
- package/es/modules/companySetting/virtualApp/index.d.ts +15 -0
- package/{dist/esm → es}/modules/companySetting/virtualApp/index.js +12 -14
- package/es/modules/companySetting/virtualApp/panels/list.d.ts +15 -0
- package/{dist/esm → es}/modules/companySetting/virtualApp/panels/list.js +10 -10
- package/es/modules/companySetting/virtualApp/panels/sourceItem.d.ts +10 -0
- package/{dist/esm → es}/modules/companySetting/virtualApp/panels/sourceItem.js +4 -6
- package/{dist/esm → es}/modules/companySetting/virtualApp/styles/config.less +2 -1
- package/{dist/esm → es}/modules/companySetting/virtualApp/styles/index.less +1 -1
- package/{dist/esm → es}/modules/companySetting/virtualApp/styles/table.less +1 -1
- package/{dist/esm → es}/modules/companySetting/wechatBinding/index.js +11 -11
- package/{dist/esm → es}/modules/companySetting/wechatBinding/index.less +1 -1
- package/es/modules/personalSetting/images/banner.png +0 -0
- package/es/modules/personalSetting/images/unbinding.png +0 -0
- package/{dist/esm/modules/appSettings → es/modules/personalSetting}/index.d.ts +0 -1
- package/es/modules/personalSetting/index.js +40 -0
- package/{dist/esm → es}/modules/personalSetting/info/index.js +10 -10
- package/{dist/esm → es}/modules/personalSetting/reset/index.js +39 -39
- package/es/modules/personalSetting/styles/unbinding.less +73 -0
- package/es/modules/personalSetting/unbinding/index.d.ts +4 -0
- package/es/modules/personalSetting/unbinding/index.js +104 -0
- package/{dist/esm → es}/modules/systemSetting/index.d.ts +0 -1
- package/{dist/esm → es}/modules/systemSetting/index.js +8 -4
- package/es/modules/systemSetting/notice/configItem/index.d.ts +8 -0
- package/{dist/esm → es}/modules/systemSetting/notice/configItem/index.js +5 -5
- package/{dist/esm → es}/modules/systemSetting/notice/edit/index.d.ts +2 -8
- package/{dist/esm → es}/modules/systemSetting/notice/edit/index.js +29 -22
- package/es/modules/systemSetting/notice/index.d.ts +9 -0
- package/{dist/esm → es}/modules/systemSetting/notice/index.js +12 -11
- package/es/types/app.d.ts +140 -0
- package/es/types/app.js +1 -0
- package/es/types/companySetting.d.ts +199 -0
- package/es/types/companySetting.js +1 -0
- package/es/types/index.d.ts +4 -0
- package/es/types/index.js +4 -0
- package/es/types/personal.d.ts +21 -0
- package/es/types/personal.js +1 -0
- package/es/types/system.d.ts +38 -0
- package/es/types/system.js +1 -0
- package/{dist/esm → es}/utils/constants.js +0 -64
- package/{dist/esm → es}/utils/functionalPermissions.js +0 -1
- package/package.json +7 -7
- package/dist/esm/components/pageLoading/index.less +0 -11
- package/dist/esm/constants/styles/base.sass +0 -9
- package/dist/esm/constants/styles/cleverUI.css +0 -7
- package/dist/esm/constants/styles/constants.sass +0 -60
- package/dist/esm/constants/styles/customUITheme.sass +0 -54
- package/dist/esm/constants/styles/reset.sass +0 -61
- package/dist/esm/index.js +0 -4
- package/dist/esm/modules/appSettings/demo/index.d.ts +0 -3
- package/dist/esm/modules/appSettings/demo/index.js +0 -6
- package/dist/esm/modules/appSettings/index.js +0 -88
- package/dist/esm/modules/appSettings/index.less +0 -21
- package/dist/esm/modules/companySetting/appList/index.d.ts +0 -21
- package/dist/esm/modules/companySetting/cost/index.d.ts +0 -8
- package/dist/esm/modules/companySetting/edit/authConfig.d.ts +0 -10
- package/dist/esm/modules/companySetting/edit/authModule.d.ts +0 -7
- package/dist/esm/modules/companySetting/edit/user.d.ts +0 -14
- package/dist/esm/modules/companySetting/edit/userGroup.d.ts +0 -15
- package/dist/esm/modules/companySetting/index.d.ts +0 -14
- package/dist/esm/modules/companySetting/index.js +0 -718
- package/dist/esm/modules/companySetting/user/index.d.ts +0 -19
- package/dist/esm/modules/companySetting/user/invite.d.ts +0 -10
- package/dist/esm/modules/companySetting/userGroup/authConfigDetail.d.ts +0 -16
- package/dist/esm/modules/companySetting/userGroup/groupItem.d.ts +0 -11
- package/dist/esm/modules/companySetting/userGroup/index.d.ts +0 -14
- package/dist/esm/modules/companySetting/virtualApp/config.d.ts +0 -11
- package/dist/esm/modules/companySetting/virtualApp/index.d.ts +0 -12
- package/dist/esm/modules/companySetting/virtualApp/panels/list.d.ts +0 -12
- package/dist/esm/modules/companySetting/virtualApp/panels/sourceItem.d.ts +0 -10
- package/dist/esm/modules/personalSetting/index.js +0 -62
- package/dist/esm/modules/personalSetting/index.less +0 -2
- package/dist/esm/modules/systemSetting/index.less +0 -2
- package/dist/esm/modules/systemSetting/notice/configItem/index.d.ts +0 -7
- package/dist/esm/modules/systemSetting/notice/index.d.ts +0 -3
- /package/{dist/esm → es}/components/demo.d.ts +0 -0
- /package/{dist/esm → es}/components/demo.js +0 -0
- /package/{dist/esm → es}/constants/icons/demo.css +0 -0
- /package/{dist/esm → es}/constants/icons/demo_index.html +0 -0
- /package/{dist/esm → es}/constants/icons/iconfont.css +0 -0
- /package/{dist/esm → es}/constants/icons/iconfont.json +0 -0
- /package/{dist/esm → es}/constants/icons/iconfont.ttf +0 -0
- /package/{dist/esm → es}/constants/icons/iconfont.woff +0 -0
- /package/{dist/esm → es}/constants/icons/iconfont.woff2 +0 -0
- /package/{dist/esm → es}/global.d.ts +0 -0
- /package/{dist/esm → es}/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/appSettings/appInfo/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/appSettings/dataAccessFilter/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/appSettings/dataAccessFilter/index.less +0 -0
- /package/{dist/esm → es}/modules/appSettings/member/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/appSettings/secretKey/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/appSettings/secretKey/index.js +0 -0
- /package/{dist/esm → es}/modules/appSettings/virtualSource/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/appSettings/virtualSource/styles/index.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/edit/styles/authConfig.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/edit/styles/authGroup.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/edit/styles/authModule.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/edit/styles/user.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/edit/styles/userGroup.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/index.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/userGroup/index.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/userGroup/style/authConfigDetail.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/virtualApp/styles/list.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/virtualApp/styles/sourceItem.less +0 -0
- /package/{dist/esm → es}/modules/companySetting/wechatBinding/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/personalSetting/info/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/personalSetting/reset/index.d.ts +0 -0
- /package/{dist/esm → es}/modules/systemSetting/notice/configItem/index.less +0 -0
- /package/{dist/esm → es}/modules/systemSetting/notice/edit/index.less +0 -0
- /package/{dist/esm → es}/utils/ajax.d.ts +0 -0
- /package/{dist/esm → es}/utils/ajax.js +0 -0
- /package/{dist/esm → es}/utils/base64.d.ts +0 -0
- /package/{dist/esm → es}/utils/base64.js +0 -0
- /package/{dist/esm → es}/utils/constants.d.ts +0 -0
- /package/{dist/esm → es}/utils/functionalPermissions.d.ts +0 -0
- /package/{dist/esm → es}/utils/util.d.ts +0 -0
- /package/{dist/esm → es}/utils/util.js +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Spin } from 'antd';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import './index.less';
|
|
4
4
|
var PageLoading = function PageLoading() {
|
|
5
5
|
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
-
className:
|
|
6
|
+
className: "settings-page-loading"
|
|
7
7
|
}, /*#__PURE__*/React.createElement(Spin, {
|
|
8
8
|
size: "large"
|
|
9
9
|
}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import SettingTabs from '..';
|
|
3
|
+
var SettingTabsDemo = function SettingTabsDemo() {
|
|
4
|
+
var title = /*#__PURE__*/React.createElement("div", null, "\u6807\u9898");
|
|
5
|
+
var items = [{
|
|
6
|
+
key: '1',
|
|
7
|
+
label: 'tab 1',
|
|
8
|
+
content: 'tab 1 content'
|
|
9
|
+
}, {
|
|
10
|
+
key: '2',
|
|
11
|
+
label: 'tab 2',
|
|
12
|
+
content: 'tab 2 content'
|
|
13
|
+
}];
|
|
14
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SettingTabs, {
|
|
15
|
+
typeName: "demo",
|
|
16
|
+
title: title,
|
|
17
|
+
items: items
|
|
18
|
+
}));
|
|
19
|
+
};
|
|
20
|
+
export default SettingTabsDemo;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
|
-
|
|
4
|
-
key: string;
|
|
5
|
-
label: string;
|
|
6
|
-
content: JSX.Element;
|
|
7
|
-
}
|
|
3
|
+
import { ISettingTabsItem } from './types';
|
|
8
4
|
declare const SettingTabs: React.FC<{
|
|
5
|
+
typeName: string;
|
|
9
6
|
items: ISettingTabsItem[];
|
|
10
7
|
title: JSX.Element;
|
|
8
|
+
currentKey?: string;
|
|
9
|
+
onClick?: (key: string[]) => void;
|
|
11
10
|
}>;
|
|
12
11
|
export default SettingTabs;
|
|
@@ -8,29 +8,79 @@ import React, { useState } from 'react';
|
|
|
8
8
|
import Sider from 'antd/lib/layout/Sider';
|
|
9
9
|
import Layout, { Content } from 'antd/lib/layout/layout';
|
|
10
10
|
import { Menu } from 'antd';
|
|
11
|
-
import
|
|
11
|
+
import { useEffect } from 'react';
|
|
12
|
+
import './index.less';
|
|
13
|
+
var LOCAL_TAB_INFO = 'modules-setting-component-settingTabs-tabInfo';
|
|
12
14
|
var SettingTabs = function SettingTabs(props) {
|
|
13
|
-
var _items$;
|
|
14
15
|
var title = props.title,
|
|
15
|
-
items = props.items
|
|
16
|
+
items = props.items,
|
|
17
|
+
_props$typeName = props.typeName,
|
|
18
|
+
typeName = _props$typeName === void 0 ? '' : _props$typeName,
|
|
19
|
+
_props$currentKey = props.currentKey,
|
|
20
|
+
currentKey = _props$currentKey === void 0 ? '' : _props$currentKey,
|
|
21
|
+
onClick = props.onClick;
|
|
16
22
|
var filterItems = items.filter(function (item) {
|
|
17
23
|
return !item.hidden;
|
|
18
24
|
});
|
|
19
|
-
var _useState = useState([
|
|
25
|
+
var _useState = useState([currentKey]),
|
|
20
26
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
27
|
selectedKeys = _useState2[0],
|
|
22
28
|
setSelectedKeys = _useState2[1];
|
|
23
29
|
var selectedContent = function selectedContent() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
if (selectedKeys[0]) {
|
|
31
|
+
var index = items.findIndex(function (item) {
|
|
32
|
+
return item.key === selectedKeys[0];
|
|
33
|
+
});
|
|
34
|
+
if (index > 0) {
|
|
35
|
+
return items[index].content;
|
|
36
|
+
} else {
|
|
37
|
+
return items[0].content;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
29
40
|
};
|
|
30
41
|
// 菜单点击
|
|
31
42
|
var menuClick = function menuClick(_ref) {
|
|
32
43
|
var key = _ref.key;
|
|
33
44
|
setSelectedKeys([key]);
|
|
45
|
+
onClick && onClick([key]);
|
|
46
|
+
};
|
|
47
|
+
// 缓存中typeName与传入typeName不一致时清空缓存
|
|
48
|
+
useEffect(function () {
|
|
49
|
+
var localTypeName = getLocalTabInfoParams('typeName');
|
|
50
|
+
if (localTypeName !== typeName) {
|
|
51
|
+
localStorage.removeItem(LOCAL_TAB_INFO);
|
|
52
|
+
}
|
|
53
|
+
}, []);
|
|
54
|
+
useEffect(function () {
|
|
55
|
+
setSelectedKeys([props.currentKey || '']);
|
|
56
|
+
}, [props.currentKey]);
|
|
57
|
+
// 强刷时记住当前tab选项
|
|
58
|
+
useEffect(function () {
|
|
59
|
+
var currentKey = getLocalTabInfoParams('key');
|
|
60
|
+
var selectedKey = selectedKeys[0];
|
|
61
|
+
if (currentKey && !selectedKey) {
|
|
62
|
+
setSelectedKeys([currentKey]);
|
|
63
|
+
} else if (!currentKey && !selectedKey) {
|
|
64
|
+
setSelectedKeys([filterItems[0].key]);
|
|
65
|
+
} else {
|
|
66
|
+
setLocalTabInfo(selectedKey);
|
|
67
|
+
}
|
|
68
|
+
}, [selectedKeys]);
|
|
69
|
+
// 从localStorage中获取tabInfo的参数
|
|
70
|
+
var getLocalTabInfoParams = function getLocalTabInfoParams(name) {
|
|
71
|
+
var tabInfo = localStorage.getItem(LOCAL_TAB_INFO);
|
|
72
|
+
if (tabInfo) {
|
|
73
|
+
return JSON.parse(tabInfo)[name];
|
|
74
|
+
} else {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
// 将tabInfo存到localStorage中
|
|
79
|
+
var setLocalTabInfo = function setLocalTabInfo(key) {
|
|
80
|
+
localStorage.setItem(LOCAL_TAB_INFO, JSON.stringify({
|
|
81
|
+
key: key,
|
|
82
|
+
typeName: typeName
|
|
83
|
+
}));
|
|
34
84
|
};
|
|
35
85
|
return /*#__PURE__*/React.createElement("div", {
|
|
36
86
|
className: "settings-container"
|
|
@@ -40,7 +90,8 @@ var SettingTabs = function SettingTabs(props) {
|
|
|
40
90
|
className: "settings-sider"
|
|
41
91
|
}, /*#__PURE__*/React.createElement(Menu, {
|
|
42
92
|
style: {
|
|
43
|
-
width: 200
|
|
93
|
+
width: 200,
|
|
94
|
+
padding: '4px 0px'
|
|
44
95
|
},
|
|
45
96
|
selectedKeys: selectedKeys,
|
|
46
97
|
items: filterItems,
|
|
@@ -1,23 +1,32 @@
|
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
+
|
|
1
3
|
.settings-container {
|
|
2
4
|
padding: 24px;
|
|
3
5
|
background: #f0f2f5;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
.tab-header {
|
|
7
|
+
font-size: 18px;
|
|
8
|
+
.tab-header-title {
|
|
9
|
+
margin-left: 8px;
|
|
10
|
+
}
|
|
11
|
+
.app-name {
|
|
12
|
+
font-weight: normal;
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
}
|
|
8
15
|
}
|
|
9
16
|
|
|
10
17
|
.settings-layout {
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
display: flex;
|
|
19
|
+
height: calc(100vh - 130px);
|
|
13
20
|
padding: 24px 0px 24px;
|
|
14
21
|
|
|
15
22
|
.settings-sider {
|
|
23
|
+
display: contents;
|
|
16
24
|
background: white;
|
|
17
25
|
}
|
|
18
26
|
|
|
19
27
|
.settings-content {
|
|
20
|
-
|
|
28
|
+
flex: auto;
|
|
29
|
+
max-width: 912px;
|
|
21
30
|
margin-left: 24px;
|
|
22
31
|
padding: 40px;
|
|
23
32
|
overflow: auto;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,11 +11,8 @@ var apis = {
|
|
|
11
11
|
queryAppList: apiPrefix + '/common/proxy/data/v2ajaxGetDataByApp.jsp',
|
|
12
12
|
queryPackageInfo: apiPrefix + '/system/packageInfo',
|
|
13
13
|
queryVirtualApps: apiPrefix + '/common/proxy/user/sourceApp.jsp',
|
|
14
|
-
// 查询虚拟应用列表
|
|
15
14
|
getCompanyAppList: apiPrefix + '/common/proxy/user/getCompanyAppList.jsp',
|
|
16
|
-
// 查询公司下所有应用列表
|
|
17
15
|
editVirtualApp: apiPrefix + '/common/proxy/user/editDataSource.jsp',
|
|
18
|
-
// 修改虚拟应用
|
|
19
16
|
queryAccountEvents: apiPrefix + '/common/proxy/contract/v2queryAccountEvent.jsp',
|
|
20
17
|
editVirtualSourceApp: apiPrefix + '/common/proxy/user/editSourceApp.jsp' // 修改虚拟应用的来源应用配置
|
|
21
18
|
},
|
|
@@ -51,6 +48,10 @@ var apis = {
|
|
|
51
48
|
},
|
|
52
49
|
eventMeta: {
|
|
53
50
|
queryEventMeta: apiPrefix + '/common/proxy/data/queryEventMetasOfGroup.jsp'
|
|
51
|
+
},
|
|
52
|
+
// 多因子认证
|
|
53
|
+
mfa: {
|
|
54
|
+
resetMfa: '/user/v2resetMfa.jsp'
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
57
|
export default apis;
|
|
File without changes
|
package/es/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as CompanySetting } from './modules/companySetting';
|
|
2
|
+
export { default as PersonalSetting } from './modules/personalSetting';
|
|
3
|
+
export { default as AppSettings } from './modules/appSettings';
|
|
4
|
+
export { default as SystemSetting } from './modules/systemSetting';
|
|
@@ -4,21 +4,22 @@ 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
|
-
// 缺少环境配置:SHOW_APP_ACCOUNT(备注)
|
|
8
|
-
// 缺少isVirtualApp
|
|
9
7
|
import React, { useContext } from 'react';
|
|
10
8
|
import { Button, Form, Input, notification } from 'antd';
|
|
11
9
|
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
12
|
-
import { urlRequest } from
|
|
13
|
-
import apis from
|
|
10
|
+
import { urlRequest } from '../../../utils/ajax';
|
|
11
|
+
import apis from '../../../constants/api';
|
|
14
12
|
import { useState } from 'react';
|
|
15
|
-
import constants from
|
|
16
|
-
var AppInfo = function AppInfo(
|
|
17
|
-
var settingsCallback =
|
|
13
|
+
import constants from '../../../utils/constants';
|
|
14
|
+
var AppInfo = function AppInfo(_ref) {
|
|
15
|
+
var settingsCallback = _ref.settingsCallback;
|
|
18
16
|
var _useContext = useContext(BizGlobalDataContext),
|
|
19
|
-
currentApp = _useContext.currentApp
|
|
17
|
+
currentApp = _useContext.currentApp,
|
|
18
|
+
envs = _useContext.envs;
|
|
19
|
+
var showAppAccount = envs === null || envs === void 0 ? void 0 : envs.showAppAccount;
|
|
20
20
|
var _useState = useState({
|
|
21
|
-
appName: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appName
|
|
21
|
+
appName: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appName,
|
|
22
|
+
appAccount: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appAccount
|
|
22
23
|
}),
|
|
23
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24
25
|
initialValues = _useState2[0],
|
|
@@ -30,39 +31,44 @@ var AppInfo = function AppInfo(props) {
|
|
|
30
31
|
var _Form$useForm = Form.useForm(),
|
|
31
32
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
32
33
|
form = _Form$useForm2[0];
|
|
33
|
-
|
|
34
34
|
// 保存
|
|
35
35
|
var onSubmit = function onSubmit(value) {
|
|
36
36
|
setLoading(true);
|
|
37
|
-
var appName = value.appName
|
|
37
|
+
var appName = value.appName,
|
|
38
|
+
appAccount = value.appAccount;
|
|
39
|
+
var data = {
|
|
40
|
+
app_name: appName,
|
|
41
|
+
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
42
|
+
};
|
|
43
|
+
if (showAppAccount) {
|
|
44
|
+
data.app_account = appAccount;
|
|
45
|
+
}
|
|
38
46
|
urlRequest(apis.setting.updateAppName, {
|
|
39
47
|
method: 'post',
|
|
40
|
-
data:
|
|
41
|
-
app_name: appName,
|
|
42
|
-
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
43
|
-
}
|
|
48
|
+
data: data
|
|
44
49
|
}).then(function (res) {
|
|
45
|
-
if (res.flag === 101) {
|
|
50
|
+
if ((res === null || res === void 0 ? void 0 : res.flag) === 101) {
|
|
46
51
|
notification.success({
|
|
47
52
|
message: '更改成功'
|
|
48
53
|
});
|
|
49
54
|
// 重置表单
|
|
50
55
|
setInitialValues({
|
|
51
|
-
appName: appName
|
|
56
|
+
appName: appName,
|
|
57
|
+
appAccount: appAccount
|
|
52
58
|
});
|
|
53
59
|
form.resetFields();
|
|
54
60
|
// 主应用更新appList
|
|
55
61
|
settingsCallback('updateAppList');
|
|
56
|
-
} else if (res.flag === -102) {
|
|
62
|
+
} else if ((res === null || res === void 0 ? void 0 : res.flag) === -102) {
|
|
57
63
|
notification.error({
|
|
58
64
|
message: '开发者角色无权限修改'
|
|
59
65
|
});
|
|
60
|
-
} else if (res.flag === 202) {
|
|
66
|
+
} else if ((res === null || res === void 0 ? void 0 : res.flag) === 202) {
|
|
61
67
|
notification.error({
|
|
62
68
|
message: '应用名称已存在'
|
|
63
69
|
});
|
|
64
70
|
}
|
|
65
|
-
}).catch(function (
|
|
71
|
+
}).catch(function () {
|
|
66
72
|
notification.error({
|
|
67
73
|
message: '修改失败,请重试'
|
|
68
74
|
});
|
|
@@ -90,15 +96,27 @@ var AppInfo = function AppInfo(props) {
|
|
|
90
96
|
}]
|
|
91
97
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
92
98
|
placeholder: "\u59D3\u540D"
|
|
93
|
-
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
99
|
+
})), showAppAccount ? /*#__PURE__*/React.createElement(Form.Item, {
|
|
100
|
+
label: "\u5907\u6CE8",
|
|
101
|
+
name: "appAccount",
|
|
102
|
+
rules: [{
|
|
103
|
+
required: true,
|
|
104
|
+
message: '请输入应用名称'
|
|
105
|
+
}, {
|
|
106
|
+
pattern: constants.regExp.teamAndAppName,
|
|
107
|
+
message: '请输入1~20位字符'
|
|
108
|
+
}]
|
|
109
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
110
|
+
placeholder: "\u8BF7\u586B\u5199\u5907\u6CE8"
|
|
111
|
+
})) : '', /*#__PURE__*/React.createElement(Form.Item, {
|
|
94
112
|
shouldUpdate: true
|
|
95
113
|
}, function () {
|
|
96
114
|
return /*#__PURE__*/React.createElement(Button, {
|
|
97
115
|
type: "primary",
|
|
98
116
|
htmlType: "submit",
|
|
99
117
|
loading: loading,
|
|
100
|
-
disabled: !form.isFieldTouched('appName') || !!form.getFieldsError().filter(function (
|
|
101
|
-
var errors =
|
|
118
|
+
disabled: !form.isFieldTouched('appName') || !!form.getFieldsError().filter(function (_ref2) {
|
|
119
|
+
var errors = _ref2.errors;
|
|
102
120
|
return errors.length;
|
|
103
121
|
}).length || JSON.stringify(initialValues) === JSON.stringify(form.getFieldsValue())
|
|
104
122
|
}, "\u4FDD\u5B58");
|
|
@@ -7,11 +7,11 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import React, { useEffect, useState } from 'react';
|
|
8
8
|
import { Button, Form, Input, notification } from 'antd';
|
|
9
9
|
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
10
|
-
import { urlRequest } from
|
|
11
|
-
import apis from
|
|
10
|
+
import { urlRequest } from '../../../utils/ajax';
|
|
11
|
+
import apis from '../../../constants/api';
|
|
12
12
|
import { useContext } from 'react';
|
|
13
13
|
var TextArea = Input.TextArea;
|
|
14
|
-
import
|
|
14
|
+
import './index.less';
|
|
15
15
|
var AppDataAccessFilter = function AppDataAccessFilter() {
|
|
16
16
|
var _useState = useState({}),
|
|
17
17
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -34,9 +34,10 @@ var AppDataAccessFilter = function AppDataAccessFilter() {
|
|
|
34
34
|
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
35
35
|
}
|
|
36
36
|
}).then(function (res) {
|
|
37
|
-
if (res.code === 10001) {
|
|
38
|
-
var
|
|
39
|
-
var
|
|
37
|
+
if (parseInt(res === null || res === void 0 ? void 0 : res.code) === 10001) {
|
|
38
|
+
var _res$data_access_filt, _res$data_access_filt2;
|
|
39
|
+
var ip = ((res === null || res === void 0 ? void 0 : (_res$data_access_filt = res.data_access_filter) === null || _res$data_access_filt === void 0 ? void 0 : _res$data_access_filt.ip) || []).join('\n');
|
|
40
|
+
var ua = ((res === null || res === void 0 ? void 0 : (_res$data_access_filt2 = res.data_access_filter) === null || _res$data_access_filt2 === void 0 ? void 0 : _res$data_access_filt2.ua) || []).join('\n');
|
|
40
41
|
setInitialValues({
|
|
41
42
|
ip: ip,
|
|
42
43
|
ua: ua
|
|
@@ -45,13 +46,11 @@ var AppDataAccessFilter = function AppDataAccessFilter() {
|
|
|
45
46
|
}
|
|
46
47
|
}).catch(function (err) {});
|
|
47
48
|
}, []);
|
|
48
|
-
|
|
49
49
|
// 保存按钮禁用逻辑
|
|
50
50
|
var disableBtn = function disableBtn(form) {
|
|
51
51
|
var value = form.getFieldsValue();
|
|
52
52
|
return !form.isFieldTouched('ip') && !form.isFieldTouched('ua') || JSON.stringify(initialValues) === JSON.stringify(value);
|
|
53
53
|
};
|
|
54
|
-
|
|
55
54
|
// 保存
|
|
56
55
|
var onSubmit = function onSubmit(value) {
|
|
57
56
|
var ip = value.ip,
|
|
@@ -64,7 +63,7 @@ var AppDataAccessFilter = function AppDataAccessFilter() {
|
|
|
64
63
|
ua: JSON.stringify(ua === null || ua === void 0 ? void 0 : ua.split('\n'))
|
|
65
64
|
}
|
|
66
65
|
}).then(function (res) {
|
|
67
|
-
if (res.code === 10001) {
|
|
66
|
+
if (parseInt(res === null || res === void 0 ? void 0 : res.code) === 10001) {
|
|
68
67
|
notification.success({
|
|
69
68
|
message: '设置成功'
|
|
70
69
|
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import AppInfo from './appInfo';
|
|
3
|
+
import AppMember from './member';
|
|
4
|
+
import AppSecretKey from './secretKey';
|
|
5
|
+
import AppDataAccessFilter from './dataAccessFilter';
|
|
6
|
+
import { SettingOutlined } from '@ant-design/icons';
|
|
7
|
+
import { useContext } from 'react';
|
|
8
|
+
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
9
|
+
import SettingTabs from '../../components/settingTabs';
|
|
10
|
+
import AppVirtualSource from './virtualSource';
|
|
11
|
+
var PersonalSetting = function PersonalSetting(_ref) {
|
|
12
|
+
var settingsCallback = _ref.settingsCallback;
|
|
13
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
14
|
+
currentApp = _useContext.currentApp;
|
|
15
|
+
var title = /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "tab-header"
|
|
17
|
+
}, /*#__PURE__*/React.createElement(SettingOutlined, null), /*#__PURE__*/React.createElement("span", {
|
|
18
|
+
className: "tab-header-title"
|
|
19
|
+
}, "\u5E94\u7528\u8BBE\u7F6E"), /*#__PURE__*/React.createElement("span", {
|
|
20
|
+
className: "app-name"
|
|
21
|
+
}, "(", currentApp === null || currentApp === void 0 ? void 0 : currentApp.appName, ")"));
|
|
22
|
+
var items = [{
|
|
23
|
+
key: '1',
|
|
24
|
+
label: '应用信息',
|
|
25
|
+
content: /*#__PURE__*/React.createElement(AppInfo, {
|
|
26
|
+
settingsCallback: settingsCallback
|
|
27
|
+
})
|
|
28
|
+
}, {
|
|
29
|
+
key: '2',
|
|
30
|
+
label: '应用成员',
|
|
31
|
+
content: /*#__PURE__*/React.createElement(AppMember, null)
|
|
32
|
+
}, {
|
|
33
|
+
key: '3',
|
|
34
|
+
label: '配置数据源',
|
|
35
|
+
content: /*#__PURE__*/React.createElement(AppVirtualSource, null),
|
|
36
|
+
hidden: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.appType) !== 'virtual'
|
|
37
|
+
}, {
|
|
38
|
+
key: '4',
|
|
39
|
+
label: 'Secret Key',
|
|
40
|
+
content: /*#__PURE__*/React.createElement(AppSecretKey, null)
|
|
41
|
+
}, {
|
|
42
|
+
key: '5',
|
|
43
|
+
label: '数据采集屏蔽',
|
|
44
|
+
content: /*#__PURE__*/React.createElement(AppDataAccessFilter, null)
|
|
45
|
+
}];
|
|
46
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SettingTabs, {
|
|
47
|
+
typeName: "app",
|
|
48
|
+
title: title,
|
|
49
|
+
items: items
|
|
50
|
+
}));
|
|
51
|
+
};
|
|
52
|
+
export default PersonalSetting;
|