From 9f16b5c553b479ea12fe368a7ecc748872ea8b98 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期四, 12 六月 2025 11:11:27 +0800
Subject: [PATCH] 修改配置文件

---
 web_src/src/components/dialog/chooseChannel.vue |   98 +++++++++++++++++++++++++++++++++----------------
 1 files changed, 66 insertions(+), 32 deletions(-)

diff --git a/web_src/src/components/dialog/chooseChannel.vue b/web_src/src/components/dialog/chooseChannel.vue
old mode 100644
new mode 100755
index 219036c..86bea83
--- a/web_src/src/components/dialog/chooseChannel.vue
+++ b/web_src/src/components/dialog/chooseChannel.vue
@@ -1,79 +1,108 @@
 <template>
-<div id="chooseChannel" v-loading="isLoging">
+<div id="chooseChannel" >
 
-    <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-loading="loading" 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 :platformDeviceId=platformDeviceId :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,
+            loading: false,
             tabActiveName: "gbChannel",
+            catalogTabActiveName: "catalog",
             platformId: "",
-            isLoging: false,
+            platformDeviceId: "",
+            catalogId: "",
+            catalogName: "",
+            currentCatalogId: "",
+            platformName: "",
+            defaultCatalogId: "",
             showDialog: false,
-            chooseData: {}
+            chooseData: {},
+            winHeight: window.innerHeight - 250,
 
         };
     },
     methods: {
-        openDialog: function (platformId,  closeCallback) {
-            console.log(platformId)
+        openDialog(platformId, platformDeviceId, platformName, defaultCatalogId, closeCallback) {
+            console.log("defaultCatalogId: " + defaultCatalogId)
             this.platformId = platformId
+            this.platformDeviceId = platformDeviceId
+            this.platformName = platformName
+            this.defaultCatalogId = defaultCatalogId
             this.showDialog = true
             this.closeCallback = closeCallback
         },
-        close: function() {
+        tabClick (tab, event){
 
+        },
+        close: function() {
+          this.closeCallback()
         },
         search: function() {
 
         },
         save: function() {
-            var that = this;
 
             this.$axios({
                 method:"post",
-                url:"/api/platforms/updateChannelForGB",
+                url:"/api/platform/update_channel_for_gb",
                 data:{
-                    platformId:  that.platformId,
-                    channelReduces:  that.chooseData
+                    platformId:  this.platformId,
+                    channelReduces:  this.chooseData
                 }
             }).then((res)=>{
-                if (res.data == true) {
-                    that.$message({
+              if (res.data.code === 0) {
+                this.$message({
                         showClose: true,
                         message: '淇濆瓨鎴愬姛,',
                         type: 'success'
@@ -82,7 +111,12 @@
             }).catch(function (error) {
                 console.log(error);
             });
-        }
+
+        },
+        catalogIdChange: function (id, name) {
+            this.catalogId = id;
+            this.catalogName = name;
+        },
     }
 };
 </script>

--
Gitblit v1.8.0