From a9bcb83a7942e3da175ab6da9ed16eda38f49180 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期一, 27 五月 2024 14:38:19 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes

---
 UI-Project/src/layout/MainErpView.vue |  160 +++++++++++++++++++++++++++-------------------------
 1 files changed, 83 insertions(+), 77 deletions(-)

diff --git a/UI-Project/src/layout/MainErpView.vue b/UI-Project/src/layout/MainErpView.vue
index bc44154..91453ae 100644
--- a/UI-Project/src/layout/MainErpView.vue
+++ b/UI-Project/src/layout/MainErpView.vue
@@ -2,10 +2,10 @@
 import {useRouter} from 'vue-router'
 import useUserInfoStore from '@/stores/userInfo'
 import userInfo from '@/stores/userInfo'
-import request from "@/utils/request";
-import {ElMessage} from "element-plus";
-import {ref, watch} from "vue"
-import deepClone from "@/utils/deepClone"
+import request from '@/utils/request'
+import {ElMessage} from 'element-plus'
+import {ref, watch} from 'vue'
+import deepClone from '@/utils/deepClone'
 
 const store = userInfo()
 
@@ -16,33 +16,34 @@
 // store.createWebSocket();
 function quit() {
   userStore.$patch({
-    user: null
+    user: null,
   })
-  router.push("/login")
+  // router.push('/login')
+  let token = window.localStorage.getItem('userInfo')
+console.log(token);
+  request.get("/loadGlass/sys/user/login").then((res) => {
+    if (res.code === 200) {
+    ElMessage.success(res.msg);
+     console.log(res.data);
+    } else {
+    ElMessage.warning(res.msg);
+    // router.push("/login");
+    }
+   });
 }
 
-
-//鎻愬彇妯″潡鍒楄〃
+//鎻愬彇鑿滃崟妯″潡鍒楄〃
 let menuList = $ref([])
