From 4e598bff548c0e4a89f30e1523bdfb8b59d97741 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 30 一月 2026 09:59:05 +0800
Subject: [PATCH] tijiao

---
 admin/.env                                                 |    4 +
 admin/src/views/business/inoutRecord.vue                   |    3 
 admin/src/views/login.vue                                  |    5 +
 admin/src/views/vehicle/category.vue                       |    5 +
 admin/src/components/common/CommonHeader.vue               |   77 +++++++++---------
 admin/src/components/system/menu/OperaMenuWindow.vue       |    2 
 admin/src/views/vehicle/components/OperaCategoryWindow.vue |    2 
 admin/public/index.html                                    |    8 ++
 admin/src/views/system/menu.vue                            |   47 +++++++++--
 admin/src/main.js                                          |   26 ++++-
 admin/src/store/index.js                                   |   16 ++++
 11 files changed, 137 insertions(+), 58 deletions(-)

diff --git a/admin/.env b/admin/.env
index 788b741..28ed2e0 100644
--- a/admin/.env
+++ b/admin/.env
@@ -10,4 +10,8 @@
 VUE_APP_API_PREFIX = '/system_gateway'
 
 # 椤圭洰鍚嶇О
+<<<<<<< HEAD
 VUE_APP_TITLE = '鏅烘収鐗╂祦鍥尯瀹夋秷涓�浣撳寲绯荤粺'
+=======
+VUE_APP_TITLE = '鑺滄箹鐑熻崏鏅烘収瀹夋秷瀹夊叏闃茶寖绯荤粺'
+>>>>>>> c5675caa (鏈�鏂扮増鏈�541200007)
diff --git a/admin/public/index.html b/admin/public/index.html
index d580c28..f8a9b72 100644
--- a/admin/public/index.html
+++ b/admin/public/index.html
@@ -5,11 +5,19 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+<<<<<<< HEAD
     <title>鏅烘収鍥尯瀹夋秷涓�浣撳寲绯荤粺</title>
   </head>
   <body>
     <noscript>
       <strong>We're sorry but 鏅烘収鍥尯瀹夋秷涓�浣撳寲绯荤粺 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+=======
+    <title>鑺滄箹鐑熻崏鏅烘収瀹夋秷瀹夊叏闃茶寖绯荤粺</title>
+  </head>
+  <body>
+    <noscript>
+      <strong>We're sorry but 鑺滄箹鐑熻崏鏅烘収瀹夋秷瀹夊叏闃茶寖绯荤粺 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+>>>>>>> c5675caa (鏈�鏂扮増鏈�541200007)
     </noscript>
     <div id="app"></div>
     <!-- built files will be auto injected -->
diff --git a/admin/src/components/common/CommonHeader.vue b/admin/src/components/common/CommonHeader.vue
index 2e95744..2857921 100644
--- a/admin/src/components/common/CommonHeader.vue
+++ b/admin/src/components/common/CommonHeader.vue
@@ -4,19 +4,10 @@
       <div class="logo">
         <div class="title">{{ title }}</div>
         <div class="list">
-          <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  :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>
-        <!-- <div class="title-en">Diagnosis of Intelligent Manufacturing Integrated Service Platfrom</div> -->
       </div>
       <div class="user">
         <el-dropdown v-if="isLogined" trigger="click">
@@ -75,6 +66,7 @@
     return {
       title: process.env.VUE_APP_TITLE,
       headerNavData: {},
+      currentIndex: 0,
       visible: {
         // 淇敼瀵嗙爜
         changePwd: false
@@ -134,7 +126,7 @@
     }
   },
   methods: {
-    ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo']),
+    ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo', 'setTopMenuCurrent']),
     // 淇敼瀵嗙爜
     changePwd () {
       this.visible.changePwd = true
@@ -162,11 +154,16 @@
         }
       }
     },
