From 26bdf2e7768ee5dfc400c3970a5aa129fed49453 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 20 三月 2023 15:31:43 +0800
Subject: [PATCH] Merge branch '级联' into main-dev

---
 web_src/src/components/dialog/getCatalog.vue |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/web_src/src/components/dialog/getCatalog.vue b/web_src/src/components/dialog/getCatalog.vue
index a146889..3aae99d 100644
--- a/web_src/src/components/dialog/getCatalog.vue
+++ b/web_src/src/components/dialog/getCatalog.vue
@@ -77,6 +77,7 @@
     },
     methods: {
         openDialog(catalogIdResult) {
+          console.log(this.chooseId)
           this.showDialog = true
           this.catalogIdResult = catalogIdResult
         },
@@ -88,7 +89,7 @@
             let that = this;
             this.$axios({
                     method:"get",
-                    url:`/api/platform/catalog`,
+                    url:`./api/platform/catalog`,
                     params: {
                         platformId: that.platformId,
                         parentId: parentId
@@ -107,26 +108,21 @@
 
         },
         loadNode: function(node, resolve){
-
-
-
           if (node.level === 0) {
             this.$axios({
               method:"get",
-              url:`/api/platform/info/` + this.platformId,
+              url:`./api/platform/info/` + this.platformId,
             })
               .then((res)=> {
                 if (res.data.code === 0) {
                   this.platformName = res.data.data.name;
                   this.defaultCatalogId = res.data.data.catalogId;
+                  this.defaultCatalogIdSign = res.data.data.catalogId;
+                  this.chooseId = res.data.data.catalogId;
                   resolve([
-                    {
-                      name: "鏈垎閰�",
-                      id:  null,
-                      type:  -1
-                    },{
+                   {
                       name: this.platformName,
-                      id:  this.platformId,
+                      id:   res.data.data.deviceGBId,
                       type:  0
                     }
                   ]);
@@ -144,9 +140,19 @@
          this.chooseId = data.id;
         },
         close: function() {
+          this.chooseId = null;
           this.showDialog = false;
         },
         submit: function() {
+          console.log(this.chooseId)
+          if (this.chooseId === null) {
+            this.$message({
+              showClose: true,
+              message: '鏈�夋嫨浠讳綍鑺傜偣,',
+              type: 'warning'
+            });
+            return;
+          }
           if (this.catalogIdResult)this.catalogIdResult(this.chooseId)
           this.showDialog = false;
         },

--
Gitblit v1.8.0