Commit 75ee368c96a3db085c51a6ee32efb3f341a8333e
1 parent
c5478514
优化默认节点的展示
Showing
3 changed files
with
9 additions
and
29 deletions
web_src/src/components/dialog/chooseChannel.vue
| @@ -52,13 +52,7 @@ export default { | @@ -52,13 +52,7 @@ export default { | ||
| 52 | chooseChannelForCatalog, | 52 | chooseChannelForCatalog, |
| 53 | }, | 53 | }, |
| 54 | computed: { | 54 | computed: { |
| 55 | - // getPlayerShared: function () { | ||
| 56 | - // return { | ||
| 57 | - // sharedUrl: window.location.host + '/' + this.videoUrl, | ||
| 58 | - // sharedIframe: '<iframe src="' + window.location.host + '/' + this.videoUrl + '"></iframe>', | ||
| 59 | - // sharedRtmp: this.videoUrl | ||
| 60 | - // }; | ||
| 61 | - // } | 55 | + |
| 62 | }, | 56 | }, |
| 63 | data() { | 57 | data() { |
| 64 | return { | 58 | return { |
| @@ -84,14 +78,6 @@ export default { | @@ -84,14 +78,6 @@ export default { | ||
| 84 | this.closeCallback = closeCallback | 78 | this.closeCallback = closeCallback |
| 85 | }, | 79 | }, |
| 86 | tabClick (tab, event){ | 80 | tabClick (tab, event){ |
| 87 | - console.log(tab.label) | ||
| 88 | - if (tab.label === "gbChannel") { | ||
| 89 | - this.$refs.chooseChannelForGb.catalogIdChange(this.catalogId); | ||
| 90 | - this.$refs.chooseChannelForGb.initData(); | ||
| 91 | - }else { | ||
| 92 | - this.$refs.chooseChannelFoStream.catalogIdChange(this.catalogId); | ||
| 93 | - this.$refs.chooseChannelFoStream.initData(); | ||
| 94 | - } | ||
| 95 | 81 | ||
| 96 | }, | 82 | }, |
| 97 | close: function() { | 83 | close: function() { |
| @@ -125,11 +111,6 @@ export default { | @@ -125,11 +111,6 @@ export default { | ||
| 125 | catalogIdChange: function (id) { | 111 | catalogIdChange: function (id) { |
| 126 | console.log("中间模块收到: " + id) | 112 | console.log("中间模块收到: " + id) |
| 127 | this.catalogId = id; | 113 | this.catalogId = id; |
| 128 | - if (this.tabActiveName === "gbChannel") { | ||
| 129 | - this.$refs.chooseChannelForGb.catalogIdChange(id); | ||
| 130 | - }else { | ||
| 131 | - this.$refs.chooseChannelFoStream.catalogIdChange(id); | ||
| 132 | - } | ||
| 133 | }, | 114 | }, |
| 134 | updateChooseChannelCallback (id){ | 115 | updateChooseChannelCallback (id){ |
| 135 | console.log("中间模块收到选择通道变化: " + id) | 116 | console.log("中间模块收到选择通道变化: " + id) |
web_src/src/components/dialog/chooseChannelForCatalog.vue
| @@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
| 21 | <span v-if="node.data.type === 2" class="iconfont icon-zhibo"></span> | 21 | <span v-if="node.data.type === 2" class="iconfont icon-zhibo"></span> |
| 22 | <span style="padding-left: 1px">{{ node.label }}</span> | 22 | <span style="padding-left: 1px">{{ node.label }}</span> |
| 23 | <span> | 23 | <span> |
| 24 | - <i style="margin-left: 5rem; color: #9d9d9d; padding-right: 20px" v-if="node.data.id === defaultCatalogId">默认</i> | 24 | + <i style="margin-left: 5rem; color: #9d9d9d; padding-right: 20px" v-if="node.data.id === defaultCatalogIdSign">默认</i> |
| 25 | </span> | 25 | </span> |
| 26 | </span> | 26 | </span> |
| 27 | </el-tree> | 27 | </el-tree> |
| @@ -38,6 +38,8 @@ export default { | @@ -38,6 +38,8 @@ export default { | ||
| 38 | name: 'chooseChannelForCatalog', | 38 | name: 'chooseChannelForCatalog', |
| 39 | props: ['platformId', 'platformName', 'defaultCatalogId', 'catalogIdChange'], | 39 | props: ['platformId', 'platformName', 'defaultCatalogId', 'catalogIdChange'], |
| 40 | created() { | 40 | created() { |
| 41 | + this.chooseId = this.defaultCatalogId; | ||
| 42 | + this.defaultCatalogIdSign = this.defaultCatalogId; | ||
| 41 | this.initData(); | 43 | this.initData(); |
| 42 | setTimeout(()=>{ | 44 | setTimeout(()=>{ |
| 43 | if (this.catalogIdChange)this.catalogIdChange(this.defaultCatalogId); | 45 | if (this.catalogIdChange)this.catalogIdChange(this.defaultCatalogId); |
| @@ -54,8 +56,9 @@ export default { | @@ -54,8 +56,9 @@ export default { | ||
| 54 | children: 'children', | 56 | children: 'children', |
| 55 | isLeaf: 'leaf' | 57 | isLeaf: 'leaf' |
| 56 | }, | 58 | }, |
| 59 | + defaultCatalogIdSign: null, | ||
| 57 | chooseNode: null, | 60 | chooseNode: null, |
| 58 | - chooseId: this.defaultCatalogId, | 61 | + chooseId: "", |
| 59 | catalogTree: null, | 62 | catalogTree: null, |
| 60 | contextmenuShow: false | 63 | contextmenuShow: false |
| 61 | 64 | ||
| @@ -141,7 +144,7 @@ export default { | @@ -141,7 +144,7 @@ export default { | ||
| 141 | node.parent.loaded = false | 144 | node.parent.loaded = false |
| 142 | node.parent.expand(); | 145 | node.parent.expand(); |
| 143 | if (res.data.data) { | 146 | if (res.data.data) { |
| 144 | - this.defaultCatalogId = res.data.data; | 147 | + this.defaultCatalogIdSign = res.data.data; |
| 145 | } | 148 | } |
| 146 | } | 149 | } |
| 147 | }) | 150 | }) |
| @@ -160,7 +163,7 @@ export default { | @@ -160,7 +163,7 @@ export default { | ||
| 160 | }) | 163 | }) |
| 161 | .then((res)=> { | 164 | .then((res)=> { |
| 162 | if (res.data.code === 0) { | 165 | if (res.data.code === 0) { |
| 163 | - this.defaultCatalogId = id; | 166 | + this.defaultCatalogIdSign = id; |
| 164 | } | 167 | } |
| 165 | }) | 168 | }) |
| 166 | .catch(function (error) { | 169 | .catch(function (error) { |
| @@ -254,7 +257,7 @@ export default { | @@ -254,7 +257,7 @@ export default { | ||
| 254 | { | 257 | { |
| 255 | label: "设为默认", | 258 | label: "设为默认", |
| 256 | icon: "el-icon-folder-checked", | 259 | icon: "el-icon-folder-checked", |
| 257 | - disabled: node.data.id === this.defaultCatalogId, | 260 | + disabled: node.data.id === this.defaultCatalogIdSign, |
| 258 | onClick: () => { | 261 | onClick: () => { |
| 259 | this.setDefaultCatalog(data.id) | 262 | this.setDefaultCatalog(data.id) |
| 260 | }, | 263 | }, |
web_src/src/components/dialog/chooseChannelForStream.vue
| @@ -253,10 +253,6 @@ export default { | @@ -253,10 +253,6 @@ export default { | ||
| 253 | handleGBSelectionChange: function() { | 253 | handleGBSelectionChange: function() { |
| 254 | this.initData(); | 254 | this.initData(); |
| 255 | }, | 255 | }, |
| 256 | - // catalogIdChange: function(id) { | ||
| 257 | - // this.catalogId = id; | ||
| 258 | - // console.log("直播通道选择模块收到: " + id) | ||
| 259 | - // }, | ||
| 260 | } | 256 | } |
| 261 | }; | 257 | }; |
| 262 | </script> | 258 | </script> |