Commit baef2dd13de60aa558d61eae5da4785f94094abd

Authored by 648540858
1 parent fa346513

优化级联选择通道页面目录Id在各个模块间的传递方式

web_src/src/components/dialog/chooseChannel.vue
... ... @@ -20,14 +20,14 @@
20 20 <el-tab-pane label="国标通道" name="gbChannel">
21 21 <el-container>
22 22 <el-main style="background-color: #FFF;">
23   - <chooseChannelForGb ref="chooseChannelForGb" :platformId=platformId :updateChoosedCallback="updateChooseChannelCallback"></chooseChannelForGb>
  23 + <chooseChannelForGb ref="chooseChannelForGb" :catalogId="catalogId" :platformId=platformId :updateChoosedCallback="updateChooseChannelCallback"></chooseChannelForGb>
24 24 </el-main>
25 25 </el-container>
26 26 </el-tab-pane>
27 27 <el-tab-pane label="直播流通道" name="streamchannel">
28 28 <el-container>
29 29 <el-main style="background-color: #FFF;">
30   - <chooseChannelFoStream ref="chooseChannelFoStream" :platformId=platformId :updateChoosedCallback="updateChooseChannelCallback"></chooseChannelFoStream>
  30 + <chooseChannelFoStream ref="chooseChannelFoStream" :catalogId="catalogId" :platformId=platformId :updateChoosedCallback="updateChooseChannelCallback"></chooseChannelFoStream>
31 31 </el-main>
32 32 </el-container>
33 33 </el-tab-pane>
... ...
web_src/src/components/dialog/chooseChannelForGb.vue
... ... @@ -24,11 +24,11 @@
24 24 <!-- <el-checkbox @change="shareAllCheckedChange">全部共享</el-checkbox>-->
25 25 </div>
26 26 <el-table ref="gbChannelsTable" :data="gbChannels" border style="width: 100%" :height="winHeight">
27   - <el-table-column prop="channelId" label="通道编号" width="210">
  27 + <el-table-column prop="channelId" label="通道编号" width="180" align="center">
28 28 </el-table-column>
29   - <el-table-column prop="name" label="通道名称" show-overflow-tooltip>
  29 + <el-table-column prop="name" label="通道名称" show-overflow-tooltip align="center">
30 30 </el-table-column>
31   - <el-table-column prop="deviceId" label="设备编号" width="210" >
  31 + <el-table-column prop="deviceId" label="设备编号" width="180" align="center">
32 32 </el-table-column>
33 33 <el-table-column label="设备地址" width="180" align="center">
34 34 <template slot-scope="scope">
... ... @@ -65,7 +65,7 @@ export default {
65 65 // };
66 66 // }
67 67 },
68   - props: ['platformId', 'updateChoosedCallback'],
  68 + props: ['platformId','catalogId', 'updateChoosedCallback'],
69 69 created() {
70 70 this.initData();
71 71 },
... ... @@ -77,7 +77,6 @@ export default {
77 77 channelType: "",
78 78 online: "",
79 79 choosed: "",
80   - catalogId: null,
81 80 currentPage: 1,
82 81 count: 10,
83 82 total: 0,
... ... @@ -110,11 +109,6 @@ export default {
110 109 console.log(val)
111 110 console.log(row)
112 111 },
113   - // selectDisable: function (){
114   - // if (this.catalogId == null) {
115   - // return false;
116   - // }
117   - // },
118 112 add: function (row) {
119 113 console.log(row)
120 114 row.catalogId = this.catalogId
... ... @@ -146,7 +140,6 @@ export default {
146 140 }
147 141 }).then((res)=>{
148 142 console.log("移除成功")
149   - let nodeIds = new Array();
150 143 if(this.updateChoosedCallback)this.updateChoosedCallback(row.catalogId)
151 144 row.platformId = null;
152 145 row.catalogId = null
... ... @@ -283,10 +276,10 @@ export default {
283 276 handleGBSelectionChange: function() {
284 277 this.initData();
285 278 },
286   - catalogIdChange: function(id) {
287   - this.catalogId = id;
288   - console.log("通道选择模块收到: " + id)
289   - },
  279 + // catalogIdChange: function(id) {
  280 + // this.catalogId = id;
  281 + // console.log("通道选择模块收到: " + id)
  282 + // },
290 283 }
291 284 };
292 285 </script>
... ...
web_src/src/components/dialog/chooseChannelForStream.vue
1 1 <template>
2 2 <div id="chooseChannelFoStream" >
3 3 <el-table ref="gbStreamsTable" :data="gbStreams" border style="width: 100%" :height="winHeight">
4   - <el-table-column prop="name" label="名称" show-overflow-tooltip>
  4 + <el-table-column prop="name" label="名称" show-overflow-tooltip align="center">
5 5 </el-table-column>
6   - <el-table-column prop="app" label="应用名" show-overflow-tooltip>
  6 + <el-table-column prop="app" label="应用名" show-overflow-tooltip align="center">
7 7 </el-table-column>
8   - <el-table-column prop="stream" label="流ID" show-overflow-tooltip>
  8 + <el-table-column prop="stream" label="流ID" show-overflow-tooltip align="center">
9 9 </el-table-column>
10   - <el-table-column prop="gbId" label="国标编码" show-overflow-tooltip>
  10 + <el-table-column prop="gbId" label="国标编码" show-overflow-tooltip align="center">
11 11 </el-table-column>
12 12 <el-table-column label="流来源" width="100" align="center">
13 13 <template slot-scope="scope">
... ... @@ -17,7 +17,7 @@
17 17 </div>
18 18 </template>
19 19 </el-table-column>
20   - <el-table-column label="操作" width="100" align="center" fixed="right">
  20 + <el-table-column label="操作" width="100" align="center" fixed="right" >
21 21 <template slot-scope="scope">
22 22 <el-button-group>
23 23 <el-button size="mini" icon="el-icon-plus" v-if="!scope.row.platformId" @click="add(scope.row)">添加</el-button>
... ... @@ -43,7 +43,7 @@ export default {
43 43 // };
44 44 // }
45 45 },
46   - props: ['platformId', 'updateChoosedCallback'],
  46 + props: ['platformId', 'catalogId', 'updateChoosedCallback'],
47 47 created() {
48 48 this.initData();
49 49 },
... ... @@ -55,7 +55,6 @@ export default {
55 55 channelType: "",
56 56 online: "",
57 57 choosed: "",
58   - catalogId: null,
59 58 currentPage: 1,
60 59 count: 10,
61 60 total: 0,
... ... @@ -254,10 +253,10 @@ export default {
254 253 handleGBSelectionChange: function() {
255 254 this.initData();
256 255 },
257   - catalogIdChange: function(id) {
258   - this.catalogId = id;
259   - console.log("直播通道选择模块收到: " + id)
260   - },
  256 + // catalogIdChange: function(id) {
  257 + // this.catalogId = id;
  258 + // console.log("直播通道选择模块收到: " + id)
  259 + // },
261 260 }
262 261 };
263 262 </script>
... ...