From 743568861d3a0b9c58d3263f555e4a729606a2f6 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 16 Oct 2023 17:12:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=88=E5=B9=B6Gin=5FVue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 10 +- .env.production | 11 +- public/config.js | 15 + src/App.vue | 9 + src/api/configManage/backupManage.ts | 6 +- src/api/configManage/config.ts | 4 +- src/api/configManage/configParam.ts | 18 +- src/api/configManage/license.ts | 14 +- src/api/configManage/neManage.ts | 20 +- src/api/configManage/softwareManage.ts | 16 +- src/api/faultManage/actAlarm.ts | 18 +- src/api/faultManage/faultSetting.ts | 45 +- src/api/faultManage/historyAlarm.ts | 16 +- src/api/index.ts | 2 +- src/api/logManage/alarm.ts | 2 +- src/api/logManage/forwarding.ts | 2 +- src/api/logManage/logSet.ts | 22 +- src/api/logManage/mml.ts | 2 +- src/api/logManage/operation.ts | 2 +- src/api/logManage/security.ts | 2 +- src/api/login.ts | 10 +- src/api/mmlManage/mmlSet.ts | 5 +- src/api/mmlManage/neOperate.ts | 4 +- src/api/mmlManage/omcOperate.ts | 4 +- src/api/mmlManage/udmOperate.ts | 4 +- src/api/monitor/session.ts | 4 +- src/api/monitor/{server.ts => system.ts} | 6 +- src/api/neUser/auth.ts | 20 +- src/api/neUser/base5G.ts | 2 +- src/api/neUser/ims.ts | 2 +- src/api/neUser/sub.ts | 27 +- src/api/neUser/ue.ts | 2 +- src/api/router.ts | 2 +- src/api/system/config.ts | 18 +- src/api/system/dict/data.ts | 14 +- src/api/system/dict/type.ts | 14 +- .../logininfor.ts => system/log/login.ts} | 22 +- .../operlog.ts => system/log/operate.ts} | 16 +- src/api/system/menu.ts | 14 +- src/api/system/notice.ts | 64 -- src/api/system/role.ts | 18 +- src/api/system/user.ts | 14 +- src/api/traceManage/analysis.ts | 4 +- src/api/traceManage/pcap.ts | 6 +- src/api/traceManage/task.ts | 12 +- src/components/DictTag/index.vue | 2 +- src/constants/token-constants.ts | 6 +- src/layouts/BasicLayout.vue | 2 +- src/plugins/http-fetch.ts | 13 +- src/store/modules/user.ts | 20 +- src/views/account/components/base-info.vue | 5 +- src/views/account/components/reset-passwd.vue | 5 +- src/views/logManage/logSet/index.vue | 24 +- src/views/login.vue | 4 +- src/views/monitor/cache/index.vue | 21 +- src/views/monitor/cache/info.vue | 3 +- src/views/monitor/job/index.vue | 25 +- src/views/monitor/job/log.vue | 17 +- src/views/monitor/online/index.vue | 338 -------- src/views/monitor/{server => system}/info.vue | 33 +- src/views/system/config/index.vue | 6 +- src/views/system/dept/index.vue | 22 +- src/views/system/dict/data.vue | 13 +- src/views/system/dict/index.vue | 6 +- .../logininfor => system/log/login}/index.vue | 73 +- .../operlog => system/log/operate}/index.vue | 55 +- src/views/system/menu/index.vue | 6 +- src/views/system/notice/index.vue | 735 ------------------ src/views/system/post/index.vue | 19 +- src/views/system/role/auth-user.vue | 44 +- .../role/components/auth-user-select.vue | 30 +- src/views/system/role/index.vue | 23 +- .../user/components/UploadXlsxImport.vue | 185 ----- src/views/system/user/index.vue | 318 ++++++-- src/views/tool/swagger/index.vue | 1 - tsconfig.json | 2 +- vite.config.ts | 4 +- 77 files changed, 734 insertions(+), 1870 deletions(-) create mode 100644 public/config.js rename src/api/monitor/{server.ts => system.ts} (50%) rename src/api/{monitor/logininfor.ts => system/log/login.ts} (63%) rename src/api/{monitor/operlog.ts => system/log/operate.ts} (67%) delete mode 100644 src/api/system/notice.ts delete mode 100644 src/views/monitor/online/index.vue rename src/views/monitor/{server => system}/info.vue (90%) rename src/views/{monitor/logininfor => system/log/login}/index.vue (89%) rename src/views/{monitor/operlog => system/log/operate}/index.vue (93%) delete mode 100644 src/views/system/notice/index.vue delete mode 100644 src/views/system/user/components/UploadXlsxImport.vue diff --git a/.env.development b/.env.development index b7c31d5c..7e373863 100644 --- a/.env.development +++ b/.env.development @@ -2,16 +2,16 @@ VITE_HISTORY_HASH = false # 历史路径-前缀URL如:/h5 -VITE_HISTORY_BASE_URL = '/' +VITE_HISTORY_BASE_URL = "/" # 应用名称 -VITE_APP_NAME = '核心网管理系统' +VITE_APP_NAME = "核心网管理系统" # 应用标识 -VITE_APP_CODE = 'CoreNet' +VITE_APP_CODE = "CoreNet" # 应用版本 -VITE_APP_VERSION = '0.0.1' +VITE_APP_VERSION = "1.23.0" # 接口基础URL地址-不带/后缀 -VITE_API_BASE_URL = '/dev-api' +VITE_API_BASE_URL = "/omc-api" diff --git a/.env.production b/.env.production index 98dcc700..22c2860d 100644 --- a/.env.production +++ b/.env.production @@ -2,16 +2,17 @@ VITE_HISTORY_HASH = true # 历史路径-前缀URL如:/h5 -VITE_HISTORY_BASE_URL = '/' +VITE_HISTORY_BASE_URL = "/" # 应用名称 -VITE_APP_NAME = '核心网管理系统' +VITE_APP_NAME = "核心网管理系统" # 应用标识 -VITE_APP_CODE = 'CoreNet' +VITE_APP_CODE = "CoreNet" # 应用版本 -VITE_APP_VERSION = '0.0.1' +VITE_APP_VERSION = "1.23.1016" # 接口基础URL地址-不带/后缀 -VITE_API_BASE_URL = '/prod-api' +VITE_API_BASE_URL = "/omc-api" + diff --git a/public/config.js b/public/config.js new file mode 100644 index 00000000..9443bc82 --- /dev/null +++ b/public/config.js @@ -0,0 +1,15 @@ +/** + * config 临时配置参数 + */ +(function () { + // host = ip:prot + const host = "192.168.12.12:3030"; + + // 服务地址 + const baseUrl = `http://${host}` + sessionStorage.setItem("baseUrl", baseUrl) + + // websocket + const wsUrl = `ws://${host}` + sessionStorage.setItem("wsUrl", wsUrl) +})(); diff --git a/src/App.vue b/src/App.vue index 98d5fd18..d0f6f93a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,8 +6,10 @@ import enUS from 'ant-design-vue/lib/locale/en_US'; import dayjs from 'dayjs'; import 'dayjs/locale/zh-cn'; import { ref, watch } from 'vue'; +import useAppStore from '@/store/modules/app'; import useI18n from '@/hooks/useI18n'; const { currentLocale } = useI18n(); +const appStore = useAppStore(); dayjs.locale('zh-cn'); // 默认中文 usePrimaryColor(); // 载入用户自定义主题色 @@ -33,6 +35,13 @@ fnChangeLocale(currentLocale.value); watch(currentLocale, val => { fnChangeLocale(val); }); + +// 输出应用版本号 +console.info( + `%c ${appStore.appName} %c ${appStore.appCode} - ${appStore.appVersion} `, + 'color: #fadfa3; background: #030307; padding: 4px 0;', + 'color: #030307; background: #fadfa3; padding: 4px 0;' +); - + {{ value }} diff --git a/src/constants/token-constants.ts b/src/constants/token-constants.ts index c2a1bebb..34c4d1b5 100644 --- a/src/constants/token-constants.ts +++ b/src/constants/token-constants.ts @@ -1,11 +1,11 @@ /**令牌-数据响应字段 */ -export const TOKEN_RESPONSE_FIELD = 'accessToken'; +export const TOKEN_RESPONSE_FIELD = 'access_token'; /**令牌-请求头标识前缀 */ -export const TOKEN_KEY_PREFIX = ''; +export const TOKEN_KEY_PREFIX = 'Bearer '; /**令牌-请求头标识 */ -export const TOKEN_KEY = 'Accesstoken'; +export const TOKEN_KEY = 'Authorization'; /**令牌-存放Cookie标识 */ export const TOKEN_COOKIE = 'AuthOMC'; diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index 64a8b4bb..6f964ae3 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -126,7 +126,7 @@ tabsStore.clear(); disable-content-margin v-bind="proConfig" :iconfont-url="scriptUrl" - :sider-width="256" + :sider-width="208" >