@zgfe/modules-settings 1.0.1-a.12 → 1.0.1-a.13
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/modules/appSettings/appInfo/index.d.ts +0 -1
- package/dist/esm/modules/appSettings/appInfo/index.js +4 -3
- package/dist/esm/modules/appSettings/index.d.ts +0 -1
- package/dist/esm/modules/appSettings/index.js +2 -4
- package/dist/esm/modules/companySetting/edit/user.js +33 -31
- package/dist/esm/modules/companySetting/edit/userGroup.js +33 -31
- package/dist/esm/modules/companySetting/index.d.ts +0 -5
- package/dist/esm/modules/companySetting/index.js +8 -7
- package/dist/esm/modules/companySetting/user/index.js +6 -3
- package/dist/esm/modules/companySetting/userGroup/authConfigDetail.d.ts +1 -0
- package/dist/esm/modules/companySetting/userGroup/authConfigDetail.js +42 -40
- package/dist/esm/modules/personalSetting/index.d.ts +0 -3
- package/dist/esm/modules/personalSetting/index.js +2 -8
- package/dist/esm/modules/personalSetting/reset/index.d.ts +0 -3
- package/dist/esm/modules/personalSetting/reset/index.js +6 -5
- package/package.json +1 -1
|
@@ -12,10 +12,11 @@ import apis from "../../../constants/api";
|
|
|
12
12
|
import { useState } from 'react';
|
|
13
13
|
import constants from "../../../utils/constants";
|
|
14
14
|
var AppInfo = function AppInfo(_ref) {
|
|
15
|
-
var settingsCallback = _ref.settingsCallback
|
|
16
|
-
showAppAccount = _ref.showAppAccount;
|
|
15
|
+
var settingsCallback = _ref.settingsCallback;
|
|
17
16
|
var _useContext = useContext(BizGlobalDataContext),
|
|
18
|
-
currentApp = _useContext.currentApp
|
|
17
|
+
currentApp = _useContext.currentApp,
|
|
18
|
+
envs = _useContext.envs;
|
|
19
|
+
var showAppAccount = envs.showAppAccount;
|
|
19
20
|
var _useState = useState({
|
|
20
21
|
appName: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appName,
|
|
21
22
|
appAccount: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appAccount
|
|
@@ -9,8 +9,7 @@ import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
|
9
9
|
import SettingTabs from "../../components/settingTabs";
|
|
10
10
|
import AppVirtualSource from "./virtualSource";
|
|
11
11
|
var PersonalSetting = function PersonalSetting(_ref) {
|
|
12
|
-
var settingsCallback = _ref.settingsCallback
|
|
13
|
-
showAppAccount = _ref.showAppAccount;
|
|
12
|
+
var settingsCallback = _ref.settingsCallback;
|
|
14
13
|
var _useContext = useContext(BizGlobalDataContext),
|
|
15
14
|
currentApp = _useContext.currentApp;
|
|
16
15
|
var title = /*#__PURE__*/React.createElement("div", {
|
|
@@ -24,8 +23,7 @@ var PersonalSetting = function PersonalSetting(_ref) {
|
|
|
24
23
|
key: '1',
|
|
25
24
|
label: '应用信息',
|
|
26
25
|
content: /*#__PURE__*/React.createElement(AppInfo, {
|
|
27
|
-
settingsCallback: settingsCallback
|
|
28
|
-
showAppAccount: showAppAccount
|
|
26
|
+
settingsCallback: settingsCallback
|
|
29
27
|
})
|
|
30
28
|
}, {
|
|
31
29
|
key: '2',
|
|
@@ -58,38 +58,40 @@ var Info = function Info(props) {
|
|
|
58
58
|
var refAuthConfig = useRef();
|
|
59
59
|
var refAuthCEPConfig = useRef();
|
|
60
60
|
useEffect(function () {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
61
|
+
if (serviceType !== 1) {
|
|
62
|
+
Promise.all([request(apis.setting.queryFunConfigList, {
|
|
63
|
+
method: 'post'
|
|
64
|
+
}).then(function (res) {
|
|
65
|
+
if (res && res.code + '' === '200') {
|
|
66
|
+
return res.data;
|
|
67
|
+
}
|
|
68
|
+
throw new Error('接口返回错误');
|
|
69
|
+
}), request(apis.setting.queryAppList, {
|
|
70
|
+
method: 'post'
|
|
71
|
+
}).then(function (res) {
|
|
72
|
+
if (res && res.code + '' === '200') {
|
|
73
|
+
return res.data;
|
|
74
|
+
}
|
|
75
|
+
throw new Error('接口返回错误');
|
|
76
|
+
}), request(apis.setting.queryFunConfigByUserId, {
|
|
77
|
+
method: 'post',
|
|
78
|
+
data: {
|
|
79
|
+
userId: data.id,
|
|
80
|
+
type: 1
|
|
81
|
+
}
|
|
82
|
+
}).then(function (res) {
|
|
83
|
+
if (res && res.code + '' === '200') {
|
|
84
|
+
return res.data;
|
|
85
|
+
}
|
|
86
|
+
throw new Error('接口返回错误');
|
|
87
|
+
})]).then(function (posts) {
|
|
88
|
+
setCEPData([posts[0] || [], posts[1] || [], posts[2] || {}]);
|
|
89
|
+
}).catch(function () {
|
|
90
|
+
notification.error({
|
|
91
|
+
message: '接口返回错误'
|
|
92
|
+
});
|
|
91
93
|
});
|
|
92
|
-
}
|
|
94
|
+
}
|
|
93
95
|
}, []);
|
|
94
96
|
useEffect(function () {
|
|
95
97
|
var authConfig = data.authConfig || {
|
|
@@ -66,38 +66,40 @@ var CompanySettingUserGroup = function CompanySettingUserGroup(props) {
|
|
|
66
66
|
var refAuthConfig = useRef();
|
|
67
67
|
var refAuthCEPConfig = useRef();
|
|
68
68
|
useEffect(function () {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
69
|
+
if (serviceType !== 1) {
|
|
70
|
+
Promise.all([request(apis.setting.queryFunConfigList, {
|
|
71
|
+
method: 'post'
|
|
72
|
+
}).then(function (res) {
|
|
73
|
+
if (res && res.code + '' === '200') {
|
|
74
|
+
return res.data;
|
|
75
|
+
}
|
|
76
|
+
throw new Error('接口返回错误');
|
|
77
|
+
}), request(apis.setting.queryAppList, {
|
|
78
|
+
method: 'post'
|
|
79
|
+
}).then(function (res) {
|
|
80
|
+
if (res && res.code + '' === '200') {
|
|
81
|
+
return res.data;
|
|
82
|
+
}
|
|
83
|
+
throw new Error('接口返回错误');
|
|
84
|
+
}), data && data.id && request(apis.setting.queryFunConfigByUserId, {
|
|
85
|
+
method: 'post',
|
|
86
|
+
data: {
|
|
87
|
+
groupId: data.id,
|
|
88
|
+
type: 2
|
|
89
|
+
}
|
|
90
|
+
}).then(function (res) {
|
|
91
|
+
if (res && res.code + '' === '200') {
|
|
92
|
+
return res.data;
|
|
93
|
+
}
|
|
94
|
+
throw new Error('接口返回错误');
|
|
95
|
+
})]).then(function (posts) {
|
|
96
|
+
setCEPData([posts[0] || [], posts[1] || [], posts[2] || {}]);
|
|
97
|
+
}).catch(function () {
|
|
98
|
+
notification.error({
|
|
99
|
+
message: '接口返回错误'
|
|
100
|
+
});
|
|
99
101
|
});
|
|
100
|
-
}
|
|
102
|
+
}
|
|
101
103
|
}, []);
|
|
102
104
|
useEffect(function () {
|
|
103
105
|
setName(data && data.groupName || '');
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
3
|
declare const CompanySetting: React.FC<{
|
|
4
|
-
zgText: string;
|
|
5
|
-
isMarsUi: boolean;
|
|
6
|
-
showVirtualApp: boolean;
|
|
7
|
-
showDataDaily: boolean;
|
|
8
4
|
showWeChatMenu: boolean;
|
|
9
5
|
showMarketMenu: boolean;
|
|
10
6
|
action: string;
|
|
11
|
-
ENVIRONMENT: string;
|
|
12
7
|
settingCallback?: (type: string, obj?: {
|
|
13
8
|
[key: string]: any;
|
|
14
9
|
}) => void;
|
|
@@ -22,20 +22,21 @@ import VirtualApp from "./virtualApp";
|
|
|
22
22
|
import Cost from "./cost";
|
|
23
23
|
import WechatBinding from "./wechatBinding";
|
|
24
24
|
var CompanySetting = function CompanySetting(props) {
|
|
25
|
-
var
|
|
26
|
-
isMarsUi = props.isMarsUi,
|
|
27
|
-
showVirtualApp = props.showVirtualApp,
|
|
28
|
-
showDataDaily = props.showDataDaily,
|
|
29
|
-
showWeChatMenu = props.showWeChatMenu,
|
|
25
|
+
var showWeChatMenu = props.showWeChatMenu,
|
|
30
26
|
showMarketMenu = props.showMarketMenu,
|
|
31
|
-
ENVIRONMENT = props.ENVIRONMENT,
|
|
32
27
|
action = props.action,
|
|
33
28
|
settingCallback = props.settingCallback;
|
|
34
29
|
|
|
35
30
|
// #todo 需要修改主应用传入参数和business-lib数据仓库
|
|
36
31
|
var apisOkNum = 0;
|
|
37
32
|
var _useContext = useContext(BizGlobalDataContext),
|
|
38
|
-
|
|
33
|
+
envs = _useContext.envs;
|
|
34
|
+
var _ref = envs || {},
|
|
35
|
+
zgText = _ref.zgText,
|
|
36
|
+
isMarsUi = _ref.isMarsUi,
|
|
37
|
+
showVirtualApp = _ref.showVirtualApp,
|
|
38
|
+
showDataDaily = _ref.showDataDaily,
|
|
39
|
+
ENVIRONMENT = _ref.ENVIRONMENT;
|
|
39
40
|
var _useState = useState('info'),
|
|
40
41
|
_useState2 = _slicedToArray(_useState, 2),
|
|
41
42
|
currentTab = _useState2[0],
|
|
@@ -391,7 +391,8 @@ var User = function User(props) {
|
|
|
391
391
|
leftMenus: leftMenus,
|
|
392
392
|
isMarsUi: isMarsUi,
|
|
393
393
|
id: data.id,
|
|
394
|
-
type: 1
|
|
394
|
+
type: 1,
|
|
395
|
+
serviceType: serviceType
|
|
395
396
|
})), /*#__PURE__*/React.createElement(Tabs.TabPane, {
|
|
396
397
|
tab: "\u6240\u5C5E\u7528\u6237\u7EC4\u6743\u9650",
|
|
397
398
|
key: "2",
|
|
@@ -409,7 +410,8 @@ var User = function User(props) {
|
|
|
409
410
|
companyAppList: companyAppList,
|
|
410
411
|
name: item.groupName,
|
|
411
412
|
groupId: item.id,
|
|
412
|
-
type: 2
|
|
413
|
+
type: 2,
|
|
414
|
+
serviceType: serviceType
|
|
413
415
|
});
|
|
414
416
|
})) : /*#__PURE__*/React.createElement(AuthConfigDetail, {
|
|
415
417
|
authConfig: {
|
|
@@ -420,7 +422,8 @@ var User = function User(props) {
|
|
|
420
422
|
isMarsUi: isMarsUi,
|
|
421
423
|
companyAppList: companyAppList,
|
|
422
424
|
name: '',
|
|
423
|
-
type: 2
|
|
425
|
+
type: 2,
|
|
426
|
+
serviceType: serviceType
|
|
424
427
|
}))));
|
|
425
428
|
},
|
|
426
429
|
style: {
|
|
@@ -28,7 +28,8 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
28
28
|
isMarsUi = props.isMarsUi,
|
|
29
29
|
id = props.id,
|
|
30
30
|
groupId = props.groupId,
|
|
31
|
-
type = props.type
|
|
31
|
+
type = props.type,
|
|
32
|
+
serviceType = props.serviceType;
|
|
32
33
|
var _useState = useState([]),
|
|
33
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34
35
|
dataAuth = _useState2[0],
|
|
@@ -55,7 +56,6 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
55
56
|
}, []);
|
|
56
57
|
useEffect(function () {
|
|
57
58
|
var data;
|
|
58
|
-
console.log('dsfdsfsdfdsfdsfdsf', id, groupId);
|
|
59
59
|
if (!id && !groupId) return;
|
|
60
60
|
if (type == 2) {
|
|
61
61
|
data = {
|
|
@@ -68,45 +68,47 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
68
68
|
userId: id
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
71
|
+
if (serviceType !== 1) {
|
|
72
|
+
Promise.all([request(apis.setting.queryFunConfigList, {
|
|
73
|
+
method: 'post'
|
|
74
|
+
}).then(function (res) {
|
|
75
|
+
if (res && res.code + '' === '200') {
|
|
76
|
+
return res.data;
|
|
77
|
+
}
|
|
78
|
+
throw new Error('接口返回错误');
|
|
79
|
+
}), request(apis.setting.queryFunConfigByUserId, {
|
|
80
|
+
method: 'post',
|
|
81
|
+
data: data
|
|
82
|
+
}).then(function (res) {
|
|
83
|
+
if (res && res.code + '' === '200') {
|
|
84
|
+
return res.data;
|
|
85
|
+
}
|
|
86
|
+
throw new Error('接口返回错误');
|
|
87
|
+
})]).then(function (resArr) {
|
|
88
|
+
var _resArr = _slicedToArray(resArr, 2),
|
|
89
|
+
CEPAllFunConfigList = _resArr[0],
|
|
90
|
+
CEPCheckedArr = _resArr[1];
|
|
91
|
+
var _ref = CEPCheckedArr || {},
|
|
92
|
+
appList = _ref.appList,
|
|
93
|
+
funConfig = _ref.funConfig;
|
|
94
|
+
setCepAppList(appList || []);
|
|
94
95
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
// 用checked的数据和全部数据进行匹配
|
|
97
|
+
var dealFunConfigList = dealDateAddChecked(CEPAllFunConfigList || [], funConfig || []);
|
|
98
|
+
// console.log(JSON.stringify(dealFunConfigList));
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
100
|
+
dealFunConfigList = dealDateAddIndeterminate(dealFunConfigList || [], funConfig || []);
|
|
101
|
+
// console.log(JSON.stringify(dealFunConfigList));
|
|
102
|
+
dealFunConfigList = dealFunConfigList.filter(function (item) {
|
|
103
|
+
return item.checked || item.indeterminate;
|
|
104
|
+
});
|
|
105
|
+
setCepFunConfig(dealFunConfigList);
|
|
106
|
+
}).catch(function () {
|
|
107
|
+
notification.error({
|
|
108
|
+
message: '接口返回错误'
|
|
109
|
+
});
|
|
108
110
|
});
|
|
109
|
-
}
|
|
111
|
+
}
|
|
110
112
|
}, [props.groupId, props.id]);
|
|
111
113
|
|
|
112
114
|
// 为数据打上checked标签
|
|
@@ -334,7 +336,7 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
334
336
|
}, thirdItem.show ? /*#__PURE__*/React.createElement("span", null, thirdItem.name.describe + ' ') : null);
|
|
335
337
|
}), ")") : null);
|
|
336
338
|
})) : null) : null;
|
|
337
|
-
})) : /*#__PURE__*/React.createElement("li", null, "\u6CA1\u6709\u5206\u914D\u529F\u80FD\u6743\u9650"))), /*#__PURE__*/React.createElement("ul", {
|
|
339
|
+
})) : /*#__PURE__*/React.createElement("li", null, "\u6CA1\u6709\u5206\u914D\u529F\u80FD\u6743\u9650"))), serviceType !== 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("ul", {
|
|
338
340
|
className: "item-detail-title"
|
|
339
341
|
}, /*#__PURE__*/React.createElement("li", null, "\u4E1A\u52A1\u6743\u9650"), /*#__PURE__*/React.createElement("ul", {
|
|
340
342
|
className: "item-detail-list"
|
|
@@ -360,6 +362,6 @@ var authConfigDetail = function authConfigDetail(props) {
|
|
|
360
362
|
}, thirdItem.checked || thirdItem.indeterminate ? /*#__PURE__*/React.createElement("span", null, thirdItem.describe + ' ') : null);
|
|
361
363
|
}), ")") : null);
|
|
362
364
|
})) : null) : null);
|
|
363
|
-
})) : /*#__PURE__*/React.createElement("li", null, "\u6CA1\u6709\u5206\u914D\u529F\u80FD\u6743\u9650"))));
|
|
365
|
+
})) : /*#__PURE__*/React.createElement("li", null, "\u6CA1\u6709\u5206\u914D\u529F\u80FD\u6743\u9650")))) : null);
|
|
364
366
|
};
|
|
365
367
|
export default authConfigDetail;
|
|
@@ -4,10 +4,7 @@ import PersonalReset from "./reset";
|
|
|
4
4
|
import { UserOutlined } from '@ant-design/icons';
|
|
5
5
|
import SettingTabs from "../../components/settingTabs";
|
|
6
6
|
var PersonalSetting = function PersonalSetting(_ref) {
|
|
7
|
-
var settingsCallback = _ref.settingsCallback
|
|
8
|
-
usePwdRules = _ref.usePwdRules,
|
|
9
|
-
passwordRule = _ref.passwordRule,
|
|
10
|
-
passwordRuleMessage = _ref.passwordRuleMessage;
|
|
7
|
+
var settingsCallback = _ref.settingsCallback;
|
|
11
8
|
var title = /*#__PURE__*/React.createElement("div", {
|
|
12
9
|
className: "tab-header"
|
|
13
10
|
}, /*#__PURE__*/React.createElement(UserOutlined, null), /*#__PURE__*/React.createElement("span", {
|
|
@@ -21,10 +18,7 @@ var PersonalSetting = function PersonalSetting(_ref) {
|
|
|
21
18
|
key: '2',
|
|
22
19
|
label: '修改密码',
|
|
23
20
|
content: /*#__PURE__*/React.createElement(PersonalReset, {
|
|
24
|
-
settingsCallback: settingsCallback
|
|
25
|
-
usePwdRules: usePwdRules,
|
|
26
|
-
passwordRule: passwordRule,
|
|
27
|
-
passwordRuleMessage: passwordRuleMessage
|
|
21
|
+
settingsCallback: settingsCallback
|
|
28
22
|
})
|
|
29
23
|
}];
|
|
30
24
|
return /*#__PURE__*/React.createElement(SettingTabs, {
|
|
@@ -13,12 +13,13 @@ import apis from "../../../constants/api";
|
|
|
13
13
|
import { urlRequest } from "../../../utils/ajax";
|
|
14
14
|
import base64 from "../../../utils/base64";
|
|
15
15
|
var PersonalReset = function PersonalReset(_ref) {
|
|
16
|
-
var settingsCallback = _ref.settingsCallback
|
|
17
|
-
usePwdRules = _ref.usePwdRules,
|
|
18
|
-
passwordRule = _ref.passwordRule,
|
|
19
|
-
passwordRuleMessage = _ref.passwordRuleMessage;
|
|
16
|
+
var settingsCallback = _ref.settingsCallback;
|
|
20
17
|
var _useContext = useContext(BizGlobalDataContext),
|
|
21
|
-
currentUser = _useContext.currentUser
|
|
18
|
+
currentUser = _useContext.currentUser,
|
|
19
|
+
envs = _useContext.envs;
|
|
20
|
+
var usePwdRules = envs.usePwdRules,
|
|
21
|
+
passwordRule = envs.passwordRule,
|
|
22
|
+
passwordRuleMessage = envs.passwordRuleMessage;
|
|
22
23
|
var _Form$useForm = Form.useForm(),
|
|
23
24
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
24
25
|
form = _Form$useForm2[0];
|