Commit baef2dd13de60aa558d61eae5da4785f94094abd
1 parent
fa346513
优化级联选择通道页面目录Id在各个模块间的传递方式
Showing
3 changed files
with
20 additions
and
28 deletions
web_src/src/components/dialog/chooseChannel.vue
| @@ -20,14 +20,14 @@ | @@ -20,14 +20,14 @@ | ||
| 20 | <el-tab-pane label="国标通道" name="gbChannel"> | 20 | <el-tab-pane label="国标通道" name="gbChannel"> |
| 21 | <el-container> | 21 | <el-container> |
| 22 | <el-main style="background-color: #FFF;"> | 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 | </el-main> | 24 | </el-main> |
| 25 | </el-container> | 25 | </el-container> |
| 26 | </el-tab-pane> | 26 | </el-tab-pane> |
| 27 | <el-tab-pane label="直播流通道" name="streamchannel"> | 27 | <el-tab-pane label="直播流通道" name="streamchannel"> |
| 28 | <el-container> | 28 | <el-container> |
| 29 | <el-main style="background-color: #FFF;"> | 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 | </el-main> | 31 | </el-main> |
| 32 | </el-container> | 32 | </el-container> |
| 33 | </el-tab-pane> | 33 | </el-tab-pane> |
web_src/src/components/dialog/chooseChannelForGb.vue
| @@ -24,11 +24,11 @@ | @@ -24,11 +24,11 @@ | ||
| 24 | <!-- <el-checkbox @change="shareAllCheckedChange">全部共享</el-checkbox>--> | 24 | <!-- <el-checkbox @change="shareAllCheckedChange">全部共享</el-checkbox>--> |
| 25 | </div> | 25 | </div> |
| 26 | <el-table ref="gbChannelsTable" :data="gbChannels" border style="width: 100%" :height="winHeight"> | 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 | </el-table-column> | 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 | </el-table-column> | 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 | </el-table-column> | 32 | </el-table-column> |
| 33 | <el-table-column label="设备地址" width="180" align="center"> | 33 | <el-table-column label="设备地址" width="180" align="center"> |
| 34 | <template slot-scope="scope"> | 34 | <template slot-scope="scope"> |
| @@ -65,7 +65,7 @@ export default { | @@ -65,7 +65,7 @@ export default { | ||
| 65 | // }; | 65 | // }; |
| 66 | // } | 66 | // } |
| 67 | }, | 67 | }, |
| 68 | - props: ['platformId', 'updateChoosedCallback'], | 68 | + props: ['platformId','catalogId', 'updateChoosedCallback'], |
| 69 | created() { | 69 | created() { |
| 70 | this.initData(); | 70 | this.initData(); |
| 71 | }, | 71 | }, |
| @@ -77,7 +77,6 @@ export default { | @@ -77,7 +77,6 @@ export default { | ||
| 77 | channelType: "", | 77 | channelType: "", |
| 78 | online: "", | 78 | online: "", |
| 79 | choosed: "", | 79 | choosed: "", |
| 80 | - catalogId: null, | ||
| 81 | currentPage: 1, | 80 | currentPage: 1, |
| 82 | count: 10, | 81 | count: 10, |
| 83 | total: 0, | 82 | total: 0, |
| @@ -110,11 +109,6 @@ export default { | @@ -110,11 +109,6 @@ export default { | ||
| 110 | console.log(val) | 109 | console.log(val) |
| 111 | console.log(row) | 110 | console.log(row) |
| 112 | }, | 111 | }, |
| 113 | - // selectDisable: function (){ | ||
| 114 | - // if (this.catalogId == null) { | ||
| 115 | - // return false; | ||
| 116 | - // } | ||
| 117 | - // }, | ||
| 118 | add: function (row) { | 112 | add: function (row) { |
| 119 | console.log(row) | 113 | console.log(row) |
| 120 | row.catalogId = this.catalogId | 114 | row.catalogId = this.catalogId |
| @@ -146,7 +140,6 @@ export default { | @@ -146,7 +140,6 @@ export default { | ||
| 146 | } | 140 | } |
| 147 | }).then((res)=>{ | 141 | }).then((res)=>{ |
| 148 | console.log("移除成功") | 142 | console.log("移除成功") |
| 149 | - let nodeIds = new Array(); | ||
| 150 | if(this.updateChoosedCallback)this.updateChoosedCallback(row.catalogId) | 143 | if(this.updateChoosedCallback)this.updateChoosedCallback(row.catalogId) |
| 151 | row.platformId = null; | 144 | row.platformId = null; |
| 152 | row.catalogId = null | 145 | row.catalogId = null |
| @@ -283,10 +276,10 @@ export default { | @@ -283,10 +276,10 @@ export default { | ||
| 283 | handleGBSelectionChange: function() { | 276 | handleGBSelectionChange: function() { |
| 284 | this.initData(); | 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 | </script> | 285 | </script> |
web_src/src/components/dialog/chooseChannelForStream.vue
| 1 | <template> | 1 | <template> |
| 2 | <div id="chooseChannelFoStream" > | 2 | <div id="chooseChannelFoStream" > |
| 3 | <el-table ref="gbStreamsTable" :data="gbStreams" border style="width: 100%" :height="winHeight"> | 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 | </el-table-column> | 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 | </el-table-column> | 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 | </el-table-column> | 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 | </el-table-column> | 11 | </el-table-column> |
| 12 | <el-table-column label="流来源" width="100" align="center"> | 12 | <el-table-column label="流来源" width="100" align="center"> |
| 13 | <template slot-scope="scope"> | 13 | <template slot-scope="scope"> |
| @@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
| 17 | </div> | 17 | </div> |
| 18 | </template> | 18 | </template> |
| 19 | </el-table-column> | 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 | <template slot-scope="scope"> | 21 | <template slot-scope="scope"> |
| 22 | <el-button-group> | 22 | <el-button-group> |
| 23 | <el-button size="mini" icon="el-icon-plus" v-if="!scope.row.platformId" @click="add(scope.row)">添加</el-button> | 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,7 +43,7 @@ export default { | ||
| 43 | // }; | 43 | // }; |
| 44 | // } | 44 | // } |
| 45 | }, | 45 | }, |
| 46 | - props: ['platformId', 'updateChoosedCallback'], | 46 | + props: ['platformId', 'catalogId', 'updateChoosedCallback'], |
| 47 | created() { | 47 | created() { |
| 48 | this.initData(); | 48 | this.initData(); |
| 49 | }, | 49 | }, |
| @@ -55,7 +55,6 @@ export default { | @@ -55,7 +55,6 @@ export default { | ||
| 55 | channelType: "", | 55 | channelType: "", |
| 56 | online: "", | 56 | online: "", |
| 57 | choosed: "", | 57 | choosed: "", |
| 58 | - catalogId: null, | ||
| 59 | currentPage: 1, | 58 | currentPage: 1, |
| 60 | count: 10, | 59 | count: 10, |
| 61 | total: 0, | 60 | total: 0, |
| @@ -254,10 +253,10 @@ export default { | @@ -254,10 +253,10 @@ export default { | ||
| 254 | handleGBSelectionChange: function() { | 253 | handleGBSelectionChange: function() { |
| 255 | this.initData(); | 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 | </script> | 262 | </script> |