From e14264130d54c85706e063ddf6b090b5c2dd4edc Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 30 一月 2026 09:48:06 +0800
Subject: [PATCH] 最新版本541200007

---
 admin/src/components/common/CommonHeader.vue         |  286 +++++++++--------------------------
 admin/src/components/system/menu/OperaMenuWindow.vue |    2 
 admin/src/views/system/menu.vue                      |   47 +----
 admin/src/main.js                                    |   60 +------
 admin/src/store/index.js                             |   33 ---
 5 files changed, 98 insertions(+), 330 deletions(-)

diff --git a/admin/src/components/common/CommonHeader.vue b/admin/src/components/common/CommonHeader.vue
index 8773c62..2e95744 100644
--- a/admin/src/components/common/CommonHeader.vue
+++ b/admin/src/components/common/CommonHeader.vue
@@ -2,56 +2,35 @@
   <div class="common-header">
     <div class="header">
       <div class="logo">
-        <div class="title"> <img src="@/assets/system.png" alt="" />{{sysConfig.subtitle || title }}</div>
+        <div class="title">{{ title }}</div>
         <div class="list">
-            <div  :class="index==currentIndex?'item active':'item'" v-for="(item,index) in topMenuList.list" :key="item.id"  @click="getHeaderNav(item,index)" :index="index">{{item.label}}
-              <div v-if="index==currentIndex" class="linellae"></div>
-            </div>
+          <div class="item active">
+            <div>鏈嶅姟涓績</div>
+            <div class="linellae"></div>
+          </div>
+          <div  class="item" v-for="(item,index) in topMenuList.list" :key="item.id"  @click="getHeaderNav(item)" :index="index">{{item.label}}</div>
+<!--          <div class="item" @click="getHeaderNav('0')">瀹夐槻涓績</div>
+          <div class="item" @click="getHeaderNav('1')">娑堟帶涓績</div>
+          <div class="item" @click="getHeaderNav('2')">鑳界涓績</div>
+          <div class="item" @click="getHeaderNav('7')">鍚庡嫟涓績</div>
+          <div class="item" @click="getHeaderNav('3')">椹鹃┒鑸�</div>-->
+          <!-- <div class="item" @click="handleTest">娴嬭瘯</div> -->
         </div>
+        <!-- <div class="title-en">Diagnosis of Intelligent Manufacturing Integrated Service Platfrom</div> -->
       </div>
       <div class="user">
