@ganwei-web/ganwei-pc-cli 6.2.2 → 6.2.3

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 (280) hide show
  1. package/ganwei-app-6.2.1/moduleConfiguration/copyFile.js +8 -14
  2. package/ganwei-app-6.2.1/moduleConfiguration/init.js +2 -8
  3. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.babelrc +4 -0
  4. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.editorconfig +22 -0
  5. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.env.development +23 -0
  6. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.env.production +29 -0
  7. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.env.test +22 -0
  8. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.eslintignore +13 -0
  9. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.eslintrc.cjs +178 -0
  10. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.prettierignore +13 -0
  11. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.prettierrc.cjs +37 -0
  12. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/auto-imports.d.ts +5 -0
  13. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/banner.js +9 -0
  14. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/build-version.js +42 -0
  15. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/bulidList.js +26 -0
  16. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/enteryJson.js +108 -0
  17. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/filterStatic.js +64 -0
  18. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/init.js +27 -0
  19. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/look-dir.js +24 -0
  20. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/rollup-options.js +35 -0
  21. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/test.js +3 -0
  22. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/vite-plugin-stats-html.js +595 -0
  23. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/components.d.ts +20 -0
  24. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/env.d.ts +7 -0
  25. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/index.html +20 -0
  26. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/package-lock.json +3965 -0
  27. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/package.json +69 -0
  28. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/pnpm-lock.yaml +5034 -0
  29. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/css/index-plus-vars.css +93 -0
  30. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/css/index-plus.css +1 -0
  31. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/css/index.css +15926 -0
  32. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/css/pptxjs.css +161 -0
  33. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/font/iconfont.css +1135 -0
  34. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/font/iconfont.js +1 -0
  35. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/font/iconfont.json +1969 -0
  36. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/font/iconfont.ttf +0 -0
  37. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/font/iconfont.woff +0 -0
  38. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/font/iconfont.woff2 +0 -0
  39. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/language/en-US/noPage.json +3 -0
  40. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/language/zh-CN/noPage.json +3 -0
  41. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/language/zh-HK/noPage.json +3 -0
  42. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/themes/dark.css +77 -0
  43. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/themes/default-theme.js +34 -0
  44. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/themes/light.css +79 -0
  45. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/App.vue +198 -0
  46. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/.sass-cache/59ae6c3370e48597956c7d0775238711a2c22a84/index.scssc +0 -0
  47. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/.sass-cache/59ae6c3370e48597956c7d0775238711a2c22a84/linkSetting.scssc +0 -0
  48. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/.sass-cache/59ae6c3370e48597956c7d0775238711a2c22a84/sceneSetting.scssc +0 -0
  49. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/.sass-cache/59ae6c3370e48597956c7d0775238711a2c22a84/specialTask.scssc +0 -0
  50. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/.sass-cache/59ae6c3370e48597956c7d0775238711a2c22a84/style.scssc +0 -0
  51. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/.sass-cache/59ae6c3370e48597956c7d0775238711a2c22a84/weekTask.scssc +0 -0
  52. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/VideoSystem.scss +397 -0
  53. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/el-dialog.scss +58 -0
  54. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/el-drawer.scss +41 -0
  55. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/index.scss +1052 -0
  56. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/login.scss +320 -0
  57. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/mobileStyle.scss +332 -0
  58. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/noDataTips.scss +57 -0
  59. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/reset.scss +1192 -0
  60. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/style-black.scss +1 -0
  61. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/style-white.scss +1 -0
  62. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/style.scss +633 -0
  63. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/videoPlaybackCom.scss +468 -0
  64. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/videoPlayer.scss +441 -0
  65. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/images/logo.png +0 -0
  66. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/plugins/encrypt.js +122 -0
  67. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/appFrame.vue +163 -0
  68. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/bottom.vue +15 -0
  69. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/css/bottom.scss +381 -0
  70. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/css/top.scss +49 -0
  71. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/js/Voice.js +345 -0
  72. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/js/bottom.js +102 -0
  73. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/top.vue +114 -0
  74. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/i18n/i18n.js +42 -0
  75. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/i18n/i18nObserver.js +39 -0
  76. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/i18n/vueI18n.js +17 -0
  77. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/toast/index.js +64 -0
  78. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/toast/index.vue +152 -0
  79. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/hostMap.js +9 -0
  80. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/main.js +39 -0
  81. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/Auth.js +83 -0
  82. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/BA.js +81 -0
  83. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/EquipList.js +127 -0
  84. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/Event.js +34 -0
  85. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/GwEcharts.js +9 -0
  86. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/PPT.js +5 -0
  87. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/RealTime.js +43 -0
  88. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/SystemConfig.js +177 -0
  89. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/Video.js +57 -0
  90. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/VideoTour.js +129 -0
  91. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/WelcomeWord.js +24 -0
  92. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/WorkOrder.js +265 -0
  93. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/videoSystem.js +81 -0
  94. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api.js +35 -0
  95. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/apiFunction.js +200 -0
  96. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/encrypt.js +14 -0
  97. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/http.js +186 -0
  98. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/router.js +31 -0
  99. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/store.js +189 -0
  100. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/types.js +16 -0
  101. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/utils/formValidate.js +25 -0
  102. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/utils/isApp.js +18 -0
  103. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/utils/language.js +45 -0
  104. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/utils/myUtils.js +643 -0
  105. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/utils/timeFormat.js +23 -0
  106. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/utils/timesYMDHMS.js +27 -0
  107. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/views/ganwei-app-empty-page/src/noPage.vue +22 -0
  108. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/stats.html +356 -0
  109. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/vite.base.config.js +244 -0
  110. package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/vite.config.ts +44 -0
  111. package/ganwei-app-6.2.1/packages/ganwei-app-home/.babelrc +4 -0
  112. package/ganwei-app-6.2.1/packages/ganwei-app-home/.editorconfig +22 -0
  113. package/ganwei-app-6.2.1/packages/ganwei-app-home/.env.development +23 -0
  114. package/ganwei-app-6.2.1/packages/ganwei-app-home/.env.production +29 -0
  115. package/ganwei-app-6.2.1/packages/ganwei-app-home/.env.test +22 -0
  116. package/ganwei-app-6.2.1/packages/ganwei-app-home/.eslintignore +13 -0
  117. package/ganwei-app-6.2.1/packages/ganwei-app-home/.eslintrc.cjs +178 -0
  118. package/ganwei-app-6.2.1/packages/ganwei-app-home/.prettierignore +13 -0
  119. package/ganwei-app-6.2.1/packages/ganwei-app-home/.prettierrc.cjs +37 -0
  120. package/ganwei-app-6.2.1/packages/ganwei-app-home/.stylelintrc.cjs +18 -0
  121. package/ganwei-app-6.2.1/packages/ganwei-app-home/auto-imports.d.ts +56 -0
  122. package/ganwei-app-6.2.1/packages/ganwei-app-home/components.d.ts +25 -0
  123. package/ganwei-app-6.2.1/packages/ganwei-app-home/env.d.ts +21 -0
  124. package/ganwei-app-6.2.1/packages/ganwei-app-home/index.html +20 -0
  125. package/ganwei-app-6.2.1/packages/ganwei-app-home/package.json +87 -0
  126. package/ganwei-app-6.2.1/packages/ganwei-app-home/public/static/language/en-US/home.json +39 -0
  127. package/ganwei-app-6.2.1/packages/ganwei-app-home/public/static/language/zh-CN/home.json +39 -0
  128. package/ganwei-app-6.2.1/packages/ganwei-app-home/public/static/language/zh-HK/home.json +39 -0
  129. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/App.vue +203 -0
  130. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/assets/images/logo.png +0 -0
  131. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/components/Layout/TitleList.vue +20 -0
  132. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/enums/index.ts +24 -0
  133. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/main.ts +29 -0
  134. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/models/index.ts +91 -0
  135. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/request/api/RealTime.ts +27 -0
  136. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/request/api.ts +5 -0
  137. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/router.ts +30 -0
  138. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/store.js +189 -0
  139. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/types.js +16 -0
  140. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/components/HomeMenuItem.vue +95 -0
  141. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/components/HomeMenus.vue +118 -0
  142. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/components/HomeMenusEditDrawer.vue +119 -0
  143. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/components/HomeSnapshots.vue +109 -0
  144. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/components/chatbot.vue +96 -0
  145. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/components/eslint.config.js +10 -0
  146. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/css/index.scss +5 -0
  147. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/img/chatbot.gif +0 -0
  148. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/img/six.png +0 -0
  149. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/index.vue +42 -0
  150. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/useLanguageStyle.ts +21 -0
  151. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/useManageMenus.ts +38 -0
  152. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/useMenus.ts +49 -0
  153. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/usePolling.ts +38 -0
  154. package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/useRealTime.ts +128 -0
  155. package/ganwei-app-6.2.1/packages/ganwei-app-home/stats.html +4975 -0
  156. package/ganwei-app-6.2.1/packages/ganwei-app-home/tsconfig.json +58 -0
  157. package/ganwei-app-6.2.1/packages/ganwei-app-home/types/gw-app-public.d.ts +4 -0
  158. package/ganwei-app-6.2.1/packages/ganwei-app-home/vite.base.config.ts +233 -0
  159. package/ganwei-app-6.2.1/packages/ganwei-app-home/vite.config.ts +49 -0
  160. package/ganwei-app-6.2.1/packages/ganwei-app-index/index.html +1 -2
  161. package/ganwei-app-6.2.1/packages/ganwei-app-index/public/static/json/config.json +2 -2
  162. package/ganwei-app-6.2.1/packages/ganwei-app-index/src/components/vue-qrcode-reader/src/misc/util.js +4 -10
  163. package/ganwei-app-6.2.1/packages/ganwei-app-index/src/types.js +1 -1
  164. package/ganwei-app-6.2.1/packages/ganwei-app-login/.babelrc +4 -0
  165. package/ganwei-app-6.2.1/packages/ganwei-app-login/.editorconfig +22 -0
  166. package/ganwei-app-6.2.1/packages/ganwei-app-login/.env.development +23 -0
  167. package/ganwei-app-6.2.1/packages/ganwei-app-login/.env.production +29 -0
  168. package/ganwei-app-6.2.1/packages/ganwei-app-login/.env.test +22 -0
  169. package/ganwei-app-6.2.1/packages/ganwei-app-login/.eslintignore +13 -0
  170. package/ganwei-app-6.2.1/packages/ganwei-app-login/.eslintrc.cjs +178 -0
  171. package/ganwei-app-6.2.1/packages/ganwei-app-login/.prettierignore +13 -0
  172. package/ganwei-app-6.2.1/packages/ganwei-app-login/.prettierrc.cjs +37 -0
  173. package/ganwei-app-6.2.1/packages/ganwei-app-login/.stylelintrc.cjs +16 -0
  174. package/ganwei-app-6.2.1/packages/ganwei-app-login/auto-imports.d.ts +5 -0
  175. package/ganwei-app-6.2.1/packages/ganwei-app-login/env.d.ts +67 -0
  176. package/ganwei-app-6.2.1/packages/ganwei-app-login/index.html +20 -0
  177. package/ganwei-app-6.2.1/packages/ganwei-app-login/package.json +79 -0
  178. package/ganwei-app-6.2.1/packages/ganwei-app-login/public/static/language/en-US/login.json +48 -0
  179. package/ganwei-app-6.2.1/packages/ganwei-app-login/public/static/language/zh-CN/login.json +48 -0
  180. package/ganwei-app-6.2.1/packages/ganwei-app-login/public/static/language/zh-HK/login.json +48 -0
  181. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/App.vue +225 -0
  182. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/assets/images/bg.png +0 -0
  183. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/assets/images/logo.png +0 -0
  184. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/assets/images/refresh.png +0 -0
  185. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/components/app-drag/index.vue +183 -0
  186. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/hostMap.ts +11 -0
  187. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/main.ts +19 -0
  188. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/models/index.ts +48 -0
  189. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/request/api/Auth.ts +27 -0
  190. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/request/api.ts +5 -0
  191. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/router.ts +30 -0
  192. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/views/login/Login.vue +99 -0
  193. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/views/login/css/login.scss +78 -0
  194. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/views/login/js/useLogin.ts +73 -0
  195. package/ganwei-app-6.2.1/packages/ganwei-app-login/src/views/login/js/useRememberPassword.ts +48 -0
  196. package/ganwei-app-6.2.1/packages/ganwei-app-login/stats.html +4975 -0
  197. package/ganwei-app-6.2.1/packages/ganwei-app-login/tsconfig.json +56 -0
  198. package/ganwei-app-6.2.1/packages/ganwei-app-login/types/gw-app-public.d.ts +4 -0
  199. package/ganwei-app-6.2.1/packages/ganwei-app-login/vite.base.config.ts +233 -0
  200. package/ganwei-app-6.2.1/packages/ganwei-app-login/vite.config.ts +51 -0
  201. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.babelrc +4 -0
  202. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.editorconfig +22 -0
  203. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.env.development +23 -0
  204. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.env.production +29 -0
  205. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.env.test +22 -0
  206. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.eslintignore +13 -0
  207. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.eslintrc.cjs +178 -0
  208. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.prettierignore +13 -0
  209. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.prettierrc.cjs +37 -0
  210. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.stylelintrc.cjs +17 -0
  211. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/auto-imports.d.ts +5 -0
  212. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/env.d.ts +21 -0
  213. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/index.html +20 -0
  214. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/package.json +85 -0
  215. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/public/static/language/en-US/setPage.json +25 -0
  216. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/public/static/language/zh-CN/setPage.json +25 -0
  217. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/public/static/language/zh-HK/setPage.json +25 -0
  218. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/App.vue +202 -0
  219. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/assets/images/logo.png +0 -0
  220. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/components/buttonModeSelect/index.vue +190 -0
  221. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/hostMap.ts +11 -0
  222. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/main.ts +24 -0
  223. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/models/index.ts +0 -0
  224. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/request/api/Auth.ts +21 -0
  225. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/request/api.ts +5 -0
  226. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/router.ts +29 -0
  227. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/store.js +189 -0
  228. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/types.js +16 -0
  229. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/views/ganwei-app-setPage/src/js/useChangeLanguage.ts +19 -0
  230. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/views/ganwei-app-setPage/src/js/useChangeTheme.ts +16 -0
  231. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/views/ganwei-app-setPage/src/js/useClearCache.ts +26 -0
  232. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/views/ganwei-app-setPage/src/js/useJavaFunc.ts +146 -0
  233. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/views/ganwei-app-setPage/src/js/useLogout.ts +52 -0
  234. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/views/ganwei-app-setPage/src/setPage.vue +120 -0
  235. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/stats.html +4975 -0
  236. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/tsconfig.json +58 -0
  237. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/types/gw-app-public.d.ts +4 -0
  238. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/vite.base.config.ts +233 -0
  239. package/ganwei-app-6.2.1/packages/ganwei-app-set-page/vite.config.ts +49 -0
  240. package/ganwei-app-6.2.1/packages/ganwei-app-template/.babelrc +4 -0
  241. package/ganwei-app-6.2.1/packages/ganwei-app-template/.editorconfig +22 -0
  242. package/ganwei-app-6.2.1/packages/ganwei-app-template/.env.development +23 -0
  243. package/ganwei-app-6.2.1/packages/ganwei-app-template/.env.production +29 -0
  244. package/ganwei-app-6.2.1/packages/ganwei-app-template/.env.test +22 -0
  245. package/ganwei-app-6.2.1/packages/ganwei-app-template/.eslintignore +13 -0
  246. package/ganwei-app-6.2.1/packages/ganwei-app-template/.eslintrc.cjs +178 -0
  247. package/ganwei-app-6.2.1/packages/ganwei-app-template/.prettierignore +13 -0
  248. package/ganwei-app-6.2.1/packages/ganwei-app-template/.prettierrc.cjs +37 -0
  249. package/ganwei-app-6.2.1/packages/ganwei-app-template/auto-imports.d.ts +5 -0
  250. package/ganwei-app-6.2.1/packages/ganwei-app-template/components.d.ts +14 -0
  251. package/ganwei-app-6.2.1/packages/ganwei-app-template/env.d.ts +7 -0
  252. package/ganwei-app-6.2.1/packages/ganwei-app-template/index.html +18 -0
  253. package/ganwei-app-6.2.1/packages/ganwei-app-template/package.json +77 -0
  254. package/ganwei-app-6.2.1/packages/ganwei-app-template/public/static/language/en-US/template.json +3 -0
  255. package/ganwei-app-6.2.1/packages/ganwei-app-template/public/static/language/zh-CN/template.json +3 -0
  256. package/ganwei-app-6.2.1/packages/ganwei-app-template/public/static/language/zh-HK/template.json +3 -0
  257. package/ganwei-app-6.2.1/packages/ganwei-app-template/src/App.vue +202 -0
  258. package/ganwei-app-6.2.1/packages/ganwei-app-template/src/assets/images/logo.png +0 -0
  259. package/ganwei-app-6.2.1/packages/ganwei-app-template/src/components/buttonModeSelect/index.vue +190 -0
  260. package/ganwei-app-6.2.1/packages/ganwei-app-template/src/hostMap.ts +11 -0
  261. package/ganwei-app-6.2.1/packages/ganwei-app-template/src/main.ts +24 -0
  262. package/ganwei-app-6.2.1/packages/ganwei-app-template/src/models/index.ts +0 -0
  263. package/ganwei-app-6.2.1/packages/ganwei-app-template/src/request/api/Auth.ts +21 -0
  264. package/ganwei-app-6.2.1/packages/ganwei-app-template/src/request/api.ts +5 -0
  265. package/ganwei-app-6.2.1/packages/ganwei-app-template/src/router.ts +29 -0
  266. package/ganwei-app-6.2.1/packages/ganwei-app-template/src/store.js +189 -0
  267. package/ganwei-app-6.2.1/packages/ganwei-app-template/src/types.js +16 -0
  268. package/ganwei-app-6.2.1/packages/ganwei-app-template/src/views/ganwei-app-template/src/template.vue +22 -0
  269. package/ganwei-app-6.2.1/packages/ganwei-app-template/tsconfig.json +58 -0
  270. package/ganwei-app-6.2.1/packages/ganwei-app-template/types/gw-app-public.d.ts +4 -0
  271. package/ganwei-app-6.2.1/packages/ganwei-app-template/vite.base.config.js +246 -0
  272. package/ganwei-app-6.2.1/packages/ganwei-app-template/vite.config.ts +44 -0
  273. package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/public/static/json/config.json +47 -43
  274. package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/src/components/isDebug/isDebug.vue +2 -9
  275. package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/src/types.js +1 -1
  276. package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/src/views/index.js +0 -3
  277. package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/src/views/jumpIframe/preloadMethod.js +3 -3
  278. package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-login/src/assets/css/login.scss +50 -30
  279. package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-login/src/types.js +1 -1
  280. package/package.json +1 -1
