@zgfe/modules-settings 1.0.1-a.9 → 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.css +0 -7
- 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/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 +76 -71
- 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 → 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 +2 -3
- package/{dist/esm → es}/modules/systemSetting/notice/index.d.ts +1 -1
- 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 +6 -6
- 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 -87
- 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 → 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.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/index.d.ts +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
|
@@ -4,22 +4,23 @@ 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
|
-
// 缺少成员过滤
|
|
8
7
|
import React, { useEffect, useContext } from 'react';
|
|
9
8
|
import { Table, Popover, Tabs } from 'antd';
|
|
10
9
|
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
11
|
-
import request from
|
|
12
|
-
import apis from
|
|
10
|
+
import request from '../../../utils/ajax';
|
|
11
|
+
import apis from '../../../constants/api';
|
|
13
12
|
import { useState } from 'react';
|
|
14
|
-
import AuthConfigDetail from
|
|
15
|
-
import util from
|
|
13
|
+
import AuthConfigDetail from '../../companySetting/userGroup/authConfigDetail';
|
|
14
|
+
import util from '../../../utils/util';
|
|
15
|
+
import { EyeOutlined } from '@ant-design/icons';
|
|
16
16
|
var AppMember = function AppMember() {
|
|
17
17
|
var _useContext = useContext(BizGlobalDataContext),
|
|
18
|
-
currentApp = _useContext.currentApp
|
|
18
|
+
currentApp = _useContext.currentApp,
|
|
19
|
+
currentUser = _useContext.currentUser;
|
|
19
20
|
var _useState = useState([]),
|
|
20
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
22
|
memberList = _useState2[0],
|
|
22
|
-
setMemberList = _useState2[1];
|
|
23
|
+
setMemberList = _useState2[1]; // 成员列表
|
|
23
24
|
var _useState3 = useState([]),
|
|
24
25
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
25
26
|
groupInfoList = _useState4[0],
|
|
@@ -83,7 +84,8 @@ var AppMember = function AppMember() {
|
|
|
83
84
|
leftMenus: leftMenus,
|
|
84
85
|
isMarsUi: isMarsUi,
|
|
85
86
|
id: data.id,
|
|
86
|
-
type: 1
|
|
87
|
+
type: 1,
|
|
88
|
+
serviceType: currentUser === null || currentUser === void 0 ? void 0 : currentUser.serviceType
|
|
87
89
|
})), /*#__PURE__*/React.createElement(Tabs.TabPane, {
|
|
88
90
|
tab: "\u6240\u5C5E\u7528\u6237\u7EC4\u6743\u9650",
|
|
89
91
|
key: "2",
|
|
@@ -93,21 +95,17 @@ var AppMember = function AppMember() {
|
|
|
93
95
|
}, /*#__PURE__*/React.createElement("div", {
|
|
94
96
|
className: "group-auth-list"
|
|
95
97
|
}, dealArr.length ? /*#__PURE__*/React.createElement("div", null, dealArr.map(function (item) {
|
|
96
|
-
return (
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
type: 2
|
|
108
|
-
})
|
|
109
|
-
// )
|
|
110
|
-
);
|
|
98
|
+
return /*#__PURE__*/React.createElement(AuthConfigDetail, {
|
|
99
|
+
key: item.id,
|
|
100
|
+
authConfig: item.authConfig,
|
|
101
|
+
leftMenus: leftMenus,
|
|
102
|
+
isMarsUi: isMarsUi,
|
|
103
|
+
companyAppList: companyAppList,
|
|
104
|
+
name: item === null || item === void 0 ? void 0 : item.groupName,
|
|
105
|
+
groupId: item.id,
|
|
106
|
+
type: 2,
|
|
107
|
+
serviceType: currentUser === null || currentUser === void 0 ? void 0 : currentUser.serviceType
|
|
108
|
+
});
|
|
111
109
|
})) : /*#__PURE__*/React.createElement(AuthConfigDetail, {
|
|
112
110
|
authConfig: {
|
|
113
111
|
dataAuth: [],
|
|
@@ -117,16 +115,19 @@ var AppMember = function AppMember() {
|
|
|
117
115
|
isMarsUi: isMarsUi,
|
|
118
116
|
companyAppList: companyAppList,
|
|
119
117
|
name: '',
|
|
120
|
-
type: 2
|
|
118
|
+
type: 2,
|
|
119
|
+
serviceType: currentUser === null || currentUser === void 0 ? void 0 : currentUser.serviceType
|
|
121
120
|
}))));
|
|
122
121
|
},
|
|
123
122
|
style: {
|
|
124
123
|
width: 255
|
|
125
124
|
},
|
|
126
125
|
trigger: "click"
|
|
127
|
-
}, /*#__PURE__*/React.createElement(
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
}, /*#__PURE__*/React.createElement(EyeOutlined, {
|
|
127
|
+
style: {
|
|
128
|
+
color: 'rgba(0, 0, 0, 0.85)'
|
|
129
|
+
}
|
|
130
|
+
}), " ", /*#__PURE__*/React.createElement("span", null, "\u67E5\u770B")));
|
|
130
131
|
}
|
|
131
132
|
}];
|
|
132
133
|
useEffect(function () {
|
|
@@ -134,8 +135,8 @@ var AppMember = function AppMember() {
|
|
|
134
135
|
request(apis.setting.getGroupMembers, {
|
|
135
136
|
method: 'get'
|
|
136
137
|
}).then(function (res) {
|
|
137
|
-
if (res.flag === 101) {
|
|
138
|
-
var _memberList = res.company_members.map(function (item) {
|
|
138
|
+
if ((res === null || res === void 0 ? void 0 : res.flag) === 101) {
|
|
139
|
+
var _memberList = ((res === null || res === void 0 ? void 0 : res.company_members) || []).map(function (item) {
|
|
139
140
|
item.key = item.id;
|
|
140
141
|
return item;
|
|
141
142
|
}).filter(function (item) {
|
|
@@ -150,10 +151,11 @@ var AppMember = function AppMember() {
|
|
|
150
151
|
request(apis.setting.groupInfos, {
|
|
151
152
|
method: 'get'
|
|
152
153
|
}).then(function (res) {
|
|
153
|
-
if (res.flag === 101) {
|
|
154
|
-
|
|
154
|
+
if ((res === null || res === void 0 ? void 0 : res.flag) === 101) {
|
|
155
|
+
var _res$infos;
|
|
156
|
+
setGroupInfoList((res === null || res === void 0 ? void 0 : res.infos) || []);
|
|
155
157
|
var _groupInfoMap = new Map();
|
|
156
|
-
res.infos.forEach(function (item) {
|
|
158
|
+
res === null || res === void 0 ? void 0 : (_res$infos = res.infos) === null || _res$infos === void 0 ? void 0 : _res$infos.forEach(function (item) {
|
|
157
159
|
_groupInfoMap.set(item.id, item);
|
|
158
160
|
});
|
|
159
161
|
setGroupInfoMap(_groupInfoMap);
|
|
@@ -163,21 +165,19 @@ var AppMember = function AppMember() {
|
|
|
163
165
|
request(apis.app.queryAppList, {
|
|
164
166
|
method: 'get'
|
|
165
167
|
}).then(function (res) {
|
|
166
|
-
setCompanyAppList(res.applist);
|
|
168
|
+
setCompanyAppList((res === null || res === void 0 ? void 0 : res.applist) || []);
|
|
167
169
|
});
|
|
168
170
|
// 请求左侧菜单
|
|
169
171
|
request(apis.app.queryLeftMenus, {
|
|
170
172
|
method: 'post',
|
|
171
173
|
data: {
|
|
172
|
-
app_id:
|
|
174
|
+
app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
173
175
|
}
|
|
174
176
|
}).then(function (res) {
|
|
175
|
-
var menus = res.leftMenus || [];
|
|
176
|
-
var menusNameMap = {};
|
|
177
|
+
var menus = (res === null || res === void 0 ? void 0 : res.leftMenus) || [];
|
|
177
178
|
var formatMenus = function formatMenus(menus) {
|
|
178
179
|
menus.forEach(function (item) {
|
|
179
180
|
item.routeName = util.getMenuRouterByName(item.name);
|
|
180
|
-
// menusNameMap[item.name] = item;
|
|
181
181
|
if (item.childrens) {
|
|
182
182
|
formatMenus(item.childrens);
|
|
183
183
|
}
|
|
@@ -185,17 +185,11 @@ var AppMember = function AppMember() {
|
|
|
185
185
|
};
|
|
186
186
|
formatMenus(menus);
|
|
187
187
|
setLeftMenus(menus);
|
|
188
|
-
|
|
189
|
-
}).catch(function (err) {
|
|
190
|
-
// todo ????
|
|
191
|
-
});
|
|
192
|
-
// };
|
|
188
|
+
}).catch(function (err) {});
|
|
193
189
|
}, []);
|
|
194
|
-
|
|
195
190
|
// 鉴权
|
|
196
191
|
var checkAuth = function checkAuth(member) {
|
|
197
192
|
var authConfig = member.authConfig || {};
|
|
198
|
-
// let id = this.appId
|
|
199
193
|
var defaultAuth = authConfig.defaultAuth || {};
|
|
200
194
|
var groupIds = authConfig.groupIds || [];
|
|
201
195
|
if (member.is_admin) return true;
|
|
@@ -204,22 +198,20 @@ var AppMember = function AppMember() {
|
|
|
204
198
|
return item.appId;
|
|
205
199
|
});
|
|
206
200
|
if (arr[0] === 0) return true;
|
|
207
|
-
if (arr.includes(currentApp.appId)) return true;
|
|
201
|
+
if (arr.includes(currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId)) return true;
|
|
208
202
|
}
|
|
209
|
-
// let i = 0
|
|
210
203
|
for (var i = 0; i < groupInfoList.length - 1; i++) {
|
|
211
204
|
if (groupIds.includes(groupInfoList[i].id)) {
|
|
212
|
-
var dataAuth = groupInfoList[i].authConfig.dataAuth;
|
|
205
|
+
var dataAuth = groupInfoList[i].authConfig.dataAuth || [];
|
|
213
206
|
var _arr2 = dataAuth.map(function (item) {
|
|
214
207
|
return item.appId;
|
|
215
208
|
});
|
|
216
209
|
if (_arr2[0] === 0) return true;
|
|
217
|
-
if (_arr2.includes(currentApp.appId)) return true;
|
|
210
|
+
if (_arr2.includes(currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId)) return true;
|
|
218
211
|
}
|
|
219
212
|
}
|
|
220
213
|
return false;
|
|
221
214
|
};
|
|
222
|
-
|
|
223
215
|
// 组装用户组数据
|
|
224
216
|
var getGroupName = function getGroupName(_ref) {
|
|
225
217
|
var groupIds = _ref.groupIds;
|
|
@@ -228,11 +220,9 @@ var AppMember = function AppMember() {
|
|
|
228
220
|
return (_groupInfoMap$get = groupInfoMap.get(groupId)) === null || _groupInfoMap$get === void 0 ? void 0 : _groupInfoMap$get.groupName;
|
|
229
221
|
}).join(',');
|
|
230
222
|
};
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
});
|
|
235
|
-
};
|
|
223
|
+
// const groupAuthConfig = (ids: number[]) => {
|
|
224
|
+
// return groupInfoList.filter((item: IGroupInfo) => ids.includes(item.id));
|
|
225
|
+
// };
|
|
236
226
|
return /*#__PURE__*/React.createElement(Table, {
|
|
237
227
|
size: "middle",
|
|
238
228
|
columns: columns,
|
|
@@ -9,35 +9,30 @@ import { notification } from 'antd';
|
|
|
9
9
|
import React, { useEffect } from 'react';
|
|
10
10
|
import { useContext } from 'react';
|
|
11
11
|
import { useState } from 'react';
|
|
12
|
-
import api from
|
|
13
|
-
import request, { urlRequest } from
|
|
14
|
-
import util from
|
|
15
|
-
import SourceItem from
|
|
16
|
-
import
|
|
12
|
+
import api from '../../../constants/api';
|
|
13
|
+
import request, { urlRequest } from '../../../utils/ajax';
|
|
14
|
+
import util from '../../../utils/util';
|
|
15
|
+
import SourceItem from '../../companySetting/virtualApp/panels/sourceItem';
|
|
16
|
+
import './styles/index.less';
|
|
17
17
|
var AppVirtualSource = function AppVirtualSource(props) {
|
|
18
18
|
var _useContext = useContext(BizGlobalDataContext),
|
|
19
19
|
currentApp = _useContext.currentApp;
|
|
20
|
-
// const { currentApp } = { currentApp: { appId: 99775 } };
|
|
21
20
|
var _useState = useState([]),
|
|
22
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
23
22
|
sourceApps = _useState2[0],
|
|
24
23
|
setSourceApps = _useState2[1];
|
|
25
|
-
var _useState3 = useState(
|
|
24
|
+
var _useState3 = useState(),
|
|
26
25
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var _useState5 = useState(
|
|
26
|
+
selectApp = _useState4[0],
|
|
27
|
+
setSelectApp = _useState4[1];
|
|
28
|
+
var _useState5 = useState(),
|
|
30
29
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var _useState7 = useState(
|
|
30
|
+
sourceAppIdMap = _useState6[0],
|
|
31
|
+
setSourceAppIdMap = _useState6[1];
|
|
32
|
+
var _useState7 = useState([]),
|
|
34
33
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var _useState9 = useState([]),
|
|
38
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
39
|
-
configData = _useState10[0],
|
|
40
|
-
setConfigData = _useState10[1];
|
|
34
|
+
configData = _useState8[0],
|
|
35
|
+
setConfigData = _useState8[1];
|
|
41
36
|
useEffect(function () {
|
|
42
37
|
Promise.all([queryVirtualApps(), getCompanyAppList()]).then(function (res) {});
|
|
43
38
|
}, []);
|
|
@@ -49,7 +44,7 @@ var AppVirtualSource = function AppVirtualSource(props) {
|
|
|
49
44
|
setSourceApps(resSourceApps);
|
|
50
45
|
var result = [];
|
|
51
46
|
resSourceApps.map(function (realApp) {
|
|
52
|
-
if (sourceAppIdMap
|
|
47
|
+
if (sourceAppIdMap === null || sourceAppIdMap === void 0 ? void 0 : sourceAppIdMap.get(realApp.id)) {
|
|
53
48
|
result.push({
|
|
54
49
|
app_id: realApp.id,
|
|
55
50
|
event_id: getSourceAppEventIdArr(realApp.id)
|
|
@@ -72,21 +67,20 @@ var AppVirtualSource = function AppVirtualSource(props) {
|
|
|
72
67
|
var queryVirtualApps = function queryVirtualApps() {
|
|
73
68
|
return new Promise(function (resolve, reject) {
|
|
74
69
|
request(api.app.queryVirtualApps, {}).then(function (res) {
|
|
75
|
-
|
|
70
|
+
var _idMap$get;
|
|
71
|
+
if (parseInt(res === null || res === void 0 ? void 0 : res.code) !== 10001) {
|
|
76
72
|
throw new Error('查询虚拟应用失败');
|
|
77
73
|
}
|
|
78
|
-
var list = res.app_list;
|
|
79
|
-
var idMap =
|
|
80
|
-
list.forEach(function (item) {
|
|
81
|
-
idMap
|
|
74
|
+
var list = res === null || res === void 0 ? void 0 : res.app_list;
|
|
75
|
+
var idMap = new Map();
|
|
76
|
+
list === null || list === void 0 ? void 0 : list.forEach(function (item) {
|
|
77
|
+
idMap.set(item.app_id, item);
|
|
82
78
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
var sources = idMap[currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId].data_source || [];
|
|
87
|
-
var idMaps = {};
|
|
79
|
+
setSelectApp(idMap.get(currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId));
|
|
80
|
+
var sources = ((_idMap$get = idMap.get(currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId)) === null || _idMap$get === void 0 ? void 0 : _idMap$get.data_source) || [];
|
|
81
|
+
var idMaps = new Map();
|
|
88
82
|
sources.forEach(function (item) {
|
|
89
|
-
idMaps
|
|
83
|
+
idMaps.set(item.source_app_id, item);
|
|
90
84
|
});
|
|
91
85
|
setSourceAppIdMap(idMaps);
|
|
92
86
|
resolve(idMaps);
|
|
@@ -99,8 +93,8 @@ var AppVirtualSource = function AppVirtualSource(props) {
|
|
|
99
93
|
});
|
|
100
94
|
};
|
|
101
95
|
var getSourceAppEventIdArr = function getSourceAppEventIdArr(sourceAppId) {
|
|
102
|
-
var sourceData = sourceAppIdMap
|
|
103
|
-
return sourceData.source_event_id || [];
|
|
96
|
+
var sourceData = sourceAppIdMap === null || sourceAppIdMap === void 0 ? void 0 : sourceAppIdMap.get(sourceAppId);
|
|
97
|
+
return (sourceData === null || sourceData === void 0 ? void 0 : sourceData.source_event_id) || [];
|
|
104
98
|
};
|
|
105
99
|
var changeData = function changeData(event_id, app_id, checked, index) {
|
|
106
100
|
var _dealData$index, _dealData$index2;
|
|
@@ -113,12 +107,12 @@ var AppVirtualSource = function AppVirtualSource(props) {
|
|
|
113
107
|
urlRequest(api.app.editVirtualSourceApp, {
|
|
114
108
|
method: 'post',
|
|
115
109
|
data: {
|
|
116
|
-
virtual_app_id: selectApp.app_id,
|
|
110
|
+
virtual_app_id: selectApp === null || selectApp === void 0 ? void 0 : selectApp.app_id,
|
|
117
111
|
source_app_id: (_dealData$index = dealData[index]) === null || _dealData$index === void 0 ? void 0 : _dealData$index.app_id,
|
|
118
112
|
source_event_list: decodeURIComponent(JSON.stringify((_dealData$index2 = dealData[index]) === null || _dealData$index2 === void 0 ? void 0 : _dealData$index2.event_id))
|
|
119
113
|
}
|
|
120
114
|
}).then(function (res) {
|
|
121
|
-
if (res.code === 10001) {
|
|
115
|
+
if (parseInt(res === null || res === void 0 ? void 0 : res.code) === 10001) {
|
|
122
116
|
notification.success({
|
|
123
117
|
message: '修改成功'
|
|
124
118
|
});
|
|
@@ -148,7 +142,7 @@ var AppVirtualSource = function AppVirtualSource(props) {
|
|
|
148
142
|
return /*#__PURE__*/React.createElement(SourceItem, {
|
|
149
143
|
key: realApp.id,
|
|
150
144
|
sourceAppId: realApp.id,
|
|
151
|
-
checked: sourceAppIdMap
|
|
145
|
+
checked: !!(sourceAppIdMap === null || sourceAppIdMap === void 0 ? void 0 : sourceAppIdMap.get(realApp.id)),
|
|
152
146
|
sourceAppName: realApp.appName,
|
|
153
147
|
sourceEventsId: getSourceAppEventIdArr(realApp.id),
|
|
154
148
|
onChange: function onChange(event_id, app_id, checked) {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import { AllGroupInfosItem, AppListItem, AuthConfig, DataAuthItem, FormData } from '../../../types';
|
|
4
|
+
declare const appList: React.FC<{
|
|
5
|
+
dataAuth: Array<DataAuthItem>;
|
|
6
|
+
isAdmin: boolean;
|
|
7
|
+
isDemoAccount: boolean;
|
|
8
|
+
authConfig: AuthConfig;
|
|
9
|
+
id: number;
|
|
10
|
+
allGroupInfos: Array<AllGroupInfosItem>;
|
|
11
|
+
isShowCreateApp: boolean;
|
|
12
|
+
companyRealAppList: Array<AppListItem>;
|
|
13
|
+
zgText: string;
|
|
14
|
+
companyId: number;
|
|
15
|
+
delAppCallback: (formData: FormData, id: number) => void;
|
|
16
|
+
gotoAppSetting: (id: number) => void;
|
|
17
|
+
gotoAppPanel: (id: number) => void;
|
|
18
|
+
createAppCallback: (formData: FormData, id: number) => void;
|
|
19
|
+
closeCreateCallback: () => void;
|
|
20
|
+
}>;
|
|
21
|
+
export default appList;
|
|
@@ -5,14 +5,14 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
5
5
|
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; }
|
|
6
6
|
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; } }
|
|
7
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
9
|
-
import
|
|
10
|
-
import util from
|
|
8
|
+
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
9
|
+
import './index.less';
|
|
10
|
+
import util from './../../../utils/util';
|
|
11
11
|
import { Button, Form, Input, notification } from 'antd';
|
|
12
|
-
import request, { selfRequest } from
|
|
12
|
+
import request, { selfRequest } from './../../../utils/ajax';
|
|
13
13
|
// import urlRequest from 'umi-request';
|
|
14
|
-
import api from
|
|
15
|
-
import { BizTable, BizDialog } from '@zgfe/business-lib';
|
|
14
|
+
import api from './../../../constants/api';
|
|
15
|
+
import { BizTable, BizDialog, BizGlobalDataContext } from '@zgfe/business-lib';
|
|
16
16
|
var reworkAppName = function reworkAppName(name) {
|
|
17
17
|
return name.length > 15 ? "".concat(name.substring(0, 15), "...") : name;
|
|
18
18
|
};
|
|
@@ -41,7 +41,10 @@ var appList = function appList(props) {
|
|
|
41
41
|
delAppCallback = props.delAppCallback,
|
|
42
42
|
gotoAppSetting = props.gotoAppSetting,
|
|
43
43
|
gotoAppPanel = props.gotoAppPanel,
|
|
44
|
-
createAppCallback = props.createAppCallback
|
|
44
|
+
createAppCallback = props.createAppCallback,
|
|
45
|
+
closeCreateCallback = props.closeCreateCallback;
|
|
46
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
47
|
+
system = _useContext.system;
|
|
45
48
|
var _useState = useState(false),
|
|
46
49
|
_useState2 = _slicedToArray(_useState, 2),
|
|
47
50
|
createdAppPanel = _useState2[0],
|
|
@@ -62,21 +65,30 @@ var appList = function appList(props) {
|
|
|
62
65
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
63
66
|
appNameVal = _useState10[0],
|
|
64
67
|
setAppNameVal = _useState10[1];
|
|
68
|
+
var _useState11 = useState([]),
|
|
69
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
70
|
+
cepAppList = _useState12[0],
|
|
71
|
+
setCepAppList = _useState12[1];
|
|
65
72
|
var formRef = useRef();
|
|
66
|
-
|
|
73
|
+
useEffect(function () {
|
|
74
|
+
if (system === 'CEP') {
|
|
75
|
+
request(api.setting.queryAppList, {
|
|
76
|
+
method: 'post'
|
|
77
|
+
}).then(function (res) {
|
|
78
|
+
if (res && res.code + '' === '200') {
|
|
79
|
+
setCepAppList(res.data || []);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}, []);
|
|
67
84
|
// #todo isAdmin 需要添加
|
|
68
|
-
|
|
69
85
|
var columns = [{
|
|
70
86
|
title: '应用名称',
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
for (var _len = arguments.length, res = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
74
|
-
res[_key] = arguments[_key];
|
|
75
|
-
}
|
|
76
|
-
var data = res[1];
|
|
87
|
+
render: function render(data) {
|
|
88
|
+
// console.log(appName, data)
|
|
77
89
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
78
90
|
className: "app-name",
|
|
79
|
-
title:
|
|
91
|
+
title: data.appName || '',
|
|
80
92
|
onClick: function onClick() {
|
|
81
93
|
return toPanel(data);
|
|
82
94
|
}
|
|
@@ -84,12 +96,12 @@ var appList = function appList(props) {
|
|
|
84
96
|
}
|
|
85
97
|
}, {
|
|
86
98
|
title: '接入平台',
|
|
87
|
-
dataIndex: '
|
|
88
|
-
render: function render() {
|
|
89
|
-
|
|
90
|
-
return /*#__PURE__*/React.createElement("div", null,
|
|
99
|
+
dataIndex: 'apps',
|
|
100
|
+
render: function render(apps) {
|
|
101
|
+
// const data = res[1];
|
|
102
|
+
return /*#__PURE__*/React.createElement("div", null, (apps || []).length ? /*#__PURE__*/React.createElement("div", {
|
|
91
103
|
className: "platform-icons"
|
|
92
|
-
},
|
|
104
|
+
}, apps.map(function (item) {
|
|
93
105
|
return /*#__PURE__*/React.createElement("span", {
|
|
94
106
|
key: item.id,
|
|
95
107
|
className: "icon-".concat(getPlatIcon(item.sdkPlatform))
|
|
@@ -98,16 +110,14 @@ var appList = function appList(props) {
|
|
|
98
110
|
}
|
|
99
111
|
}, {
|
|
100
112
|
title: 'key',
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
var data = arguments.length <= 1 ? undefined : arguments[1];
|
|
113
|
+
render: function render(data) {
|
|
114
|
+
// const data = res[1];
|
|
104
115
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "appId: ", data.id), /*#__PURE__*/React.createElement("p", null, "appKey: ", data.appKey), showAppAlias(data) ? /*#__PURE__*/React.createElement("p", null, "\u6240\u5C5E\u4EA7\u54C1\uFF1A", data.appAlias) : null);
|
|
105
116
|
}
|
|
106
117
|
}, {
|
|
107
118
|
title: '操作',
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
var data = arguments.length <= 1 ? undefined : arguments[1];
|
|
119
|
+
render: function render(data) {
|
|
120
|
+
// const data = res[1];
|
|
111
121
|
return /*#__PURE__*/React.createElement("div", {
|
|
112
122
|
className: "operating"
|
|
113
123
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -234,10 +244,9 @@ var appList = function appList(props) {
|
|
|
234
244
|
return item.id !== delAppId;
|
|
235
245
|
});
|
|
236
246
|
var appId = hasAuthApplistByDel.length ? hasAuthApplistByDel[0].id : 0;
|
|
237
|
-
|
|
238
247
|
// 通知数据刷新
|
|
239
248
|
delAppCallback(formData, appId);
|
|
240
|
-
} else if (res.flag === 203) {
|
|
249
|
+
} else if ((res === null || res === void 0 ? void 0 : res.flag) === 203) {
|
|
241
250
|
notification.error({
|
|
242
251
|
message: '应用删除失败,无权限'
|
|
243
252
|
});
|
|
@@ -295,7 +304,6 @@ var appList = function appList(props) {
|
|
|
295
304
|
authConfig: JSON.stringify(cloneAuthConfig),
|
|
296
305
|
groupIds: findGroups().join(',')
|
|
297
306
|
};
|
|
298
|
-
|
|
299
307
|
// 通知数据刷新
|
|
300
308
|
createAppCallback(formData, res.app_info.id);
|
|
301
309
|
msg = '创建应用成功';
|
|
@@ -349,6 +357,7 @@ var appList = function appList(props) {
|
|
|
349
357
|
},
|
|
350
358
|
onCancel: function onCancel() {
|
|
351
359
|
setCreatedAppPanel(false);
|
|
360
|
+
closeCreateCallback && closeCreateCallback();
|
|
352
361
|
},
|
|
353
362
|
confirmLoading: createAppLoading
|
|
354
363
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -383,7 +392,7 @@ var appList = function appList(props) {
|
|
|
383
392
|
}, "\u786E\u8BA4\u5220\u9664\u6B64\u5E94\u7528\u5417\uFF1F\u5220\u9664\u540E\u5E94\u7528\u7684\u6570\u636E\u5C06\u4E0D\u518D\u53EF\u7528"), /*#__PURE__*/React.createElement("div", {
|
|
384
393
|
className: "app-list-content"
|
|
385
394
|
}, /*#__PURE__*/React.createElement(BizTable, {
|
|
386
|
-
dataSource: companyRealAppList,
|
|
395
|
+
dataSource: system === 'CEP' ? cepAppList : companyRealAppList,
|
|
387
396
|
columns: columns,
|
|
388
397
|
pagination: false
|
|
389
398
|
})));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import './../../../constants/icons/iconfont.css';
|
|
2
2
|
.app-list {
|
|
3
3
|
height: 100%;
|
|
4
|
-
padding:
|
|
4
|
+
padding: 0;
|
|
5
5
|
overflow: auto;
|
|
6
6
|
.applist-head {
|
|
7
7
|
.c-button {
|
|
@@ -63,10 +63,3 @@
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
[class^='icon-'],
|
|
67
|
-
[class*=' icon-'] {
|
|
68
|
-
font-family: 'zhuge' !important;
|
|
69
|
-
font-style: normal;
|
|
70
|
-
-webkit-font-smoothing: antialiased;
|
|
71
|
-
-moz-osx-font-smoothing: grayscale;
|
|
72
|
-
}
|
|
@@ -5,12 +5,12 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
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
7
|
import React, { useEffect, useState } from 'react';
|
|
8
|
-
import
|
|
8
|
+
import './index.less';
|
|
9
9
|
import { notification } from 'antd';
|
|
10
|
-
import request from
|
|
11
|
-
import api from
|
|
12
|
-
import PageLoading from
|
|
13
|
-
import util from
|
|
10
|
+
import request from './../../../utils/ajax';
|
|
11
|
+
import api from './../../../constants/api';
|
|
12
|
+
import PageLoading from '../../../components/pageLoading';
|
|
13
|
+
import util from '../../../utils/util';
|
|
14
14
|
var Cost = function Cost(props) {
|
|
15
15
|
var ENVIRONMENT = props.ENVIRONMENT,
|
|
16
16
|
companyAppList = props.companyAppList,
|
|
@@ -99,7 +99,7 @@ var Cost = function Cost(props) {
|
|
|
99
99
|
}
|
|
100
100
|
var res = [];
|
|
101
101
|
if (consum && consum.length > 1) {
|
|
102
|
-
var eventLimit = contract.eventLimit;
|
|
102
|
+
var eventLimit = (contract === null || contract === void 0 ? void 0 : contract.eventLimit) || 0;
|
|
103
103
|
for (var i = 1; i < consum.length; i++) {
|
|
104
104
|
var overData = consum[i].eventSum - eventLimit;
|
|
105
105
|
if (consum[i].couponInfo.couEventLimit > eventLimit) {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export interface PackageInfo {
|
|
2
|
+
overview?: Overview;
|
|
3
|
+
}
|
|
4
|
+
export interface Overview {
|
|
5
|
+
billingCycle?: string;
|
|
6
|
+
ratedAppCount?: number;
|
|
7
|
+
licenseEvnetCount?: number;
|
|
8
|
+
ratedEventCount?: number;
|
|
9
|
+
eventCount?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface AccountEvents {
|
|
12
|
+
contract?: Contract;
|
|
13
|
+
discount?: Array<DiscountItem>;
|
|
14
|
+
consum?: Array<ConsunItem>;
|
|
15
|
+
}
|
|
16
|
+
export interface Contract {
|
|
17
|
+
ID: number;
|
|
18
|
+
eventLimit: number;
|
|
19
|
+
serviceBeginDate: {
|
|
20
|
+
time: number;
|
|
21
|
+
};
|
|
22
|
+
serviceEndDate: {
|
|
23
|
+
time: number;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface ConsunItem {
|
|
27
|
+
eventSum: number;
|
|
28
|
+
couponInfo: {
|
|
29
|
+
couEventLimit: number;
|
|
30
|
+
};
|
|
31
|
+
beginDateTime: {
|
|
32
|
+
time: number;
|
|
33
|
+
};
|
|
34
|
+
endDateTime: {
|
|
35
|
+
time: number;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface DiscountItem {
|
|
39
|
+
couName: string;
|
|
40
|
+
couEventLimit: number;
|
|
41
|
+
detail: {
|
|
42
|
+
detailStatus: string;
|
|
43
|
+
};
|
|
44
|
+
destoryDateTime: {
|
|
45
|
+
time: number;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface CostDetailItem {
|
|
49
|
+
key: number;
|
|
50
|
+
startMonthTime: string;
|
|
51
|
+
endMonthTime?: string;
|
|
52
|
+
eventSum: number;
|
|
53
|
+
limit: number;
|
|
54
|
+
isOver: boolean;
|
|
55
|
+
overData: number;
|
|
56
|
+
}
|
|
57
|
+
export interface CouponItem {
|
|
58
|
+
dType: string;
|
|
59
|
+
dLimit: number;
|
|
60
|
+
couState: string;
|
|
61
|
+
endDateTime: string;
|
|
62
|
+
key: number;
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './styles/authConfig.less';
|
|
3
|
+
import { AppListItem, Config, LeftMenusItem } from '../../../types';
|
|
4
|
+
declare const Info: React.FC<{
|
|
5
|
+
config: Config;
|
|
6
|
+
appList: Array<AppListItem>;
|
|
7
|
+
isMarsUi: boolean;
|
|
8
|
+
leftMenus: LeftMenusItem[];
|
|
9
|
+
ref: any;
|
|
10
|
+
}>;
|
|
11
|
+
export default Info;
|