From d7afcab6016f46fa5f40962a079d003ebdf9172b Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期日, 30 一月 2022 16:39:15 +0800
Subject: [PATCH] 优化媒体服务器配置展示界面

---
 web_src/src/components/dialog/chooseChannelForCatalog.vue |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/web_src/src/components/dialog/chooseChannelForCatalog.vue b/web_src/src/components/dialog/chooseChannelForCatalog.vue
index 5133caa..6c7fdab 100644
--- a/web_src/src/components/dialog/chooseChannelForCatalog.vue
+++ b/web_src/src/components/dialog/chooseChannelForCatalog.vue
@@ -21,7 +21,7 @@
          <span v-if="node.data.type === 2" class="iconfont icon-zhibo"></span>
         <span style="padding-left: 1px">{{ node.label }}</span>
         <span>
-          <i style="margin-left: 5rem; color: #9d9d9d; padding-right: 20px" v-if="node.data.id === defaultCatalogId">榛樿</i>
+          <i style="margin-left: 5rem; color: #9d9d9d; padding-right: 20px" v-if="node.data.id === defaultCatalogIdSign">榛樿</i>
         </span>
       </span>
      </el-tree>
@@ -38,6 +38,8 @@
     name: 'chooseChannelForCatalog',
     props: ['platformId', 'platformName', 'defaultCatalogId', 'catalogIdChange'],
     created() {
+        this.chooseId = this.defaultCatalogId;
+        this.defaultCatalogIdSign = this.defaultCatalogId;
         this.initData();
         setTimeout(()=>{
           if (this.catalogIdChange)this.catalogIdChange(this.defaultCatalogId);
@@ -54,8 +56,9 @@
             children: 'children',
             isLeaf: 'leaf'
           },
+          defaultCatalogIdSign: null,
           chooseNode: null,
-          chooseId: this.defaultCatalogId,
+          chooseId: "",
           catalogTree: null,
           contextmenuShow: false
 
@@ -132,6 +135,7 @@
             url:`/api/platform/catalog/del`,
             params: {
               id: id,
+              platformId: this.platformId,
             }
           })
             .then((res) => {
@@ -139,8 +143,8 @@
                 console.log("绉婚櫎鎴愬姛")
                 node.parent.loaded = false
                 node.parent.expand();
-                if(this.defaultCatalogId === id) {
-                  this.defaultCatalogId = this.platformId;
+                if (res.data.data) {
+                  this.defaultCatalogIdSign = res.data.data;
                 }
               }
             })
@@ -159,7 +163,7 @@
           })
             .then((res)=> {
               if (res.data.code === 0) {
-                this.defaultCatalogId = id;
+                this.defaultCatalogIdSign = id;
               }
             })
             .catch(function (error) {
@@ -253,7 +257,7 @@
                 {
                   label: "璁句负榛樿",
                   icon: "el-icon-folder-checked",
-                  disabled: node.data.id === this.defaultCatalogId,
+                  disabled: node.data.id === this.defaultCatalogIdSign,
                   onClick: () => {
                     this.setDefaultCatalog(data.id)
                   },

--
Gitblit v1.8.0