From e6790d88fc5b1ac33d239c0d90ce6cdea666b821 Mon Sep 17 00:00:00 2001 From: mk1990 <153958232@qq.com> Date: 星期一, 16 五月 2022 10:14:24 +0800 Subject: [PATCH] Merge branch 'wvp-28181-2.0' of https://github.com/mk1990/wvp-GB28181-pro into wvp-28181-2.0 --- web_src/src/components/dialog/chooseChannel.vue | 81 ++++++++++++++++++++++++++++------------ 1 files changed, 56 insertions(+), 25 deletions(-) diff --git a/web_src/src/components/dialog/chooseChannel.vue b/web_src/src/components/dialog/chooseChannel.vue index 219036c..599921e 100644 --- a/web_src/src/components/dialog/chooseChannel.vue +++ b/web_src/src/components/dialog/chooseChannel.vue @@ -1,62 +1,89 @@ <template> <div id="chooseChannel" v-loading="isLoging"> - <el-dialog title="閫夋嫨閫氶亾" v-if="showDialog" top="2rem" width="70%" :close-on-click-modal="false" :visible.sync="showDialog" :destroy-on-close="true" @close="close()"> - <el-tabs v-model="tabActiveName" > + <el-dialog title="閫夋嫨閫氶亾" v-if="showDialog" top="2rem" width="90%" :close-on-click-modal="false" :visible.sync="showDialog" :destroy-on-close="true" @close="close()"> + <el-row> + <el-col :span="10"> + <el-tabs v-model="catalogTabActiveName" > + <el-tab-pane label="鐩綍缁撴瀯" name="catalog"> + <el-container> + <el-main v-bind:style="{backgroundColor: '#FFF', maxHeight: winHeight + 'px'}"> + <chooseChannelForCatalog ref="chooseChannelForCatalog" :platformId=platformId :platformName=platformName :defaultCatalogId=defaultCatalogId :catalogIdChange="catalogIdChange" ></chooseChannelForCatalog> + </el-main> + </el-container> + </el-tab-pane> + </el-tabs> + + </el-col> + <el-col :span="14"> + <el-tabs v-model="tabActiveName" @tab-click="tabClick"> <el-tab-pane label="鍥芥爣閫氶亾" name="gbChannel"> - <el-container> - <el-main style="background-color: #FFF;"> - <chooseChannelForGb :platformId=platformId ></chooseChannelForGb> - </el-main> - </el-container> - - + <el-container> + <el-main style="background-color: #FFF;"> + <chooseChannelForGb ref="chooseChannelForGb" :catalogId="catalogId" :catalogName="catalogName" :platformId=platformId ></chooseChannelForGb> + </el-main> + </el-container> </el-tab-pane> <el-tab-pane label="鐩存挱娴侀�氶亾" name="streamchannel"> - <!-- TODO --> + <el-container> + <el-main style="background-color: #FFF;"> + <chooseChannelFoStream ref="chooseChannelFoStream" :catalogId="catalogId" :catalogName="catalogName" :currentCatalogId="currentCatalogId" :platformId=platformId ></chooseChannelFoStream> + </el-main> + </el-container> </el-tab-pane> - </el-tabs> + </el-tabs> + </el-col> + </el-row> + </el-dialog> </div> </template> <script> import chooseChannelForGb from '../dialog/chooseChannelForGb.vue' +import chooseChannelFoStream from '../dialog/chooseChannelForStream.vue' +import chooseChannelForCatalog from '../dialog/chooseChannelForCatalog.vue' export default { name: 'chooseChannel', props: {}, components: { chooseChannelForGb, + chooseChannelFoStream, + 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 { isLoging: false, tabActiveName: "gbChannel", + catalogTabActiveName: "catalog", platformId: "", - isLoging: false, + catalogId: "", + catalogName: "", + currentCatalogId: "", + platformName: "", + defaultCatalogId: "", showDialog: false, - chooseData: {} + chooseData: {}, + winHeight: window.innerHeight - 250, }; }, methods: { - openDialog: function (platformId, closeCallback) { - console.log(platformId) + openDialog(platformId, platformName, defaultCatalogId, closeCallback) { this.platformId = platformId + this.platformName = platformName + this.defaultCatalogId = defaultCatalogId this.showDialog = true this.closeCallback = closeCallback }, - close: function() { + tabClick (tab, event){ + }, + close: function() { + this.closeCallback() }, search: function() { @@ -66,7 +93,7 @@ this.$axios({ method:"post", - url:"/api/platforms/updateChannelForGB", + url:"/api/platform/update_channel_for_gb", data:{ platformId: that.platformId, channelReduces: that.chooseData @@ -82,7 +109,11 @@ }).catch(function (error) { console.log(error); }); - } + }, + catalogIdChange: function (id, name) { + this.catalogId = id; + this.catalogName = name; + }, } }; </script> -- Gitblit v1.8.0