Fixiaobai
2023-10-12 66506f2a1b836e955264f3efbfdcd3e27008b6a6
src/view/index.vue
@@ -60,7 +60,7 @@
      align-items: center;
      flex-direction: column;
      padding: 20px 0;
      transition: .3s;
   transition: 0.3s;
      overflow-y: auto;
   }
@@ -122,7 +122,7 @@
   .right {
      height: calc(100vh - 58px);
      transition: .3s;
   transition: 0.3s;
   }
   .tag {
@@ -142,7 +142,7 @@
   }
   
   .tag .el-icon-delete:hover{
      color: #F56C6C;
   color: #f56c6c;
   }
   
   .tag:hover .el-icon-delete{
@@ -211,7 +211,7 @@
         <div class="logo">
            <img src="../../static/img/lg.png" />
         </div>
         <div class="label">瑞翔新材TMS系统</div>
         <div class="label" id="label">瑞翔新材TMS系统</div>
         <div class="user">
            <el-avatar :size="24">{{ userName.substring(0, 1) }}</el-avatar>
            <span>{{ userName }}</span>
@@ -232,7 +232,7 @@
            <div class="small_menu">
               <p v-for="(b, bi) in a.c" :key="bi" :class="activeP == b.k ? 'active_p' : ''" @click="addTab(b)">
                  <i :class="b.i"></i>
                  <span>{{ b.v }}</span>
                  <span :id="menu+`${b.k}`" >{{ b.v }}</span>
               </p>
            </div>
         </el-popover>
@@ -259,6 +259,7 @@
</template>
<script>
import { ref,onMounted } from 'vue'
   const requireComponent = require.context("../components/view", false, /\.vue/);
   var comObj = {};
   requireComponent.keys().forEach(fileName => {
@@ -288,7 +289,7 @@
                  }]
               },
               {
                  k: 2,
            k: 24,
                  v: "承运商管理",
                  i: "font icon-kuguanfahuo",
                  c: [{
@@ -304,7 +305,7 @@
                  }]
               },
               {
                  k: 1,
            k: 25,
                  v: "运输管理",
                  i: "font icon-yunyingguanli_tieziguanli",
                  c: [{
@@ -383,7 +384,7 @@
                  ]
               },
               {
                  k: 3,
            k: 26,
                  v: "承运商考核",
                  i: "font icon-wodekaohe",
                  c: [{
@@ -401,7 +402,7 @@
                  ]
               },
               {
                  k: 4,
            k: 27,
                  v: "系统配置",
                  i: "el-icon-s-tools",
                  c: [{
@@ -440,6 +441,7 @@
            activeBox: 0,
            activeP: 0,
            tabActive: 0,
         menuIsClick: false,
            tabs: [{
               k: 0,
               v: "首页",
@@ -453,8 +455,17 @@
      mounted() {
         // this.userName = JSON.parse(localStorage.getItem("user")).name;
      },
   watch:{
      menuIsClick(){
         $("#label").click()
      }
   },
      methods: {
      menuClick() {
         this.menuIsClick=!this.menuIsClick
   },
         addTab(ob) {
      this.menuClick()
            if (ob.k == 0) this.activeBox = 0;
            this.activeP = ob.k; //0
            this.tabActive = ob.k; //0