-    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')
+    getHeaderNav (item,index) {
+      this.currentIndex = index
+      if(item.linkType === 0){
+        this.setTopMenuCurrent(item)
+      }else{
+        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) {
@@ -295,31 +292,32 @@
 
 .list {
   flex: 1;
-  display: flex;
-  align-items: center;
   margin-left: 60px;
-
-  .item {
-    margin-right: 40px;
-    font-size: 16px;
-    font-weight: 400;
+  margin-top: 10px;
     display: flex;
-    flex-direction: column;
     align-items: center;
-    justify-content: flex-start;
-    height: 40px;
-    cursor: pointer;
+    .item {
+      margin-right: 40px;
+      font-size: 16px;
+      font-weight: 400;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      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 {
@@ -344,7 +342,8 @@
     align-items: center;
 
     .title {
-      width: 240px;
+      font-size: 18px;
+      width: 320px;
     }
 
     // display: inline;
@@ -356,7 +355,7 @@
   }
 
   .user {
-    width: 212px;
+    width: 152px;
     box-sizing: border-box;
     height: 56px;
     padding-right: 25px;
diff --git a/admin/src/components/system/menu/OperaMenuWindow.vue b/admin/src/components/system/menu/OperaMenuWindow.vue
index 383f3c8..e786d69 100644
--- a/admin/src/components/system/menu/OperaMenuWindow.vue
+++ b/admin/src/components/system/menu/OperaMenuWindow.vue
@@ -20,7 +20,6 @@
       <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>
@@ -67,7 +66,6 @@
         icon: '',
         type: '',
         linkType: 0,
-        type: '',
         remark: ''
       },
       // 楠岃瘉瑙勫垯
diff --git a/admin/src/main.js b/admin/src/main.js
index 0ad3f03..83b2a5e 100644
--- a/admin/src/main.js
+++ b/admin/src/main.js
@@ -37,7 +37,7 @@
   router,
   store,
   computed: {
-    ...mapState(['userInfo', 'homePage'])
+    ...mapState(['userInfo', 'homePage','topMenuCurrent','menuData'])
   },
   watch: {
     async userInfo () {
@@ -48,7 +48,7 @@
     }
   },
   methods: {
-    ...mapMutations(['switchCollapseMenu', 'setHomePage']),
+    ...mapMutations(['switchCollapseMenu', 'setHomePage', 'setTopMenuCurrent', 'setTopMenuCurrent']),
     // 鍒濆鍖栨湰鍦伴厤缃�
     initLocalConfig () {
       // 鑿滃崟鐘舵�侀厤缃�
@@ -74,15 +74,27 @@
       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
+          topList.forEach(item => {
+            if (item.linkType === 0 && topCurrent == null) {
+              topCurrent = item
+            }
+          })
+          this.setTopMenuCurrent(topCurrent)
+          // 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(storeMenus)
           // 404
diff --git a/admin/src/store/index.js b/admin/src/store/index.js
index 6825b73..f76eee9 100644
--- a/admin/src/store/index.js
+++ b/admin/src/store/index.js
@@ -16,6 +16,8 @@
     // 鏄惁鏀惰捣
     collapse: false
   },
+  topMenuCurrent: {
+  },
   topMenuList: {
     // 鑿滃崟鍒楄〃
     list: [],
@@ -56,8 +58,22 @@
   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
diff --git a/admin/src/views/business/inoutRecord.vue b/admin/src/views/business/inoutRecord.vue
index 61bf082..6371726 100644
--- a/admin/src/views/business/inoutRecord.vue
+++ b/admin/src/views/business/inoutRecord.vue
@@ -162,8 +162,11 @@
         { key: 1, name: '澶栧崗杩愯緭杞﹁締' },
         { key: 2, name: '甯傚叕鍙稿嵏璐ц溅杈�' },
         { key: 3, name: '鍔犲伐鐑熷嵏璐ц溅杈�' },
+<<<<<<< HEAD
         { key: 4, name: '鑷湁鍏姟杞�' },
         { key: 5, name: '鑷湁璐ц繍杞﹁締' },
+=======
+        { key: 4, name: '鐗╂祦鍏姟鐢ㄨ溅'  007)
         { key: 6, name: '鏈煡杞﹁締' }
       ]
     }
diff --git a/admin/src/views/login.vue b/admin/src/views/login.vue
index 5c64f46..a4f240a 100644
--- a/admin/src/views/login.vue
+++ b/admin/src/views/login.vue
@@ -3,8 +3,13 @@
     <img src="@/assets/images/bg@2x.png" class="main_bg" alt="">
     <div class="login_wrap">
       <div class="login_img">
+<<<<<<< HEAD
         <div class="h3" style="font-size: 30px; margin-bottom: 0;">{{sysConfig.title || ''}}</div>
         <div class="h3">{{sysConfig.subtitle || title}}</div>
+=======
+        <div class="h2">鑺滄箹鐑熻崏鏅烘収瀹夋秷瀹夊叏闃茶寖绯荤粺</div>
+        <div class="h3">鏅烘収鐗╂祦鍥尯瀹夋秷涓�浣撳寲绯荤粺</div>
+>>>>>>> c5675caa (鏈�鏂扮増鏈�541200007)
       </div>
       <div class="form_wrap">
         <div class="tabs">
diff --git a/admin/src/views/system/menu.vue b/admin/src/views/system/menu.vue
index 44e1bac..849b26e 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(activeGroup==0?'鏂板缓涓�绾ц彍鍗�':'鏂板缓椤堕儴瀵艰埅鑿滃崟',null,null,activeGroup)" icon="el-icon-plus" v-permissions="['system:menu:create']">鏂板缓</el-button></li>
+        <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 @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,9 +35,14 @@
             <template v-else>鏈缃�</template>
           </template>
         </el-table-column>
-        <el-table-column prop="path" label="璁块棶璺緞" show-tooltip-when-overflow min-width="220px"></el-table-column>
+        <el-table-column prop="path" label="璁块棶璺緞" show-tooltip-when-overflow min-width="200px"></el-table-column>
         <el-table-column prop="params" label="鍙傛暟" min-width="120px"></el-table-column>
-        <el-table-column prop="remark" 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="createUser" label="鍒涘缓浜�" min-width="100px">
           <template slot-scope="{row}">{{row.createUserInfo == null ? '' : row.createUserInfo.username}}</template>
         </el-table-column>
@@ -58,8 +63,8 @@
           fixed="right"
         >
           <template slot-scope="{row}">
-            <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 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 v-if="!row.fixed" type="text" icon="el-icon-delete" @click="deleteById(row)" v-permissions="['system:menu:delete']">鍒犻櫎</el-button>
           </template>
         </el-table-column>
@@ -82,8 +87,10 @@
   data () {
     return {
       // 鏄惁姝e湪澶勭悊涓�
-      activeGroup: 0,
-      groupList:[{id:0,name: "鏈嶅姟涓績鑿滃崟"},{id:1,name: "椤堕儴瀵艰埅閰嶇疆"}],
+      activeGroup: -1,
+      activeType: 1,
+      topMenuId:null,
+      groupList:[{id:-1,name: "椤堕儴瀵艰埅閰嶇疆",type:1},{id:-2,name: "绯荤粺宸︿晶鑿滃崟",type:0}],
       isWorking: {
         sort: false
       }
@@ -92,14 +99,36 @@
   methods: {
     groupClick(item){
       this.activeGroup = item.id
+      this.activeType = item.type
       this.handlePageChange();
     },
     // 鏌ヨ鏁版嵁
     handlePageChange () {
       this.isWorking.search = true
-      fetchTree({type: this.activeGroup})
+      fetchTree({type: this.activeType == 1?this.activeType:null})
         .then(records => {
-          this.tableData.list = 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
+              }
+            })
+          }
         })
         .catch(e => {
           this.$tip.apiFailed(e)
diff --git a/admin/src/views/vehicle/category.vue b/admin/src/views/vehicle/category.vue
index d224e1a..e1e0116 100644
--- a/admin/src/views/vehicle/category.vue
+++ b/admin/src/views/vehicle/category.vue
@@ -30,8 +30,13 @@
                       <span  v-else-if="row.bizType ==1">澶栧崗杩愯緭杞﹁締</span>
                       <span  v-else-if="row.bizType ==2">甯傚叕鍙稿嵏璐ц溅杈�</span>
                       <span  v-else-if="row.bizType ==3">鍔犲伐鐑熷嵏璐ц溅杈�</span>
+<<<<<<< HEAD
                       <span  v-else-if="row.bizType ==4">鑷湁鍏姟杞�</span>
                       <span  v-else-if="row.bizType ==5">鑷湁璐ц繍杞﹁締</span>
+=======
+                      <span  v-else-if="row.bizType ==4">鐗╂祦鍏姟鐢ㄨ溅</span>
+                      <span  v-else-if="row.bizType ==5">鐗╂祦璐ц繍杞﹁締</span>
+>>>>>>> c5675caa (鏈�鏂扮増鏈�541200007)
                       <span  v-else >-</span>
                     </template>
               </el-table-column>
diff --git a/admin/src/views/vehicle/components/OperaCategoryWindow.vue b/admin/src/views/vehicle/components/OperaCategoryWindow.vue
index 6fa801d..5b2d798 100644
--- a/admin/src/views/vehicle/components/OperaCategoryWindow.vue
+++ b/admin/src/views/vehicle/components/OperaCategoryWindow.vue
@@ -51,7 +51,7 @@
         { key: 2, name: '甯傚叕鍙稿嵏璐ц溅杈�' },
         { key: 3, name: '鍔犲伐鐑熷嵏璐ц溅杈�' },
         { key: 4, name: '鑷湁鍏姟杞�' },
-        { key: 5, name: '鑷湁璐ц繍杞﹁締' }
+        { key: 5, name: '鐗╂祦璐ц繍杞﹁締' }
       ],
       // 楠岃瘉瑙勫垯
       rules: {

--
Gitblit v1.9.3