From bd8f3a15f17facd2f77521da844eaf76dca22bad Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 22 三月 2024 10:02:25 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/northglass-erp/src/layout/MainErpView.vue |   29 ++++++++++++++++++-----------
 1 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/layout/MainErpView.vue b/north-glass-erp/northglass-erp/src/layout/MainErpView.vue
index 20334e7..e094acc 100644
--- a/north-glass-erp/northglass-erp/src/layout/MainErpView.vue
+++ b/north-glass-erp/northglass-erp/src/layout/MainErpView.vue
@@ -1,12 +1,17 @@
 <script setup>
 import { RouterLink,useRouter} from 'vue-router'
 import  useUserInfoStore from '@/stores/userInfo'
-import request from "@/utils/request";
-import {ElMessage} from "element-plus";
+import request from "@/utils/request"
+import {ElMessage} from "element-plus"
 import {onMounted, reactive, ref, watch} from "vue"
 import deepClone from "@/utils/deepClone"
 import userInfo from '@/stores/userInfo'
-import {Close, Grid, Histogram, MessageBox, SwitchButton} from "@element-plus/icons-vue";
+import {Close, Grid, Histogram, MessageBox, SwitchButton} from "@element-plus/icons-vue"
+import { useI18n } from 'vue-i18n'
+import i18n from "@/lang/index"
+const lang = i18n.global.locale.value
+//璇█鑾峰彇
+const { t } = useI18n()
 const store=userInfo()
 
 const router = useRouter()
@@ -23,18 +28,21 @@
 
 //鎻愬彇妯″潡鍒楄〃
 let menuList=$ref([])
-request.get("/menu").then((res) => {
+request.get(`/menu/getMenu/${lang}`).then((res) => {
   if(res.code==200){
     menuList= deepClone(res.data)
   }else{
     ElMessage.warning(res.msg)
     router.push("/login")
   }
+}).catch((e)=>{
+  ElMessage.warning(t('main.connectErr'))
+  router.push("/login")
 })
 
 //鑾峰彇鑿滃崟鍒楄〃
 let menuItemList=$ref([])
-request.get("/menuItem").then((res) => {
+request.get(`/menuItem/getMenuItem/${lang}`).then((res) => {
   if(res.code==200){
     menuItemList= deepClone(res.data)
   }else{
@@ -80,14 +88,13 @@
       <el-header >
         <div style="height: 100%;width: 100%;display: flex">
           <img src="../assets/northGlass.ico" alt="" style="max-width: 100%;max-height: 100%">
-          <h3 style="margin: 1rem  ;font-weight: bold;width: 20vw;"> 娆㈣繋{{ user }}浣跨敤鍖楃幓ERP绯荤粺锛�</h3>
-          <span style="height: 70%;width: 78vw;margin-top: 1rem;" >
+          <h3 style="margin: 1rem  ;font-weight: bold;width: 40vw;"> {{$t('main.titleFirst') + user + $t('main.titleLast')}}</h3>
+          <span style="height: 70%;width: 78vw;margin-top: 1.5rem;" >
 
-            <el-button  class="sys-quit" @click="quit"  type="info" round>
-              <el-icon size="large"><SwitchButton  size=""/></el-icon>
-            </el-button>
+<!--            <el-button   class="sys-quit" @click="quit"  type="info" round>-->
+              <el-icon @click="quit"  style="float: right;margin-right: 1rem" size="large" ><SwitchButton  size=""/></el-icon>
+<!--            </el-button>-->
           </span>
-
         </div>
       </el-header>
       <el-container >

--
Gitblit v1.8.0