panlinlin
2021-03-30 56859d09df8d4226882d43934acf32d60a3b51d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<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-tab-pane label="国标通道" name="gbChannel">
                <el-container>
                    <el-main style="background-color: #FFF;">
                     <chooseChannelForGb :platformId=platformId ></chooseChannelForGb>
                    </el-main>
            </el-container>
 
 
            </el-tab-pane>
            <el-tab-pane label="直播流通道" name="streamchannel">
                <!-- TODO -->
            </el-tab-pane>
        </el-tabs>
    </el-dialog>
</div>
</template>
 
<script>
import chooseChannelForGb from '../dialog/chooseChannelForGb.vue'
export default {
    name: 'chooseChannel',
    props: {},
    components: {
        chooseChannelForGb,
    },
    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",
            platformId: "",
            isLoging: false,
            showDialog: false,
            chooseData: {}
 
        };
    },
    methods: {
        openDialog: function (platformId,  closeCallback) {
            console.log(platformId)
            this.platformId = platformId
            this.showDialog = true
            this.closeCallback = closeCallback
        },
        close: function() {
 
        },
        search: function() {
 
        },
        save: function() {
            var that = this;
 
            this.$axios({
                method:"post",
                url:"/api/platforms/updateChannelForGB",
                data:{
                    platformId:  that.platformId,
                    channelReduces:  that.chooseData
                }
            }).then((res)=>{
                if (res.data == true) {
                    that.$message({
                        showClose: true,
                        message: '保存成功,',
                        type: 'success'
                    });
                }
            }).catch(function (error) {
                console.log(error);
            });
        }
    }
};
</script>
 
<style>
 
</style>