From 41fc3d69e920ca286591352f7f6d03ccaad1e794 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期五, 26 九月 2025 15:42:46 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wuhuyancao' into wuhuyancao

---
 admin/src/components/common/MenuSelect.vue |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/admin/src/components/common/MenuSelect.vue b/admin/src/components/common/MenuSelect.vue
index b01748f..5373411 100644
--- a/admin/src/components/common/MenuSelect.vue
+++ b/admin/src/components/common/MenuSelect.vue
@@ -36,7 +36,8 @@
       default: false
     },
     // 闇�琚帓闄ょ殑閮ㄩ棬ID
-    excludeId: {}
+    excludeId: {},
+    topMenuId: {}
   },
   data () {
     return {
@@ -45,6 +46,9 @@
   },
   watch: {
     excludeId () {
+      this.fetchData()
+    },
+    topMenuId () {
       this.fetchData()
     }
   },
@@ -64,7 +68,17 @@
         fetchTree()
           .then(records => {
             this.data = []
-            this.__fillData(this.data, records)
+            var res = [];
+            if(this.topMenuId){
+              records.forEach(item => {
+                if(item.id == this.topMenuId){
+                  res = item.children
+                }
+              })
+            }else{
+              res = records
+            }
+            this.__fillData(this.data, res)
           })
           .catch(e => {
             this.$tip.apiFailed(e)
@@ -74,7 +88,7 @@
     // 濉厖鑿滃崟鏍�
     __fillData (list, pool) {
       for (const menu of pool) {
-        if (menu.id === this.excludeId) {
+        if (menu.id === this.excludeId || menu.linkType ===1) {
           continue
         }
         const menuNode = {

--
Gitblit v1.9.3