@ganwei-web/ganwei-pc-cli 6.2.2 → 6.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ganwei-app-6.2.1/.gitignore +33 -0
- package/ganwei-app-6.2.1/.npmrc +1 -0
- package/ganwei-app-6.2.1/moduleConfiguration/.gitignore +27 -0
- package/ganwei-app-6.2.1/moduleConfiguration/copyFile.js +8 -14
- package/ganwei-app-6.2.1/moduleConfiguration/init.js +2 -8
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.babelrc +4 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.editorconfig +22 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.env.development +23 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.env.production +29 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.env.test +22 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.eslintignore +13 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.eslintrc.cjs +178 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.gitignore +27 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.prettierignore +13 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/.prettierrc.cjs +37 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/auto-imports.d.ts +5 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/banner.js +9 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/build-version.js +42 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/bulidList.js +26 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/enteryJson.js +108 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/filterStatic.js +64 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/init.js +27 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/look-dir.js +24 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/rollup-options.js +35 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/test.js +3 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/build/vite-plugin-stats-html.js +595 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/components.d.ts +20 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/env.d.ts +7 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/index.html +20 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/package-lock.json +3965 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/package.json +69 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/pnpm-lock.yaml +5034 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/css/index-plus-vars.css +93 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/css/index-plus.css +1 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/css/index.css +15926 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/css/pptxjs.css +161 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/font/iconfont.css +1135 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/font/iconfont.js +1 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/font/iconfont.json +1969 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/font/iconfont.ttf +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/font/iconfont.woff +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/font/iconfont.woff2 +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/language/en-US/noPage.json +3 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/language/zh-CN/noPage.json +3 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/language/zh-HK/noPage.json +3 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/themes/dark.css +77 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/themes/default-theme.js +34 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/public/static/themes/light.css +79 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/App.vue +198 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/.sass-cache/59ae6c3370e48597956c7d0775238711a2c22a84/index.scssc +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/.sass-cache/59ae6c3370e48597956c7d0775238711a2c22a84/linkSetting.scssc +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/.sass-cache/59ae6c3370e48597956c7d0775238711a2c22a84/sceneSetting.scssc +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/.sass-cache/59ae6c3370e48597956c7d0775238711a2c22a84/specialTask.scssc +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/.sass-cache/59ae6c3370e48597956c7d0775238711a2c22a84/style.scssc +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/.sass-cache/59ae6c3370e48597956c7d0775238711a2c22a84/weekTask.scssc +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/VideoSystem.scss +397 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/el-dialog.scss +58 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/el-drawer.scss +41 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/index.scss +1052 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/login.scss +320 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/mobileStyle.scss +332 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/noDataTips.scss +57 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/reset.scss +1192 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/style-black.scss +1 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/style-white.scss +1 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/style.scss +633 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/videoPlaybackCom.scss +468 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/css/videoPlayer.scss +441 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/images/logo.png +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/assets/plugins/encrypt.js +122 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/appFrame.vue +163 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/bottom.vue +15 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/css/bottom.scss +381 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/css/top.scss +49 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/js/Voice.js +345 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/js/bottom.js +102 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/appFrame/top.vue +114 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/i18n/i18n.js +42 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/i18n/i18nObserver.js +39 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/i18n/vueI18n.js +17 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/toast/index.js +64 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/components/toast/index.vue +152 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/hostMap.js +9 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/main.js +39 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/Auth.js +83 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/BA.js +81 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/EquipList.js +127 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/Event.js +34 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/GwEcharts.js +9 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/PPT.js +5 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/RealTime.js +43 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/SystemConfig.js +177 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/Video.js +57 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/VideoTour.js +129 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/WelcomeWord.js +24 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/WorkOrder.js +265 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api/videoSystem.js +81 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/api.js +35 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/apiFunction.js +200 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/encrypt.js +14 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/request/http.js +186 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/router.js +31 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/store.js +189 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/types.js +16 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/utils/formValidate.js +25 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/utils/isApp.js +18 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/utils/language.js +45 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/utils/myUtils.js +643 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/utils/timeFormat.js +23 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/utils/timesYMDHMS.js +27 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/src/views/ganwei-app-empty-page/src/noPage.vue +22 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/stats.html +356 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/vite.base.config.js +244 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-empty-page/vite.config.ts +44 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/.babelrc +4 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/.editorconfig +22 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/.env.development +23 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/.env.production +29 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/.env.test +22 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/.eslintignore +13 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/.eslintrc.cjs +178 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/.gitignore +27 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/.prettierignore +13 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/.prettierrc.cjs +37 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/.stylelintrc.cjs +18 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/auto-imports.d.ts +56 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/components.d.ts +25 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/env.d.ts +21 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/index.html +20 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/package.json +87 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/public/static/language/en-US/home.json +39 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/public/static/language/zh-CN/home.json +39 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/public/static/language/zh-HK/home.json +39 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/App.vue +203 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/assets/images/logo.png +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/components/Layout/TitleList.vue +20 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/enums/index.ts +24 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/main.ts +29 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/models/index.ts +91 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/request/api/RealTime.ts +27 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/request/api.ts +5 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/router.ts +30 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/store.js +189 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/types.js +16 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/components/HomeMenuItem.vue +95 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/components/HomeMenus.vue +118 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/components/HomeMenusEditDrawer.vue +119 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/components/HomeSnapshots.vue +109 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/components/chatbot.vue +96 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/components/eslint.config.js +10 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/css/index.scss +5 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/img/chatbot.gif +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/img/six.png +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/index.vue +42 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/useLanguageStyle.ts +21 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/useManageMenus.ts +38 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/useMenus.ts +49 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/usePolling.ts +38 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/useRealTime.ts +128 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/stats.html +4975 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/tsconfig.json +58 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/types/gw-app-public.d.ts +4 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/vite.base.config.ts +233 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-home/vite.config.ts +49 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-index/.gitignore +27 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-index/index.html +1 -2
- package/ganwei-app-6.2.1/packages/ganwei-app-index/public/static/json/config.json +2 -2
- package/ganwei-app-6.2.1/packages/ganwei-app-index/src/components/vue-qrcode-reader/src/misc/util.js +4 -10
- package/ganwei-app-6.2.1/packages/ganwei-app-index/src/types.js +1 -1
- package/ganwei-app-6.2.1/packages/ganwei-app-login/.babelrc +4 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/.editorconfig +22 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/.env.development +23 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/.env.production +29 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/.env.test +22 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/.eslintignore +13 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/.eslintrc.cjs +178 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/.gitignore +27 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/.prettierignore +13 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/.prettierrc.cjs +37 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/.stylelintrc.cjs +16 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/auto-imports.d.ts +5 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/env.d.ts +67 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/index.html +20 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/package.json +79 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/public/static/language/en-US/login.json +48 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/public/static/language/zh-CN/login.json +48 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/public/static/language/zh-HK/login.json +48 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/App.vue +225 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/assets/images/bg.png +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/assets/images/logo.png +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/assets/images/refresh.png +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/components/app-drag/index.vue +183 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/hostMap.ts +11 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/main.ts +19 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/models/index.ts +48 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/request/api/Auth.ts +27 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/request/api.ts +5 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/router.ts +30 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/views/login/Login.vue +99 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/views/login/css/login.scss +78 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/views/login/js/useLogin.ts +73 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/src/views/login/js/useRememberPassword.ts +48 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/stats.html +4975 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/tsconfig.json +56 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/types/gw-app-public.d.ts +4 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/vite.base.config.ts +233 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-login/vite.config.ts +51 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.babelrc +4 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.editorconfig +22 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.env.development +23 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.env.production +29 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.env.test +22 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.eslintignore +13 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.eslintrc.cjs +178 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.gitignore +27 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.prettierignore +13 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.prettierrc.cjs +37 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/.stylelintrc.cjs +17 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/auto-imports.d.ts +5 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/env.d.ts +21 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/index.html +20 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/package.json +85 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/public/static/language/en-US/setPage.json +25 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/public/static/language/zh-CN/setPage.json +25 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/public/static/language/zh-HK/setPage.json +25 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/App.vue +202 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/assets/images/logo.png +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/components/buttonModeSelect/index.vue +190 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/hostMap.ts +11 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/main.ts +24 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/models/index.ts +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/request/api/Auth.ts +21 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/request/api.ts +5 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/router.ts +29 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/store.js +189 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/types.js +16 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/views/ganwei-app-setPage/src/js/useChangeLanguage.ts +19 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/views/ganwei-app-setPage/src/js/useChangeTheme.ts +16 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/views/ganwei-app-setPage/src/js/useClearCache.ts +26 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/views/ganwei-app-setPage/src/js/useJavaFunc.ts +146 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/views/ganwei-app-setPage/src/js/useLogout.ts +52 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/src/views/ganwei-app-setPage/src/setPage.vue +120 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/stats.html +4975 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/tsconfig.json +58 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/types/gw-app-public.d.ts +4 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/vite.base.config.ts +233 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-set-page/vite.config.ts +49 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/.babelrc +4 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/.editorconfig +22 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/.env.development +23 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/.env.production +29 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/.env.test +22 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/.eslintignore +13 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/.eslintrc.cjs +178 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/.gitignore +27 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/.prettierignore +13 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/.prettierrc.cjs +37 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/auto-imports.d.ts +5 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/components.d.ts +14 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/env.d.ts +7 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/index.html +18 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/package.json +77 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/public/static/language/en-US/template.json +3 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/public/static/language/zh-CN/template.json +3 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/public/static/language/zh-HK/template.json +3 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/src/App.vue +202 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/src/assets/images/logo.png +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/src/components/buttonModeSelect/index.vue +190 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/src/hostMap.ts +11 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/src/main.ts +24 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/src/models/index.ts +0 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/src/request/api/Auth.ts +21 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/src/request/api.ts +5 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/src/router.ts +29 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/src/store.js +189 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/src/types.js +16 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/src/views/ganwei-app-template/src/template.vue +22 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/tsconfig.json +58 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/types/gw-app-public.d.ts +4 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/vite.base.config.js +246 -0
- package/ganwei-app-6.2.1/packages/ganwei-app-template/vite.config.ts +44 -0
- package/ganwei-iotcenter-index-6.2.1/.gitignore +31 -0
- package/ganwei-iotcenter-index-6.2.1/.npmrc +1 -0
- package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/.gitignore +27 -0
- package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/public/static/json/config.json +47 -43
- package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/src/App.vue +5 -0
- package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/src/components/isDebug/isDebug.vue +2 -9
- package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/src/types.js +1 -1
- package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/src/views/index.js +0 -3
- package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/src/views/jumpIframe/index.vue +9 -3
- package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-index/src/views/jumpIframe/preloadMethod.js +3 -3
- package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-login/.gitignore +27 -0
- package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-login/src/assets/css/login.scss +50 -30
- package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-login/src/types.js +1 -1
- package/ganwei-iotcenter-index-6.2.1/packages/ganwei-iotcenter-template/.gitignore +27 -0
- package/ganwei-pc.js +0 -0
- 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
|
+
]);
|
package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/img/chatbot.gif
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -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
|
+
}
|
package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/useManageMenus.ts
ADDED
|
@@ -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
|
+
}
|
package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/useMenus.ts
ADDED
|
@@ -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
|
+
}
|
package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/usePolling.ts
ADDED
|
@@ -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
|
+
}
|
package/ganwei-app-6.2.1/packages/ganwei-app-home/src/views/ganwei-app-home/src/js/useRealTime.ts
ADDED
|
@@ -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
|
+
}
|