-request.get('/menu/sysMenu/list').then((res) => {
+// request.get('/loadGlass/menu/sysMenu/list').then((res) => {
+request.get('/loadGlass/sys/menu/getMenuTree').then((res) => {
   if (res.code == 200) {
     menuList = deepClone(res.data)
+    console.log(response.data.token);
   } else {
     ElMessage.warning(res.msg)
     router.push('/login')
   }
 })
-
-//鑾峰彇鑿滃崟鍒楄〃
-// let menuItemList = $ref([])
-// request.get('/menuItem').then((res) => {
-//   if (res.code == 200) {
-//     menuItemList = deepClone(res.data)
-//   } else {
-//     ElMessage.warning(res.msg)
-//     router.push('/login')
-//   }
-// })
 
 const menu = ref(null)
 let indexKey = ref(null)
@@ -51,42 +52,47 @@
   indexKey.value = key
 }
 
-watch(indexKey, (newVal, oldVal) => {
+watch(
+    indexKey,
+    (newVal, oldVal) => {
       if (oldVal !== newVal && oldVal !== null) {
         menu.value.close(oldVal)
       }
-},
-    {deep:true}
+    },
+    {deep: true}
 )
 
 router.beforeEach((to, from) => {
   //return false
 })
 
-
 let openFlag = $ref(null)
 //鍘熷鑿滃崟鎵撳紑
 const openMenu = (menuID) => {
-    if(menuID===openFlag){
-      openFlag = null
-    }else {
-      openFlag = menuID
-    }
+  if (menuID === openFlag) {
+    openFlag = null
+  } else {
+    openFlag = menuID
+  }
 }
-
-
 </script>
-
+ 
 <template>
   <div id="all">
     <el-container>
-      <el-header >
+      <el-header>
         <div style="height: 100%;width: 100%;display: flex;background-color: #fff;">
-          <img src="../assets/northGlass.ico" alt="" style="max-width: 100%;max-height: 100%">
+          <img src="../assets/northGlass.ico"
+               alt=""
+               style="max-width: 100%;max-height: 100%">
           <h3 style="margin: 1rem  ;font-weight: bold;width: 20vw;"> 娆㈣繋{{ user }}浣跨敤鍖楃幓MES绯荤粺锛�</h3>
           <span style="height: 70%;width: 78vw;margin-top: 1rem;">
-            <el-button class="sys-quit" @click="quit" round>
-              <el-icon size="large"><SwitchButton size=""/></el-icon>
+            <el-button class="sys-quit"
+                       @click="quit"
+                       round>
+              <el-icon size="large">
+                <SwitchButton size=""/>閫�鍑�
+              </el-icon>
             </el-button>
           </span>
         </div>
@@ -130,46 +136,51 @@
     </el-container>
   </div>
 </template>
-
+ 
 <style scoped>
-#all{
+#all {
   background-color: #eee;
   height: 100%;
 }
-.el-container{
+
+.el-container {
   height: 100vh;
-  width: 99vw
+  width: 99vw;
 }
 
-*{
+* {
   padding: 0;
   margin: 0;
 }
-:deep(.sys-quit){
+
+:deep(.sys-quit) {
   float: right;
   margin-right: 1rem;
   width: 5rem;
 }
-/* 妯嚎 */
-#line{
-float:right;
-width: 100%;
-height: 1px;
-/* margin-top: 0.5em; */
-margin-bottom: 0.5em;
-background:#d4c4c4;
-position: relative;
-text-align: center;
-}
-:deep(span){
-  margin-right: 0;
 
+/* 妯嚎 */
+#line {
+  float: right;
+  width: 100%;
+  height: 1px;
+  /* margin-top: 0.5em; */
+  margin-bottom: 0.5em;
+  background: #d4c4c4;
+  position: relative;
+  text-align: center;
 }
-.el-collapse{
+
+:deep(span) {
+  margin-right: 0;
+}
+
+.el-collapse {
   font-size: 16px;
   font-weight: bold;
 }
-#main{
+
+#main {
   width: 99%;
   float: right;
   height: 99%;
@@ -178,7 +189,7 @@
 /*------------*/
 
 /* .menu div div{
-
+ 
   width: 138px;
   height: 35px;
   line-height: 35px;
@@ -195,10 +206,10 @@
   margin-bottom:4px;
   text-align: left;
   cursor: pointer; */
-  /* border-radius:8px; */
-  /*   outline: none; */
-  /* background-color:#5CADFE; */
-  /* box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); */
+/* border-radius:8px; */
+/*   outline: none; */
+/* background-color:#5CADFE; */
+/* box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); */
 /* } */
 
 .menu {
@@ -210,9 +221,6 @@
   font-size: 16px;
   padding-left: 15px;
   padding-right: 2px;
-
-
-
 }
 
 ul {
@@ -222,7 +230,6 @@
 }
 
 ul li {
-
   height: 28px;
   line-height: 30px;
   /* background: rgb(128, 128, 128); */
@@ -249,7 +256,6 @@
   font-size: 14px;
 }
 ul li a:hover {
-
   color: #1087ff;
 }
 
@@ -258,9 +264,10 @@
   height: 0px;
   /* background-color: white;
   opacity: 0.8; */
-  margin-bottom:2px;
+  margin-bottom: 2px;
 }
-.item a{
+
+.item a {
   width: 138px;
   height: 35px;
   display: block;
@@ -284,7 +291,6 @@
   position: relative;
   font-weight: bold;
   overflow: hidden;
-
 }
 
 .menu_title:hover {
@@ -304,8 +310,6 @@
   text-align: center;
 }
 
-
-
 /* 鍔ㄧ敾鏁堟灉 */
 .enter-x-left {
   z-index: 9;
@@ -315,16 +319,20 @@
   transform: translateX(-50px);
   transition: all 0.3s ease;
 }
-.enter-x-left:nth-child(1){
+
+.enter-x-left:nth-child(1) {
   animation-delay: 0.1s;
 }
-.enter-x-left:nth-child(2){
+
+.enter-x-left:nth-child(2) {
   animation-delay: 0.2s;
 }
+
 .enter-x-left:nth-child(3) {
   animation-delay: 0.3s;
 }
-.enter-x-left:nth-child(4){
+
+.enter-x-left:nth-child(4) {
   animation-delay: 0.4s;
 }
 @keyframes enter-x-left {
@@ -333,6 +341,4 @@
     transform: translateX(0);
   }
 }
-
-
 </style>
\ No newline at end of file

--
Gitblit v1.8.0