From f6722e13ba28cd292c162df9292bb3418ba12bec Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 25 六月 2025 15:17:50 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/2.0.1' into 2.0.1

---
 company/src/components/common/MenuSelect.vue |   35 ++++++++++++++++++++++++++---------
 1 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/company/src/components/common/MenuSelect.vue b/company/src/components/common/MenuSelect.vue
index ea5f26c..5cdb3a9 100644
--- a/company/src/components/common/MenuSelect.vue
+++ b/company/src/components/common/MenuSelect.vue
@@ -12,7 +12,7 @@
 
 <script>
 import TreeSelect from './TreeSelect'
-import { fetchTree } from '@/api/system/menu'
+import { fetchTree, fetchTree1 } from '@/api/system/menu'
 export default {
   name: 'MenuSelect',
   components: { TreeSelect },
@@ -20,6 +20,9 @@
     value: {},
     inline: {
       default: true
+    },
+    type: {
+      default: '0'
     },
     placeholder: {
       default: '璇烽�夋嫨鑿滃崟'
@@ -40,6 +43,9 @@
     }
   },
   watch: {
+    type: function (newVal, oldVal) {
+      this.type = newVal
+    },
     excludeId () {
       this.fetchData()
     }
@@ -47,14 +53,25 @@
   methods: {
     // 鑾峰彇鎵�鏈夎彍鍗�
     fetchData () {
-      fetchTree()
-        .then(records => {
-          this.data = []
-          this.__fillData(this.data, records)
-        })
-        .catch(e => {
-          this.$tip.apiFailed(e)
-        })
+      if (this.type == '1' || this.type == '2') {
+        fetchTree1(this.type)
+          .then(records => {
+            this.data = []
+            this.__fillData(this.data, records)
+          })
+          .catch(e => {
+            this.$tip.apiFailed(e)
+          })
+      } else {
+        fetchTree()
+          .then(records => {
+            this.data = []
+            this.__fillData(this.data, records)
+          })
+          .catch(e => {
+            this.$tip.apiFailed(e)
+          })
+      }
     },
     // 濉厖鑿滃崟鏍�
     __fillData (list, pool) {

--
Gitblit v1.9.3