@cloud-app-dev/vidc 1.0.48 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/es/AppContext/Sync.d.ts +6 -0
- package/es/AppContext/Sync.js +47 -0
- package/es/AppContext/index.d.ts +10 -0
- package/es/AppContext/index.js +117 -0
- package/es/AppContext/interface.d.ts +29 -0
- package/es/AppContext/static.d.ts +6 -0
- package/es/AppContext/static.js +6 -0
- package/es/Config/index.d.ts +4 -0
- package/es/Config/index.js +23 -0
- package/es/Config/interface.d.ts +39 -0
- package/es/Config/utils.d.ts +11 -0
- package/es/{DagInitialRequest/index.js → Config/utils.js} +39 -62
- package/es/ConfigContext/index.d.ts +6 -0
- package/es/ConfigContext/index.js +3 -0
- package/es/InitialConfig/index.d.ts +5 -7
- package/es/InitialConfig/index.js +11 -42
- package/es/InitialConfig/utils.d.ts +15 -0
- package/es/InitialConfig/utils.js +40 -305
- package/es/InitialRequest/index.d.ts +5 -11
- package/es/InitialRequest/index.js +50 -67
- package/es/InitialRequest/utils.d.ts +8 -0
- package/es/InitialRequest/utils.js +28 -567
- package/es/Service/http.d.ts +4 -0
- package/es/Service/http.js +152 -0
- package/es/Service/index.d.ts +3 -0
- package/es/Service/index.js +14 -0
- package/es/Service/interface.d.ts +28 -0
- package/es/Service/logger.d.ts +3 -0
- package/es/Service/logger.js +13 -0
- package/es/Service/middleware.d.ts +5 -0
- package/es/Service/middleware.js +15 -0
- package/es/Service/utils.d.ts +3 -0
- package/es/Service/utils.js +11 -0
- package/es/WorkerFlow/Demo.js +1 -0
- package/es/WorkerFlow/Form/Condition.js +4 -5
- package/es/WorkerFlow/Form/GroupList.d.ts +2 -1
- package/es/WorkerFlow/Form/GroupList.js +3 -2
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +4 -2
- package/es/WorkerFlow/Nodes/TitleElement.js +13 -6
- package/es/WorkerFlow/index.js +36 -7
- package/es/index.d.ts +4 -8
- package/es/index.js +4 -8
- package/package.json +2 -2
- package/es/AppLayout/AppHeader/index.css +0 -4
- package/es/AppLayout/AppHeader/index.d.ts +0 -18
- package/es/AppLayout/AppHeader/index.js +0 -41
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.d.ts +0 -1
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.js +0 -10
- package/es/AppLayout/AppHorizontalMenu/SubGroup.d.ts +0 -9
- package/es/AppLayout/AppHorizontalMenu/SubGroup.js +0 -57
- package/es/AppLayout/AppHorizontalMenu/index.css +0 -152
- package/es/AppLayout/AppHorizontalMenu/index.d.ts +0 -13
- package/es/AppLayout/AppHorizontalMenu/index.js +0 -230
- package/es/AppLayout/AppInlineMenu/SubGroup.d.ts +0 -9
- package/es/AppLayout/AppInlineMenu/SubGroup.js +0 -34
- package/es/AppLayout/AppInlineMenu/index.css +0 -110
- package/es/AppLayout/AppInlineMenu/index.d.ts +0 -12
- package/es/AppLayout/AppInlineMenu/index.js +0 -194
- package/es/AppLayout/AppLogo/index.css +0 -74
- package/es/AppLayout/AppLogo/index.d.ts +0 -13
- package/es/AppLayout/AppLogo/index.js +0 -100
- package/es/AppLayout/AppTools/index.css +0 -0
- package/es/AppLayout/AppTools/index.d.ts +0 -8
- package/es/AppLayout/AppTools/index.js +0 -10
- package/es/AppLayout/FunctionPreview/index.css +0 -128
- package/es/AppLayout/FunctionPreview/index.d.ts +0 -22
- package/es/AppLayout/FunctionPreview/index.js +0 -218
- package/es/AppLayout/Header/ListenceRoute.d.ts +0 -5
- package/es/AppLayout/Header/ListenceRoute.js +0 -28
- package/es/AppLayout/Header/ModifyPassword/index.d.ts +0 -6
- package/es/AppLayout/Header/ModifyPassword/index.js +0 -201
- package/es/AppLayout/Header/ModifyUserAvatar/index.css +0 -25
- package/es/AppLayout/Header/ModifyUserAvatar/index.d.ts +0 -10
- package/es/AppLayout/Header/ModifyUserAvatar/index.js +0 -97
- package/es/AppLayout/Header/NotifyAlarm.js +0 -122
- package/es/AppLayout/Header/ThemeTools.js +0 -69
- package/es/AppLayout/Header/Tools.d.ts +0 -11
- package/es/AppLayout/Header/Tools.js +0 -86
- package/es/AppLayout/Header/ToolsItem.d.ts +0 -1
- package/es/AppLayout/Header/ToolsItem.js +0 -12
- package/es/AppLayout/Header/UserAction.d.ts +0 -10
- package/es/AppLayout/Header/UserAction.js +0 -224
- package/es/AppLayout/Header/index.css +0 -136
- package/es/AppLayout/Header/index.d.ts +0 -9
- package/es/AppLayout/Header/index.js +0 -36
- package/es/AppLayout/index.css +0 -21
- package/es/AppLayout/index.d.ts +0 -12
- package/es/AppLayout/index.js +0 -38
- package/es/AppLayout/service/index.js +0 -174
- package/es/AppLayout/service/prefix.js +0 -4
- package/es/AppLayout/service/url.js +0 -35
- package/es/AppLayout/utils/menu.js +0 -24
- package/es/AppLayout/utils.d.ts +0 -4
- package/es/AppLayout/utils.js +0 -112
- package/es/DagInitialConfig/index.css +0 -0
- package/es/DagInitialConfig/index.d.ts +0 -10
- package/es/DagInitialConfig/index.js +0 -70
- package/es/DagInitialConfig/utils.js +0 -185
- package/es/DagInitialRequest/index.css +0 -0
- package/es/DagInitialRequest/index.d.ts +0 -10
- package/es/DagInitialRequest/utils.js +0 -573
- package/es/FormContent/index.css +0 -27
- package/es/FormContent/index.d.ts +0 -19
- package/es/FormContent/index.js +0 -58
- package/es/OrgTree/index.css +0 -39
- package/es/OrgTree/index.d.ts +0 -16
- package/es/OrgTree/index.js +0 -176
- package/es/OrgUserTree/demo.d.ts +0 -2
- package/es/OrgUserTree/demo.js +0 -20
- package/es/OrgUserTree/index.css +0 -31
- package/es/OrgUserTree/index.d.ts +0 -28
- package/es/OrgUserTree/index.js +0 -131
- package/es/PlaceTree/demo.d.ts +0 -2
- package/es/PlaceTree/demo.js +0 -20
- package/es/PlaceTree/index.css +0 -40
- package/es/PlaceTree/index.d.ts +0 -26
- package/es/PlaceTree/index.js +0 -174
- package/es/Upload/AntUpload/index.css +0 -22
- package/es/Upload/AntUpload/index.d.ts +0 -19
- package/es/Upload/AntUpload/index.js +0 -226
- package/es/Upload/UploadChildren/index.css +0 -28
- package/es/Upload/UploadChildren/index.js +0 -26
- package/es/Upload/index.css +0 -0
- package/es/Upload/index.d.ts +0 -9
- package/es/Upload/index.js +0 -7
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import _Store from "@cloud-app-dev/basic-components/es/Store";
|
|
2
|
-
import _Config from "@cloud-app-dev/basic-components/es/Config";
|
|
3
|
-
import _Service from "@cloud-app-dev/basic-components/es/Service";
|
|
4
1
|
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
5
2
|
|
|
6
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
-
|
|
8
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9
|
-
|
|
10
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
-
|
|
12
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
|
-
|
|
14
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
|
|
16
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
17
|
-
|
|
18
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
19
|
-
|
|
20
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
4
|
|
|
22
5
|
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."); }
|
|
@@ -29,9 +12,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
29
12
|
|
|
30
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
14
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
import { __awaiter } from "tslib";
|
|
16
|
+
import Config from '../Config';
|
|
17
|
+
import Service from '../Service';
|
|
35
18
|
|
|
36
19
|
function catchPromise(fn) {
|
|
37
20
|
return new Promise(function (resolve) {
|
|
@@ -39,19 +22,15 @@ function catchPromise(fn) {
|
|
|
39
22
|
return resolve(res);
|
|
40
23
|
}, function (err) {
|
|
41
24
|
console.error(err);
|
|
42
|
-
resolve();
|
|
25
|
+
resolve(null);
|
|
43
26
|
});
|
|
44
27
|
});
|
|
45
28
|
}
|
|
46
29
|
|
|
47
30
|
var method = 'post';
|
|
48
31
|
export function initialization() {
|
|
49
|
-
return
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
function _initialization() {
|
|
53
|
-
_initialization = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
54
|
-
var headers, result, userInfo, userId, operationCenterId, data, data2, centerUrl, centerInfo, themeInfo, themeConfig, themeStyle, themeId, themeUrl, themeRes, _themeRes$data, userPrivilegesUrl, centerPrivilegesUrl, allPrivilegesUrl, systemInfoUrl, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, userPrivileges, _yield$Promise$all2$2, centerPrivileges, _yield$Promise$all2$3, allPrivileges, systemInfo;
|
|
32
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
33
|
+
var headers, result, userInfo, userId, operationCenterId, data, data2, centerUrl, centerInfo, themeInfo, themeConfig, themeId, themeUrl, themeRes, userPrivilegesUrl, centerPrivilegesUrl, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, userPrivileges, _yield$Promise$all2$2, centerPrivileges;
|
|
55
34
|
|
|
56
35
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
57
36
|
while (1) {
|
|
@@ -61,7 +40,7 @@ function _initialization() {
|
|
|
61
40
|
Authorization: _cache.getCache('token', 'session')
|
|
62
41
|
};
|
|
63
42
|
_context.next = 3;
|
|
64
|
-
return
|
|
43
|
+
return Service.$http({
|
|
65
44
|
url: '/api/user/v1/getUserByToken',
|
|
66
45
|
method: method,
|
|
67
46
|
headers: headers,
|
|
@@ -81,7 +60,7 @@ function _initialization() {
|
|
|
81
60
|
};
|
|
82
61
|
centerUrl = "/api/user/operationCenter/v1/operationCenters/".concat(operationCenterId);
|
|
83
62
|
_context.next = 12;
|
|
84
|
-
return
|
|
63
|
+
return Service.$http({
|
|
85
64
|
data: data2,
|
|
86
65
|
method: method,
|
|
87
66
|
url: centerUrl,
|
|
@@ -92,7 +71,7 @@ function _initialization() {
|
|
|
92
71
|
case 12:
|
|
93
72
|
centerInfo = _context.sent;
|
|
94
73
|
_context.next = 15;
|
|
95
|
-
return
|
|
74
|
+
return Service.$http({
|
|
96
75
|
url: "/api/micro/configureApplication/v1/queryConfigureApplicationById/".concat(operationCenterId)
|
|
97
76
|
});
|
|
98
77
|
|
|
@@ -100,74 +79,50 @@ function _initialization() {
|
|
|
100
79
|
themeInfo = _context.sent;
|
|
101
80
|
themeConfig = themeInfo.data || {}; // eslint-disable-next-line no-eval
|
|
102
81
|
|
|
103
|
-
themeStyle = {
|
|
104
|
-
tabType: themeConfig.tabType ? eval(themeConfig.tabType) : true,
|
|
105
|
-
menuType: themeConfig.menuType || 'horizontal'
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
_Store.app.updateThemeStyle(themeStyle);
|
|
109
|
-
|
|
110
82
|
themeId = themeConfig.themeId || centerInfo.data.hues;
|
|
111
83
|
|
|
112
84
|
if (!themeId) {
|
|
113
|
-
_context.next =
|
|
85
|
+
_context.next = 24;
|
|
114
86
|
break;
|
|
115
87
|
}
|
|
116
88
|
|
|
117
89
|
themeUrl = "/api/micro/configure/v1/queryConfigureByConfigureId/".concat(themeId);
|
|
118
|
-
_context.next =
|
|
119
|
-
return
|
|
90
|
+
_context.next = 22;
|
|
91
|
+
return Service.$http({
|
|
120
92
|
data: data2,
|
|
121
93
|
method: 'get',
|
|
122
94
|
url: themeUrl,
|
|
123
|
-
headers: headers
|
|
124
|
-
requestId: 'themeRes'
|
|
95
|
+
headers: headers
|
|
125
96
|
});
|
|
126
97
|
|
|
127
|
-
case
|
|
98
|
+
case 22:
|
|
128
99
|
themeRes = _context.sent;
|
|
129
100
|
|
|
130
101
|
try {
|
|
131
|
-
|
|
102
|
+
Config.registerConfig('theme', themeRes.data);
|
|
132
103
|
} catch (e) {
|
|
133
104
|
console.error(e);
|
|
134
105
|
}
|
|
135
106
|
|
|
136
|
-
case
|
|
107
|
+
case 24:
|
|
137
108
|
userPrivilegesUrl = "/api/user/role/v1/queryUserRoles/".concat(userId);
|
|
138
109
|
centerPrivilegesUrl = "/api/micro/applicationSystemScene/v1/queryAllFunctionByApplicationSystemId/".concat(operationCenterId);
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
_context.next = 32;
|
|
142
|
-
return Promise.all([catchPromise(_Service.$http({
|
|
110
|
+
_context.next = 28;
|
|
111
|
+
return Promise.all([catchPromise(Service.$http({
|
|
143
112
|
data: data,
|
|
144
113
|
method: method,
|
|
145
114
|
url: userPrivilegesUrl,
|
|
146
|
-
headers: headers
|
|
147
|
-
|
|
148
|
-
})), catchPromise(_Service.$http({
|
|
115
|
+
headers: headers
|
|
116
|
+
})), catchPromise(Service.$http({
|
|
149
117
|
data: data2,
|
|
150
118
|
method: 'get',
|
|
151
119
|
url: centerPrivilegesUrl,
|
|
152
|
-
headers: headers
|
|
153
|
-
|
|
154
|
-
})), catchPromise(_Service.$http({
|
|
155
|
-
method: 'get',
|
|
156
|
-
url: allPrivilegesUrl,
|
|
157
|
-
headers: headers,
|
|
158
|
-
requestId: 'allPrivilegesUrl'
|
|
159
|
-
})), catchPromise(_Service.$http({
|
|
160
|
-
data: data,
|
|
161
|
-
method: method,
|
|
162
|
-
url: systemInfoUrl,
|
|
163
|
-
headers: headers,
|
|
164
|
-
requestId: 'systemInfoUrl'
|
|
165
|
-
})) //获取用户系统信息
|
|
166
|
-
]);
|
|
120
|
+
headers: headers
|
|
121
|
+
}))]);
|
|
167
122
|
|
|
168
|
-
case
|
|
123
|
+
case 28:
|
|
169
124
|
_yield$Promise$all = _context.sent;
|
|
170
|
-
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all,
|
|
125
|
+
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
|
|
171
126
|
_yield$Promise$all2$ = _yield$Promise$all2[0];
|
|
172
127
|
userPrivileges = _yield$Promise$all2$ === void 0 ? {
|
|
173
128
|
data: []
|
|
@@ -176,512 +131,18 @@ function _initialization() {
|
|
|
176
131
|
centerPrivileges = _yield$Promise$all2$2 === void 0 ? {
|
|
177
132
|
data: []
|
|
178
133
|
} : _yield$Promise$all2$2;
|
|
179
|
-
_yield$Promise$all2$3 = _yield$Promise$all2[2];
|
|
180
|
-
allPrivileges = _yield$Promise$all2$3 === void 0 ? {
|
|
181
|
-
data: []
|
|
182
|
-
} : _yield$Promise$all2$3;
|
|
183
|
-
systemInfo = _yield$Promise$all2[3];
|
|
184
134
|
return _context.abrupt("return", {
|
|
185
135
|
userInfo: userInfo,
|
|
186
|
-
userPrivileges: userPrivileges,
|
|
187
|
-
centerPrivileges: centerPrivileges,
|
|
188
|
-
|
|
189
|
-
centerInfo: centerInfo,
|
|
190
|
-
systemInfo: systemInfo
|
|
136
|
+
userPrivileges: userPrivileges.data,
|
|
137
|
+
centerPrivileges: centerPrivileges.data,
|
|
138
|
+
centerInfo: centerInfo
|
|
191
139
|
});
|
|
192
140
|
|
|
193
|
-
case
|
|
141
|
+
case 35:
|
|
194
142
|
case "end":
|
|
195
143
|
return _context.stop();
|
|
196
144
|
}
|
|
197
145
|
}
|
|
198
146
|
}, _callee);
|
|
199
147
|
}));
|
|
200
|
-
return _initialization.apply(this, arguments);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export function queryOrganizationsList(_x) {
|
|
204
|
-
return _queryOrganizationsList.apply(this, arguments);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function _queryOrganizationsList() {
|
|
208
|
-
_queryOrganizationsList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(options) {
|
|
209
|
-
var headers, url, res, data;
|
|
210
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
211
|
-
while (1) {
|
|
212
|
-
switch (_context2.prev = _context2.next) {
|
|
213
|
-
case 0:
|
|
214
|
-
headers = {
|
|
215
|
-
Authorization: _cache.getCache('token', 'session')
|
|
216
|
-
};
|
|
217
|
-
url = '/api/udm-api/DeviceBuzTree/queryList';
|
|
218
|
-
_context2.next = 4;
|
|
219
|
-
return _Service.$http({
|
|
220
|
-
headers: headers,
|
|
221
|
-
url: url,
|
|
222
|
-
method: 'post',
|
|
223
|
-
requestId: 'queryBusinessTree',
|
|
224
|
-
data: {}
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
case 4:
|
|
228
|
-
res = _context2.sent;
|
|
229
|
-
data = res.data || [];
|
|
230
|
-
data.forEach(function (v) {
|
|
231
|
-
v.organizationName = v.groupName;
|
|
232
|
-
v.organizationDescription = v.description;
|
|
233
|
-
});
|
|
234
|
-
return _context2.abrupt("return", {
|
|
235
|
-
data: data
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
case 8:
|
|
239
|
-
case "end":
|
|
240
|
-
return _context2.stop();
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}, _callee2);
|
|
244
|
-
}));
|
|
245
|
-
return _queryOrganizationsList.apply(this, arguments);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export function queryUserOrganizationsList(_x2) {
|
|
249
|
-
return _queryUserOrganizationsList.apply(this, arguments);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
function _queryUserOrganizationsList() {
|
|
253
|
-
_queryUserOrganizationsList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(options) {
|
|
254
|
-
var headers, url;
|
|
255
|
-
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
256
|
-
while (1) {
|
|
257
|
-
switch (_context3.prev = _context3.next) {
|
|
258
|
-
case 0:
|
|
259
|
-
headers = {
|
|
260
|
-
Authorization: _cache.getCache('token', 'session')
|
|
261
|
-
};
|
|
262
|
-
url = '/api/user/v1/organization/queryChildOrganizationsById';
|
|
263
|
-
return _context3.abrupt("return", catchPromise(_Service.$http({
|
|
264
|
-
headers: headers,
|
|
265
|
-
url: url,
|
|
266
|
-
method: 'post',
|
|
267
|
-
requestId: 'queryOrganizationsList',
|
|
268
|
-
data: _objectSpread({
|
|
269
|
-
selectChildOrganization: true
|
|
270
|
-
}, options)
|
|
271
|
-
})));
|
|
272
|
-
|
|
273
|
-
case 3:
|
|
274
|
-
case "end":
|
|
275
|
-
return _context3.stop();
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}, _callee3);
|
|
279
|
-
}));
|
|
280
|
-
return _queryUserOrganizationsList.apply(this, arguments);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
export function queryPlacesList(_x3) {
|
|
284
|
-
return _queryPlacesList.apply(this, arguments);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
function _queryPlacesList() {
|
|
288
|
-
_queryPlacesList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(orgId) {
|
|
289
|
-
var headers, url, url2, data, res, _res, _res$, placeDeviceList, _res$2, placeAuthList;
|
|
290
|
-
|
|
291
|
-
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
292
|
-
while (1) {
|
|
293
|
-
switch (_context4.prev = _context4.next) {
|
|
294
|
-
case 0:
|
|
295
|
-
headers = {
|
|
296
|
-
Authorization: _cache.getCache('token', 'session')
|
|
297
|
-
};
|
|
298
|
-
url = '/api/place/v1/getPlacesByHasDevice';
|
|
299
|
-
url2 = '/api/user/v1/organization/queryPlacesByOrganizationId';
|
|
300
|
-
data = {
|
|
301
|
-
organizationId: orgId,
|
|
302
|
-
includeSubOrgIds: true
|
|
303
|
-
};
|
|
304
|
-
_context4.next = 6;
|
|
305
|
-
return Promise.all([catchPromise(_Service.$http({
|
|
306
|
-
method: method,
|
|
307
|
-
url: url,
|
|
308
|
-
headers: headers,
|
|
309
|
-
data: {},
|
|
310
|
-
requestId: 'getPlacesByHasDevice'
|
|
311
|
-
})), catchPromise(_Service.$http({
|
|
312
|
-
method: method,
|
|
313
|
-
url: url2,
|
|
314
|
-
headers: headers,
|
|
315
|
-
data: data,
|
|
316
|
-
requestId: 'queryPlacesByOrganizationId'
|
|
317
|
-
})) //获取运营中心菜单
|
|
318
|
-
]);
|
|
319
|
-
|
|
320
|
-
case 6:
|
|
321
|
-
res = _context4.sent;
|
|
322
|
-
_res = _slicedToArray(res, 2), _res$ = _res[0], placeDeviceList = _res$ === void 0 ? {
|
|
323
|
-
data: []
|
|
324
|
-
} : _res$, _res$2 = _res[1], placeAuthList = _res$2 === void 0 ? {
|
|
325
|
-
data: []
|
|
326
|
-
} : _res$2;
|
|
327
|
-
return _context4.abrupt("return", [placeDeviceList.data, placeAuthList.data]);
|
|
328
|
-
|
|
329
|
-
case 9:
|
|
330
|
-
case "end":
|
|
331
|
-
return _context4.stop();
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
}, _callee4);
|
|
335
|
-
}));
|
|
336
|
-
return _queryPlacesList.apply(this, arguments);
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
function queryUserDevicesNew(data) {
|
|
340
|
-
var headers = {
|
|
341
|
-
Authorization: _cache.getCache('token', 'session')
|
|
342
|
-
};
|
|
343
|
-
var url = '/api/device/v1/queryDevices4User';
|
|
344
|
-
return _Service.$http({
|
|
345
|
-
url: url,
|
|
346
|
-
method: 'post',
|
|
347
|
-
data: data,
|
|
348
|
-
headers: headers,
|
|
349
|
-
requestId: 'queryDevices4User'
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
function queryUserDevicesStatusNew(data) {
|
|
354
|
-
var headers = {
|
|
355
|
-
Authorization: _cache.getCache('token', 'session')
|
|
356
|
-
};
|
|
357
|
-
var url = '/api/device/v1/queryDeviceStatus4User';
|
|
358
|
-
return _Service.$http({
|
|
359
|
-
url: url,
|
|
360
|
-
method: 'post',
|
|
361
|
-
data: data,
|
|
362
|
-
headers: headers,
|
|
363
|
-
requestId: 'queryDeviceStatus4User'
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
function queryDeviceLocalRecordAbilityList(data) {
|
|
368
|
-
var headers = {
|
|
369
|
-
Authorization: _cache.getCache('token', 'session')
|
|
370
|
-
};
|
|
371
|
-
var url = '/api/device/v1/queryDeviceLocalRecordAbilityList';
|
|
372
|
-
return _Service.$http({
|
|
373
|
-
url: url,
|
|
374
|
-
method: 'post',
|
|
375
|
-
data: data,
|
|
376
|
-
headers: headers,
|
|
377
|
-
requestId: 'queryDeviceLocalRecordAbilityList'
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
function emptyPromise() {
|
|
382
|
-
return new Promise(function (resolve) {
|
|
383
|
-
return resolve(false);
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
export function formatDeviceMap() {
|
|
388
|
-
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
389
|
-
var groupLibs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
390
|
-
var deviceState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
391
|
-
var deviceFrontEnd = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
392
|
-
var deviceStorage = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
393
|
-
var deviceList = [];
|
|
394
|
-
data.forEach(function (item) {
|
|
395
|
-
var _item$split = item.split('|'),
|
|
396
|
-
_item$split2 = _slicedToArray(_item$split, 21),
|
|
397
|
-
cid = _item$split2[0],
|
|
398
|
-
deviceName = _item$split2[1],
|
|
399
|
-
deviceType = _item$split2[3],
|
|
400
|
-
id = _item$split2[4],
|
|
401
|
-
latitude = _item$split2[5],
|
|
402
|
-
longitude = _item$split2[6],
|
|
403
|
-
lygroupIndex = _item$split2[7],
|
|
404
|
-
manufacturerDeviceId = _item$split2[8],
|
|
405
|
-
manufacturerDeviceType = _item$split2[9],
|
|
406
|
-
organizationIds = _item$split2[10],
|
|
407
|
-
pathId = _item$split2[11],
|
|
408
|
-
placeId = _item$split2[12],
|
|
409
|
-
sn = _item$split2[13],
|
|
410
|
-
boxNum = _item$split2[14],
|
|
411
|
-
cameraType = _item$split2[15],
|
|
412
|
-
villageLocationType = _item$split2[16],
|
|
413
|
-
placeTags = _item$split2[17],
|
|
414
|
-
parentId = _item$split2[18],
|
|
415
|
-
accessType = _item$split2[19],
|
|
416
|
-
createTime = _item$split2[20];
|
|
417
|
-
|
|
418
|
-
try {
|
|
419
|
-
organizationIds = organizationIds.split(',');
|
|
420
|
-
} catch (e) {
|
|
421
|
-
organizationIds = [];
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
try {
|
|
425
|
-
pathId = pathId.split(',');
|
|
426
|
-
} catch (e) {
|
|
427
|
-
pathId = [];
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
try {
|
|
431
|
-
placeTags = placeTags.split(',');
|
|
432
|
-
} catch (e) {
|
|
433
|
-
placeTags = [];
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
try {
|
|
437
|
-
cameraType = JSON.parse(cameraType);
|
|
438
|
-
} catch (e) {
|
|
439
|
-
cameraType = null;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
deviceList.push({
|
|
443
|
-
cid: cid,
|
|
444
|
-
deviceName: deviceName,
|
|
445
|
-
deviceStatus: deviceState[id],
|
|
446
|
-
deviceType: deviceType,
|
|
447
|
-
id: id,
|
|
448
|
-
latitude: latitude,
|
|
449
|
-
longitude: longitude,
|
|
450
|
-
lygroupId: groupLibs[lygroupIndex],
|
|
451
|
-
manufacturerDeviceId: manufacturerDeviceId,
|
|
452
|
-
manufacturerDeviceType: manufacturerDeviceType,
|
|
453
|
-
organizationIds: organizationIds,
|
|
454
|
-
pathId: pathId,
|
|
455
|
-
placeId: placeId,
|
|
456
|
-
sn: sn,
|
|
457
|
-
boxNum: boxNum,
|
|
458
|
-
cameraType: cameraType,
|
|
459
|
-
hasFrontEnd: +deviceFrontEnd[id] !== 0,
|
|
460
|
-
hasStorage: +deviceStorage[id] !== 0,
|
|
461
|
-
parentId: parentId,
|
|
462
|
-
accessType: accessType,
|
|
463
|
-
villageLocationType: villageLocationType,
|
|
464
|
-
placeTags: placeTags,
|
|
465
|
-
createTime: createTime
|
|
466
|
-
});
|
|
467
|
-
});
|
|
468
|
-
return deviceList;
|
|
469
|
-
}
|
|
470
|
-
export function queryUserDevice(_x4) {
|
|
471
|
-
return _queryUserDevice.apply(this, arguments);
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
function _queryUserDevice() {
|
|
475
|
-
_queryUserDevice = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(options) {
|
|
476
|
-
var needDeviceLocalRecordAbility,
|
|
477
|
-
devices,
|
|
478
|
-
_devices,
|
|
479
|
-
listRes,
|
|
480
|
-
statusRes,
|
|
481
|
-
frontEndRes,
|
|
482
|
-
deviceState,
|
|
483
|
-
deviceFrontEnd,
|
|
484
|
-
deviceStorage,
|
|
485
|
-
_args5 = arguments;
|
|
486
|
-
|
|
487
|
-
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
488
|
-
while (1) {
|
|
489
|
-
switch (_context5.prev = _context5.next) {
|
|
490
|
-
case 0:
|
|
491
|
-
needDeviceLocalRecordAbility = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : true;
|
|
492
|
-
_context5.next = 3;
|
|
493
|
-
return Promise.all([queryUserDevicesNew(options ? options : {
|
|
494
|
-
offset: 0,
|
|
495
|
-
limit: 100000
|
|
496
|
-
}), queryUserDevicesStatusNew(options ? options : {
|
|
497
|
-
offset: 0,
|
|
498
|
-
limit: 100000
|
|
499
|
-
}), needDeviceLocalRecordAbility ? queryDeviceLocalRecordAbilityList(options ? options : {
|
|
500
|
-
queryType: 2
|
|
501
|
-
}) : emptyPromise()]);
|
|
502
|
-
|
|
503
|
-
case 3:
|
|
504
|
-
devices = _context5.sent;
|
|
505
|
-
_devices = _slicedToArray(devices, 3), listRes = _devices[0], statusRes = _devices[1], frontEndRes = _devices[2];
|
|
506
|
-
deviceState = {};
|
|
507
|
-
statusRes.data.split('|').forEach(function (res) {
|
|
508
|
-
var _res$split = res.split(','),
|
|
509
|
-
_res$split2 = _slicedToArray(_res$split, 2),
|
|
510
|
-
id = _res$split2[0],
|
|
511
|
-
state = _res$split2[1];
|
|
512
|
-
|
|
513
|
-
deviceState[id] = "".concat(state);
|
|
514
|
-
});
|
|
515
|
-
deviceFrontEnd = {};
|
|
516
|
-
deviceStorage = {};
|
|
517
|
-
frontEndRes && frontEndRes.data.split('|').forEach(function (res_1) {
|
|
518
|
-
var _res_1$split = res_1.split(','),
|
|
519
|
-
_res_1$split2 = _slicedToArray(_res_1$split, 3),
|
|
520
|
-
id_1 = _res_1$split2[0],
|
|
521
|
-
state_1 = _res_1$split2[1],
|
|
522
|
-
storage = _res_1$split2[2];
|
|
523
|
-
|
|
524
|
-
deviceFrontEnd[id_1] = state_1;
|
|
525
|
-
deviceStorage[id_1] = storage;
|
|
526
|
-
});
|
|
527
|
-
return _context5.abrupt("return", formatDeviceMap(listRes.data.list, listRes.data.other, deviceState, deviceFrontEnd, deviceStorage));
|
|
528
|
-
|
|
529
|
-
case 11:
|
|
530
|
-
case "end":
|
|
531
|
-
return _context5.stop();
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
}, _callee5);
|
|
535
|
-
}));
|
|
536
|
-
return _queryUserDevice.apply(this, arguments);
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
export function authFormat() {
|
|
540
|
-
var userRoles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
541
|
-
var systemFeatures = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
542
|
-
var userType = arguments.length > 2 ? arguments[2] : undefined;
|
|
543
|
-
var filterFeatures = arguments.length > 3 ? arguments[3] : undefined;
|
|
544
|
-
var features = [];
|
|
545
|
-
/* prettier-ignore */
|
|
546
|
-
|
|
547
|
-
var appIds = Object.values(_Config.AppConfig).filter(function (v) {
|
|
548
|
-
return v.appType === 0;
|
|
549
|
-
}).map(function (v) {
|
|
550
|
-
return v.id;
|
|
551
|
-
});
|
|
552
|
-
userRoles = userRoles.map(function (v) {
|
|
553
|
-
return "".concat(v);
|
|
554
|
-
});
|
|
555
|
-
systemFeatures.forEach(function (item) {
|
|
556
|
-
var _item$extJson;
|
|
557
|
-
|
|
558
|
-
if (Array.isArray((_item$extJson = item.extJson) === null || _item$extJson === void 0 ? void 0 : _item$extJson.relations) && userRoles.includes("".concat(item.code))) {
|
|
559
|
-
var _userRoles;
|
|
560
|
-
|
|
561
|
-
var _features = filterFeatures || systemFeatures;
|
|
562
|
-
|
|
563
|
-
var relationsFeatures = item.extJson.relations.map(function (v) {
|
|
564
|
-
return _features.find(function (v2) {
|
|
565
|
-
return v2.alias === v;
|
|
566
|
-
});
|
|
567
|
-
}).filter(function (v) {
|
|
568
|
-
return !!v;
|
|
569
|
-
});
|
|
570
|
-
var relationCodes = relationsFeatures.map(function (v) {
|
|
571
|
-
return "".concat(v.code);
|
|
572
|
-
});
|
|
573
|
-
var unSysFeatures = relationsFeatures.filter(function (v) {
|
|
574
|
-
return !systemFeatures.find(function (v1) {
|
|
575
|
-
return v1.code === v.code;
|
|
576
|
-
});
|
|
577
|
-
});
|
|
578
|
-
systemFeatures.push.apply(systemFeatures, _toConsumableArray(unSysFeatures));
|
|
579
|
-
|
|
580
|
-
(_userRoles = userRoles).push.apply(_userRoles, _toConsumableArray(relationCodes));
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
if (appIds.includes(item.microApplicationId)) {
|
|
584
|
-
userRoles.push("".concat(item.code));
|
|
585
|
-
}
|
|
586
|
-
});
|
|
587
|
-
systemFeatures.forEach(function (item) {
|
|
588
|
-
if (userRoles.includes("".concat(item.code)) || +userType === 100702 && userRoles.includes(item.parentCode)) {
|
|
589
|
-
if (item.groups && item.groups.group1) {
|
|
590
|
-
features.push({
|
|
591
|
-
id: item.groups.group1.key,
|
|
592
|
-
name: item.groups.group1.label,
|
|
593
|
-
code: item.groups.group1.key,
|
|
594
|
-
alias: item.groups.group1.key,
|
|
595
|
-
sort: item.groups.group1.sort || item.sort,
|
|
596
|
-
icon: item.groups.group1.icon,
|
|
597
|
-
isMenu: 1,
|
|
598
|
-
level: 1,
|
|
599
|
-
microApplicationId: item.microApplicationId
|
|
600
|
-
});
|
|
601
|
-
|
|
602
|
-
if (item.groups.group2) {
|
|
603
|
-
var _item$groups$group;
|
|
604
|
-
|
|
605
|
-
features.push({
|
|
606
|
-
id: item.groups.group2.key,
|
|
607
|
-
name: item.groups.group2.label,
|
|
608
|
-
code: item.groups.group2.key,
|
|
609
|
-
alias: item.groups.group2.key,
|
|
610
|
-
sort: item.groups.group2.sort || ((_item$groups$group = item.groups.group1) === null || _item$groups$group === void 0 ? void 0 : _item$groups$group.sort) || item.sort,
|
|
611
|
-
icon: item.groups.group2.icon,
|
|
612
|
-
isMenu: 1,
|
|
613
|
-
level: 2,
|
|
614
|
-
microApplicationId: item.microApplicationId,
|
|
615
|
-
parentCode: item.groups.group1.key
|
|
616
|
-
});
|
|
617
|
-
item.parentCode = item.groups.group2.key;
|
|
618
|
-
} else {
|
|
619
|
-
features.push({
|
|
620
|
-
id: item.groups.group1.key + 'lv2',
|
|
621
|
-
name: item.groups.group1.label,
|
|
622
|
-
code: item.groups.group1.key + 'lv2',
|
|
623
|
-
alias: item.groups.group1.key + 'lv2',
|
|
624
|
-
sort: item.groups.group1.sort || item.sort,
|
|
625
|
-
isMenu: 1,
|
|
626
|
-
level: 2,
|
|
627
|
-
microApplicationId: item.microApplicationId,
|
|
628
|
-
parentCode: item.groups.group1.key
|
|
629
|
-
});
|
|
630
|
-
item.parentCode = item.groups.group1.key + 'lv2';
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
item.level = item.isMenu === 1 ? 3 : 4;
|
|
635
|
-
features.push(item);
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
(window._HOT_FEATURES_ || []).forEach(function (item) {
|
|
639
|
-
if (item.groups && item.groups.group1) {
|
|
640
|
-
features.push({
|
|
641
|
-
id: item.groups.group1.key,
|
|
642
|
-
name: item.groups.group1.label,
|
|
643
|
-
code: item.groups.group1.key,
|
|
644
|
-
alias: item.groups.group1.key,
|
|
645
|
-
sort: item.groups.group1.sort || item.sort,
|
|
646
|
-
icon: item.groups.group1.icon,
|
|
647
|
-
isMenu: 1,
|
|
648
|
-
microApplicationId: item.microApplicationId
|
|
649
|
-
});
|
|
650
|
-
|
|
651
|
-
if (item.groups.group2) {
|
|
652
|
-
var _item$groups$group2;
|
|
653
|
-
|
|
654
|
-
features.push({
|
|
655
|
-
id: item.groups.group2.key,
|
|
656
|
-
name: item.groups.group2.label,
|
|
657
|
-
code: item.groups.group2.key,
|
|
658
|
-
sort: item.groups.group2.sort || ((_item$groups$group2 = item.groups.group1) === null || _item$groups$group2 === void 0 ? void 0 : _item$groups$group2.sort) || item.sort,
|
|
659
|
-
alias: item.groups.group2.key,
|
|
660
|
-
icon: item.groups.group2.icon,
|
|
661
|
-
isMenu: 1,
|
|
662
|
-
microApplicationId: item.microApplicationId,
|
|
663
|
-
parentCode: item.groups.group1.key
|
|
664
|
-
});
|
|
665
|
-
item.parentCode = item.groups.group2.key;
|
|
666
|
-
} else {
|
|
667
|
-
features.push({
|
|
668
|
-
id: item.groups.group1.key + 'lv2',
|
|
669
|
-
name: item.groups.group1.label,
|
|
670
|
-
code: item.groups.group1.key + 'lv2',
|
|
671
|
-
alias: item.groups.group1.key + 'lv2',
|
|
672
|
-
sort: item.groups.group1.sort || item.sort,
|
|
673
|
-
icon: item.groups.group1.icon,
|
|
674
|
-
isMenu: 1,
|
|
675
|
-
level: 2,
|
|
676
|
-
microApplicationId: item.microApplicationId,
|
|
677
|
-
parentCode: item.groups.group1.key
|
|
678
|
-
});
|
|
679
|
-
item.parentCode = item.groups.group1.key + 'lv2';
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
item.level = 3;
|
|
684
|
-
features.push(item);
|
|
685
|
-
});
|
|
686
|
-
return features;
|
|
687
148
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RsponseType, XHRResponse } from './interface';
|
|
2
|
+
export declare function $http(options: RsponseType): import("fetch-like-axios").AxiosPromise<any>;
|
|
3
|
+
export declare const $httpMultiPartInstance: import("fetch-like-axios").AxiosInstance;
|
|
4
|
+
export declare const $httpXMLInstance: ({ url, method, data, headers, cancelHttp, isAsync, requestId }: XHRResponse) => Promise<unknown>;
|