@zgfe/modules-settings 1.0.1-a.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.
Files changed (97) hide show
  1. package/README.md +33 -0
  2. package/dist/esm/components/pageLoading/index.d.ts +3 -0
  3. package/dist/esm/components/pageLoading/index.js +11 -0
  4. package/dist/esm/components/pageLoading/index.less +11 -0
  5. package/dist/esm/constants/api.d.ts +30 -0
  6. package/dist/esm/constants/api.js +32 -0
  7. package/dist/esm/constants/icons/demo.css +539 -0
  8. package/dist/esm/constants/icons/demo_index.html +8537 -0
  9. package/dist/esm/constants/icons/iconfont.css +1467 -0
  10. package/dist/esm/constants/icons/iconfont.js +43 -0
  11. package/dist/esm/constants/icons/iconfont.json +2550 -0
  12. package/dist/esm/constants/icons/iconfont.ttf +0 -0
  13. package/dist/esm/constants/icons/iconfont.woff +0 -0
  14. package/dist/esm/constants/icons/iconfont.woff2 +0 -0
  15. package/dist/esm/constants/styles/base.sass +9 -0
  16. package/dist/esm/constants/styles/cleverUI.css +7 -0
  17. package/dist/esm/constants/styles/constants.sass +60 -0
  18. package/dist/esm/constants/styles/customUITheme.sass +54 -0
  19. package/dist/esm/constants/styles/reset.sass +61 -0
  20. package/dist/esm/global.d.ts +4 -0
  21. package/dist/esm/index.d.ts +3 -0
  22. package/dist/esm/index.js +3 -0
  23. package/dist/esm/modules/appSettings/appInfo/index.d.ts +3 -0
  24. package/dist/esm/modules/appSettings/appInfo/index.js +45 -0
  25. package/dist/esm/modules/appSettings/dataAccessFilter/index.d.ts +3 -0
  26. package/dist/esm/modules/appSettings/dataAccessFilter/index.js +37 -0
  27. package/dist/esm/modules/appSettings/index.d.ts +3 -0
  28. package/dist/esm/modules/appSettings/index.js +24 -0
  29. package/dist/esm/modules/appSettings/member/index.d.ts +3 -0
  30. package/dist/esm/modules/appSettings/member/index.js +29 -0
  31. package/dist/esm/modules/appSettings/secretKey/index.d.ts +3 -0
  32. package/dist/esm/modules/appSettings/secretKey/index.js +8 -0
  33. package/dist/esm/modules/companySetting/appList/index.d.ts +21 -0
  34. package/dist/esm/modules/companySetting/appList/index.js +386 -0
  35. package/dist/esm/modules/companySetting/appList/index.less +72 -0
  36. package/dist/esm/modules/companySetting/cost/index.d.ts +6 -0
  37. package/dist/esm/modules/companySetting/cost/index.js +79 -0
  38. package/dist/esm/modules/companySetting/cost/index.less +31 -0
  39. package/dist/esm/modules/companySetting/edit/authConfig.d.ts +9 -0
  40. package/dist/esm/modules/companySetting/edit/authConfig.js +333 -0
  41. package/dist/esm/modules/companySetting/edit/authConfigCEP.d.ts +10 -0
  42. package/dist/esm/modules/companySetting/edit/authConfigCEP.js +309 -0
  43. package/dist/esm/modules/companySetting/edit/authGroup.d.ts +7 -0
  44. package/dist/esm/modules/companySetting/edit/authGroup.js +89 -0
  45. package/dist/esm/modules/companySetting/edit/authModule.d.ts +7 -0
  46. package/dist/esm/modules/companySetting/edit/authModule.js +217 -0
  47. package/dist/esm/modules/companySetting/edit/multiAuthModule.d.ts +7 -0
  48. package/dist/esm/modules/companySetting/edit/multiAuthModule.js +150 -0
  49. package/dist/esm/modules/companySetting/edit/styles/authConfig.less +3 -0
  50. package/dist/esm/modules/companySetting/edit/styles/authGroup.less +10 -0
  51. package/dist/esm/modules/companySetting/edit/styles/authModule.less +82 -0
  52. package/dist/esm/modules/companySetting/edit/styles/user.less +32 -0
  53. package/dist/esm/modules/companySetting/edit/styles/userGroup.less +44 -0
  54. package/dist/esm/modules/companySetting/edit/user.d.ts +12 -0
  55. package/dist/esm/modules/companySetting/edit/user.js +222 -0
  56. package/dist/esm/modules/companySetting/edit/userGroup.d.ts +14 -0
  57. package/dist/esm/modules/companySetting/edit/userGroup.js +321 -0
  58. package/dist/esm/modules/companySetting/index.d.ts +18 -0
  59. package/dist/esm/modules/companySetting/index.js +492 -0
  60. package/dist/esm/modules/companySetting/index.less +24 -0
  61. package/dist/esm/modules/companySetting/info/index.d.ts +6 -0
  62. package/dist/esm/modules/companySetting/info/index.js +105 -0
  63. package/dist/esm/modules/companySetting/info/index.less +35 -0
  64. package/dist/esm/modules/companySetting/style/common.less +68 -0
  65. package/dist/esm/modules/companySetting/user/index.d.ts +29 -0
  66. package/dist/esm/modules/companySetting/user/index.js +548 -0
  67. package/dist/esm/modules/companySetting/user/index.less +161 -0
  68. package/dist/esm/modules/companySetting/user/invite.d.ts +8 -0
  69. package/dist/esm/modules/companySetting/user/invite.js +171 -0
  70. package/dist/esm/modules/companySetting/userGroup/authConfigDetail.d.ts +16 -0
  71. package/dist/esm/modules/companySetting/userGroup/authConfigDetail.js +379 -0
  72. package/dist/esm/modules/companySetting/userGroup/groupItem.d.ts +11 -0
  73. package/dist/esm/modules/companySetting/userGroup/groupItem.js +140 -0
  74. package/dist/esm/modules/companySetting/userGroup/index.d.ts +13 -0
  75. package/dist/esm/modules/companySetting/userGroup/index.js +142 -0
  76. package/dist/esm/modules/companySetting/userGroup/index.less +6 -0
  77. package/dist/esm/modules/companySetting/userGroup/style/authConfigDetail.less +44 -0
  78. package/dist/esm/modules/companySetting/userGroup/style/index.less +79 -0
  79. package/dist/esm/modules/dsfdsf +0 -0
  80. package/dist/esm/modules/personalSetting/index.d.ts +4 -0
  81. package/dist/esm/modules/personalSetting/index.js +17 -0
  82. package/dist/esm/modules/personalSetting/index.less +1 -0
  83. package/dist/esm/modules/personalSetting/info/index.d.ts +3 -0
  84. package/dist/esm/modules/personalSetting/info/index.js +83 -0
  85. package/dist/esm/modules/personalSetting/reset/index.d.ts +3 -0
  86. package/dist/esm/modules/personalSetting/reset/index.js +93 -0
  87. package/dist/esm/utils/ajax.d.ts +3 -0
  88. package/dist/esm/utils/ajax.js +5 -0
  89. package/dist/esm/utils/base64.d.ts +11 -0
  90. package/dist/esm/utils/base64.js +128 -0
  91. package/dist/esm/utils/constants.d.ts +160 -0
  92. package/dist/esm/utils/constants.js +282 -0
  93. package/dist/esm/utils/functionalPermissions.d.ts +385 -0
  94. package/dist/esm/utils/functionalPermissions.js +407 -0
  95. package/dist/esm/utils/util.d.ts +209 -0
  96. package/dist/esm/utils/util.js +649 -0
  97. package/package.json +56 -0
