@cloud-app-dev/vidc 1.0.50 → 2.0.0-alpha.10

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 (353) hide show
  1. package/.umirc.ts +1 -2
  2. package/es/Api/index.d.ts +3 -4
  3. package/es/Api/index.js +7 -8
  4. package/es/AppContext/Sync.d.ts +6 -0
  5. package/es/AppContext/Sync.js +47 -0
  6. package/es/AppContext/index.d.ts +10 -0
  7. package/es/AppContext/index.js +117 -0
  8. package/es/AppContext/interface.d.ts +29 -0
  9. package/es/AppContext/static.d.ts +6 -0
  10. package/es/AppContext/static.js +6 -0
  11. package/es/{AppLayout/AppTools → AppRedirect}/index.css +0 -0
  12. package/es/AppRedirect/index.d.ts +16 -0
  13. package/es/AppRedirect/index.js +38 -0
  14. package/es/AppRoute/Render.d.ts +23 -0
  15. package/es/AppRoute/Render.js +111 -0
  16. package/es/AppRoute/Rendered.d.ts +4 -0
  17. package/es/AppRoute/Rendered.js +11 -0
  18. package/es/{DagInitialConfig → AppRoute}/index.css +0 -0
  19. package/es/AppRoute/index.d.ts +14 -0
  20. package/es/{AppLayout/Header/NotifyAlarm.js → AppRoute/index.js} +52 -68
  21. package/es/AppRoute/interface.d.ts +18 -0
  22. package/es/AppRoute/utils.d.ts +1 -0
  23. package/es/AppRoute/utils.js +28 -0
  24. package/es/Auth/index.d.ts +8 -0
  25. package/es/Auth/index.js +17 -0
  26. package/es/AutoExit/index.js +8 -5
  27. package/es/CheckGroupFixed/index.css +49 -0
  28. package/es/CheckGroupFixed/index.d.ts +17 -0
  29. package/es/CheckGroupFixed/index.js +146 -0
  30. package/es/Config/index.d.ts +4 -0
  31. package/es/Config/index.js +80 -0
  32. package/es/Config/interface.d.ts +62 -0
  33. package/es/Config/utils.d.ts +2 -0
  34. package/es/Config/utils.js +43 -0
  35. package/es/ConfigContext/index.d.ts +9 -0
  36. package/es/ConfigContext/index.js +3 -0
  37. package/es/ContentBox/BetweenBox/index.css +5 -0
  38. package/es/ContentBox/BetweenBox/index.d.ts +12 -0
  39. package/es/ContentBox/BetweenBox/index.js +24 -0
  40. package/es/ContentBox/InfoBox/index.css +23 -0
  41. package/es/ContentBox/InfoBox/index.d.ts +12 -0
  42. package/es/ContentBox/InfoBox/index.js +26 -0
  43. package/es/ContentBox/TwoColumnBox/index.css +77 -0
  44. package/es/ContentBox/TwoColumnBox/index.d.ts +10 -0
  45. package/es/ContentBox/TwoColumnBox/index.js +50 -0
  46. package/es/ContentBox/deps/content-grid.d.ts +9 -0
  47. package/es/ContentBox/deps/content-grid.js +9 -0
  48. package/es/ContentBox/deps/grid-factory.d.ts +10 -0
  49. package/es/ContentBox/deps/grid-factory.js +72 -0
  50. package/es/ContentBox/deps/simple-grid.d.ts +9 -0
  51. package/es/ContentBox/deps/simple-grid.js +8 -0
  52. package/es/ContentBox/index.css +9 -0
  53. package/es/ContentBox/index.d.ts +14 -0
  54. package/es/ContentBox/index.js +28 -0
  55. package/es/DeviceIcon/icon.js +5 -5
  56. package/es/DeviceIcon/index.js +2 -2
  57. package/es/DeviceList/index.d.ts +1 -1
  58. package/es/DeviceList/index.js +4 -4
  59. package/es/DeviceSelect/index.js +4 -3
  60. package/es/Dict/cache.d.ts +3 -0
  61. package/es/Dict/cache.js +21 -0
  62. package/es/Dict/desc.d.ts +64 -0
  63. package/es/Dict/desc.js +162 -0
  64. package/es/Dict/device.d.ts +28 -0
  65. package/es/Dict/device.js +117 -0
  66. package/es/Dict/hook.d.ts +4 -0
  67. package/es/Dict/hook.js +114 -0
  68. package/es/Dict/index.d.ts +13 -0
  69. package/es/Dict/index.js +14 -0
  70. package/es/Dict/interface.d.ts +16 -0
  71. package/es/Dict/utils.d.ts +11 -0
  72. package/es/Dict/utils.js +51 -0
  73. package/es/Drag/DragAndDropItem.d.ts +4 -0
  74. package/es/Drag/DragAndDropItem.js +145 -0
  75. package/es/Drag/DropItem.d.ts +4 -0
  76. package/es/Drag/DropItem.js +54 -0
  77. package/es/{DagInitialRequest → Drag}/index.css +0 -0
  78. package/es/Drag/index.d.ts +7 -0
  79. package/es/Drag/index.js +7 -0
  80. package/es/Drag/interface.d.ts +16 -0
  81. package/es/Drawer/Demo.d.ts +3 -0
  82. package/es/Drawer/Demo.js +52 -0
  83. package/es/Drawer/Footer.d.ts +4 -0
  84. package/es/Drawer/Footer.js +26 -0
  85. package/es/Drawer/index.css +39 -0
  86. package/es/Drawer/index.d.ts +12 -0
  87. package/es/Drawer/index.js +41 -0
  88. package/es/Drawer/interface.d.ts +191 -0
  89. package/es/DynamicDeviceList/CheckExt.js +3 -3
  90. package/es/DynamicDeviceList/index.js +2 -2
  91. package/es/DynamicDeviceList/utils.js +2 -2
  92. package/es/DynamicList/demo.d.ts +2 -0
  93. package/es/{DagInitialRequest/index.js → DynamicList/demo.js} +49 -55
  94. package/es/DynamicList/index.css +7 -0
  95. package/es/DynamicList/index.d.ts +31 -0
  96. package/es/DynamicList/index.js +132 -0
  97. package/es/FullScreen/index.css +16 -0
  98. package/es/FullScreen/index.d.ts +10 -0
  99. package/es/FullScreen/index.js +68 -0
  100. package/es/HightLevel/index.css +3 -0
  101. package/es/HightLevel/index.d.ts +9 -0
  102. package/es/HightLevel/index.js +23 -0
  103. package/es/{Upload → IconFont}/index.css +0 -0
  104. package/es/IconFont/index.d.ts +13 -0
  105. package/es/IconFont/index.js +58 -0
  106. package/es/ImageView/index.css +6 -0
  107. package/es/ImageView/index.d.ts +17 -0
  108. package/es/ImageView/index.js +58 -0
  109. package/es/InitialConfig/index.d.ts +5 -7
  110. package/es/InitialConfig/index.js +16 -51
  111. package/es/InitialConfig/utils.d.ts +15 -0
  112. package/es/InitialConfig/utils.js +36 -324
  113. package/es/InitialRequest/index.d.ts +5 -11
  114. package/es/InitialRequest/index.js +57 -66
  115. package/es/InitialRequest/utils.d.ts +9 -0
  116. package/es/InitialRequest/utils.js +53 -627
  117. package/es/Input/index.css +8 -0
  118. package/es/Input/index.d.ts +18 -0
  119. package/es/{DagInitialConfig → Input}/index.js +50 -45
  120. package/es/LabelValue/index.css +18 -0
  121. package/es/LabelValue/index.d.ts +23 -0
  122. package/es/LabelValue/index.js +32 -0
  123. package/es/List/CheckExt.d.ts +10 -0
  124. package/es/List/CheckExt.js +28 -0
  125. package/es/List/index.css +62 -6
  126. package/es/List/index.d.ts +73 -11
  127. package/es/List/index.js +163 -36
  128. package/es/List/renderItem.d.ts +20 -0
  129. package/es/List/renderItem.js +68 -0
  130. package/es/List/utils.d.ts +5 -0
  131. package/es/List/utils.js +18 -0
  132. package/es/ListExt/index.css +9 -0
  133. package/es/ListExt/index.d.ts +19 -0
  134. package/es/ListExt/index.js +44 -0
  135. package/es/LoaderApp/index.css +3 -0
  136. package/es/LoaderApp/index.d.ts +31 -0
  137. package/es/LoaderApp/index.js +132 -0
  138. package/es/LoaderApp/interface.d.ts +6 -0
  139. package/es/LoaderApp/loader.d.ts +20 -0
  140. package/es/LoaderApp/loader.js +86 -0
  141. package/es/LoaderApp/utils.d.ts +13 -0
  142. package/es/LoaderApp/utils.js +121 -0
  143. package/es/LoaderScript/index.d.ts +26 -0
  144. package/es/LoaderScript/index.js +127 -0
  145. package/es/LoaderScript/interface.d.ts +26 -0
  146. package/es/LoaderScript/utils.d.ts +12 -0
  147. package/es/LoaderScript/utils.js +110 -0
  148. package/es/Modal/index.css +43 -0
  149. package/es/Modal/index.d.ts +17 -0
  150. package/es/Modal/index.js +34 -0
  151. package/es/Modal/interface.d.ts +339 -0
  152. package/es/Picture/component/DefaultRects/RectInfo.d.ts +7 -0
  153. package/es/Picture/component/DefaultRects/RectInfo.js +94 -0
  154. package/es/Picture/component/DefaultRects/index.css +247 -0
  155. package/es/Picture/component/DefaultRects/index.d.ts +12 -0
  156. package/es/Picture/component/DefaultRects/index.js +47 -0
  157. package/es/Picture/component/DefaultRects/utils.d.ts +2 -0
  158. package/es/Picture/component/DefaultRects/utils.js +11 -0
  159. package/es/Picture/component/DrawRect/index.css +8 -0
  160. package/es/Picture/component/DrawRect/index.d.ts +14 -0
  161. package/es/Picture/component/DrawRect/index.js +41 -0
  162. package/es/Picture/component/MoveContent/index.css +0 -0
  163. package/es/Picture/component/MoveContent/index.d.ts +39 -0
  164. package/es/Picture/component/MoveContent/index.js +240 -0
  165. package/es/Picture/component/MoveContent/utils.d.ts +4 -0
  166. package/es/Picture/component/MoveContent/utils.js +19 -0
  167. package/es/Picture/component/RectMenu/index.css +31 -0
  168. package/es/Picture/component/RectMenu/index.d.ts +13 -0
  169. package/es/Picture/component/RectMenu/index.js +81 -0
  170. package/es/Picture/component/RectMenu/utils.d.ts +12 -0
  171. package/es/Picture/component/RectMenu/utils.js +22 -0
  172. package/es/Picture/component/Tools/index.css +42 -0
  173. package/es/Picture/component/Tools/index.d.ts +13 -0
  174. package/es/Picture/component/Tools/index.js +83 -0
  175. package/es/Picture/component/WheelScale/index.d.ts +6 -0
  176. package/es/Picture/component/WheelScale/index.js +29 -0
  177. package/es/Picture/dragBound.d.ts +5 -0
  178. package/es/Picture/dragBound.js +77 -0
  179. package/es/Picture/index.css +12 -0
  180. package/es/Picture/index.d.ts +16 -0
  181. package/es/Picture/index.js +344 -0
  182. package/es/Picture/interface.d.ts +67 -0
  183. package/es/Picture/loadCaptureRectImage.d.ts +8 -0
  184. package/es/Picture/loadCaptureRectImage.js +119 -0
  185. package/es/Picture/useDraw.d.ts +1 -0
  186. package/es/Picture/useDraw.js +136 -0
  187. package/es/Picture/utils.d.ts +22 -0
  188. package/es/Picture/utils.js +90 -0
  189. package/es/Progress/index.css +20 -0
  190. package/es/Progress/index.d.ts +11 -0
  191. package/es/{AppLayout/Header/ThemeTools.js → Progress/index.js} +46 -47
  192. package/es/RefDrawer/index.js +4 -5
  193. package/es/RefModal/index.js +4 -5
  194. package/es/ScrollList/index.css +73 -0
  195. package/es/ScrollList/index.d.ts +24 -0
  196. package/es/ScrollList/index.js +262 -0
  197. package/es/ScrollList/utils.js +84 -0
  198. package/es/Service/http.d.ts +4 -0
  199. package/es/Service/http.js +135 -0
  200. package/es/Service/index.d.ts +3 -0
  201. package/es/Service/index.js +14 -0
  202. package/es/Service/interface.d.ts +28 -0
  203. package/es/Service/logger.d.ts +3 -0
  204. package/es/Service/logger.js +13 -0
  205. package/es/Service/middleware.d.ts +5 -0
  206. package/es/Service/middleware.js +15 -0
  207. package/es/Service/utils.d.ts +3 -0
  208. package/es/Service/utils.js +11 -0
  209. package/es/TableLayout/index.css +4 -0
  210. package/es/TableLayout/index.d.ts +10 -0
  211. package/es/TableLayout/index.js +64 -0
  212. package/es/ThemeAntd/index.css +501 -0
  213. package/es/ThemeAntd/index.d.ts +7 -0
  214. package/es/ThemeAntd/index.js +6 -0
  215. package/es/ThemeAntd/style/button.css +46 -0
  216. package/es/ThemeAntd/style/checkbox.css +64 -0
  217. package/es/ThemeAntd/style/form.css +10 -0
  218. package/es/ThemeAntd/style/input.css +58 -0
  219. package/es/ThemeAntd/style/pagination.css +44 -0
  220. package/es/ThemeAntd/style/picker.css +86 -0
  221. package/es/ThemeAntd/style/popover.css +3 -0
  222. package/es/ThemeAntd/style/radio.css +71 -0
  223. package/es/ThemeAntd/style/scrollbar.css +19 -0
  224. package/es/ThemeAntd/style/select.css +57 -0
  225. package/es/ThemeAntd/style/table.css +36 -0
  226. package/es/ThemeAntd/style/tree.css +4 -0
  227. package/es/{OrgUserTree → Tree}/demo.d.ts +0 -0
  228. package/es/Tree/demo.js +69 -0
  229. package/es/Tree/index.css +64 -0
  230. package/es/Tree/index.d.ts +24 -0
  231. package/es/Tree/index.js +83 -0
  232. package/es/TreeMode/index.d.ts +1 -1
  233. package/es/TreeMode/index.js +6 -6
  234. package/es/TreeTitle/index.js +2 -2
  235. package/es/UserSelect/index.d.ts +3 -3
  236. package/es/UserSelect/index.js +17 -16
  237. package/es/VList/index.css +4 -0
  238. package/es/VList/index.d.ts +16 -0
  239. package/es/VList/index.js +56 -0
  240. package/es/VList/utils.d.ts +10 -0
  241. package/es/VList/utils.js +17 -0
  242. package/es/WorkerFlow/Form/Condition.js +6 -6
  243. package/es/WorkerFlow/Form/EmptyUserSet.js +4 -6
  244. package/es/WorkerFlow/Form/FormAuth.js +3 -3
  245. package/es/WorkerFlow/Form/GroupList.d.ts +2 -1
  246. package/es/WorkerFlow/Form/GroupList.js +3 -2
  247. package/es/WorkerFlow/Form/GroupSelect.js +4 -6
  248. package/es/WorkerFlow/Form/GroupSelectModalContent.js +11 -8
  249. package/es/WorkerFlow/Form/LevelGroupSelect.js +5 -7
  250. package/es/WorkerFlow/Form/UserAndGroupSelect.js +4 -6
  251. package/es/WorkerFlow/Form/UserSelect.js +4 -6
  252. package/es/WorkerFlow/Form/UserSelectModalContent.js +7 -5
  253. package/es/WorkerFlow/Form/UserSet.js +3 -3
  254. package/es/WorkerFlow/Nodes/Add.js +2 -3
  255. package/es/WorkerFlow/Nodes/AddOption.js +2 -2
  256. package/es/WorkerFlow/Nodes/Approver.js +2 -2
  257. package/es/WorkerFlow/Nodes/Condition.js +2 -2
  258. package/es/WorkerFlow/Nodes/Handle.js +2 -2
  259. package/es/WorkerFlow/Nodes/Notifier.js +2 -2
  260. package/es/WorkerFlow/Nodes/TitleElement.js +5 -8
  261. package/es/WorkerFlow/index.js +38 -10
  262. package/es/WorkerFlow/utils.js +2 -2
  263. package/es/core.d.ts +27 -0
  264. package/es/index.d.ts +35 -8
  265. package/es/index.js +35 -8
  266. package/es/useChangeEffect/index.d.ts +3 -0
  267. package/es/useChangeEffect/index.js +32 -0
  268. package/es/useDrawer/index.d.ts +14 -0
  269. package/es/useDrawer/index.js +90 -0
  270. package/es/useHistory/index.css +0 -0
  271. package/es/useHistory/index.d.ts +3 -0
  272. package/es/useHistory/index.js +14 -0
  273. package/es/useHttp/index.d.ts +8 -0
  274. package/es/useHttp/index.js +78 -0
  275. package/es/useModal/index.d.ts +14 -0
  276. package/es/useModal/index.js +92 -0
  277. package/es/utils.d.ts +2 -0
  278. package/es/utils.js +32 -0
  279. package/package.json +13 -7
  280. package/es/AppLayout/AppHeader/index.css +0 -4
  281. package/es/AppLayout/AppHeader/index.d.ts +0 -18
  282. package/es/AppLayout/AppHeader/index.js +0 -41
  283. package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.d.ts +0 -1
  284. package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.js +0 -10
  285. package/es/AppLayout/AppHorizontalMenu/SubGroup.d.ts +0 -9
  286. package/es/AppLayout/AppHorizontalMenu/SubGroup.js +0 -57
  287. package/es/AppLayout/AppHorizontalMenu/index.css +0 -152
  288. package/es/AppLayout/AppHorizontalMenu/index.d.ts +0 -13
  289. package/es/AppLayout/AppHorizontalMenu/index.js +0 -230
  290. package/es/AppLayout/AppInlineMenu/SubGroup.d.ts +0 -9
  291. package/es/AppLayout/AppInlineMenu/SubGroup.js +0 -34
  292. package/es/AppLayout/AppInlineMenu/index.css +0 -110
  293. package/es/AppLayout/AppInlineMenu/index.d.ts +0 -12
  294. package/es/AppLayout/AppInlineMenu/index.js +0 -194
  295. package/es/AppLayout/AppLogo/index.css +0 -74
  296. package/es/AppLayout/AppLogo/index.d.ts +0 -13
  297. package/es/AppLayout/AppLogo/index.js +0 -100
  298. package/es/AppLayout/AppTools/index.d.ts +0 -8
  299. package/es/AppLayout/AppTools/index.js +0 -10
  300. package/es/AppLayout/FunctionPreview/index.css +0 -128
  301. package/es/AppLayout/FunctionPreview/index.d.ts +0 -22
  302. package/es/AppLayout/FunctionPreview/index.js +0 -218
  303. package/es/AppLayout/Header/ListenceRoute.d.ts +0 -5
  304. package/es/AppLayout/Header/ListenceRoute.js +0 -28
  305. package/es/AppLayout/Header/ModifyPassword/index.d.ts +0 -6
  306. package/es/AppLayout/Header/ModifyPassword/index.js +0 -201
  307. package/es/AppLayout/Header/ModifyUserAvatar/index.css +0 -25
  308. package/es/AppLayout/Header/ModifyUserAvatar/index.d.ts +0 -10
  309. package/es/AppLayout/Header/ModifyUserAvatar/index.js +0 -97
  310. package/es/AppLayout/Header/Tools.d.ts +0 -11
  311. package/es/AppLayout/Header/Tools.js +0 -86
  312. package/es/AppLayout/Header/ToolsItem.d.ts +0 -1
  313. package/es/AppLayout/Header/ToolsItem.js +0 -12
  314. package/es/AppLayout/Header/UserAction.d.ts +0 -10
  315. package/es/AppLayout/Header/UserAction.js +0 -224
  316. package/es/AppLayout/Header/index.css +0 -136
  317. package/es/AppLayout/Header/index.d.ts +0 -9
  318. package/es/AppLayout/Header/index.js +0 -36
  319. package/es/AppLayout/index.css +0 -21
  320. package/es/AppLayout/index.d.ts +0 -12
  321. package/es/AppLayout/index.js +0 -38
  322. package/es/AppLayout/service/index.js +0 -174
  323. package/es/AppLayout/service/prefix.js +0 -4
  324. package/es/AppLayout/service/url.js +0 -35
  325. package/es/AppLayout/utils/menu.js +0 -24
  326. package/es/AppLayout/utils.d.ts +0 -4
  327. package/es/AppLayout/utils.js +0 -112
  328. package/es/DagInitialConfig/index.d.ts +0 -10
  329. package/es/DagInitialConfig/utils.js +0 -185
  330. package/es/DagInitialRequest/index.d.ts +0 -10
  331. package/es/DagInitialRequest/utils.js +0 -573
  332. package/es/FormContent/index.css +0 -27
  333. package/es/FormContent/index.d.ts +0 -19
  334. package/es/FormContent/index.js +0 -58
  335. package/es/OrgTree/index.css +0 -39
  336. package/es/OrgTree/index.d.ts +0 -16
  337. package/es/OrgTree/index.js +0 -176
  338. package/es/OrgUserTree/demo.js +0 -20
  339. package/es/OrgUserTree/index.css +0 -31
  340. package/es/OrgUserTree/index.d.ts +0 -28
  341. package/es/OrgUserTree/index.js +0 -131
  342. package/es/PlaceTree/demo.d.ts +0 -2
  343. package/es/PlaceTree/demo.js +0 -20
  344. package/es/PlaceTree/index.css +0 -40
  345. package/es/PlaceTree/index.d.ts +0 -26
  346. package/es/PlaceTree/index.js +0 -174
  347. package/es/Upload/AntUpload/index.css +0 -22
  348. package/es/Upload/AntUpload/index.d.ts +0 -19
  349. package/es/Upload/AntUpload/index.js +0 -226
  350. package/es/Upload/UploadChildren/index.css +0 -28
  351. package/es/Upload/UploadChildren/index.js +0 -26
  352. package/es/Upload/index.d.ts +0 -9
  353. 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,29 +12,14 @@ 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
