web_src/src/components/PushVideoList.vue
@@ -1,18 +1,14 @@
<template>
   <div id="pushVideoList">
      <el-container>
         <el-header>
            <uiHeader></uiHeader>
         </el-header>
         <el-main>
            <div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;">
               <span style="font-size: 1rem; font-weight: bold;">推流列表</span>
            </div>
        <div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;font-size: 14px;">
          搜索: <el-input @input="getPushList" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字" prefix-icon="el-icon-search" v-model="searchSrt" clearable> </el-input>
          流媒体: <el-select size="mini" @change="getPushList" style="margin-right: 1rem;" v-model="mediaServerId" placeholder="请选择" default-first-option>
  <div id="pushVideoList" style="width: 100%">
    <div class="page-header">
      <div class="page-title">推流列表</div>
      <div class="page-header-btn">
        搜索:
        <el-input @input="getPushList" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字"
                  prefix-icon="el-icon-search" v-model="searchSrt" clearable></el-input>
        流媒体:
        <el-select size="mini" @change="getPushList" style="margin-right: 1rem;" v-model="mediaServerId"
                   placeholder="请选择" default-first-option>
          <el-option label="全部" value=""></el-option>
          <el-option
            v-for="item in mediaServerList"
@@ -21,20 +17,29 @@
            :value="item.id">
          </el-option>
        </el-select>
          推流状态: <el-select size="mini" style="margin-right: 1rem;" @change="getPushList" v-model="pushing" placeholder="请选择" default-first-option>
        推流状态:
        <el-select size="mini" style="margin-right: 1rem;" @change="getPushList" v-model="pushing" placeholder="请选择"
                   default-first-option>
          <el-option label="全部" value=""></el-option>
          <el-option label="推流进行中" value="true"></el-option>
          <el-option label="推流未进行" value="false"></el-option>
        </el-select>
          <el-button icon="el-icon-upload2" size="mini" style="margin-right: 1rem;" type="primary" @click="importChannel">通道导入</el-button>
          <el-button icon="el-icon-download" size="mini" style="margin-right: 1rem;" type="primary" >
            <a style="color: #FFFFFF; text-align: center; text-decoration: none" href="/static/file/推流通道导入.zip" download='推流通道导入.zip' >下载模板</a>
        <el-button icon="el-icon-upload2" size="mini" style="margin-right: 1rem;" type="primary" @click="importChannel">
          通道导入
          </el-button>
          <el-button icon="el-icon-delete" size="mini" style="margin-right: 1rem;" :disabled="multipleSelection.length === 0" type="danger" @click="batchDel">批量移除</el-button>
        <el-button icon="el-icon-download" size="mini" style="margin-right: 1rem;" type="primary">
          <a style="color: #FFFFFF; text-align: center; text-decoration: none" href="/static/file/推流通道导入.zip"
             download='推流通道导入.zip'>下载模板</a>
        </el-button>
        <el-button icon="el-icon-delete" size="mini" style="margin-right: 1rem;"
                   :disabled="multipleSelection.length === 0" type="danger" @click="batchDel">批量移除
        </el-button>
      </div>
        </div>
            <devicePlayer ref="devicePlayer"></devicePlayer>
            <addStreamTOGB ref="addStreamTOGB"></addStreamTOGB>
            <el-table ref="pushListTable" :data="pushList" border style="width: 100%" :height="winHeight" @selection-change="handleSelectionChange" :row-key="(row)=> row.app + row.stream">
    <el-table ref="pushListTable" :data="pushList" border style="width: 100%" :height="winHeight"
              @selection-change="handleSelectionChange" :row-key="(row)=> row.app + row.stream">
          <el-table-column align="center" type="selection" :reserve-selection="true" width="55">
          </el-table-column>
               <el-table-column prop="name" label="名称" align="center">
@@ -63,10 +68,17 @@
               <el-table-column label="操作" width="360" align="center" fixed="right">
                  <template slot-scope="scope">
                     <el-button-group>
                        <el-button size="mini" icon="el-icon-video-play" v-if="(scope.row.status == false && scope.row.gbId == null) || scope.row.status" @click="playPush(scope.row)">播放</el-button>
            <el-button size="mini" icon="el-icon-video-play"
                       v-if="(scope.row.status == false && scope.row.gbId == null) || scope.row.status"
                       @click="playPush(scope.row)">播放
            </el-button>
                        <el-button size="mini" icon="el-icon-delete" type="danger" @click="stopPush(scope.row)">移除</el-button>
                        <el-button size="mini" icon="el-icon-position" type="primary" v-if="!!!scope.row.gbId" @click="addToGB(scope.row)">加入国标</el-button>
                        <el-button size="mini" icon="el-icon-position" type="primary" v-if="!!scope.row.gbId" @click="removeFromGB(scope.row)">移出国标</el-button>
            <el-button size="mini" icon="el-icon-position" type="primary" v-if="!!!scope.row.gbId"
                       @click="addToGB(scope.row)">加入国标
            </el-button>
            <el-button size="mini" icon="el-icon-position" type="primary" v-if="!!scope.row.gbId"
                       @click="removeFromGB(scope.row)">移出国标
            </el-button>
                     </el-button-group>
                     </template>
               </el-table-column>
@@ -83,8 +95,6 @@
            </el-pagination>
         <streamProxyEdit ref="streamProxyEdit" ></streamProxyEdit>
         <importChannel ref="importChannel" ></importChannel>
         </el-main>
      </el-container>
   </div>
</template>
@@ -92,9 +102,10 @@
   import streamProxyEdit from './dialog/StreamProxyEdit.vue'
   import devicePlayer from './dialog/devicePlayer.vue'
   import addStreamTOGB from './dialog/addStreamTOGB.vue'
   import uiHeader from './UiHeader.vue'
import uiHeader from '../layout/UiHeader.vue'
   import importChannel from './dialog/importChannel.vue'
   import MediaServer from './service/MediaServer'
   export default {
      name: 'pushVideoList',
      components: {
@@ -123,8 +134,7 @@
            getDeviceListLoading: false
         };
      },
      computed: {
      },
  computed: {},
      mounted() {
         this.initData();
         this.updateLooper = setInterval(this.getPushList, 2000);
@@ -210,7 +220,11 @@
        });
         },
         addToGB: function(row){
            this.$refs.addStreamTOGB.openDialog({app: row.app, stream: row.stream, mediaServerId: row.mediaServerId}, this.initData);
      this.$refs.addStreamTOGB.openDialog({
        app: row.app,
        stream: row.stream,
        mediaServerId: row.mediaServerId
      }, this.initData);
         },
         removeFromGB: function(row){
        let that = this;