| | |
| | | |
| | | /** |
| | | * 获取 |
| | | * @param page |
| | | * @param count |
| | | * @return |
| | | */ |
| | | PageInfo<StreamPushItem> getPushList(Integer page, Integer count); |
| | | PageInfo<StreamPushItem> getPushList(Integer page, Integer count, String query, Boolean pushing, String mediaServerId); |
| | | |
| | | List<StreamPushItem> getPushList(String mediaSererId); |
| | | |
| | | StreamPushItem transform(MediaItem item); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<StreamPushItem> getPushList(Integer page, Integer count) { |
| | | public PageInfo<StreamPushItem> getPushList(Integer page, Integer count, String query, Boolean pushing, String mediaServerId) { |
| | | PageHelper.startPage(page, count); |
| | | List<StreamPushItem> all = streamPushMapper.selectAll(); |
| | | List<StreamPushItem> all = streamPushMapper.selectAllForList(query, pushing, mediaServerId); |
| | | return new PageInfo<>(all); |
| | | } |
| | | |
| | |
| | | "LEFT JOIN parent_platform pp ON pp.serverGBId = pgs.platformId " + |
| | | "WHERE " + |
| | | "pgs.app =#{app} " + |
| | | "AND pgs.stream =#{stream} " + |
| | | "GROUP BY pp.serverGBId") |
| | | "AND pgs.stream =#{stream} ") |
| | | List<ParentPlatform> selectByAppAndStream(String app, String stream); |
| | | |
| | | @Select("SELECT pgs.*, gs.gbId FROM platform_gb_stream pgs " + |
| | |
| | | "</script>") |
| | | int delAll(List<StreamPushItem> streamPushItems); |
| | | |
| | | |
| | | |
| | | |
| | | @Select(value = {" <script>" + |
| | | "SELECT " + |
| | | "st.*, " + |
| | | "pgs.gbId, pgs.status, pgs.name, pgs.longitude, pgs.latitude " + |
| | | "from " + |
| | | "stream_push st " + |
| | | "LEFT JOIN gb_stream pgs " + |
| | | "on st.app = pgs.app AND st.stream = pgs.stream " + |
| | | "WHERE " + |
| | | "1=1 " + |
| | | " <if test='query != null'> AND (st.app LIKE '%${query}%' OR st.stream LIKE '%${query}%' OR pgs.gbId LIKE '%${query}%' OR pgs.name LIKE '%${query}%')</if> " + |
| | | " <if test='pushing == true' > AND (pgs.gbId is null OR pgs.status=1)</if>" + |
| | | " <if test='pushing == false' > AND pgs.status=0</if>" + |
| | | " <if test='mediaServerId != null' > AND st.mediaServerId=#{mediaServerId} </if>" + |
| | | "order by st.createStamp desc" + |
| | | " </script>"}) |
| | | List<StreamPushItem> selectAllForList(String query, Boolean pushing, String mediaServerId); |
| | | |
| | | @Select("SELECT st.*, pgs.gbId, pgs.status, pgs.name, pgs.longitude, pgs.latitude FROM stream_push st LEFT JOIN gb_stream pgs on st.app = pgs.app AND st.stream = pgs.stream order by st.createStamp desc") |
| | | List<StreamPushItem> selectAll(); |
| | | |
| | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.context.request.async.DeferredResult; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | @ApiImplicitParam(name="page", value = "当前页", required = true, dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name="count", value = "每页查询数量", required = true, dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name="query", value = "查询内容", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name="online", value = "是否在线", dataTypeClass = Boolean.class), |
| | | @ApiImplicitParam(name="pushing", value = "是否正在推流", dataTypeClass = Boolean.class), |
| | | @ApiImplicitParam(name="mediaServerId", value = "流媒体ID", dataTypeClass = String.class), |
| | | }) |
| | | @GetMapping(value = "/list") |
| | | @ResponseBody |
| | | public PageInfo<StreamPushItem> list(@RequestParam(required = false)Integer page, |
| | | @RequestParam(required = false)Integer count, |
| | | @RequestParam(required = false)String query, |
| | | @RequestParam(required = false)Boolean online ){ |
| | | @RequestParam(required = false)Boolean pushing, |
| | | @RequestParam(required = false)String mediaServerId ){ |
| | | |
| | | PageInfo<StreamPushItem> pushList = streamPushService.getPushList(page, count); |
| | | if (StringUtils.isEmpty(query)) { |
| | | query = null; |
| | | } |
| | | if (StringUtils.isEmpty(mediaServerId)) { |
| | | mediaServerId = null; |
| | | } |
| | | PageInfo<StreamPushItem> pushList = streamPushService.getPushList(page, count, query, pushing, mediaServerId); |
| | | return pushList; |
| | | } |
| | | |
| | |
| | | <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> |
| | | <el-option label="全部" value=""></el-option> |
| | | <el-option |
| | | v-for="item in mediaServerList" |
| | | :key="item.id" |
| | | :label="item.id" |
| | | :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-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> |
| | | |
| | | </div> |
| | | <devicePlayer ref="devicePlayer"></devicePlayer> |
| | | <addStreamTOGB ref="addStreamTOGB"></addStreamTOGB> |
| | | <el-table :data="pushList" border style="width: 100%" :height="winHeight"> |
| | | <el-table-column prop="name" label="名称" width="180" align="center"> |
| | | </el-table-column> |
| | | <el-table-column prop="app" label="APP" width="180" align="center"> |
| | | </el-table-column> |
| | | <el-table-column prop="stream" label="流ID" width="240" align="center"> |
| | |
| | | import addStreamTOGB from './dialog/addStreamTOGB.vue' |
| | | import uiHeader from './UiHeader.vue' |
| | | import importChannel from './dialog/importChannel.vue' |
| | | import MediaServer from './service/MediaServer' |
| | | export default { |
| | | name: 'pushVideoList', |
| | | components: { |
| | |
| | | updateLooper: 0, //数据刷新轮训标志 |
| | | currentDeviceChannelsLenth:0, |
| | | winHeight: window.innerHeight - 200, |
| | | mediaServerObj : new MediaServer(), |
| | | currentPage:1, |
| | | count:15, |
| | | total:0, |
| | | searchSrt: "", |
| | | pushing: "", |
| | | mediaServerId: "", |
| | | mediaServerList: [], |
| | | getDeviceListLoading: false |
| | | }; |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | initData: function() { |
| | | this.mediaServerObj.getOnlineMediaServerList((data)=>{ |
| | | console.log(data) |
| | | this.mediaServerList = data.data; |
| | | }) |
| | | this.getPushList(); |
| | | }, |
| | | currentChange: function(val){ |
| | |
| | | url:`/api/push/list`, |
| | | params: { |
| | | page: that.currentPage, |
| | | count: that.count |
| | | count: that.count, |
| | | query: that.searchSrt, |
| | | pushing: that.pushing, |
| | | mediaServerId: that.mediaServerId, |
| | | } |
| | | }).then(function (res) { |
| | | that.total = res.data.total; |