chooseChannel.vue 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <div id="chooseChannel" v-loading="isLoging">
  3. <el-dialog title="选择通道" v-if="showDialog" top="2rem" width="70%" :close-on-click-modal="false" :visible.sync="showDialog" :destroy-on-close="true" @close="close()">
  4. <el-tabs v-model="tabActiveName" >
  5. <el-tab-pane label="国标通道" name="gbChannel">
  6. <el-container>
  7. <el-main style="background-color: #FFF;">
  8. <chooseChannelForGb :platformId=platformId ></chooseChannelForGb>
  9. </el-main>
  10. </el-container>
  11. </el-tab-pane>
  12. <el-tab-pane label="直播流通道" name="streamchannel">
  13. <el-container>
  14. <el-main style="background-color: #FFF;">
  15. <chooseChannelFoStream :platformId=platformId ></chooseChannelFoStream>
  16. </el-main>
  17. </el-container>
  18. </el-tab-pane>
  19. </el-tabs>
  20. </el-dialog>
  21. </div>
  22. </template>
  23. <script>
  24. import chooseChannelForGb from '../dialog/chooseChannelForGb.vue'
  25. import chooseChannelFoStream from '../dialog/chooseChannelForStream.vue'
  26. export default {
  27. name: 'chooseChannel',
  28. props: {},
  29. components: {
  30. chooseChannelForGb,
  31. chooseChannelFoStream,
  32. },
  33. computed: {
  34. // getPlayerShared: function () {
  35. // return {
  36. // sharedUrl: window.location.host + '/' + this.videoUrl,
  37. // sharedIframe: '<iframe src="' + window.location.host + '/' + this.videoUrl + '"></iframe>',
  38. // sharedRtmp: this.videoUrl
  39. // };
  40. // }
  41. },
  42. data() {
  43. return {
  44. isLoging: false,
  45. tabActiveName: "gbChannel",
  46. platformId: "",
  47. isLoging: false,
  48. showDialog: false,
  49. chooseData: {}
  50. };
  51. },
  52. methods: {
  53. openDialog: function (platformId, closeCallback) {
  54. console.log(platformId)
  55. this.platformId = platformId
  56. this.showDialog = true
  57. this.closeCallback = closeCallback
  58. },
  59. close: function() {
  60. },
  61. search: function() {
  62. },
  63. save: function() {
  64. var that = this;
  65. this.$axios({
  66. method:"post",
  67. url:"/api/platforms/updateChannelForGB",
  68. data:{
  69. platformId: that.platformId,
  70. channelReduces: that.chooseData
  71. }
  72. }).then((res)=>{
  73. if (res.data == true) {
  74. that.$message({
  75. showClose: true,
  76. message: '保存成功,',
  77. type: 'success'
  78. });
  79. }
  80. }).catch(function (error) {
  81. console.log(error);
  82. });
  83. }
  84. }
  85. };
  86. </script>
  87. <style>
  88. </style>