From 3609d361118d75dd221959977bfac33a37815953 Mon Sep 17 00:00:00 2001
From: lawrencehj <1934378145@qq.com>
Date: 星期一, 15 三月 2021 15:24:41 +0800
Subject: [PATCH] 完成响应上级远程启动信令执行
---
web_src/src/components/gb28181/chooseChannel.vue | 113 ++++++++++++++++++++------------------------------------
1 files changed, 41 insertions(+), 72 deletions(-)
diff --git a/web_src/src/components/gb28181/chooseChannel.vue b/web_src/src/components/gb28181/chooseChannel.vue
index e5cb09c..810ebd3 100644
--- a/web_src/src/components/gb28181/chooseChannel.vue
+++ b/web_src/src/components/gb28181/chooseChannel.vue
@@ -1,63 +1,32 @@
<template>
<div id="chooseChannel" v-loading="isLoging">
- <el-dialog title="閫夋嫨閫氶亾" top="0" :close-on-click-modal="false" :visible.sync="showDialog" :destroy-on-close="true" @close="close()">
- <el-container>
- <el-main style="background-color: #FFF;">
- <el-tabs v-model="tabActiveName" >
+ <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 label="鍥芥爣閫氶亾" name="gbChannel">
- <div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;font-size: 14px;">
- 鎼滅储: <el-input @input="search" 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="search" style="margin-right: 1rem;" v-model="channelType" placeholder="璇烽�夋嫨" default-first-option>
- <el-option label="鍏ㄩ儴" value=""></el-option>
- <el-option label="璁惧" value="false"></el-option>
- <el-option label="瀛愮洰褰�" value="true"></el-option>
- </el-select>
- 鍦ㄧ嚎鐘舵��: <el-select size="mini" style="margin-right: 1rem;" @change="search" v-model="online" 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>
- </div>
- <el-table :data="gbChannels" border style="width: 100%" @selection-change="handleGBSelectionChange" >
- <el-table-column type="selection" width="55" align="center" fixed> </el-table-column>
- <el-table-column prop="devicelId" label="璁惧缂栧彿" width="210" >
- </el-table-column>
- <el-table-column prop="channelId" label="閫氶亾缂栧彿" width="210">
- </el-table-column>
- <el-table-column prop="channelName" label="閫氶亾鍚嶇О">
- </el-table-column>
- <el-table-column label="鍦板潃" width="180" align="center">
- <template slot-scope="scope">
- <div slot="reference" class="name-wrapper">
- <el-tag size="medium">{{ scope.row.hostAddress }}</el-tag>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="manufacturer" label="鍘傚" align="center">
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="鐩存挱娴侀�氶亾" name="streamchannel">
- <!-- TODO -->
- </el-tab-pane>
- </el-tabs>
-
- </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 player from './player.vue'
+import chooseChannelForGb from './chooseChannelForGb.vue'
export default {
name: 'chooseChannel',
props: {},
components: {
- // player,
+ chooseChannelForGb,
},
computed: {
// getPlayerShared: function () {
@@ -68,42 +37,23 @@
// };
// }
},
- created() {},
data() {
return {
isLoging: false,
tabActiveName: "gbChannel",
+ platformId: "",
isLoging: false,
showDialog: false,
- chooseChanageCallback: null,
- closeCallback: null,
- gbChannels: [
- {
- devicelId: "34000000000200001",
- channelId: "34000000000200001",
- channelName: "test",
- hostAddress: "192.168.1.1:5060",
- manufacturer: "澶у崕"
- },{
- devicelId: "34000000000200001",
- channelId: "34000000000200001",
- channelName: "test",
- hostAddress: "192.168.1.1:5060",
- manufacturer: "澶у崕"
- }
- ],
- searchSrt: "",
- channelType: "",
- online: "",
-
+ chooseData: {}
+
};
},
methods: {
-
- openDialog: function (chooseChanageCallback, closeCallback) {
+ openDialog: function (platformId, closeCallback) {
+ console.log(platformId)
+ this.platformId = platformId
this.showDialog = true
this.closeCallback = closeCallback
- this.chooseChanageCallback = chooseChanageCallback
},
close: function() {
@@ -111,8 +61,27 @@
search: function() {
},
- handleGBSelectionChange: 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);
+ });
}
}
};
--
Gitblit v1.8.0