@cloud-app-dev/vidc 1.0.12 → 1.0.16

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 (90) hide show
  1. package/.umirc.ts +18 -11
  2. package/es/AppLayout/AppHorizontalMenu/index.js +6 -2
  3. package/es/AppLayout/AppInlineMenu/index.js +9 -3
  4. package/es/InitialConfig/index.js +0 -1
  5. package/es/InitialRequest/index.js +4 -2
  6. package/es/InitialRequest/utils.js +120 -61
  7. package/es/OrgTree/index.js +6 -5
  8. package/es/WorkerFlow/Demo.d.ts +2 -0
  9. package/es/WorkerFlow/Demo.js +34 -0
  10. package/es/WorkerFlow/Form/Approver.d.ts +2 -0
  11. package/es/WorkerFlow/Form/Approver.js +7 -0
  12. package/es/WorkerFlow/Form/Condition.d.ts +2 -0
  13. package/es/WorkerFlow/Form/Condition.js +7 -0
  14. package/es/WorkerFlow/Form/FormAuth.d.ts +7 -0
  15. package/es/WorkerFlow/Form/FormAuth.js +116 -0
  16. package/es/WorkerFlow/Form/Handle.d.ts +8 -0
  17. package/es/WorkerFlow/Form/Handle.js +19 -0
  18. package/es/WorkerFlow/Form/UserSelect.d.ts +7 -0
  19. package/es/WorkerFlow/Form/UserSelect.js +253 -0
  20. package/es/WorkerFlow/Form/UserSet.d.ts +9 -0
  21. package/es/WorkerFlow/Form/UserSet.js +124 -0
  22. package/es/WorkerFlow/Form/UsersHandleType.d.ts +6 -0
  23. package/es/WorkerFlow/Form/UsersHandleType.js +30 -0
  24. package/es/WorkerFlow/Nodes/Add.d.ts +7 -0
  25. package/es/WorkerFlow/Nodes/Add.js +81 -0
  26. package/es/WorkerFlow/Nodes/AddOption.d.ts +9 -0
  27. package/es/WorkerFlow/Nodes/AddOption.js +23 -0
  28. package/es/WorkerFlow/Nodes/AddOptionList.d.ts +6 -0
  29. package/es/WorkerFlow/Nodes/AddOptionList.js +44 -0
  30. package/es/WorkerFlow/Nodes/Approver.d.ts +11 -0
  31. package/es/WorkerFlow/Nodes/Approver.js +53 -0
  32. package/es/WorkerFlow/Nodes/Condition.d.ts +9 -0
  33. package/es/WorkerFlow/Nodes/Condition.js +154 -0
  34. package/es/WorkerFlow/Nodes/Constants.d.ts +34 -0
  35. package/es/WorkerFlow/Nodes/Constants.js +110 -0
  36. package/es/WorkerFlow/Nodes/End.d.ts +6 -0
  37. package/es/WorkerFlow/Nodes/End.js +16 -0
  38. package/es/WorkerFlow/Nodes/Handle.d.ts +11 -0
  39. package/es/WorkerFlow/Nodes/Handle.js +53 -0
  40. package/es/WorkerFlow/Nodes/Node.d.ts +7 -0
  41. package/es/WorkerFlow/Nodes/Node.js +26 -0
  42. package/es/WorkerFlow/Nodes/Notifier.d.ts +11 -0
  43. package/es/WorkerFlow/Nodes/Notifier.js +58 -0
  44. package/es/WorkerFlow/Nodes/Render.d.ts +7 -0
  45. package/es/WorkerFlow/Nodes/Render.js +16 -0
  46. package/es/WorkerFlow/Nodes/Start.d.ts +11 -0
  47. package/es/WorkerFlow/Nodes/Start.js +26 -0
  48. package/es/WorkerFlow/Nodes/TitleElement.d.ts +9 -0
  49. package/es/WorkerFlow/Nodes/TitleElement.js +92 -0
  50. package/es/WorkerFlow/Nodes/Wrap.d.ts +13 -0
  51. package/es/WorkerFlow/Nodes/Wrap.js +29 -0
  52. package/es/WorkerFlow/OperatorContext.d.ts +4 -0
  53. package/es/WorkerFlow/OperatorContext.js +3 -0
  54. package/es/WorkerFlow/Tools.d.ts +8 -0
  55. package/es/WorkerFlow/Tools.js +80 -0
  56. package/es/WorkerFlow/XML/CanvasTag.d.ts +3 -0
  57. package/es/WorkerFlow/XML/CanvasTag.js +126 -0
  58. package/es/WorkerFlow/XML/EndEvent.d.ts +1 -0
  59. package/es/WorkerFlow/XML/EndEvent.js +14 -0
  60. package/es/WorkerFlow/XML/ExclusiveGateway.d.ts +8 -0
  61. package/es/WorkerFlow/XML/ExclusiveGateway.js +120 -0
  62. package/es/WorkerFlow/XML/Root.d.ts +1 -0
  63. package/es/WorkerFlow/XML/Root.js +5 -0
  64. package/es/WorkerFlow/XML/StartEvent.d.ts +5 -0
  65. package/es/WorkerFlow/XML/StartEvent.js +28 -0
  66. package/es/WorkerFlow/XML/UserTask.d.ts +5 -0
  67. package/es/WorkerFlow/XML/UserTask.js +45 -0
  68. package/es/WorkerFlow/XML/index.d.ts +3 -0
  69. package/es/WorkerFlow/XML/index.js +97 -0
  70. package/es/WorkerFlow/XML/utils.d.ts +4 -0
  71. package/es/WorkerFlow/XML/utils.js +47 -0
  72. package/es/WorkerFlow/api.d.ts +8 -0
  73. package/es/WorkerFlow/api.js +49 -0
  74. package/es/WorkerFlow/bpmn-mock.bpmn +103 -0
  75. package/es/WorkerFlow/data.json +83 -0
  76. package/es/WorkerFlow/index.css +728 -0
  77. package/es/WorkerFlow/index.d.ts +8 -0
  78. package/es/WorkerFlow/index.js +223 -0
  79. package/es/WorkerFlow/interface.d.ts +58 -0
  80. package/es/WorkerFlow/useDrawer.d.ts +14 -0
  81. package/es/WorkerFlow/useDrawer.js +77 -0
  82. package/es/WorkerFlow/useModal.d.ts +14 -0
  83. package/es/WorkerFlow/useModal.js +79 -0
  84. package/es/core.d.ts +16 -0
  85. package/es/index.d.ts +1 -0
  86. package/es/index.js +2 -1
  87. package/package.json +7 -2
  88. package/tsconfig.json +1 -0
  89. package/es/InitialConfig/index.css +0 -0
  90. package/es/InitialRequest/index.css +0 -0