-          <div class="user-search">
-              <div class="user-search-left">
-                <span>鍏ㄩ儴</span>
-                  <img src="@/assets/icons/xl.png" alt="">
-              </div>
-              <div class="user-search-right">
-                  <input type="text" placeholder="璇疯緭鍏�" />
-                  <img src="@/assets/icons/sousuo.png" alt="">
-              </div>
-          </div>
-          <div class="user-images">
-<!--              <img src="@/assets/icons/ic_1.jpg" alt="">-->
-<!--              <img src="@/assets/icons/ic_2.png" alt="">-->
-              <img src="@/assets/icons/ic_3.jpg" alt="">
-              <img src="@/assets/icons/ic_4.jpg" alt="">
-              <img src="@/assets/icons/ic_5.jpg" alt="">
-<!--              <img src="@/assets/icons/ic_6.jpg" alt="">-->
-              <img src="@/assets/icons/ic_7.jpg" alt="">
-<!--              <img src="@/assets/icons/ic_8.jpg" alt="">-->
-          </div>
-          <el-dropdown v-if="isLogined" trigger="click">
-            <span class="el-dropdown-link" style="cursor: pointer; color: rgba(255,255,255,.56);">
-              {{ userInfo | displayName }}
-              <i class="el-icon-arrow-down el-icon--right"></i>
-            </span>
-            <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item @click.native="changePwd">淇敼瀵嗙爜</el-dropdown-item>
-              <el-dropdown-item @click.native="logout">閫�鍑虹櫥褰�</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown>
-<!--        <el-dropdown v-if="isLogined" trigger="click">-->
-<!--          <span class="el-dropdown-link">-->
-<!--            &lt;!&ndash; <img v-if="userInfo != null" :src="userInfo.avatar == null ? `${require('@/assets/avatar/man.png')}` : userInfo.avatar" alt="">{{userInfo | displayName}}<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i> &ndash;&gt;-->
-<!--            <img v-if="userInfo != null" style="width: 30px !important" src="@/assets/avatar/man.png" alt="" />{{-->
-<!--              userInfo | displayName-->
-<!--            }}<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
-<!--          </span>-->
-<!--          <el-dropdown-menu slot="dropdown">-->
-<!--            <el-dropdown-item @click.native="changePwd">淇敼瀵嗙爜</el-dropdown-item>-->
-<!--            <el-dropdown-item @click.native="logout">閫�鍑虹櫥褰�</el-dropdown-item>-->
-<!--          </el-dropdown-menu>-->
-<!--        </el-dropdown>-->
+        <el-dropdown v-if="isLogined" trigger="click">
+          <span class="el-dropdown-link">
+            <!-- <img v-if="userInfo != null" :src="userInfo.avatar == null ? `${require('@/assets/avatar/man.png')}` : userInfo.avatar" alt="">{{userInfo | displayName}}<i class="el-icon-arrow-down el-icon--right"></i> -->
+            <img v-if="userInfo != null" style="width: 30px !important" src="@/assets/avatar/man.png" alt="" />{{
+              userInfo | displayName
+            }}<i class="el-icon-arrow-down el-icon--right"></i>
+          </span>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item @click.native="changePwd">淇敼瀵嗙爜</el-dropdown-item>
+            <el-dropdown-item @click.native="logout">閫�鍑虹櫥褰�</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
       </div>
     </div>
     <!-- 淇敼瀵嗙爜 -->
@@ -65,7 +44,7 @@
             show-password></el-input>
         </el-form-item>
         <el-form-item label="鏂板瘑鐮�" prop="newPwd" required>
-          <el-input v-model="changePwdData.form.newPwd" type="password" placeholder="璇疯緭鍏ユ柊瀵嗙爜锛岃嚦灏戝寘鎷暟瀛椼�佸ぇ鍐欏瓧姣嶃�佸皬鍐欏瓧姣嶃�佺壒娈婂瓧绗︿腑鐨勪笁绉嶅瓧绗︼紝涓旇嚦灏�8浣嶆暟"
+          <el-input v-model="changePwdData.form.newPwd" type="password" placeholder="璇疯緭鍏ユ柊瀵嗙爜锛屽瘑鐮侀渶鍖呭惈瀛楁瘝銆佹暟瀛楀強鐗规畩瀛楃涓殑鑷冲皯涓ょ"
             maxlength="20" show-password></el-input>
         </el-form-item>
         <!-- <div style="font-size: 12px;color:#999999">瀵嗙爜闇�鍖呭惈瀛楁瘝銆佹暟瀛楀強鐗规畩瀛楃涓殑鑷冲皯涓ょ</div> -->
@@ -81,7 +60,7 @@
 <script>
 import { mapState, mapMutations } from 'vuex'
 import GlobalAlertWindow from './GlobalAlertWindow'
-import { getSystemConfig, logout, updatePwd } from '@/api/system/common'
+import { logout, updatePwd } from '@/api/system/common'
 import { getAppHeaderNav } from '@/api'
 export default {
   name: 'CommonHeader',
@@ -128,13 +107,13 @@
     }
   },
   computed: {
-    ...mapState(['menuData', 'userInfo', 'topMenuList', 'currentIndex', 'sysConfig'])
+    ...mapState(['menuData', 'userInfo', 'topMenuList'])
     // title () {
     //   return this.$route.meta.title
     // }
   },
   created () {
-    this.getSystemConfig()
+
   },
   mounted () {
     // needChangePwd 0 : 榛樿瀵嗙爜闇�瑕佷慨鏀癸紝1 涓嶉渶瑕�
@@ -155,7 +134,7 @@
     }
   },
   methods: {
-    ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo', 'setTopMenuCurrent', 'setCurrentIndex', 'setSysconfig']),
+    ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo']),
     // 淇敼瀵嗙爜
     changePwd () {
       this.visible.changePwd = true
@@ -163,68 +142,36 @@
         this.$refs.changePwdDataForm.resetFields()
       })
     },
