Forráskód Böngészése

修改项目名称都从配置文件中国读取

gengjunfang 3 hete
szülő
commit
762bc67d39
8 módosított fájl, 26 hozzáadás és 11 törlés
  1. 3 0
      .env.development
  2. 6 2
      .env.production
  3. 1 1
      index.html
  4. 6 3
      src/api/dicom.ts
  5. 1 1
      src/router/index.ts
  6. 2 1
      src/views/Home.vue
  7. 4 1
      src/views/Layout.vue
  8. 3 2
      src/views/Login.vue

+ 3 - 0
.env.development

@@ -1,4 +1,7 @@
 # 开发环境配置
+# 项目标题
+#VITE_APP_TITLE=医学影像云平台
+VITE_APP_TITLE=十堰市影像云平台
 # 阅片器调阅地址
 VITE_VIEWER_URL=http://127.0.0.1:19603
 VITE_API_URL=http://127.0.0.1:8080

+ 6 - 2
.env.production

@@ -1,6 +1,10 @@
 # 生产环境配置
+# 项目标题
+VITE_APP_TITLE=十堰市影像云平台
 # 阅片器调阅地址
 #VITE_VIEWER_URL=http://192.168.1.10:9603
 #VITE_API_URL=http://192.168.1.10:9604
-VITE_VIEWER_URL=http://36.140.148.147:9603
-VITE_API_URL=http://36.140.148.147:9604
+#VITE_VIEWER_URL=http://36.140.148.147:9603
+#VITE_API_URL=http://36.140.148.147:9604
+VITE_VIEWER_URL=http://122.188.65.69:7213
+VITE_API_URL=http://122.188.65.69:7214

+ 1 - 1
index.html

@@ -4,7 +4,7 @@
     <meta charset="UTF-8" />
     <link rel="icon" type="image/svg+xml" href="/vite.svg" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>质控在线 - QConline</title>
+    <title>%VITE_APP_TITLE%</title>
   </head>
   <body>
     <div id="app"></div>

+ 6 - 3
src/api/dicom.ts

@@ -44,7 +44,8 @@ export function uploadDicom(file: File, institutionId: string) {
     data: formData,
     headers: {
       'Content-Type': 'multipart/form-data'
-    }
+    },
+    timeout: 120000  // 文件上传超时时间设置为120秒
   })
 }
 
@@ -64,7 +65,8 @@ export function batchUploadDicom(files: File[], institutionId: string) {
     data: formData,
     headers: {
       'Content-Type': 'multipart/form-data'
-    }
+    },
+    timeout: 120000  // 文件上传超时时间设置为120秒
   })
 }
 
@@ -84,7 +86,8 @@ export function batchUploadAdvanced(files: File[], institutionId: string) {
     data: formData,
     headers: {
       'Content-Type': 'multipart/form-data'
-    }
+    },
+    timeout: 120000  // 文件上传超时时间设置为120秒
   })
 }
 

+ 1 - 1
src/router/index.ts

@@ -208,7 +208,7 @@ router.beforeEach((to, from, next) => {
   const userStore = useUserStore()
 
   // 设置页面标题
-  document.title = (to.meta.title as string) || '质控在线'
+  document.title = (to.meta.title as string) || '云平台'
 
   // 调试日志
   console.log('路由守卫 - 目标路径:', to.path)

+ 2 - 1
src/views/Home.vue

@@ -5,7 +5,7 @@
         <div class="welcome-icon">
           <el-icon :size="48"><Promotion /></el-icon>
         </div>
-        <h2>欢迎使用质控在线管理系统</h2>
+        <h2>欢迎使用{{appTitle}}</h2>
         <p class="user-info">当前用户:{{ userStore.userInfo?.realName || userStore.userInfo?.username }}</p>
         <p class="org-info">所属机构:{{ userStore.userInfo?.institutionName || '未设置' }}</p>
       </div>
@@ -122,6 +122,7 @@ import { getDashboardStatistics } from '@/api/system'
 
 const router = useRouter()
 const userStore = useUserStore()
+const appTitle = import.meta.env.VITE_APP_TITLE
 
 const statistics = ref<any>({
   studyCount: 0,

+ 4 - 1
src/views/Layout.vue

@@ -5,7 +5,7 @@
         <div class="logo-container">
           <el-icon class="logo-icon"><FirstAidKit /></el-icon>
         </div>
-        <h2>广西壮族自治区云胶片</h2>
+        <h2>{{ appTitle }}</h2>
       </div>
       <div class="header-right">
         <span class="institution-name">{{ userStore.currentInstitution?.institutionName || '未选择机构' }}</span>
@@ -108,6 +108,9 @@ import { ElMessageBox } from 'element-plus'
 import { UserFilled, HomeFilled, User, Document, FirstAidKit, Setting, FolderOpened, Connection } from '@element-plus/icons-vue'
 import { useUserStore } from '@/stores/user'
 
+// 从环境变量获取项目标题
+const appTitle = import.meta.env.VITE_APP_TITLE
+
 const router = useRouter()
 const userStore = useUserStore()
 

+ 3 - 2
src/views/Login.vue

@@ -1,8 +1,7 @@
 <template>
   <div class="login-container">
     <div class="login-box">
-      <h1 class="login-title">质控在线</h1>
-      <p class="login-subtitle">QConline Management System</p>
+      <h1 class="login-title">{{appTitle}}</h1>
 
       <el-form ref="formRef" :model="form" :rules="rules" class="login-form">
         <el-form-item prop="username">
@@ -60,6 +59,8 @@ import type { FormInstance, FormRules } from 'element-plus'
 const router = useRouter()
 const userStore = useUserStore()
 
+const appTitle = import.meta.env.VITE_APP_TITLE || '系统登录'
+
 const formRef = ref<FormInstance>()
 const loading = ref(false)