From 8d7bb4ac830444afde480a588e99952105ea8ede Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 22 二月 2024 09:19:58 +0800
Subject: [PATCH] mrshi

---
 platform/src/components/common/MenuSelect.vue |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/platform/src/components/common/MenuSelect.vue b/platform/src/components/common/MenuSelect.vue
index 2b2785e..3471617 100644
--- a/platform/src/components/common/MenuSelect.vue
+++ b/platform/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: '璇烽�夋嫨鑿滃崟'
@@ -30,10 +33,6 @@
     },
     appendToBody: {
       default: false
-    },
-    type: {
-      type: String|Number,
-      default: 0
     },
     // 闇�琚帓闄ょ殑閮ㄩ棬ID
     excludeId: {}
@@ -51,14 +50,25 @@
   methods: {
     // 鑾峰彇鎵�鏈夎彍鍗�
     fetchData () {
-      fetchTree({}, this.type)
-        .then(records => {
-          this.data = []
-          this.__fillData(this.data, records)
-        })
-        .catch(e => {
-          this.$tip.apiFailed(e)
-        })
+      if (this.type === '1') {
+        fetchTree1()
+          .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