wuyouming666
2024-04-19 e0699feb382ad3c01040f135f53698ac5c6ec84e
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,13 +16,12 @@
// store.createWebSocket();
function quit() {
  userStore.$patch({
    user: null
    user: null,
  })
  router.push("/login")
  router.push('/login')
}
 
//提取模块列表
//提取菜单模块列表
let menuList = $ref([])
request.get('/loadGlass/menu/sysMenu/list').then((res) => {
  if (res.code == 200) {
@@ -33,17 +32,6 @@
  }
})
 
//获取菜单列表
// 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,7 +39,9 @@
  indexKey.value = key
}
 
watch(indexKey, (newVal, oldVal) => {
watch(
    indexKey,
    (newVal, oldVal) => {
      if (oldVal !== newVal && oldVal !== null) {
        menu.value.close(oldVal)
      }
@@ -63,7 +53,6 @@
  //return false
})
 
let openFlag = $ref(null)
//原始菜单打开
const openMenu = (menuID) => {
@@ -73,8 +62,6 @@
      openFlag = menuID
    }
}
</script>
 
<template>
@@ -82,11 +69,17 @@
    <el-container>
      <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>
@@ -136,20 +129,23 @@
  background-color: #eee;
  height: 100%;
}
.el-container{
  height: 100vh;
  width: 99vw
  width: 99vw;
}
 
*{
  padding: 0;
  margin: 0;
}
:deep(.sys-quit){
  float: right;
  margin-right: 1rem;
  width: 5rem;
}
/* 横线 */
#line{
float:right;
@@ -161,14 +157,16 @@
position: relative;
text-align: center;
}
:deep(span){
  margin-right: 0;
}
.el-collapse{
  font-size: 16px;
  font-weight: bold;
}
#main{
  width: 99%;
  float: right;
@@ -210,9 +208,6 @@
  font-size: 16px;
  padding-left: 15px;
  padding-right: 2px;
}
 
ul {
@@ -222,7 +217,6 @@
}
 
ul li {
  height: 28px;
  line-height: 30px;
  /* background: rgb(128, 128, 128); */
@@ -249,7 +243,6 @@
  font-size: 14px;
}
ul li a:hover {
  color: #1087ff;
}
 
@@ -260,6 +253,7 @@
  opacity: 0.8; */
  margin-bottom:2px;
}
.item a{
  width: 138px;
  height: 35px;
@@ -284,7 +278,6 @@
  position: relative;
  font-weight: bold;
  overflow: hidden;
}
 
.menu_title:hover {
@@ -304,8 +297,6 @@
  text-align: center;
}
 
/* 动画效果 */
.enter-x-left {
  z-index: 9;
@@ -315,15 +306,19 @@
  transform: translateX(-50px);
  transition: all 0.3s ease;
}
.enter-x-left:nth-child(1){
  animation-delay: 0.1s;
}
.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){
  animation-delay: 0.4s;
}
@@ -333,6 +328,4 @@
    transform: translateX(0);
  }
}
</style>