@@ -0,0 +1,109 @@
1
+ <template>
2
+ <div class="dataItem">
3
+ <TitleList>
4
+ <template #subTitle>
5
+ {{ $t('home.subModule.snapshot.title') }}
6
+ </template>
7
+ <el-row class="systemOperationOverview_main" :gutter="10">
8
+ <el-col :span="colWidth" v-for="(item, index) in snapshotList" :key="index">
9
+ <div class="OverviewItem" @click="goPage(item.path, $t(item.name))">
10
+ <div class="left_ico">
11
+ <img class="left_img" :src="item.img" />
12
+ <p class="right_msg_title">{{ $t(item.name) }}</p>
13
+ </div>
14
+ <div class="right_msg">
15
+ <p class="right_msg_msg" :class="item.className">
16
+ {{ item.displayValue }}
17
+ <span>{{ $t('home.unit.item') }}</span>
18
+ </p>
19
+ </div>
20
+ </div>
21
+ </el-col>
22
+ </el-row>
23
+ </TitleList>
24
+ </div>
25
+ </template>
26
+
27
+ <script setup lang="ts">
28
+ import { bus } from 'wujie';
29
+
30
+ import { useMFEManager } from '@ganwei-web/gw-app-mfe';
31
+
32
+ import TitleList from '@/components/Layout/TitleList.vue';
33
+
34
+ import useLanguageStyle from '../js/useLanguageStyle';
35
+ import useRealTime from '../js/useRealTime';
36
+
37
+ const { colWidth } = useLanguageStyle()
38
+ const { snapshotList } = useRealTime()
39
+
40
+ const MFEManager = useMFEManager()
41
+ function goPage(type: string, title: string) {
42
+ MFEManager?.router.push({ path: `/index/jump/ganwei-app-snapshots`, query: { type: type } });
43
+ bus.$emit('snapshotsTypeChange', { title, type })
44
+ }
45
+
46
+ </script>
47
+
48
+ <style lang="scss" scoped>
49
+ // 系统运行总览
50
+ .systemOperationOverview_main {
51
+ width: 100%;
52
+ margin: 0 !important;
53
+
54
+ .OverviewItem {
55
+ position: relative;
56
+
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: space-between;
60
+
61
+ height: 56px;
62
+ margin-bottom: 12px;
63
+ padding: 0 10px;
64
+
65
+ background-color: var(--snapshot-item-bg);
66
+ border-radius: 6px;
67
+
68
+ .left_ico {
69
+ // display: none;
70
+ display: flex;
71
+ align-items: center;
72
+
73
+ .left_img {
74
+ padding: 8px;
75
+ }
76
+
77
+ .right_msg_title {
78
+ font-size: 0.875rem;
79
+ color: var(--snapshot-item-title);
80
+ text-align: center;
81
+ white-space: nowrap;
82
+ }
83
+ }
84
+
85
+ .right_msg {
86
+ .right_msg_msg {
87
+ display: flex;
88
+
89
+ font-size: 20px;
90
+ font-weight: bold;
91
+ line-height: 20px;
92
+ color: var(--snapshot-item-title);
93
+ text-align: center;
94
+
95
+ span {
96
+ margin-left: 2px;
97
+ font-size: 14px;
98
+ font-weight: normal;
99
+ line-height: 23px;
100
+ }
101
+ }
102
+ }
103
+ }
104
+
105
+ .m_line {
106
+ position: absolute;
107
+ }
108
+ }
109
+ </style>
@@ -0,0 +1,96 @@
1
+ <template>
2
+ <div class="chatbot-entry" :style="{ left: pos.x + 'px', top: pos.y + 'px' }" @mousedown="onMouseDown"
3
+ @touchstart="onTouchStart" @click="onClick" title="问答机器人" :class="isAI.includes(AI_PATH.path) ? '' : 'displayNone'">
4
+ <img src="../img/chatbot.gif" alt="问答机器人" />
5
+
6
+ </div>
7
+ </template>
8
+
9
+ <script setup>
10
+ import { inject, ref } from 'vue'
11
+
12
+ import { useMFEManager } from '@ganwei-web/gw-app-mfe';
13
+
14
+ import { AI_PATH } from '@/enums';
15
+ const showModules = inject('showModules');
16
+ const arry = showModules._value.filter(element => {
17
+ return element.route.includes(AI_PATH.path)
18
+ });
19
+ const isAI = arry.length > 0 ? arry[0].route : '';
20
+
21
+ const MFEManager = useMFEManager()
22
+
23
+ const pos = ref({ x: window.innerWidth - 90, y: window.innerHeight - 220 });
24
+ const dragging = ref(false);
25
+ let offset = { x: 0, y: 0 };
26
+
27
+ const onMouseDown = (e) => {
28
+ dragging.value = true;
29
+ offset.x = e.clientX - pos.value.x;
30
+ offset.y = e.clientY - pos.value.y;
31
+ document.addEventListener('mousemove', onMouseMove);
32
+ document.addEventListener('mouseup', onMouseUp);
33
+ };
34
+
35
+ const onMouseMove = (e) => {
36
+ if (!dragging.value) return;
37
+ pos.value.x = e.clientX - offset.x;
38
+ pos.value.y = e.clientY - offset.y;
39
+ };
40
+
41
+ const onMouseUp = () => {
42
+ dragging.value = false;
43
+ document.removeEventListener('mousemove', onMouseMove);
44
+ document.removeEventListener('mouseup', onMouseUp);
45
+ };
46
+
47
+ // 移动端 touch 事件
48
+ const onTouchStart = (e) => {
49
+ dragging.value = true;
50
+ const touch = e.touches[0];
51
+ offset.x = touch.clientX - pos.value.x;
52
+ offset.y = touch.clientY - pos.value.y;
53
+ document.addEventListener('touchmove', onTouchMove, { passive: false });
54
+ document.addEventListener('touchend', onTouchEnd);
55
+ };
56
+
57
+ const onTouchMove = (e) => {
58
+ if (!dragging.value) return;
59
+ const touch = e.touches[0];
60
+ pos.value.x = touch.clientX - offset.x;
61
+ pos.value.y = touch.clientY - offset.y;
62
+ e.preventDefault(); // 防止页面滚动
63
+ };
64
+
65
+ const onTouchEnd = () => {
66
+ dragging.value = false;
67
+ document.removeEventListener('touchmove', onTouchMove);
68
+ document.removeEventListener('touchend', onTouchEnd);
69
+ };
70
+
71
+ const onClick = () => {
72
+ MFEManager?.router.push("/index/jump/outerlink?url=" + AI_PATH.path)
73
+ };
74
+ </script>
75
+
76
+ <style scoped>
77
+ .chatbot-entry {
78
+ position: fixed;
79
+ z-index: 999999;
80
+ user-select: none;
81
+ transition: box-shadow 0.2s;
82
+ }
83
+
84
+ .chatbot-entry img {
85
+ width: 100px;
86
+ height: 100px;
87
+ }
88
+
89
+ .chatbot-entry:active {
90
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
91
+ }
92
+
93
+ .displayNone {
94
+ display: none;
95
+ }
96
+ </style>
@@ -0,0 +1,10 @@
1
+ import js from "@eslint/js";
2
+ import { defineConfig } from "eslint/config";
3
+ import pluginVue from "eslint-plugin-vue";
4
+ import globals from "globals";
5
+
6
+ export default defineConfig([
7
+ { files: ["**/*.{js,mjs,cjs,vue}"], plugins: { js }, extends: ["js/recommended"] },
8
+ { files: ["**/*.{js,mjs,cjs,vue}"], languageOptions: { globals: globals.browser } },
9
+ pluginVue.configs["flat/essential"],
10
+ ]);
@@ -0,0 +1,5 @@
1
+ .home {
2
+ overflow: auto;
3
+ width: 100%;
4
+ height: 100%;
5
+ }
@@ -0,0 +1,42 @@
1
+
2
+ <template>
3
+ <appFrame :showTop="false" :showBottom="false" :leftText="$t('home.title')" rightIcon="icon_Nav_saoyisao"
4
+ :rightIconTip="$t('home.button.scane')">
5
+ <div class="home">
6
+ <HomeSnapshots></HomeSnapshots>
7
+ <HomeMenus :showModules :showEditButton @edit="showMenuEditDrawer"></HomeMenus>
8
+ <HomeMenusEditDrawer v-model:showModules="showModules" v-bind:deleteModules="deleteModules" v-model:showEdit="menuEditDrawerVisible"></HomeMenusEditDrawer>
9
+ <chatbot></chatbot>
10
+ </div>
11
+ </appFrame>
12
+ </template>
13
+ <script setup lang="ts">
14
+ import { computed, provide, ref } from 'vue'
15
+
16
+ import chatbot from './components/chatbot.vue'
17
+ import HomeMenus from './components/HomeMenus.vue'
18
+ import HomeMenusEditDrawer from './components/HomeMenusEditDrawer.vue'
19
+ import HomeSnapshots from './components/HomeSnapshots.vue'
20
+ import useMenus from './js/useMenus'
21
+
22
+ const menuColorList = ['#6763EF', '#2FA9E6', '#B945CE', '#27AE79', '#F68309', '#9872EF', '#0FD3D4', '#F37071', '#FDB03D']
23
+ const menuEditDrawerVisible = ref(false)
24
+ const { showModules, deleteModules } = useMenus()
25
+
26
+ const showEditButton = computed(() => {
27
+ return showModules.value.length > 0 || deleteModules.value.length > 0
28
+ })
29
+
30
+ function showMenuEditDrawer() {
31
+ menuEditDrawerVisible.value = true
32
+ }
33
+ function getBackground(index: number) {
34
+ return {
35
+ background: menuColorList[index % menuColorList.length]
36
+ }
37
+ }
38
+
39
+ provide('getBackground', getBackground)
40
+ provide('showModules', showModules)
41
+ </script>
42
+ <style lang="scss" src="./css/index.scss" scoped></style>
@@ -0,0 +1,21 @@
1
+ import { onBeforeMount, ref } from "vue";
2
+
3
+ export default function () {
4
+ const colWidth = ref(12)
5
+ function setColWidth(languageType: string) {
6
+ if (languageType == 'en-US') {
7
+ colWidth.value = 24
8
+ } else {
9
+ colWidth.value = 12
10
+ }
11
+ }
12
+
13
+ onBeforeMount(() => {
14
+ setColWidth(localStorage.languageType)
15
+ })
16
+
17
+ return {
18
+ colWidth,
19
+ setColWidth
20
+ }
21
+ }
@@ -0,0 +1,38 @@
1
+ import { Ref } from "vue";
2
+
3
+ import { MenuItem } from "@/models";
4
+
5
+ export default function useManageMenus(showModules: Ref<MenuItem[]>, deleteModules: Ref<MenuItem[]>) {
6
+
7
+ /**
8
+ * @description 本地保存菜单禁用、启用状态
9
+ */
10
+ function saveModules() {
11
+ localStorage.setItem('showModules', JSON.stringify(showModules.value));
12
+ localStorage.setItem('deleteModules', JSON.stringify(deleteModules.value));
13
+ }
14
+
15
+ /**
16
+ * @description 启用菜单
17
+ * @param {number} index
18
+ */
19
+ function addModules(index: number) {
20
+ showModules.value.push(deleteModules.value[index]);
21
+ deleteModules.value.splice(index, 1)
22
+ }
23
+
24
+ /**
25
+ * @description 禁用菜单
26
+ * @param {number} index
27
+ */
28
+ function removeModules(index: number) {
29
+ deleteModules.value.push(showModules.value[index]);
30
+ showModules.value.splice(index, 1)
31
+ }
32
+
33
+ return {
34
+ addModules,
35
+ removeModules,
36
+ saveModules
37
+ }
38
+ }
@@ -0,0 +1,49 @@
1
+ import { computed, onBeforeMount, ref } from "vue";
2
+
3
+ import { MenuItem } from "@/models";
4
+
5
+ export default function () {
6
+ const allModules = ref<MenuItem[]>([])
7
+ const showModules = ref<MenuItem[]>([])
8
+ const deleteModules = ref<MenuItem[]>([])
9
+
10
+ /**
11
+ * @description 过滤出非底部菜单
12
+ */
13
+ function filterBottomMenu() {
14
+ try {
15
+ const menu = JSON.parse(sessionStorage.menu) as MenuItem[]
16
+ const filterMenu = menu.filter(i => !i.isAppBottomMenu)
17
+ allModules.value = filterMenu;
18
+ } catch (e) {
19
+ console.log(e)
20
+ }
21
+ }
22
+
23
+ /**
24
+ * @description 获取本地禁用菜单、启用菜单
25
+ */
26
+ function getShowMenus() {
27
+ deleteModules.value = []
28
+ showModules.value = []
29
+
30
+ const localDeleteModules = (JSON.parse(localStorage.getItem('deleteModules')!) || []) as MenuItem[]
31
+ for (const module of allModules.value) {
32
+ if (localDeleteModules.some(deleteModule => module.route === deleteModule.route)) {
33
+ deleteModules.value.push(module)
34
+ } else {
35
+ showModules.value.push(module)
36
+ }
37
+ }
38
+ }
39
+
40
+ onBeforeMount(() => {
41
+ filterBottomMenu()
42
+ getShowMenus()
43
+ })
44
+
45
+ return {
46
+ showModules,
47
+ deleteModules,
48
+ }
49
+ }
@@ -0,0 +1,38 @@
1
+ import { onBeforeUnmount } from "vue";
2
+
3
+ export default function (requestFn: () => Promise<unknown>, timeOut = 1000) {
4
+ let pollingInterval: number | null = null;
5
+
6
+ function startPolling() {
7
+ if (pollingInterval) {
8
+ // 已经存在定时器,不重复执行
9
+ return;
10
+ }
11
+
12
+ requestFn().then(() => {
13
+ pollingInterval = window.setTimeout(
14
+ () => {
15
+ pollingInterval = null;
16
+ startPolling()
17
+ },
18
+ timeOut
19
+ )
20
+ }).catch(() => {
21
+ stopPolling()
22
+ })
23
+ }
24
+
25
+ function stopPolling() {
26
+ if (pollingInterval) {
27
+ window.clearTimeout(pollingInterval);
28
+ pollingInterval = null;
29
+ }
30
+ }
31
+
32
+ onBeforeUnmount(stopPolling)
33
+
34
+ return {
35
+ startPolling,
36
+ stopPolling
37
+ }
38
+ }
@@ -0,0 +1,128 @@
1
+
2
+ import { onMounted, ref } from 'vue';
3
+
4
+ import Toast from '@ganwei-web/gw-app-components/toast';
5
+
6
+ import { ISnapshot } from '@/models';
7
+ import { realTimeService } from '@/request/api';
8
+
9
+ import usePolling from './usePolling'
10
+
11
+ function getNumberRange(min: number, max: number) {
12
+ return Array.from({ length: max - min + 1 }, (_, i) => min + i);
13
+ }
14
+
15
+ export default function () {
16
+ let levels: number[] = []
17
+ const { startPolling } = usePolling(getRealTimeEventCounts)
18
+
19
+ const snapshotList = ref<ISnapshot[]>([
20
+ {
21
+ title: '故障',
22
+ displayValue: '0',
23
+ value: 0,
24
+ tabTopId: 1,
25
+ img: import.meta.env.VITE_IMAGE_BASE + '/snapshot_alarm.svg',
26
+ name: 'home.subModule.snapshot.types.alarm',
27
+ className: 'guzhang',
28
+ path: 'Errors'
29
+ },
30
+ {
31
+ title: '警告',
32
+ displayValue: '0',
33
+ value: 0,
34
+ tabTopId: 2,
35
+ img: import.meta.env.VITE_IMAGE_BASE + '/snapshot_warning.svg',
36
+ name: 'home.subModule.snapshot.types.warning',
37
+ className: 'jinggao',
38
+ path: 'Warnings'
39
+ },
40
+ {
41
+ title: '信息',
42
+ displayValue: '0',
43
+ value: 0,
44
+ tabTopId: 3,
45
+ img: import.meta.env.VITE_IMAGE_BASE + '/snapshot_info.svg',
46
+ name: 'home.subModule.snapshot.types.info',
47
+ className: 'xinxi',
48
+ path: 'Infos'
49
+ },
50
+ {
51
+ title: '设置',
52
+ displayValue: '0',
53
+ value: 0,
54
+ tabTopId: 4,
55
+ img: import.meta.env.VITE_IMAGE_BASE + '/snapshot_setup.svg',
56
+ name: 'home.subModule.snapshot.types.setup',
57
+ className: 'shezhi',
58
+ path: 'Settings'
59
+ },
60
+ {
61
+ title: '资产',
62
+ displayValue: '0',
63
+ value: 0,
64
+ tabTopId: 5,
65
+ img: import.meta.env.VITE_IMAGE_BASE + '/snapshot_zichan.svg',
66
+ name: 'home.subModule.snapshot.types.asset',
67
+ className: 'zichan',
68
+ path: 'Assets'
69
+ }
70
+ ])
71
+
72
+ /**
73
+ * @description 获取实时快照类别配置
74
+ */
75
+ function getRealTimeEventTypeConfig() {
76
+ realTimeService.getRealTimeEventTypeConfig().then(res => {
77
+ if (res.data.code === 200) {
78
+ const data = res.data.data
79
+ if (data) {
80
+ levels = data.reduce<number[]>((range, config) => {
81
+ return range.concat(getNumberRange(config.snapshotLevelMin, config.snapshotLevelMax))
82
+ }, [])
83
+ startPolling()
84
+ }
85
+ } else {
86
+ Toast.error(res.data.message);
87
+ }
88
+ }).catch(err => {
89
+ console.log('err', err);
90
+ })
91
+ }
92
+
93
+ /**
94
+ * @description 获取实时快照类别数量
95
+ */
96
+ function getRealTimeEventCounts() {
97
+ const data = {
98
+ types: levels.join(',')
99
+ }
100
+ return realTimeService.getRealTimeEventCount(data).then(res => {
101
+ if (res.data.code === 200) {
102
+ const data = res.data.data
103
+ if (data) {
104
+ snapshotList.value.forEach(snapshot => {
105
+ const findSnapshot = data.find(i => i.name === snapshot.title)
106
+ if (findSnapshot) {
107
+ snapshot.value = findSnapshot.value
108
+ snapshot.displayValue = findSnapshot.displayValue
109
+ }
110
+ })
111
+ } else {
112
+ Toast.error(res.data.message);
113
+ }
114
+ }
115
+ }).catch(err => {
116
+ console.log(err);
117
+ throw new Error(err)
118
+ })
119
+ }
120
+
121
+ onMounted(() => {
122
+ getRealTimeEventTypeConfig()
123
+ })
124
+
125
+ return {
126
+ snapshotList
127
+ }
128
+ }