From b353171ab48a680c4da732bdf768bc1b1454049a Mon Sep 17 00:00:00 2001 From: jiangzhe <244140623@qq.com> Date: Fri, 26 Apr 2024 14:14:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E7=BD=B2=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=92=8C=E8=8F=9C=E5=8D=95=E7=BB=93=E6=9E=84=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=96=B0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- .env.production | 4 +- package.json | 2 +- src/router/index.ts | 4 +- .../activity/component/schedule/index.vue | 2 +- src/views/evaluate/evaluateList/index.vue | 190 ++++++++++++++++++ vite.config.ts | 4 + 7 files changed, 202 insertions(+), 8 deletions(-) create mode 100644 src/views/evaluate/evaluateList/index.vue diff --git a/.env.development b/.env.development index a10fdea..625e4d6 100644 --- a/.env.development +++ b/.env.development @@ -5,10 +5,10 @@ VITE_APP_TITLE = 云舒_心理健康平台 VITE_APP_ENV = 'development' # 开发环境 -VITE_APP_BASE_API = '/dev-api' +VITE_APP_BASE_API = '/api' # 应用访问路径 例如使用前缀 /admin/ -VITE_APP_CONTEXT_PATH = '/' +VITE_APP_CONTEXT_PATH = '/manage/' # 监控地址 VITE_APP_MONITRO_ADMIN = 'http://localhost:9090/admin/applications' diff --git a/.env.production b/.env.production index e0659e9..0c6f22c 100644 --- a/.env.production +++ b/.env.production @@ -5,7 +5,7 @@ VITE_APP_TITLE = 云舒_心理健康平台 VITE_APP_ENV = 'production' # 应用访问路径 例如使用前缀 /admin/ -VITE_APP_CONTEXT_PATH = '/' +VITE_APP_CONTEXT_PATH = '/manage/' # 监控地址 VITE_APP_MONITRO_ADMIN = '/admin/applications' @@ -14,7 +14,7 @@ VITE_APP_MONITRO_ADMIN = '/admin/applications' VITE_APP_POWERJOB_ADMIN = '/powerjob' # 生产环境 -VITE_APP_BASE_API = '/prod-api' +VITE_APP_BASE_API = '/api' # 是否在打包时开启压缩,支持 gzip 和 brotli VITE_BUILD_COMPRESS = gzip diff --git a/package.json b/package.json index 3abf7b7..de7ad43 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "license": "MIT", "scripts": { "dev": "vite serve --mode development", - "build:prod": "vite build --mode production &&vue-tsc --noEmit", + "build:prod": "vite build --mode production", "preview": "vite preview", "lint": "eslint src/**/*.{ts,js,vue} --fix", "prepare": "husky install", diff --git a/src/router/index.ts b/src/router/index.ts index 107fe4f..4e308e7 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,4 +1,4 @@ -import { createWebHistory, createRouter, RouteOption } from 'vue-router'; +import { createWebHashHistory, createRouter, RouteOption } from 'vue-router'; /* Layout */ import Layout from '@/layout/index.vue'; @@ -211,7 +211,7 @@ export const dynamicRoutes: RouteOption[] = [ * 创建路由 */ const router = createRouter({ - history: createWebHistory(import.meta.env.VITE_APP_CONTEXT_PATH), + history: createWebHashHistory(import.meta.env.VITE_APP_CONTEXT_PATH), routes: constantRoutes, // 刷新时,滚动条位置还原 scrollBehavior(to, from, savedPosition) { diff --git a/src/views/activity/component/schedule/index.vue b/src/views/activity/component/schedule/index.vue index e10da01..d1aaec5 100644 --- a/src/views/activity/component/schedule/index.vue +++ b/src/views/activity/component/schedule/index.vue @@ -80,7 +80,7 @@ {{ scope.row.status == 0 ? '未测' : - '已测'}} + '已测' }} diff --git a/src/views/evaluate/evaluateList/index.vue b/src/views/evaluate/evaluateList/index.vue new file mode 100644 index 0000000..e344366 --- /dev/null +++ b/src/views/evaluate/evaluateList/index.vue @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + + + + + + + + {{ parseTime(scope.row.expireTime, '{y}-{m}-{d}') }} + + + + + + {{ scope.row.status === 1 ? '正常' : '停用' }} + + + + + + + + + 查看测评结果 + + + + + + + + + + + + + diff --git a/vite.config.ts b/vite.config.ts index 788aace..548f6de 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -6,6 +6,10 @@ import path from 'path'; export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => { const env = loadEnv(mode, process.cwd()); return { + build: { + outDir: "manage", + chunkSizeWarningLimit: 1600, + }, // 部署生产环境和开发环境下的URL。 // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。