package/.umirc.ts CHANGED
@@ -1,13 +1,19 @@
1
1
  import { defineConfig } from 'dumi';
2
2
  import path from 'path';
3
3
 
4
+ const token =
5
+ 'eyJhbGciOiJIUzI1NiJ9.eyJvcmdhbml6YXRpb25JZCI6IjEwMDEwMTAwMDQ0NiIsImV4dCI6MTYzNTA0MTQ2NTU1MiwidWlkIjoiMTAxMDAwMDAwMjQ5IiwidmFsaWRTdGF0ZSI6MTA0NDA2LCJyb2xlSWQiOlsxMDAwMDAxMTAzODddLCJ2YWxpZFRpbWUiOm51bGwsIm9wdENlbnRlcklkIjoiMTAwMTAwMDAwMjMzIiwidXNlclR5cGUiOjEwMDcwMiwiaWF0IjoxNjM0NzgyMjY1NTUyfQ.wtZ9A0tw3IiV1P6gHkNfVO5765OjIutSGmvfQOuGhH0';
6
+
4
7
  export default defineConfig({
5
- title: '臻观数智-基础组件库',
8
+ title: '云应用-基础组件库',
6
9
  favicon: 'https://user-images.githubusercontent.com/9554297/83762004-a0761b00-a6a9-11ea-83b4-9c8ff721d4b8.png',
7
10
  logo: 'https://user-images.githubusercontent.com/9554297/83762004-a0761b00-a6a9-11ea-83b4-9c8ff721d4b8.png',
8
11
  outputPath: 'docs-dist',
9
12
  mode: 'site',
10
- extraBabelPlugins: [['import', { libraryName: 'antd', style: 'css' }, 'antd']],
13
+ extraBabelPlugins: [
14
+ ['import', { libraryName: 'antd', style: 'css' }, 'antd'],
15
+ ['import', { libraryName: '@cloud-app-dev/basic-components', style: false, camel2DashComponentName: false, libraryDirectory: 'es' }, 'basic-components'],
16
+ ],
11
17
  navs: [
12
18
  null, // null 值代表保留约定式生成的导航,只做增量配置
13
19
  {
@@ -18,6 +24,15 @@ export default defineConfig({
18
24
  alias: {
19
25
  '@src': path.resolve('./src'),
20
26
  },
27
+ proxy: {
28
+ '/api': {
29
+ target: 'http://192.168.101.39:2234',
30
+ changeOrigin: true,
31
+ onProxyReq(proxyReq: any) {
32
+ proxyReq.setHeader('authorization', token);
33
+ },
34
+ },
35
+ },
21
36
  // mfsu: {
22
37
  // development: {
23
38
  // output: './.mfsu/dev',
@@ -26,15 +41,7 @@ export default defineConfig({
26
41
  // output: './.mfsu/prod',
27
42
  // },
28
43
  // },
29
- scripts: [
30
- 'http://192.168.101.118:2234/micro-apps/micro-dep-librarys/systemjs.js',
31
- 'http://192.168.101.118:2234/micro-apps/micro-dep-librarys/mobx.min.js',
32
- 'http://192.168.101.118:2234/micro-apps/micro-dep-librarys/immer.min.js',
33
- 'http://192.168.101.118:2234/micro-apps/micro-dep-librarys/axios.min.js',
34
- 'http://192.168.101.118:2234/micro-apps/micro-dep-librarys/lodash.min.js',
35
- 'http://192.168.101.118:2234/micro-apps/micro-dep-librarys/micro-utils/micro-utils.js',
36
- 'http://192.168.101.118:2234/micro-apps/micro-dep-librarys/micro-basic-library/micro-basic-library.js',
37
- ],
44
+ scripts: ['//at.alicdn.com/t/font_1724012_972m5d05cou.js'],
38
45
  styles: [
39
46
  `:root{
40
47
  --primary: rgba(18,122,255,1);
@@ -208,15 +208,17 @@ function AppHorizontalMenu(_ref) {
208
208
  type: "icon-S_Arrow_SmallRight"
209
209
  }))), /*#__PURE__*/React.createElement(QueueAnim, {
210
210
  type: "top"
211
- }, state.isFunc && /*#__PURE__*/React.createElement(FunctionPreview, {
211
+ }, state.isFunc ? /*#__PURE__*/React.createElement(FunctionPreview, {
212
212
  className: "app-horizontal-funcs",
213
213
  currentMenuKeys: app.currentMenuKeys,
214
214
  onMenuSelect: onMenuSelect,
215
215
  key: "all",
216
216
  menuList: auth.userMenuList
217
+ }) : /*#__PURE__*/React.createElement(React.Fragment, {
218
+ key: "allempty"
217
219
  })), /*#__PURE__*/React.createElement(QueueAnim, {
218
220
  type: "alpha"
219
- }, state.isFunc && /*#__PURE__*/React.createElement("div", {
221
+ }, state.isFunc ? /*#__PURE__*/React.createElement("div", {
220
222
  key: "mask",
221
223
  className: "fun-preview-mask",
222
224
  onClick: function onClick() {
@@ -226,6 +228,8 @@ function AppHorizontalMenu(_ref) {
226
228
  });
227
229
  });
228
230
  }
231
+ }) : /*#__PURE__*/React.createElement(React.Fragment, {
232
+ key: "maskempty"
229
233
  })));
230
234
  }
231
235
 
@@ -169,23 +169,29 @@ function AppInlineMenu(_ref) {
169
169
  }), !state.collapsed ? /*#__PURE__*/React.createElement("span", null, v.name) : null)));
170
170
  }))), /*#__PURE__*/React.createElement(QueueAnim, {
171
171
  type: "left"
172
- }, state.subMenuKey && state.subMenuKey !== 'all' && /*#__PURE__*/React.createElement(SubGroup, {
172
+ }, state.subMenuKey && state.subMenuKey !== 'all' ? /*#__PURE__*/React.createElement(SubGroup, {
173
173
  currentMenuKeys: app.currentMenuKeys,
174
174
  onMenuSelect: onMenuSelect,
175
175
  style: popStyle,
176
176
  key: state.subMenuKey,
177
177
  menuList: state.subMenus
178
- }), state.subMenuKey && state.subMenuKey === 'all' && /*#__PURE__*/React.createElement(FunctionPreview, {
178
+ }) : /*#__PURE__*/React.createElement(React.Fragment, {
179
+ key: "menuempty"
180
+ }), state.subMenuKey && state.subMenuKey === 'all' ? /*#__PURE__*/React.createElement(FunctionPreview, {
179
181
  currentMenuKeys: app.currentMenuKeys,
180
182
  style: popStyle,
181
183
  onMenuSelect: onMenuSelect,
182
184
  key: "all",
183
185
  menuList: auth.userMenuList
186
+ }) : /*#__PURE__*/React.createElement(React.Fragment, {
187
+ key: "allempty"
184
188
  })), /*#__PURE__*/React.createElement(QueueAnim, {
185
189
  type: "alpha"
186
- }, state.subMenuKey && state.subMenuKey === 'all' && /*#__PURE__*/React.createElement("div", {
190
+ }, state.subMenuKey && state.subMenuKey === 'all' ? /*#__PURE__*/React.createElement("div", {
187
191
  key: "mask",
188
192
  className: "fun-preview-mask"
193
+ }) : /*#__PURE__*/React.createElement(React.Fragment, {
194
+ key: "maskempty"
189
195
  })));
190
196
  }
191
197
 
@@ -16,7 +16,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
 
17
17
  import React, { useState, useEffect } from 'react';
18
18
  import { formatAppConfig, querySystemConfig, queryThemeConfig, queryMapConfig, queryMicroApplicationList, querySystemUpdate, queryLogoConfig, queryZenMapConfig, queryZenMap3DConfig } from './utils';
19
- import "./index.css";
20
19
 
21
20
  function InitialConfig(_ref) {
22
21
  var children = _ref.children,
@@ -21,9 +21,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
21
21
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
22
 
23
23
  import React, { useState, useEffect } from 'react';
24
- import { initialization, queryOrganizationsList, queryPlacesList, queryUserDevice, authFormat } from './utils';
24
+ import { initialization, queryOrganizationsList, queryPlacesList, queryUserDevice, authFormat, queryUserOrganizationsList } from './utils';
25
25
  import { logger } from '@cloud-app-dev/utils';
26
- import "./index.css";
27
26
  var _BASE_DATA_INIT = false;
28
27
 
29
28
  function InitialRequest(_ref) {
@@ -66,6 +65,9 @@ function InitialRequest(_ref) {
66
65
 
67
66
  _Store.auth.initAuthData([].concat(_toConsumableArray(userAuth), _toConsumableArray(globalAuth)));
68
67
 
68
+ queryUserOrganizationsList().then(function (res) {
69
+ return _Store.orgUser.initSetOrgData(res.data || []);
70
+ });
69
71
  queryOrganizationsList().then(function (res) {
70
72
  return _Store.org.initSetOrgData((res === null || res === void 0 ? void 0 : res.data) || []);
71
73
  });
@@ -2,6 +2,12 @@ import _Store from "@cloud-app-dev/basic-components/es/Store";
2
2
  import _Config from "@cloud-app-dev/basic-components/es/Config";
3
3
  import _Service from "@cloud-app-dev/basic-components/es/Service";
4
4
 
5
+ 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; }
6
+
7
+ 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; }
8
+
9
+ 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; }
10
+
5
11
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
6
12
 
7
13
  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."); }
@@ -22,12 +28,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
22
28
 
23
29
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
30
 
25
- 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; }
26
-
27
- 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; }
28
-
29
- 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; }
30
-
31
31
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
32
32
 
33
33
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
@@ -52,7 +52,7 @@ export function initialization() {
52
52
 
53
53
  function _initialization() {
54
54
  _initialization = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
55
- var headers, result, userInfo, userId, operationCenterId, data, data2, centerUrl, centerInfo, themeInfo, themeConfig, themeStyle, themeId, themeConfigInfo, _themeRes$data, themeUrl, themeRes, _themeRes$data2, _themeRes$data3, 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;
55
+ 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;
56
56
 
57
57
  return regeneratorRuntime.wrap(function _callee$(_context) {
58
58
  while (1) {
@@ -109,15 +109,14 @@ function _initialization() {
109
109
  _Store.app.updateThemeStyle(themeStyle);
110
110
 
111
111
  themeId = themeConfig.themeId || centerInfo.data.hues;
112
- themeConfigInfo = {};
113
112
 
114
113
  if (!themeId) {
115
- _context.next = 27;
114
+ _context.next = 26;
116
115
  break;
117
116
  }
118
117
 
119
118
  themeUrl = "/api/micro/configure/v1/queryConfigureByConfigureId/".concat(themeId);
120
- _context.next = 25;
119
+ _context.next = 24;
121
120
  return _Service.$http({
122
121
  data: data2,
123
122
  method: 'get',
@@ -126,21 +125,21 @@ function _initialization() {
126
125
  requestId: 'themeRes'
127
126
  });
128
127
 
129
- case 25:
128
+ case 24:
130
129
  themeRes = _context.sent;
131
130
 
132
- if ((_themeRes$data = themeRes.data) === null || _themeRes$data === void 0 ? void 0 : _themeRes$data.info) {
133
- themeConfigInfo = (_themeRes$data2 = themeRes.data) === null || _themeRes$data2 === void 0 ? void 0 : _themeRes$data2.info;
134
-
135
- _Config.registerThemeConfig((_themeRes$data3 = themeRes.data) === null || _themeRes$data3 === void 0 ? void 0 : _themeRes$data3.info);
131
+ try {
132
+ _Config.registerThemeConfig((_themeRes$data = themeRes.data) === null || _themeRes$data === void 0 ? void 0 : _themeRes$data.info);
133
+ } catch (e) {
134
+ console.error(e);
136
135
  }
137
136
 
138
- case 27:
137
+ case 26:
139
138
  userPrivilegesUrl = "/api/user/role/v1/queryUserRoles/".concat(userId);
140
139
  centerPrivilegesUrl = "/api/micro/applicationSystemScene/v1/queryAllFunctionByApplicationSystemId/".concat(operationCenterId);
141
140
  allPrivilegesUrl = "/api/micro/function/v1/queryFunctionList";
142
141
  systemInfoUrl = "/api/user/v1/systemInfo/".concat(userId);
143
- _context.next = 33;
142
+ _context.next = 32;
144
143
  return Promise.all([catchPromise(_Service.$http({
145
144
  data: data,
146
145
  method: method,
@@ -167,7 +166,7 @@ function _initialization() {
167
166
  })) //获取用户系统信息
168
167
  ]);
169
168
 
170
- case 33:
169
+ case 32:
171
170
  _yield$Promise$all = _context.sent;
172
171
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 4);
173
172
  _yield$Promise$all2$ = _yield$Promise$all2[0];
@@ -189,11 +188,10 @@ function _initialization() {
189
188
  centerPrivileges: centerPrivileges,
190
189
  allPrivileges: allPrivileges,
191
190
  centerInfo: centerInfo,
192
- systemInfo: systemInfo,
193
- themeConfigInfo: themeConfigInfo
191
+ systemInfo: systemInfo
194
192
  });
195
193
 
196
- case 43:
194
+ case 42:
197
195
  case "end":
198
196
  return _context.stop();
199
197
  }
@@ -203,32 +201,97 @@ function _initialization() {
203
201
  return _initialization.apply(this, arguments);
204
202
  }
205
203
 
206
- export function queryOrganizationsList(options) {
207
- var headers = {
208
- Authorization: cache.getCache('token', 'session')
209
- };
210
- var url = '/api/user/v1/organization/queryChildOrganizationsById';
211
- return catchPromise(_Service.$http({
212
- headers: headers,
213
- url: url,
214
- method: 'post',
215
- requestId: 'queryOrganizationsList',
216
- data: _objectSpread({
217
- selectChildOrganization: true
218
- }, options)
204
+ export function queryOrganizationsList(_x) {
205
+ return _queryOrganizationsList.apply(this, arguments);
206
+ }
207
+
208
+ function _queryOrganizationsList() {
209
+ _queryOrganizationsList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(options) {
210
+ var headers, url, res, data;
211
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
212
+ while (1) {
213
+ switch (_context2.prev = _context2.next) {
214
+ case 0:
215
+ headers = {
216
+ Authorization: cache.getCache('token', 'session')
217
+ };
218
+ url = '/api/udm-api/DeviceBuzTree/queryList';
219
+ _context2.next = 4;
220
+ return _Service.$http({
221
+ headers: headers,
222
+ url: url,
223
+ method: 'post',
224
+ requestId: 'queryBusinessTree',
225
+ data: {}
226
+ });
227
+
228
+ case 4:
229
+ res = _context2.sent;
230
+ data = res.data || [];
231
+ data.forEach(function (v) {
232
+ v.organizationName = v.groupName;
233
+ v.organizationDescription = v.description;
234
+ });
235
+ return _context2.abrupt("return", {
236
+ data: data
237
+ });
238
+
239
+ case 8:
240
+ case "end":
241
+ return _context2.stop();
242
+ }
243
+ }
244
+ }, _callee2);
219
245
  }));
246
+ return _queryOrganizationsList.apply(this, arguments);
247
+ }
248
+
249
+ export function queryUserOrganizationsList(_x2) {
250
+ return _queryUserOrganizationsList.apply(this, arguments);
220
251
  }
221
- export function queryPlacesList(_x) {
252
+
253
+ function _queryUserOrganizationsList() {
254
+ _queryUserOrganizationsList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(options) {
255
+ var headers, url;
256
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
257
+ while (1) {
258
+ switch (_context3.prev = _context3.next) {
259
+ case 0:
260
+ headers = {
261
+ Authorization: cache.getCache('token', 'session')
262
+ };
263
+ url = '/api/user/v1/organization/queryChildOrganizationsById';
264
+ return _context3.abrupt("return", catchPromise(_Service.$http({
265
+ headers: headers,
266
+ url: url,
267
+ method: 'post',
268
+ requestId: 'queryOrganizationsList',
269
+ data: _objectSpread({
270
+ selectChildOrganization: true
271
+ }, options)
272
+ })));
273
+
274
+ case 3:
275
+ case "end":
276
+ return _context3.stop();
277
+ }
278
+ }
279
+ }, _callee3);
280
+ }));
281
+ return _queryUserOrganizationsList.apply(this, arguments);
282
+ }
283
+
284
+ export function queryPlacesList(_x3) {
222
285
  return _queryPlacesList.apply(this, arguments);
223
286
  }
224
287
 
225
288
  function _queryPlacesList() {
226
- _queryPlacesList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(orgId) {
289
+ _queryPlacesList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(orgId) {
227
290
  var headers, url, url2, data, res, _res, _res$, placeDeviceList, _res$2, placeAuthList;
228
291
 
229
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
292
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
230
293
  while (1) {
231
- switch (_context2.prev = _context2.next) {
294
+ switch (_context4.prev = _context4.next) {
232
295
  case 0:
233
296
  headers = {
234
297
  Authorization: cache.getCache('token', 'session')
@@ -239,7 +302,7 @@ function _queryPlacesList() {
239
302
  organizationId: orgId,
240
303
  includeSubOrgIds: true
241
304
  };
242
- _context2.next = 6;
305
+ _context4.next = 6;
243
306
  return Promise.all([catchPromise(_Service.$http({
244
307
  method: method,
245
308
  url: url,
@@ -256,20 +319,20 @@ function _queryPlacesList() {
256
319
  ]);
257
320
 
258
321
  case 6:
259
- res = _context2.sent;
322
+ res = _context4.sent;
260
323
  _res = _slicedToArray(res, 2), _res$ = _res[0], placeDeviceList = _res$ === void 0 ? {
261
324
  data: []
262
325
  } : _res$, _res$2 = _res[1], placeAuthList = _res$2 === void 0 ? {
263
326
  data: []
264
327
  } : _res$2;
265
- return _context2.abrupt("return", [placeDeviceList.data, placeAuthList.data]);
328
+ return _context4.abrupt("return", [placeDeviceList.data, placeAuthList.data]);
266
329
 
267
330
  case 9:
268
331
  case "end":
269
- return _context2.stop();
332
+ return _context4.stop();
270
333
  }
271
334
  }
272
- }, _callee2);
335
+ }, _callee4);
273
336
  }));
274
337
  return _queryPlacesList.apply(this, arguments);
275
338
  }
@@ -354,23 +417,19 @@ export function formatDeviceMap() {
354
417
  createTime = _item$split2[20];
355
418
 
356
419
  try {
357
- organizationIds = JSON.parse(organizationIds).map(function (v) {
358
- return v.toString();
359
- });
420
+ organizationIds = organizationIds.split(',');
360
421
  } catch (e) {
361
422
  organizationIds = [];
362
423
  }
363
424
 
364
425
  try {
365
- pathId = JSON.parse(pathId);
426
+ pathId = pathId.split(',');
366
427
  } catch (e) {
367
428
  pathId = [];
368
429
  }
369
430
 
370
431
  try {
371
- placeTags = JSON.parse(placeTags).map(function (v) {
372
- return v.toString();
373
- });
432
+ placeTags = placeTags.split(',');
374
433
  } catch (e) {
375
434
  placeTags = [];
376
435
  }
@@ -409,12 +468,12 @@ export function formatDeviceMap() {
409
468
  });
410
469
  return deviceList;
411
470
  }
412
- export function queryUserDevice(_x2) {
471
+ export function queryUserDevice(_x4) {
413
472
  return _queryUserDevice.apply(this, arguments);
414
473
  }
415
474
 
416
475
  function _queryUserDevice() {
417
- _queryUserDevice = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(options) {
476
+ _queryUserDevice = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(options) {
418
477
  var needDeviceLocalRecordAbility,
419
478
  devices,
420
479
  _devices,
@@ -424,14 +483,14 @@ function _queryUserDevice() {
424
483
  deviceState,
425
484
  deviceFrontEnd,
426
485
  deviceStorage,
427
- _args3 = arguments;
486
+ _args5 = arguments;
428
487
 
429
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
488
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
430
489
  while (1) {
431
- switch (_context3.prev = _context3.next) {
490
+ switch (_context5.prev = _context5.next) {
432
491
  case 0:
433
- needDeviceLocalRecordAbility = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : true;
434
- _context3.next = 3;
492
+ needDeviceLocalRecordAbility = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : true;
493
+ _context5.next = 3;
435
494
  return Promise.all([queryUserDevicesNew(options ? options : {
436
495
  offset: 0,
437
496
  limit: 100000
@@ -443,7 +502,7 @@ function _queryUserDevice() {
443
502
  }) : emptyPromise()]);
444
503
 
445
504
  case 3:
446
- devices = _context3.sent;
505
+ devices = _context5.sent;
447
506
  _devices = _slicedToArray(devices, 3), listRes = _devices[0], statusRes = _devices[1], frontEndRes = _devices[2];
448
507
  deviceState = {};
449
508
  statusRes.data.split('|').forEach(function (res) {
@@ -466,14 +525,14 @@ function _queryUserDevice() {
466
525
  deviceFrontEnd[id_1] = state_1;
467
526
  deviceStorage[id_1] = storage;
468
527
  });
469
- return _context3.abrupt("return", formatDeviceMap(listRes.data.list, listRes.data.other, deviceState, deviceFrontEnd, deviceStorage));
528
+ return _context5.abrupt("return", formatDeviceMap(listRes.data.list, listRes.data.other, deviceState, deviceFrontEnd, deviceStorage));
470
529
 
471
530
  case 11:
472
531
  case "end":
473
- return _context3.stop();
532
+ return _context5.stop();
474
533
  }
475
534
  }
476
- }, _callee3);
535
+ }, _callee5);
477
536
  }));
478
537
  return _queryUserDevice.apply(this, arguments);
479
538
  }
@@ -3,10 +3,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
3
3
  import _CBox from "@cloud-app-dev/basic-components/es/CBox";
4
4
  import _Tree from "@cloud-app-dev/basic-components/es/Tree";
5
5
  import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
6
+ import _Store from "@cloud-app-dev/basic-components/es/Store";
6
7
  var _excluded = ["org", "className", "title", "inputPlaceholder", "renderHeader", "treeNodeClass", "activeKey", "treeData"];
7
8
 
8
- var _dec, _class;
9
-
10
9
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
11
10
 
12
11
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
@@ -49,7 +48,8 @@ import React from 'react';
49
48
  import TreeTitle from '../TreeTitle';
50
49
  import { inject } from 'mobx-react';
51
50
  import "./index.css";
52
- var OrgTree = (_dec = inject('org'), _dec(_class = /*#__PURE__*/function (_React$Component) {
51
+
52
+ var OrgTree = /*#__PURE__*/function (_React$Component) {
53
53
  _inherits(OrgTree, _React$Component);
54
54
 
55
55
  var _super = _createSuper(OrgTree);
@@ -62,7 +62,7 @@ var OrgTree = (_dec = inject('org'), _dec(_class = /*#__PURE__*/function (_React
62
62
  _this = _super.call(this, props);
63
63
 
64
64
  _this.onChange = function (value) {
65
- var org = _this.props.org;
65
+ var org = _Store.org;
66
66
  var expandedKeys = [];
67
67
 
68
68
  if (!value) {
@@ -172,5 +172,6 @@ var OrgTree = (_dec = inject('org'), _dec(_class = /*#__PURE__*/function (_React
172
172
  }]);
173
173
 
174
174
  return OrgTree;
175
- }(React.Component)) || _class);
175
+ }(React.Component);
176
+
176
177
  export default OrgTree;
@@ -0,0 +1,2 @@
1
+ declare const App: () => JSX.Element;
2
+ export default App;
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import WorkerFlow from './index';
3
+ import data from './data.json';
4
+ var nodeData = data.data;
5
+ var form = [{
6
+ label: '处理意见',
7
+ auth: 1,
8
+ name: 'yijian'
9
+ }, {
10
+ label: '备注',
11
+ auth: 1,
12
+ name: 'desc'
13
+ }, {
14
+ label: '图片',
15
+ auth: 1,
16
+ name: 'image'
17
+ }, {
18
+ label: '审核意见',
19
+ auth: 1,
20
+ name: 'shyj'
21
+ }];
22
+
23
+ var App = function App() {
24
+ return /*#__PURE__*/React.createElement("div", {
25
+ style: {
26
+ height: 800
27
+ }
28
+ }, /*#__PURE__*/React.createElement(WorkerFlow, {
29
+ data: nodeData,
30
+ form: form
31
+ }));
32
+ };
33
+
34
+ export default App;
@@ -0,0 +1,2 @@
1
+ declare function ApproverForm(): JSX.Element;
2
+ export default ApproverForm;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+
3
+ function ApproverForm() {
4
+ return /*#__PURE__*/React.createElement("div", null, "ApproverForm");
5
+ }
6
+
7
+ export default ApproverForm;
@@ -0,0 +1,2 @@
1
+ declare function ConditionForm(): JSX.Element;
2
+ export default ConditionForm;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+
3
+ function ConditionForm() {
4
+ return /*#__PURE__*/React.createElement("div", null, "ConditionForm");
5
+ }
6
+
7
+ export default ConditionForm;
@@ -0,0 +1,7 @@
1
+ import { WorkerFlowFormType } from '../interface';
2
+ interface IFormAuthProps {
3
+ form: WorkerFlowFormType[];
4
+ onChange: (options: any) => void;
5
+ }
6
+ declare function FormAuth({ form, onChange }: IFormAuthProps): JSX.Element;
7
+ export default FormAuth;