Sfoglia il codice sorgente

驾驶舱门户多语言

yanghao 1 settimana fa
parent
commit
2b7caca5ac

+ 1 - 1
src/components/home/header.vue

@@ -52,7 +52,7 @@
           </li>
 
           <!-- 驾驶舱门户 -->
-          <li v-hasPermi="['portal:dashboard:view']">
+          <li>
             <a
               class="cursor-pointer px-3 py-1.5 rounded-md transition-all duration-300"
               :class="

+ 12 - 0
src/i18n/lang/en.json

@@ -92,5 +92,17 @@
     "rule": "Group System Agent",
     "ask": "Intelligent Questioning",
     "person": "Ruixiaozhi"
+  },
+   "drive": {
+    "title":"Cockpit portal",
+    "subTitle":"Choose a dashboard, and explore the data",
+    "all": "All",
+    "jingying":"Operation",
+    "production":"Manufacturing",
+    "finance":"Financial",
+    "chain":"Supply Chain",
+    "market":"Marketing",
+    "qhse":"QHSE"
+
   }
 }

+ 12 - 0
src/i18n/lang/ru.json

@@ -91,5 +91,17 @@
     "rule": "Агент регламентов",
     "ask": "Вопрос по данным",
     "person": "Руй Сяо Чжи"
+  },
+  "drive": {
+    "title":"Портал панели управления",
+    "subTitle":"Выберите панель управления и изучите данные.",
+    "all": "Все",
+    "jingying":"Oперация",
+    "production":"Производство",
+    "finance":"Финансовый",
+    "chain":"цепь поставок",
+    "market":"Маркетинг",
+    "qhse":"QHSE"
+
   }
 }

+ 12 - 0
src/i18n/lang/zh.json

@@ -92,6 +92,18 @@
     "rule": "集团制度智能体",
     "ask": "智能问数",
     "person": "瑞小智(数字人)"
+  },
+  "drive": {
+    "title":"驾驶舱门户",
+    "subTitle":"选择一个驾驶舱,快速进入对应业务看板。",
+    "all": "全部驾驶舱",
+    "jingying":"经营驾驶舱",
+    "production":"生产驾驶舱",
+    "finance":"财务驾驶舱",
+    "chain":"供应链驾驶舱",
+    "market":"市场驾驶舱",
+    "qhse":"QHSE"
+
   }
   
 }

+ 13 - 12
src/views/drive/index.vue

@@ -7,8 +7,8 @@
         >
         <div class="drive-hero__copy pl-5">
           <p class="drive-hero__eyebrow">DASHBOARD PORTAL</p>
-          <p class="drive-hero__title">驾驶舱门户</p>
-          <p class="drive-hero__desc">选择一个驾驶舱,快速进入对应业务看板。</p>
+          <p class="drive-hero__title">{{ $t("drive.title") }}</p>
+          <p class="drive-hero__desc">{{ $t("drive.subTitle") }}</p>
         </div>
         <div class="drive-hero__visual">
           <el-image
@@ -70,6 +70,7 @@ import * as dd from "dingtalk-jsapi";
 import { getMCSsoToken } from "@/api/user";
 import { useUserStore } from "@/stores/useUserStore";
 import { useThemeStore } from "@/stores/useThemeStore";
+import { useI18n } from "@/i18n";
 
 import banner from "@/assets/images/drivebannere.jpg";
 import banner_white from "@/assets/images/drivebannere_white.png";
@@ -106,20 +107,20 @@ import jingying from "@/assets/images/jingying.png";
 import shengc from "@/assets/images/shengc.png";
 import cai from "@/assets/images/cai.png";
 import gong from "@/assets/images/gong.png";
-import city from "@/assets/images/city.png";
 
 const userStore = useUserStore();
 const themeStore = useThemeStore();
 
-const tabs = [
-  { label: "全部驾驶舱", value: "all", icon: all },
-  { label: "经营管理", value: "management", icon: jingying },
-  { label: "生产运营", value: "production", icon: shengc },
-  { label: "财务管理", value: "finance", icon: cai },
-  { label: "供应链管理", value: "supply", icon: gong },
-  { label: "市场营销", value: "marketing", icon: city },
-  { label: "QHSE", value: "qhse", icon: gong },
-];
+const { t } = useI18n();
+
+const tabs = computed(() => [
+  { value: "all", label: t("drive.all"), icon: all },
+  { value: "management", label: t("drive.jingying"), icon: jingying },
+  { value: "production", label: t("drive.production"), icon: shengc },
+  { value: "finance", label: t("drive.finance"), icon: cai },
+  { value: "supply", label: t("drive.chain"), icon: gong },
+  { value: "qhse", label: t("drive.qhse"), icon: gong },
+]);
 const activeTab = ref("all");
 type DriveCard = {
   title: string;