@@ -0,0 +1,386 @@
1
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
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
+ 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
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ import React, { useEffect, useRef, useState } from 'react';
9
+ import "./index.less";
10
+ import util from "./../../../utils/util";
11
+ import { Button, Form, Input, notification } from 'antd';
12
+ import request from "./../../../utils/ajax";
13
+ import api from "./../../../constants/api";
14
+ import { BizTable, BizDialog } from '@zgfe/business-lib';
15
+ var TextArea = Input.TextArea;
16
+ var reworkAppName = function reworkAppName(name) {
17
+ return name.length > 15 ? "".concat(name.substring(0, 15), "...") : name;
18
+ };
19
+ var getPlatIcon = function getPlatIcon(sdkPlatform) {
20
+ var lib = {
21
+ '1': 'android',
22
+ '2': 'ios',
23
+ '3': 'js'
24
+ };
25
+ return lib[sdkPlatform];
26
+ };
27
+ var showAppAlias = function showAppAlias(data) {
28
+ return data.appAlias && util.isString(data.appAlias);
29
+ };
30
+ var appList = function appList(props) {
31
+ var dataAuth = props.dataAuth,
32
+ isAdmin = props.isAdmin,
33
+ isDemoAccount = props.isDemoAccount,
34
+ authConfig = props.authConfig,
35
+ id = props.id,
36
+ allGroupInfos = props.allGroupInfos,
37
+ appList = props.appList,
38
+ companyRealAppList = props.companyRealAppList,
39
+ zgText = props.zgText,
40
+ companyId = props.companyId,
41
+ delAppCallback = props.delAppCallback,
42
+ gotoAppSetting = props.gotoAppSetting,
43
+ gotoAppPanel = props.gotoAppPanel,
44
+ createAppCallback = props.createAppCallback;
45
+ var _useState = useState(false),
46
+ _useState2 = _slicedToArray(_useState, 2),
47
+ createdAppPanel = _useState2[0],
48
+ setCreatedAppPanel = _useState2[1];
49
+ var _useState3 = useState(false),
50
+ _useState4 = _slicedToArray(_useState3, 2),
51
+ createAppLoading = _useState4[0],
52
+ setCreateAppLoading = _useState4[1];
53
+ var _useState5 = useState(false),
54
+ _useState6 = _slicedToArray(_useState5, 2),
55
+ delPanelState = _useState6[0],
56
+ setDelPanelState = _useState6[1];
57
+ var _useState7 = useState(0),
58
+ _useState8 = _slicedToArray(_useState7, 2),
59
+ delAppId = _useState8[0],
60
+ setDelAppId = _useState8[1];
61
+ var _useState9 = useState(''),
62
+ _useState10 = _slicedToArray(_useState9, 2),
63
+ appNameVal = _useState10[0],
64
+ setAppNameVal = _useState10[1];
65
+ var formRef = useRef();
66
+
67
+ // #todo isAdmin 需要添加
68
+
69
+ var columns = [{
70
+ title: '应用名称',
71
+ dataIndex: 'attr1',
72
+ render: function render() {
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];
77
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
78
+ className: "app-name",
79
+ title: res[1].appName || '',
80
+ onClick: function onClick() {
81
+ return toPanel(data);
82
+ }
83
+ }, reworkAppName(data.appName || '')));
84
+ }
85
+ }, {
86
+ title: '接入平台',
87
+ dataIndex: 'attr2',
88
+ render: function render() {
89
+ var data = arguments.length <= 1 ? undefined : arguments[1];
90
+ return /*#__PURE__*/React.createElement("div", null, data.apps.length ? /*#__PURE__*/React.createElement("div", {
91
+ className: "platform-icons"
92
+ }, data.apps.map(function (item) {
93
+ return /*#__PURE__*/React.createElement("span", {
94
+ key: item.id,
95
+ className: "icon-".concat(getPlatIcon(item.sdkPlatform))
96
+ });
97
+ })) : /*#__PURE__*/React.createElement("span", null, "\u672A\u63A5\u5165\u6570\u636E"));
98
+ }
99
+ }, {
100
+ title: 'key',
101
+ dataIndex: 'attr3',
102
+ render: function render() {
103
+ var data = arguments.length <= 1 ? undefined : arguments[1];
104
+ 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
+ }
106
+ }, {
107
+ title: '操作',
108
+ dataIndex: 'name',
109
+ render: function render() {
110
+ var data = arguments.length <= 1 ? undefined : arguments[1];
111
+ return /*#__PURE__*/React.createElement("div", {
112
+ className: "operating"
113
+ }, /*#__PURE__*/React.createElement("span", {
114
+ onClick: function onClick() {
115
+ return toAppSetting(data);
116
+ }
117
+ }, "\u5E94\u7528\u8BBE\u7F6E"), /*#__PURE__*/React.createElement("span", {
118
+ onClick: function onClick() {
119
+ return showDelPanel(data);
120
+ },
121
+ className: "icon-delete"
122
+ }));
123
+ }
124
+ }];
125
+ useEffect(function () {}, []);
126
+ var toPanel = function toPanel(data) {
127
+ if (gotoAppPanel) {
128
+ if (!checkAppAuth(data.id)) {
129
+ notification.error({
130
+ message: '此应用无权限'
131
+ });
132
+ return;
133
+ }
134
+ gotoAppPanel(data.id);
135
+ }
136
+ };
137
+ var toAppSetting = function toAppSetting(data) {
138
+ if (gotoAppSetting) {
139
+ if (checkAppAuth(data.id)) {
140
+ notification.error({
141
+ message: '此应用无权限'
142
+ });
143
+ return;
144
+ }
145
+ gotoAppSetting(data.id);
146
+ }
147
+ };
148
+ var showDelPanel = function showDelPanel(data) {
149
+ if (isAdmin && !checkAppAuth(data.id)) {
150
+ notification.error({
151
+ message: '删除失败,无权限'
152
+ });
153
+ return;
154
+ }
155
+ setDelAppId(data.id);
156
+ setDelPanelState(true);
157
+ };
158
+ var checkAppAuth = function checkAppAuth(appId) {
159
+ var flag = false;
160
+ if (dataAuth.length === 1 && dataAuth[0].appId === 0) {
161
+ flag = true;
162
+ } else if (isAdmin) {
163
+ flag = true;
164
+ } else {
165
+ flag = dataAuth.map(function (item) {
166
+ return item.appId;
167
+ }).includes(appId);
168
+ }
169
+ return flag;
170
+ };
171
+ var inDemoMode = function inDemoMode() {
172
+ if (isDemoAccount) {
173
+ notification.error({
174
+ message: '权限不足'
175
+ });
176
+ return true;
177
+ }
178
+ return false;
179
+ };
180
+ var findGroups = function findGroups() {
181
+ // 包含当前用户的所有组
182
+ var res = [];
183
+ var _iterator = _createForOfIteratorHelper(allGroupInfos),
184
+ _step;
185
+ try {
186
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
187
+ var group = _step.value;
188
+ if (group.members.map(function (item) {
189
+ return item.userId;
190
+ }).includes(id)) {
191
+ res.push(group.id);
192
+ }
193
+ }
194
+ } catch (err) {
195
+ _iterator.e(err);
196
+ } finally {
197
+ _iterator.f();
198
+ }
199
+ return res;
200
+ };
201
+ var onDelConfirm = function onDelConfirm() {
202
+ if (inDemoMode()) {
203
+ return;
204
+ }
205
+ request(api.app.deleteApp, {
206
+ method: 'post',
207
+ data: {
208
+ app_id: delAppId
209
+ }
210
+ }).then(function (res) {
211
+ if ((res === null || res === void 0 ? void 0 : res.flag) === 101) {
212
+ notification.success({
213
+ message: '删除成功'
214
+ });
215
+ var cloneAuthConfig = util.clone(authConfig);
216
+ if (!(cloneAuthConfig.dataAuth.length === 1 && cloneAuthConfig.dataAuth[0].appId === 0)) {
217
+ var index = cloneAuthConfig.dataAuth.findIndex(function (item) {
218
+ return item.appId === delAppId;
219
+ });
220
+ cloneAuthConfig.dataAuth.splice(index, 1);
221
+ }
222
+ var formData = {
223
+ userId: id,
224
+ authConfig: JSON.stringify(cloneAuthConfig),
225
+ groupIds: findGroups().join(',')
226
+ };
227
+ var hasAuthApplistByDel = appList.filter(function (item) {
228
+ return item.id !== delAppId;
229
+ });
230
+ var _appId = hasAuthApplistByDel.length ? hasAuthApplistByDel[0].id : 0;
231
+
232
+ // 通知数据刷新
233
+ delAppCallback(formData, _appId);
234
+ } else if (res.flag === 203) {
235
+ notification.error({
236
+ message: '应用删除失败,无权限'
237
+ });
238
+ } else {
239
+ notification.error({
240
+ message: '删除失败,请重试'
241
+ });
242
+ }
243
+ }).catch(function (err) {
244
+ notification.error({
245
+ message: '删除失败,请重试'
246
+ });
247
+ }).finally(function () {
248
+ setDelPanelState(false);
249
+ });
250
+ };
251
+ var onCreateConfirm = function onCreateConfirm() {
252
+ if (inDemoMode()) {
253
+ return;
254
+ }
255
+ setCreateAppLoading(true);
256
+ var msg = '';
257
+ request(api.app.createApp, {
258
+ method: 'post',
259
+ data: {
260
+ app_name: appNameVal,
261
+ companyId: companyId
262
+ }
263
+ }).then(function (res) {
264
+ console.log(res, res.flag, res.flag === 101);
265
+ if (res.flag === 101) {
266
+ console.log(1);
267
+ setCreatedAppPanel(false);
268
+ // window.track('应用-创建应用', {
269
+ // 是否首次: companyRealAppList.length ? '否' : '是',
270
+ // 应用名称: 'name'
271
+ // })
272
+ var cloneAuthConfig = util.clone(authConfig);
273
+ cloneAuthConfig.dataAuth.unshift({
274
+ appId: res.app_info.id,
275
+ plats: [0]
276
+ });
277
+ var formData = {
278
+ userId: id,
279
+ authConfig: JSON.stringify(cloneAuthConfig),
280
+ groupIds: findGroups().join(',')
281
+ };
282
+
283
+ // 通知数据刷新
284
+ createAppCallback(formData, appId);
285
+ msg = '创建应用成功';
286
+ notification.success({
287
+ message: msg
288
+ });
289
+ } else {
290
+ switch (res.flag) {
291
+ case 201:
292
+ msg = '创建失败,应用数量达到限制';
293
+ break;
294
+ case 202:
295
+ msg = '创建失败,该名称已存在';
296
+ break;
297
+ case 203:
298
+ msg = '创建失败,无权限';
299
+ break;
300
+ default:
301
+ msg = '创建应用接口错误,请重试';
302
+ break;
303
+ }
304
+ notification.error({
305
+ message: msg
306
+ });
307
+ }
308
+ }).catch(function () {
309
+ notification.error({
310
+ message: '创建失败,请重试'
311
+ });
312
+ }).finally(function () {
313
+ setCreateAppLoading(false);
314
+ });
315
+ };
316
+ return /*#__PURE__*/React.createElement("div", {
317
+ className: "app-list"
318
+ }, /*#__PURE__*/React.createElement("div", {
319
+ className: "applist-head"
320
+ }, /*#__PURE__*/React.createElement(Button, {
321
+ type: "primary",
322
+ onClick: function onClick() {
323
+ var _formRef$current;
324
+ setCreatedAppPanel(true);
325
+ (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.setFieldValue('appNameVal', '');
326
+ }
327
+ }, "\u65B0\u5EFA\u5E94\u7528")), /*#__PURE__*/React.createElement(BizDialog, {
328
+ title: "\u65B0\u5EFA\u5E94\u7528",
329
+ visible: createdAppPanel,
330
+ closable: true,
331
+ onOk: function onOk() {
332
+ var _formRef$current2;
333
+ if (!((_formRef$current2 = formRef.current) !== null && _formRef$current2 !== void 0 && _formRef$current2.getFieldError('appNameVal').length)) {
334
+ onCreateConfirm();
335
+ }
336
+ },
337
+ onCancel: function onCancel() {
338
+ setCreatedAppPanel(false);
339
+ },
340
+ confirmLoading: createAppLoading
341
+ }, /*#__PURE__*/React.createElement("div", {
342
+ className: "dialog-content"
343
+ }, /*#__PURE__*/React.createElement(Form, {
344
+ initialValues: {
345
+ appNameVal: ''
346
+ },
347
+ ref: formRef,
348
+ onValuesChange: function onValuesChange() {
349
+ var _formRef$current3;
350
+ setAppNameVal((_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 ? void 0 : _formRef$current3.getFieldValue('appNameVal'));
351
+ }
352
+ }, /*#__PURE__*/React.createElement(Form.Item, {
353
+ name: 'appNameVal',
354
+ rules: [{
355
+ required: true,
356
+ message: '请输入应用名称'
357
+ }, {
358
+ type: 'string',
359
+ max: 20,
360
+ message: '不能超过20个字符'
361
+ }]
362
+ }, /*#__PURE__*/React.createElement(Input, {
363
+ type: 'text',
364
+ placeholder: '请输入应用名',
365
+ width: "100%",
366
+ size: "big"
367
+ }))), /*#__PURE__*/React.createElement("p", null, "\u65E0\u9700\u4E3A\u4E00\u4E2A\u4EA7\u54C1\u7684\u4E0D\u540C\u5E73\u53F0\u521B\u5EFA\u591A\u4E2A\u5E94\u7528\uFF0C\u63A8\u8350\u60A8\u4F7F\u7528\u4EA7\u54C1\u540D\u79F0"), /*#__PURE__*/React.createElement("p", null, "\u547D\u540D\u5E94\u7528\u540D, \u5982\u3010", zgText, "\u3011\u800C\u975E\u3010", zgText, " IOS\u7248\u3011"))), /*#__PURE__*/React.createElement(BizDialog, {
368
+ title: "\u5220\u9664\u5E94\u7528",
369
+ visible: delPanelState,
370
+ closable: true,
371
+ onOk: function onOk() {
372
+ setDelPanelState(false);
373
+ onDelConfirm();
374
+ },
375
+ onCancel: function onCancel() {
376
+ setDelPanelState(false);
377
+ }
378
+ }, "\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", {
379
+ className: "app-list-content"
380
+ }, /*#__PURE__*/React.createElement(BizTable, {
381
+ dataSource: companyRealAppList,
382
+ columns: columns,
383
+ pagination: false
384
+ })));
385
+ };
386
+ export default appList;
@@ -0,0 +1,72 @@
1
+ @import './../../../constants/icons/iconfont.css';
2
+ .app-list {
3
+ height: 100%;
4
+ padding: 40px 50px;
5
+ overflow: auto;
6
+ .applist-head {
7
+ .c-button {
8
+ margin-right: 20px;
9
+ }
10
+ }
11
+ .app-list-content {
12
+ margin-top: 20px;
13
+ }
14
+ .platform-icons {
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: flex-start;
18
+ width: 100%;
19
+ span {
20
+ margin-right: 10px;
21
+ color: #cfcfcf;
22
+ font-size: 16px;
23
+ }
24
+ }
25
+ .app-list-content {
26
+ .c-grid-cell,
27
+ .c-grid-header-cell {
28
+ text-align: left !important;
29
+ border: none;
30
+ border-bottom: 1px solid #d1d1d1;
31
+ }
32
+ .c-grid-cell {
33
+ text-align: left !important;
34
+ }
35
+ .c-grid-body .c-grid-row:nth-child(2n) {
36
+ background: #fff !important;
37
+ }
38
+ .app-name {
39
+ cursor: pointer;
40
+ &:hover {
41
+ color: #00a0ea;
42
+ }
43
+ }
44
+ .operating {
45
+ span {
46
+ color: #00a0ea;
47
+ cursor: pointer;
48
+ }
49
+ span.icon-delete {
50
+ margin-left: 10px;
51
+ color: #cfcfcf;
52
+ &:hover {
53
+ color: #00a0ea;
54
+ }
55
+ }
56
+ }
57
+ }
58
+ .dialog-content {
59
+ color: #858585;
60
+ .c-input {
61
+ margin-bottom: 20px;
62
+ color: #000;
63
+ }
64
+ }
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
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const Info: React.FC<{
4
+ updateCurrentUser?: () => void;
5
+ }>;
6
+ export default Info;
@@ -0,0 +1,79 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
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
+ 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
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useContext, useEffect, useState } from 'react';
8
+ import "./index.less";
9
+ import { BizGlobalDataContext } from '@zgfe/business-lib';
10
+ import { Input, notification } from 'antd';
11
+ import request from "./../../../utils/ajax";
12
+ import api from "./../../../constants/api";
13
+ import PageLoading from "../../../components/pageLoading";
14
+ var TextArea = Input.TextArea;
15
+ var Info = function Info(props) {
16
+ var _useContext = useContext(BizGlobalDataContext),
17
+ currentApp = _useContext.currentApp,
18
+ currentUser = _useContext.currentUser,
19
+ isDemo = _useContext.isDemo;
20
+ var _useState = useState({
21
+ overview: {}
22
+ }),
23
+ _useState2 = _slicedToArray(_useState, 2),
24
+ packageInfo = _useState2[0],
25
+ setPackageInfo = _useState2[1];
26
+ var _useState3 = useState(false),
27
+ _useState4 = _slicedToArray(_useState3, 2),
28
+ ready = _useState4[0],
29
+ setReady = _useState4[1];
30
+ var _useState5 = useState([]),
31
+ _useState6 = _slicedToArray(_useState5, 2),
32
+ overview = _useState6[0],
33
+ setOverview = _useState6[1];
34
+ var _useState7 = useState(0),
35
+ _useState8 = _slicedToArray(_useState7, 2),
36
+ appCount = _useState8[0],
37
+ setAppCount = _useState8[1];
38
+ useEffect(function () {
39
+ setReady(false);
40
+ request(api.app.queryAppList, {
41
+ method: 'get'
42
+ }).then(function (res) {
43
+ if (!res) return;
44
+ setAppCount((res.applist || []).length);
45
+ }).catch(function (err) {
46
+ notification.error({
47
+ message: '费用信息获取失败'
48
+ });
49
+ });
50
+ request(api.app.queryPackageInfo, {
51
+ method: 'post',
52
+ data: {
53
+ companyId: currentUser === null || currentUser === void 0 ? void 0 : currentUser.companyId
54
+ }
55
+ }).then(function (res) {
56
+ if (!res) return;
57
+ setPackageInfo(res.data);
58
+ setReady(true);
59
+ }).catch(function (err) {
60
+ notification.error({
61
+ message: '费用信息获取失败'
62
+ });
63
+ });
64
+ }, []);
65
+ useEffect(function () {
66
+ var overview = packageInfo.overview;
67
+ setOverview([overview.billingCycle, appCount, overview.ratedAppCount, overview.licenseEvnetCount, overview.ratedEventCount, overview.eventCount]);
68
+ }, [packageInfo, appCount]);
69
+ return /*#__PURE__*/React.createElement("div", {
70
+ className: "company-setting-cost"
71
+ }, ready ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h5", null, "\u6982\u51B5"), /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, "\u5F53\u524D\u4F7F\u7528\u5468\u671F"), /*#__PURE__*/React.createElement("th", null, "\u5F53\u524D\u5E94\u7528\u6570"), /*#__PURE__*/React.createElement("th", null, "\u989D\u5B9A\u5E94\u7528\u6570"), /*#__PURE__*/React.createElement("th", null, "\u5F53\u524D\u4E8B\u4EF6\u91CF"), /*#__PURE__*/React.createElement("th", null, "\u989D\u5B9A\u4E8B\u4EF6\u603B\u91CF"), /*#__PURE__*/React.createElement("th", null, "\u5408\u540C\u671F\u5185\u4E8B\u4EF6\u91CF"))), /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, overview.length ? overview.map(function (item) {
72
+ return /*#__PURE__*/React.createElement("td", {
73
+ key: item
74
+ }, item);
75
+ }) : /*#__PURE__*/React.createElement("td", {
76
+ colspan: "4"
77
+ }, "\u6682\u65E0\u6570\u636E"))))) : /*#__PURE__*/React.createElement(PageLoading, null));
78
+ };
79
+ export default Info;
@@ -0,0 +1,31 @@
1
+ @import './../../../constants/icons/iconfont.css';
2
+ .company-setting-cost {
3
+ min-height: 400px;
4
+ max-height: 100%;
5
+ padding: 40px 50px;
6
+ overflow: auto;
7
+ h5 {
8
+ font-weight: normal;
9
+ font-size: 14px;
10
+ }
11
+ table {
12
+ width: 100%;
13
+ margin: 15px 0 40px 0;
14
+ border-collapse: collapse;
15
+ thead {
16
+ color: #636363;
17
+ font-weight: bold;
18
+ font-size: 14px;
19
+ background: #fbfbfb;
20
+ }
21
+ td,
22
+ th {
23
+ padding: 10px 15px;
24
+ text-align: center;
25
+ border: 1px solid #cecece;
26
+ }
27
+ td {
28
+ height: 50px;
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './styles/authConfig.less';
3
+ declare const Info: React.FC<{
4
+ config?: {};
5
+ appList: [];
6
+ isMarsUi: Boolean;
7
+ leftMenus: [];
8
+ }>;
9
+ export default Info;