-    getSystemConfig () {
-      if (!this.sysConfig.subTitle) {
-        getSystemConfig()
-          .then((res) => {
-            if (res && res.subtitle) {
-              this.setSysconfig(res)
-            }
-          })
-      }
-    },
     validatePassword (rule, value, callback) {
       if (!value) {
         callback(new Error('璇疯緭鍏ュ瘑鐮�'))
       } else {
-        // const lengthValid = /^.{6,20}$/.test(value)
-        // const hasLetter = /[a-zA-Z]/.test(value)
-        // const hasNumber = /[0-9]/.test(value)
-        // const hasSpecial = /[!@#$%^&*(),.?":{}|<>]/.test(value)
-        //
-        // const typesCount = [hasLetter, hasNumber, hasSpecial].filter(Boolean).length
-        //
-        // if (!lengthValid) {
-        //   callback(new Error('瀵嗙爜闀垮害闇�涓�6鍒�20涓瓧绗�'))
-        // } else if (typesCount < 2) {
-        //   callback(new Error('瀵嗙爜闇�鍖呭惈瀛楁瘝銆佹暟瀛楀強鐗规畩瀛楃涓殑鑷冲皯涓ょ'))
-        // } else {
-        //   callback() // 楠岃瘉閫氳繃
-        // }
-        let typeCount = 0
-        if (/[a-z]/.test(value)) typeCount++ // 灏忓啓瀛楁瘝
-        if (/[A-Z]/.test(value)) typeCount++ // 澶у啓瀛楁瘝
-        if (/\d/.test(value)) typeCount++ // 鏁板瓧
-        if (/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(value)) typeCount++ // 鐗规畩瀛楃
-        if (typeCount >= 3) {
-          callback()
+        const lengthValid = /^.{6,20}$/.test(value)
+        const hasLetter = /[a-zA-Z]/.test(value)
+        const hasNumber = /[0-9]/.test(value)
+        const hasSpecial = /[!@#$%^&*(),.?":{}|<>]/.test(value)
+
+        const typesCount = [hasLetter, hasNumber, hasSpecial].filter(Boolean).length
+
+        if (!lengthValid) {
+          callback(new Error('瀵嗙爜闀垮害闇�涓�6鍒�20涓瓧绗�'))
+        } else if (typesCount < 2) {
+          callback(new Error('瀵嗙爜闇�鍖呭惈瀛楁瘝銆佹暟瀛楀強鐗规畩瀛楃涓殑鑷冲皯涓ょ'))
         } else {
-          callback(new Error('鑷冲皯鍖呮嫭鏁板瓧銆佸ぇ鍐欏瓧姣嶃�佸皬鍐欏瓧姣嶃�佺壒娈婂瓧绗︿腑鐨勪笁绉嶅瓧绗︼紝涓旇嚦灏�8浣嶆暟'))
+          callback() // 楠岃瘉閫氳繃
         }
       }
     },
-    getHeaderNav (item, index) {
-      this.setCurrentIndex(index)
-      if (item.linkType === 0) {
-        this.setTopMenuCurrent(item)
-      } else {
-        if (item.url && item.url === 'goHKAF' && item.params != null) {
-          this.getHKAFHeaderNav(item.params, item.label)
-        } else if (item.url && item.url.indexOf('http') === 0) {
-          window.open(item.url, '_blank')
-        }
+    getHeaderNav (item) {
+      if (item.url && item.url === 'goHKAF' && item.params != null) {
+        this.getHKAFHeaderNav(item.params)
+      } else if (item.url && item.url.indexOf('http') === 0) {
+        window.open(item.url, '_blank')
       }
     },
-    getHKAFHeaderNav (type, label) {
+    getHKAFHeaderNav (type) {
       getAppHeaderNav(type).then(res => {
-        if (label === '瀹夐槻涓績') {
-          const openWindow = window.open(res, '_blank')
-          // setTimeout(() => {
-          //   openWindow.close()
-          // }, 7 * 1000)
-        } else {
-          window.open(res, '_blank')
-        }
+        window.open(res, '_blank')
       })
     },
     handleTest () {
@@ -310,9 +257,8 @@
           newPwd: this.changePwdData.form.newPwd
         })
           .then(() => {
-            console.log('淇敼鎴愬姛')
             this.$tip.apiSuccess('淇敼鎴愬姛')
-            // this.$store.commit('setUserInfo', { needChangePwd: 1 })
+            this.$store.commit('setUserInfo', { needChangePwd: 1 })
             this.visible.changePwd = false
           })
           .catch(e => {
@@ -344,37 +290,36 @@
 @import "@/assets/style/variables.scss";
 
 .common-header {
-  background-color: #1E7FFF;
+  background-color: #2080f7;
 }
 
 .list {
   flex: 1;
+  display: flex;
+  align-items: center;
   margin-left: 60px;
-  margin-top: 10px;
+
+  .item {
+    margin-right: 40px;
+    font-size: 16px;
+    font-weight: 400;
     display: flex;
+    flex-direction: column;
     align-items: center;
-    .item {
-      margin-right: 24px;
-      font-size: 16px;
-      font-weight: 400;
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      justify-content: flex-start;
-      height: 49px;
-      cursor: pointer;
+    justify-content: flex-start;
+    height: 40px;
+    cursor: pointer;
 
-      .linellae {
-        width: 64px;
-        height: 2px;
-        background: #FFFFFF;
-      }
+    .linellae {
+      width: 64px;
+      height: 2px;
+      background: #FFFFFF;
     }
+  }
 
-    .active {
-      font-weight: 500;
-    }
-
+  .active {
+    font-weight: 500;
+  }
 }
 
 .header {
@@ -389,7 +334,7 @@
     box-sizing: border-box;
     min-width: 360px;
     height: 56px;
-    padding: 10px 12px;
+    padding: 10px 30px;
     // flex-shrink: 0;
     line-height: 36px;
     font-size: 22px;
@@ -399,18 +344,7 @@
     align-items: center;
 
     .title {
-      display: flex;
-      color: rgb(255, 255, 255);
-      font-size: 18px;
-      font-weight: 700;
-      font-family: "Microsoft Yahei", "sans-serif", "segoe UI", "PingFang SC", arial, Helvetica;
-      //font-size: 18px;
-      //width: 320px;
-      img{
-        width:auto ;
-        height: 32px;
-        margin-right: 5px;
-      }
+      width: 240px;
     }
 
     // display: inline;
@@ -422,83 +356,15 @@
   }
 
   .user {
-    /*width: 152px;*/
+    width: 212px;
     box-sizing: border-box;
     height: 56px;
     padding-right: 25px;
-    /*background: url("../../assets/images/top_ic_bolang@2x.png") no-repeat;*/
+    background: url("../../assets/images/top_ic_bolang@2x.png") no-repeat;
     flex-shrink: 0;
     text-align: right;
-    display: flex;
-    align-items: center;
-    .user-search {
-        width: 346px;
-        height: 32px;
-        border-radius: 30px;
-        border: 1px solid rgba(255,255,255,.56);
-        margin-right: 15px;
-        display: flex;
-        align-items: center;
-        .user-search-left {
-            flex-shrink: 0;
-            width: 106px;
-            height: 100%;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            span {
-                font-size: 14px;
-                font-weight: 400;
-                color: rgba(255,255,255,.56);
-                margin-right: 10px;
-            }
-            img {
-                top: 0;
-                margin: 0;
-                width: 20px;
-                height: 16px;
-            }
-        }
-        .user-search-right {
-            flex: 1;
-            height: 100%;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            padding-right: 10px;
-            box-sizing: border-box;
-            input {
-                flex: 1;
-                height: 100%;
-                font-size: 14px;
-                font-weight: 400;
-                color: rgba(255,255,255,.56);
-                border: none;
-                outline: none;
-                background-color: rgba(0,0,0,0);
-                &::placeholder {
-                    color: rgba(255,255,255,.56);
-                }
-            }
-            img {
-                top: 0;
-                margin: 0;
-                width: 20px;
-                height: 20px;
-            }
-        }
-    }
-    .user-images {
-        height: 100%;
-        display: flex;
-        align-items: center;
-        img {
-            top: 0 !important;
-            width: 18px;
-            height: 18px;
-            margin-right: 12px;
-        }
-    }
+    cursor: pointer;
+
     .el-dropdown {
       top: 2px;
       color: #fff;
diff --git a/admin/src/components/system/menu/OperaMenuWindow.vue b/admin/src/components/system/menu/OperaMenuWindow.vue
index e786d69..383f3c8 100644
--- a/admin/src/components/system/menu/OperaMenuWindow.vue
+++ b/admin/src/components/system/menu/OperaMenuWindow.vue
@@ -20,6 +20,7 @@
       <el-form-item label="鎼哄甫鍙傛暟" prop="params">
         <el-input v-model="form.params" placeholder="璇疯緭鍏ユ惡甯﹀弬鏁�" v-trim maxlength="200"/>
       </el-form-item>
+      <el-form-item label="鍥炬爣" prop="icon" class="form-item-icon" v-if="form.type !== 1">
       <el-form-item label="鑿滃崟绫诲瀷" prop="linkType" >
         <el-radio-group v-model="form.linkType">
           <el-radio :label="0" :value="0" >鍐呴儴鑿滃崟</el-radio>
@@ -66,6 +67,7 @@
         icon: '',
         type: '',
         linkType: 0,
+        type: '',
         remark: ''
       },
       // 楠岃瘉瑙勫垯
diff --git a/admin/src/main.js b/admin/src/main.js
index dc697c7..0ad3f03 100644
--- a/admin/src/main.js
+++ b/admin/src/main.js
@@ -15,7 +15,6 @@
 import preventReClick from '@/directives/directive'
 import Treeselect from '@riophae/vue-treeselect'
 import '@riophae/vue-treeselect/dist/vue-treeselect.css'
-
 Vue.component('treeselect', Treeselect)
 
 Vue.use(preventReClick)
@@ -38,7 +37,7 @@
   router,
   store,
   computed: {
-    ...mapState(['userInfo', 'homePage','topMenuCurrent','menuData'])
+    ...mapState(['userInfo', 'homePage'])
   },
   watch: {
     async userInfo () {
@@ -46,16 +45,10 @@
         return
       }
       await this.initRoutes()
-    },
-    async topMenuCurrent () {
-      if (this.topMenuCurrent == null) {
-        return
-      }
-      await this.chagneRoutes()
     }
   },
   methods: {
-    ...mapMutations(['switchCollapseMenu', 'setCurrentIndex', 'setHomePage', 'setTopMenuCurrent', 'setTopMenuCurrent','cleartagsview']),
+    ...mapMutations(['switchCollapseMenu', 'setHomePage']),
     // 鍒濆鍖栨湰鍦伴厤缃�
     initLocalConfig () {
       // 鑿滃崟鐘舵�侀厤缃�
@@ -81,40 +74,17 @@
       await fetchMenuTree()
         .then(allmenus => {
           // 娣诲姞鑿滃崟
+          var menus = allmenus.filter(item => {
+            return item.type !== 1
+          })
           var topList = allmenus.filter(item => {
             return item.type === 1
           })
+          console.log(topList)
+          storeMenus.push.apply(storeMenus, menus)
           storeTopMenus.push.apply(storeTopMenus, topList)
-          var topCurrent = null
-          var tlist =[]
-          topList.forEach(item => {
-            if (item.linkType === 0 ) {
-              if (topCurrent == null) {
-                topCurrent = item
-              }
-              tlist.push(...item.children)
-            }
-          })
-          if (this.$route.query && this.$route.query.menuparams) {
-            let menu = topList.filter(item => item.params === this.$route.query.menuparams)
-            this.setTopMenuCurrent(menu[0])
-            this.setCurrentIndex(topList.findIndex(obj => obj.params === this.$route.query.menuparams))
-          } else {
-            this.setTopMenuCurrent(topCurrent)
-            this.setCurrentIndex(0)
-          }
-          // console.log(topList)
-          // var menus = []
-          // topList.forEach(item => {
-          //   console.log(topCurrent.id, item.id)
-          //   if (item.id == this.topMenuCurrent.id) {
-          //     menus = item.children
-          //   }
-          // })
-          console.log('menus', this.menuData.list)
-          storeMenus.push.apply(storeMenus, this.menuData.list)
           // 娣诲姞璺敱
-          this.__addRouters(tlist)
+          this.__addRouters(storeMenus)
           // 404
           router.addRoute({
             path: '*',
@@ -127,9 +97,7 @@
             redirect: this.homePage.url
           })
           // 璺敱鍔犺浇瀹屾垚鍚庯紝濡傛灉璁块棶鐨勬槸/锛岃烦杞嚦鍔ㄦ�佽瘑鍒殑棣栭〉
-          if (this.$route.query && this.$route.query.menuparams) {
-            this.$router.push(topList.filter(item => item.params === this.$route.query.menuparams)[0].homeUrl)
-          } else if (this.$route.path === '/') {
+          if (this.$route.path === '/') {
             this.$router.push(this.homePage.url)
           }
         })
@@ -139,16 +107,6 @@
         .finally(() => {
           this.loading = false
         })
-    },
-    async chagneRoutes () {
-      // 閲嶇疆鑿滃崟
-      this.cleartagsview('/index')
-      console.log('menus', this.menuData.list)
-      // 娣诲姞璺敱
-      // this.__addRouters(this.menuData.list)
-      if(this.topMenuCurrent.homeUrl){
-        await this.$router.push({path: this.topMenuCurrent.homeUrl, query: {}})
-      }
     },
     // 鏂板缓璺敱
     __addRouters (routes, parents = []) {
diff --git a/admin/src/store/index.js b/admin/src/store/index.js
index f2fb2f1..6825b73 100644
--- a/admin/src/store/index.js
+++ b/admin/src/store/index.js
@@ -1,13 +1,11 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
-import router from '../router'
 Vue.use(Vuex)
 
 const state = {
   // 鐧诲綍鐢ㄦ埛淇℃伅
   userInfo: null,
   tableHeightNew: 300,
-  sysConfig: { title: '', subtitle: '' },
   primaryColor: '#2080f7',
   // 棣栭〉
   homePage: null,
@@ -18,8 +16,6 @@
     // 鏄惁鏀惰捣
     collapse: false
   },
-  topMenuCurrent: {
-  },
   topMenuList: {
     // 鑿滃崟鍒楄〃
     list: [],
@@ -29,21 +25,10 @@
   // tags鏁扮粍
   tags: [],
   // tagsview鏍囩鏄剧ず闅愯棌
-  isCollapse: false,
-  // 椤堕儴鑿滃崟绱㈠紩
-  currentIndex: 0
+  isCollapse: false
 }
 
 const mutations = {
-  // 璁剧疆椤堕儴鑿滃崟绱㈠紩
-  setCurrentIndex (state, index) {
-    console.log('璁剧疆椤堕儴鑿滃崟绱㈠紩', index)
-    state.currentIndex = index
-  },
-  setSysconfig (state, config) {
-    state.sysConfig = { title: config.title || '', subtitle: config.subtitle || '' }
-    document.title =  state.sysConfig.title+ state.sysConfig.subtitle
-  },
   // 鍒囨崲鑿滃崟鐘舵��
   switchCollapseMenu (state, value) {
     if (value != null) {
@@ -71,22 +56,8 @@
   setHomePage (state, homePage) {
     state.homePage = homePage
   },
-  // 璁剧疆棣栭〉璺敱淇℃伅
-  setTopMenuCurrent (state, current) {
-    console.log('setTopMenuCurrent', current)
-    if (current.id !== state.topMenuCurrent.id) {
-      state.topMenuList.list.forEach(item => {
-        console.log(item.id, item.id)
-        if (current.id == item.id) {
-          state.topMenuCurrent = current
-          state.menuData.list = item.children
-        }
-      })
-    }
-  },
   // 閲嶇疆鑿滃崟
   resetMenus: (state) => {
-    state.topMenuId = null
     state.menuData.list = []
   },
   //  tags
@@ -95,7 +66,7 @@
     // findindex鎵捐鏍囷紝寰幆鍒ゆ柇涓�涓嬶紝濡傛灉绛変簬閭d箞灏变唬琛ㄦ湁鐩稿悓鐨勶紝灏变笉蹇呮坊鍔狅紝濡傛灉鎵句笉鍒伴偅灏辨槸-1.灏辨坊鍔�
     // state.tags = [{ ...val, keepAlive: false }]
     const result = state.tags.findIndex(item => item.index === val.index)
-    if (result === -1) {
+      if (result === -1) {
       state.tags.push({ ...val, keepAlive: false })
     } else {
       state.tags[result] = { ...val, keepAlive: false }
diff --git a/admin/src/views/system/menu.vue b/admin/src/views/system/menu.vue
index 849b26e..44e1bac 100644
--- a/admin/src/views/system/menu.vue
+++ b/admin/src/views/system/menu.vue
@@ -11,7 +11,7 @@
     <!-- 琛ㄦ牸鍜屽垎椤� -->
     <template v-slot:table-wrap>
       <ul class="toolbar" v-permissions="['system:menu:create', 'system:menu:delete', 'system:menu:sort']">
-        <li><el-button type="primary" @click="$refs.operaMenuWindow.open(activeType==0?'鏂板缓涓�绾ц彍鍗�':'鏂板缓椤堕儴瀵艰埅鑿滃崟',null,null,activeType)" icon="el-icon-plus" v-permissions="['system:menu:create']">鏂板缓</el-button></li>
+        <li><el-button type="primary" @click="$refs.operaMenuWindow.open(activeGroup==0?'鏂板缓涓�绾ц彍鍗�':'鏂板缓椤堕儴瀵艰埅鑿滃崟',null,null,activeGroup)" icon="el-icon-plus" v-permissions="['system:menu:create']">鏂板缓</el-button></li>
         <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['system:menu:delete']">鍒犻櫎</el-button></li>
         <li><el-button @click="sort('top')" :loading="isWorking.sort" icon="el-icon-sort-up" v-permissions="['system:menu:sort']">涓婄Щ</el-button></li>
         <li><el-button @click="sort('bottom')" :loading="isWorking.sort" icon="el-icon-sort-down" v-permissions="['system:menu:sort']">涓嬬Щ</el-button></li>
@@ -35,14 +35,9 @@
             <template v-else>鏈缃�</template>
           </template>
         </el-table-column>
-        <el-table-column prop="path" label="璁块棶璺緞" show-tooltip-when-overflow min-width="200px"></el-table-column>
+        <el-table-column prop="path" label="璁块棶璺緞" show-tooltip-when-overflow min-width="220px"></el-table-column>
         <el-table-column prop="params" label="鍙傛暟" min-width="120px"></el-table-column>
-        <el-table-column prop="linkType" label="鑿滃崟绫诲瀷" min-width="80px">
-          <template slot-scope="{row}">
-            {{row.linkType == 1 ? '澶栭儴绯荤粺' : '鍐呴儴绯荤粺'}}
-          </template>
-        </el-table-column>
-        <el-table-column prop="remark" label="澶囨敞" min-width="150px" show-tooltip-when-overflow></el-table-column>
+        <el-table-column prop="remark" label="澶囨敞" min-width="120px"></el-table-column>
         <el-table-column prop="createUser" label="鍒涘缓浜�" min-width="100px">
           <template slot-scope="{row}">{{row.createUserInfo == null ? '' : row.createUserInfo.username}}</template>
         </el-table-column>
@@ -63,8 +58,8 @@
           fixed="right"
         >
           <template slot-scope="{row}">
-            <el-button type="text" icon="el-icon-edit" @click="$refs.operaMenuWindow.open('缂栬緫鑿滃崟', row,null,activeType)" v-permissions="['system:menu:update']">缂栬緫</el-button>
-            <el-button v-if="activeGroup !== 1" type="text" icon="el-icon-plus" @click="$refs.operaMenuWindow.open('鏂板缓瀛愯彍鍗�', null, row,activeType)" v-permissions="['system:menu:create']">鏂板缓瀛愯彍鍗�</el-button>
+            <el-button type="text" icon="el-icon-edit" @click="$refs.operaMenuWindow.open('缂栬緫鑿滃崟', row,null,activeGroup)" v-permissions="['system:menu:update']">缂栬緫</el-button>
+            <el-button v-if="activeGroup !== 1" type="text" icon="el-icon-plus" @click="$refs.operaMenuWindow.open('鏂板缓瀛愯彍鍗�', null, row,activeGroup)" v-permissions="['system:menu:create']">鏂板缓瀛愯彍鍗�</el-button>
             <el-button v-if="!row.fixed" type="text" icon="el-icon-delete" @click="deleteById(row)" v-permissions="['system:menu:delete']">鍒犻櫎</el-button>
           </template>
         </el-table-column>
@@ -87,10 +82,8 @@
   data () {
     return {
       // 鏄惁姝e湪澶勭悊涓�
-      activeGroup: -1,
-      activeType: 1,
-      topMenuId:null,
-      groupList:[{id:-1,name: "椤堕儴瀵艰埅閰嶇疆",type:1},{id:-2,name: "绯荤粺宸︿晶鑿滃崟",type:0}],
+      activeGroup: 0,
+      groupList:[{id:0,name: "鏈嶅姟涓績鑿滃崟"},{id:1,name: "椤堕儴瀵艰埅閰嶇疆"}],
       isWorking: {
         sort: false
       }
@@ -99,36 +92,14 @@
   methods: {
     groupClick(item){
       this.activeGroup = item.id
-      this.activeType = item.type
       this.handlePageChange();
     },
     // 鏌ヨ鏁版嵁
     handlePageChange () {
       this.isWorking.search = true
-      fetchTree({type: this.activeType == 1?this.activeType:null})
+      fetchTree({type: this.activeGroup})
         .then(records => {
-          if(this.activeType === 1){
-            this.tableData.list = records
-            this.groupList = [{id:-1,name: "椤堕儴瀵艰埅閰嶇疆",type:1}]
-            var tops = []
-            this.tableData.list.forEach(item=>{
-              if(item.linkType !== 1){
-                tops.push({id:item.id,name: item.name,type:0})
-              }
-            })
-            if(tops.length){
-              this.groupList.push(...tops)
-            }else {
-              this.groupList.push({id:0,name: "绯荤粺宸︿晶鑿滃崟",type:0})
-            }
-          }else{
-            //濡傛灉鏄唴閮ㄨ彍鍗�
-            records.forEach(item =>{
-              if(item.id === this.activeGroup){
-                this.tableData.list =item.children
-              }
-            })
-          }
+          this.tableData.list = records
         })
         .catch(e => {
           this.$tip.apiFailed(e)

--
Gitblit v1.9.3