- 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); } }
33
-
34
- 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); }); }; }
35
-
36
- function catchPromise(fn) {
37
- return new Promise(function (resolve) {
38
- fn.then(function (res) {
39
- return resolve(res);
40
- }, function (err) {
41
- console.error(err);
42
- resolve();
43
- });
44
- });
45
- }
46
-
15
+ import { __awaiter } from "tslib";
16
+ import Service from '../Service';
47
17
  var method = 'post';
48
18
  export function initialization() {
49
- return _initialization.apply(this, arguments);
50
- }
19
+ var _a;
51
20
 
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;
21
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
22
+ var headers, result, userInfo, userId, systemId, centerUrl, userPrivilegesUrl, systemFeatureUrl, themeConfigUrl, _yield$Promise$all, _yield$Promise$all2, _yield$Promise$all2$, centerInfo, userFeaturesRes, _yield$Promise$all2$2, systemFeatures, _yield$Promise$all2$3, themeInfo, featureIds;
55
23
 
56
24
  return regeneratorRuntime.wrap(function _callee$(_context) {
57
25
  while (1) {
@@ -61,627 +29,85 @@ function _initialization() {
61
29
  Authorization: _cache.getCache('token', 'session')
62
30
  };
63
31
  _context.next = 3;
64
- return _Service.$http({
32
+ return Service.$http({
65
33
  url: '/api/user/v1/getUserByToken',
66
34
  method: method,
67
- headers: headers,
68
- requestId: 'getUserInfo'
35
+ headers: headers
69
36
  });
70
37
 
71
38
  case 3:
72
39
  result = _context.sent;
73
40
  userInfo = result.data;
74
41
  userId = userInfo.id;
75
- operationCenterId = userInfo.operationCenterId;
76
- data = {
77
- id: userId
78
- };
79
- data2 = {
80
- id: operationCenterId
81
- };
82
- centerUrl = "/api/user/operationCenter/v1/operationCenters/".concat(operationCenterId);
83
- _context.next = 12;
84
- return _Service.$http({
85
- data: data2,
86
- method: method,
42
+ systemId = userInfo.operationCenterId;
43
+ centerUrl = "/api/user/operationCenter/v1/operationCenters/".concat(systemId);
44
+ userPrivilegesUrl = "/api/user/role/v1/queryUserRoles/".concat(userId);
45
+ systemFeatureUrl = "/api/system/".concat(systemId, "/list");
46
+ themeConfigUrl = '/api/system/config/type';
47
+ _context.next = 13;
48
+ return Promise.all([Service.$http({
87
49
  url: centerUrl,
50
+ data: {
51
+ id: systemId
52
+ },
88
53
  headers: headers,
89
- requestId: 'operationCenterInfo'
90
- });
91
-
92
- case 12:
93
- centerInfo = _context.sent;
94
- _context.next = 15;
95
- return _Service.$http({
96
- url: "/api/micro/configureApplication/v1/queryConfigureApplicationById/".concat(operationCenterId)
97
- });
98
-
99
- case 15:
100
- themeInfo = _context.sent;
101
- themeConfig = themeInfo.data || {}; // eslint-disable-next-line no-eval
102
-
103
- themeStyle = {
104
- tabType: themeConfig.tabType ? eval(themeConfig.tabType) : true,
105
- menuType: themeConfig.menuType || 'horizontal'
106
- };
107
-
108
- _Store.app.updateThemeStyle(themeStyle);
109
-
110
- themeId = themeConfig.themeId || centerInfo.data.hues;
111
-
112
- if (!themeId) {
113
- _context.next = 26;
114
- break;
115
- }
116
-
117
- themeUrl = "/api/micro/configure/v1/queryConfigureByConfigureId/".concat(themeId);
118
- _context.next = 24;
119
- return _Service.$http({
120
- data: data2,
121
- method: 'get',
122
- url: themeUrl,
123
- headers: headers,
124
- requestId: 'themeRes'
125
- });
126
-
127
- case 24:
128
- themeRes = _context.sent;
129
-
130
- try {
131
- _Config.registerThemeConfig((_themeRes$data = themeRes.data) === null || _themeRes$data === void 0 ? void 0 : _themeRes$data.info);
132
- } catch (e) {
133
- console.error(e);
134
- }
135
-
136
- case 26:
137
- userPrivilegesUrl = "/api/user/role/v1/queryUserRoles/".concat(userId);
138
- centerPrivilegesUrl = "/api/micro/applicationSystemScene/v1/queryAllFunctionByApplicationSystemId/".concat(operationCenterId);
139
- allPrivilegesUrl = "/api/micro/function/v1/queryFunctionList";
140
- systemInfoUrl = "/api/user/v1/systemInfo/".concat(userId);
141
- _context.next = 32;
142
- return Promise.all([catchPromise(_Service.$http({
143
- data: data,
144
- method: method,
54
+ method: method
55
+ }), Service.$http({
145
56
  url: userPrivilegesUrl,
146
57
  headers: headers,
147
- requestId: 'queryUserRoles'
148
- })), catchPromise(_Service.$http({
149
- data: data2,
58
+ data: {
59
+ id: userId
60
+ },
61
+ method: method
62
+ }), Service.$http({
63
+ url: systemFeatureUrl,
64
+ data: {
65
+ id: systemId
66
+ },
150
67
  method: 'get',
151
- url: centerPrivilegesUrl,
68
+ headers: headers
69
+ }), Service.$http({
70
+ url: themeConfigUrl,
152
71
  headers: headers,
153
- requestId: 'centerPrivilegesUrl'
154
- })), catchPromise(_Service.$http({
155
- method: 'get',
156
- url: allPrivilegesUrl,
157
- headers: headers,
158
- requestId: 'allPrivilegesUrl'
159
- })), catchPromise(_Service.$http({
160
- data: data,
161
72
  method: method,
162
- url: systemInfoUrl,
163
- headers: headers,
164
- requestId: 'systemInfoUrl'
165
- })) //获取用户系统信息
166
- ]);
73
+ data: {
74
+ type: 'theme',
75
+ systemId: systemId
76
+ }
77
+ })]);
167
78
 
168
- case 32:
79
+ case 13:
169
80
  _yield$Promise$all = _context.sent;
170
81
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 4);
171
82
  _yield$Promise$all2$ = _yield$Promise$all2[0];
172
- userPrivileges = _yield$Promise$all2$ === void 0 ? {
173
- data: []
83
+ centerInfo = _yield$Promise$all2$ === void 0 ? {
84
+ data: {}
174
85
  } : _yield$Promise$all2$;
175
- _yield$Promise$all2$2 = _yield$Promise$all2[1];
176
- centerPrivileges = _yield$Promise$all2$2 === void 0 ? {
86
+ userFeaturesRes = _yield$Promise$all2[1];
87
+ _yield$Promise$all2$2 = _yield$Promise$all2[2];
88
+ systemFeatures = _yield$Promise$all2$2 === void 0 ? {
177
89
  data: []
178
90
  } : _yield$Promise$all2$2;
179
- _yield$Promise$all2$3 = _yield$Promise$all2[2];
180
- allPrivileges = _yield$Promise$all2$3 === void 0 ? {
181
- data: []
91
+ _yield$Promise$all2$3 = _yield$Promise$all2[3];
92
+ themeInfo = _yield$Promise$all2$3 === void 0 ? {
93
+ data: {}
182
94
  } : _yield$Promise$all2$3;
183
- systemInfo = _yield$Promise$all2[3];
95
+ featureIds = (userFeaturesRes.data || []).map(function (v) {
96
+ return v.functionCodes;
97
+ }).flat();
184
98
  return _context.abrupt("return", {
185
99
  userInfo: userInfo,
186
- userPrivileges: userPrivileges,
187
- centerPrivileges: centerPrivileges,
188
- allPrivileges: allPrivileges,
189
- centerInfo: centerInfo,
190
- systemInfo: systemInfo
100
+ userFeatures: featureIds,
101
+ systemFeatures: systemFeatures.data,
102
+ operationInfo: centerInfo.data,
103
+ themeConfig: ((_a = themeInfo === null || themeInfo === void 0 ? void 0 : themeInfo.data) === null || _a === void 0 ? void 0 : _a.content) || {}
191
104
  });
192
105
 
193
- case 42:
106
+ case 24:
194
107
  case "end":
195
108
  return _context.stop();
196
109
  }
197
110
  }
198
111
  }, _callee);
199
112
  }));
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
113
  }