From 75ee368c96a3db085c51a6ee32efb3f341a8333e Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 25 一月 2022 20:21:36 +0800
Subject: [PATCH] 优化默认节点的展示
---
web_src/src/components/dialog/chooseChannel.vue | 21 +--------------------
web_src/src/components/dialog/chooseChannelForCatalog.vue | 13 ++++++++-----
web_src/src/components/dialog/chooseChannelForStream.vue | 4 ----
3 files changed, 9 insertions(+), 29 deletions(-)
diff --git a/web_src/src/components/dialog/chooseChannel.vue b/web_src/src/components/dialog/chooseChannel.vue
index 23df2c1..d173955 100644
--- a/web_src/src/components/dialog/chooseChannel.vue
+++ b/web_src/src/components/dialog/chooseChannel.vue
@@ -52,13 +52,7 @@
chooseChannelForCatalog,
},
computed: {
- // getPlayerShared: function () {
- // return {
- // sharedUrl: window.location.host + '/' + this.videoUrl,
- // sharedIframe: '<iframe src="' + window.location.host + '/' + this.videoUrl + '"></iframe>',
- // sharedRtmp: this.videoUrl
- // };
- // }
+
},
data() {
return {
@@ -84,14 +78,6 @@
this.closeCallback = closeCallback
},
tabClick (tab, event){
- console.log(tab.label)
- if (tab.label === "gbChannel") {
- this.$refs.chooseChannelForGb.catalogIdChange(this.catalogId);
- this.$refs.chooseChannelForGb.initData();
- }else {
- this.$refs.chooseChannelFoStream.catalogIdChange(this.catalogId);
- this.$refs.chooseChannelFoStream.initData();
- }
},
close: function() {
@@ -125,11 +111,6 @@
catalogIdChange: function (id) {
console.log("涓棿妯″潡鏀跺埌锛� " + id)
this.catalogId = id;
- if (this.tabActiveName === "gbChannel") {
- this.$refs.chooseChannelForGb.catalogIdChange(id);
- }else {
- this.$refs.chooseChannelFoStream.catalogIdChange(id);
- }
},
updateChooseChannelCallback (id){
console.log("涓棿妯″潡鏀跺埌閫夋嫨閫氶亾鍙樺寲锛� " + id)
diff --git a/web_src/src/components/dialog/chooseChannelForCatalog.vue b/web_src/src/components/dialog/chooseChannelForCatalog.vue
index 2d87bdd..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
@@ -141,7 +144,7 @@
node.parent.loaded = false
node.parent.expand();
if (res.data.data) {
- this.defaultCatalogId = res.data.data;
+ this.defaultCatalogIdSign = res.data.data;
}
}
})
@@ -160,7 +163,7 @@
})
.then((res)=> {
if (res.data.code === 0) {
- this.defaultCatalogId = id;
+ this.defaultCatalogIdSign = id;
}
})
.catch(function (error) {
@@ -254,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)
},
diff --git a/web_src/src/components/dialog/chooseChannelForStream.vue b/web_src/src/components/dialog/chooseChannelForStream.vue
index 1c6f66f..931a58e 100644
--- a/web_src/src/components/dialog/chooseChannelForStream.vue
+++ b/web_src/src/components/dialog/chooseChannelForStream.vue
@@ -253,10 +253,6 @@
handleGBSelectionChange: function() {
this.initData();
},
- // catalogIdChange: function(id) {
- // this.catalogId = id;
- // console.log("鐩存挱閫氶亾閫夋嫨妯″潡鏀跺埌锛� " + id)
- // },
}
};
</script>
--
Gitblit v1.8.0