Commit 363606d8453c027429ea66a6036c62b01ff8e06c

Authored by 648540858
1 parent 9ce22eba

优化级联目录发送

src/main/java/com/genersoft/iot/vmp/gb28181/event/subscribe/catalog/CatalogEventLister.java
@@ -99,7 +99,7 @@ public class CatalogEventLister implements ApplicationListener<CatalogEvent> { @@ -99,7 +99,7 @@ public class CatalogEventLister implements ApplicationListener<CatalogEvent> {
99 } 99 }
100 if (event.getGbStreams() != null && event.getGbStreams().size() > 0){ 100 if (event.getGbStreams() != null && event.getGbStreams().size() > 0){
101 for (GbStream gbStream : event.getGbStreams()) { 101 for (GbStream gbStream : event.getGbStreams()) {
102 - DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), parentPlatform.getDeviceGBId()); 102 + DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), parentPlatform);
103 deviceChannelList.add(deviceChannelByStream); 103 deviceChannelList.add(deviceChannelByStream);
104 } 104 }
105 } 105 }
@@ -138,7 +138,10 @@ public class CatalogEventLister implements ApplicationListener<CatalogEvent> { @@ -138,7 +138,10 @@ public class CatalogEventLister implements ApplicationListener<CatalogEvent> {
138 } 138 }
139 if (event.getGbStreams() != null && event.getGbStreams().size() > 0){ 139 if (event.getGbStreams() != null && event.getGbStreams().size() > 0){
140 for (GbStream gbStream : event.getGbStreams()) { 140 for (GbStream gbStream : event.getGbStreams()) {
141 - DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), parentPlatform.getDeviceGBId()); 141 + DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), parentPlatform);
  142 + if (deviceChannelByStream.getParentId().length() <= 10) { // 父节点是行政区划,则设置CivilCode使用此行政区划
  143 + deviceChannelByStream.setCivilCode(deviceChannelByStream.getParentId());
  144 + }
142 deviceChannelList.add(deviceChannelByStream); 145 deviceChannelList.add(deviceChannelByStream);
143 } 146 }
144 } 147 }
@@ -159,7 +162,7 @@ public class CatalogEventLister implements ApplicationListener&lt;CatalogEvent&gt; { @@ -159,7 +162,7 @@ public class CatalogEventLister implements ApplicationListener&lt;CatalogEvent&gt; {
159 deviceChannelList.add(deviceChannel); 162 deviceChannelList.add(deviceChannel);
160 GbStream gbStream = storager.queryStreamInParentPlatform(platform.getServerGBId(), gbId); 163 GbStream gbStream = storager.queryStreamInParentPlatform(platform.getServerGBId(), gbId);
161 if(gbStream != null){ 164 if(gbStream != null){
162 - DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), platform.getDeviceGBId()); 165 + DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), platform);
163 deviceChannelList.add(deviceChannelByStream); 166 deviceChannelList.add(deviceChannelByStream);
164 } 167 }
165 sipCommanderFroPlatform.sendNotifyForCatalogAddOrUpdate(event.getType(), platform, deviceChannelList, subscribeInfo, null); 168 sipCommanderFroPlatform.sendNotifyForCatalogAddOrUpdate(event.getType(), platform, deviceChannelList, subscribeInfo, null);
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
@@ -259,28 +259,34 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { @@ -259,28 +259,34 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
259 catalogXml.append("<Item>\r\n"); 259 catalogXml.append("<Item>\r\n");
260 catalogXml.append("<DeviceID>" + channel.getChannelId() + "</DeviceID>\r\n"); 260 catalogXml.append("<DeviceID>" + channel.getChannelId() + "</DeviceID>\r\n");
261 catalogXml.append("<Name>" + channel.getName() + "</Name>\r\n"); 261 catalogXml.append("<Name>" + channel.getName() + "</Name>\r\n");
262 - catalogXml.append("<Manufacturer>" + channel.getManufacture() + "</Manufacturer>\r\n");  
263 catalogXml.append("<Parental>" + channel.getParental() + "</Parental>\r\n"); 262 catalogXml.append("<Parental>" + channel.getParental() + "</Parental>\r\n");
264 if (channel.getParentId() != null) { 263 if (channel.getParentId() != null) {
265 catalogXml.append("<ParentID>" + channel.getParentId() + "</ParentID>\r\n"); 264 catalogXml.append("<ParentID>" + channel.getParentId() + "</ParentID>\r\n");
266 } 265 }
267 - catalogXml.append("<RegisterWay>" + channel.getRegisterWay() + "</RegisterWay>\r\n");  
268 - catalogXml.append("<Status>" + (channel.getStatus() == 0?"OFF":"ON") + "</Status>\r\n");  
269 - catalogXml.append("<Secrecy>" + channel.getSecrecy() + "</Secrecy>\r\n");  
270 - if (channel.getChannelType() != 2) { // 业务分组/虚拟组织/行政区划 不设置以下字段  
271 - catalogXml.append("<Model>" + channel.getModel() + "</Model>\r\n");  
272 - catalogXml.append("<Owner>" + channel.getOwner() + "</Owner>\r\n");  
273 - catalogXml.append("<CivilCode>" + channel.getCivilCode() + "</CivilCode>\r\n");  
274 - catalogXml.append("<Address>" + channel.getAddress() + "</Address>\r\n");  
275 - catalogXml.append("<Longitude>" + channel.getLongitude() + "</Longitude>\r\n");  
276 - catalogXml.append("<Latitude>" + channel.getLatitude() + "</Latitude>\r\n");  
277 - catalogXml.append("<IPAddress>" + channel.getIpAddress() + "</IPAddress>\r\n");  
278 - catalogXml.append("<Port>" + channel.getPort() + "</Port>\r\n");  
279 - catalogXml.append("<Info>\r\n");  
280 - catalogXml.append("<PTZType>" + channel.getPTZType() + "</PTZType>\r\n");  
281 - catalogXml.append("</Info>\r\n"); 266 + if (channel.getChannelId().length() == 20) {
  267 + if (Integer.parseInt(channel.getChannelId().substring(10, 13)) == 216) { // 虚拟组织增加BusinessGroupID字段
  268 + catalogXml.append("<BusinessGroupID>" + channel.getParentId() + "</BusinessGroupID>\r\n");
  269 + }
  270 + catalogXml.append("<Manufacturer>" + channel.getManufacture() + "</Manufacturer>\r\n");
  271 + catalogXml.append("<RegisterWay>" + channel.getRegisterWay() + "</RegisterWay>\r\n");
  272 + catalogXml.append("<Status>" + (channel.getStatus() == 0?"OFF":"ON") + "</Status>\r\n");
  273 + if (channel.getChannelType() != 2) { // 业务分组/虚拟组织/行政区划 不设置以下字段
  274 + catalogXml.append("<Secrecy>" + channel.getSecrecy() + "</Secrecy>\r\n");
  275 + catalogXml.append("<Model>" + channel.getModel() + "</Model>\r\n");
  276 + catalogXml.append("<Owner>" + channel.getOwner() + "</Owner>\r\n");
  277 + catalogXml.append("<CivilCode>" + channel.getCivilCode() + "</CivilCode>\r\n");
  278 + catalogXml.append("<Address>" + channel.getAddress() + "</Address>\r\n");
  279 + catalogXml.append("<Longitude>" + channel.getLongitude() + "</Longitude>\r\n");
  280 + catalogXml.append("<Latitude>" + channel.getLatitude() + "</Latitude>\r\n");
  281 + catalogXml.append("<IPAddress>" + channel.getIpAddress() + "</IPAddress>\r\n");
  282 + catalogXml.append("<Port>" + channel.getPort() + "</Port>\r\n");
  283 + catalogXml.append("<Info>\r\n");
  284 + catalogXml.append("<PTZType>" + channel.getPTZType() + "</PTZType>\r\n");
  285 + catalogXml.append("</Info>\r\n");
  286 + }
282 } 287 }
283 288
  289 +
284 catalogXml.append("</Item>\r\n"); 290 catalogXml.append("</Item>\r\n");
285 } 291 }
286 } 292 }
@@ -596,6 +602,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { @@ -596,6 +602,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
596 catalogXml.append("<Secrecy>" + channel.getSecrecy() + "</Secrecy>\r\n"); 602 catalogXml.append("<Secrecy>" + channel.getSecrecy() + "</Secrecy>\r\n");
597 catalogXml.append("<RegisterWay>" + channel.getRegisterWay() + "</RegisterWay>\r\n"); 603 catalogXml.append("<RegisterWay>" + channel.getRegisterWay() + "</RegisterWay>\r\n");
598 catalogXml.append("<Status>" + (channel.getStatus() == 0 ? "OFF" : "ON") + "</Status>\r\n"); 604 catalogXml.append("<Status>" + (channel.getStatus() == 0 ? "OFF" : "ON") + "</Status>\r\n");
  605 + if (channel.getChannelId().length() == 20 && Integer.parseInt(channel.getChannelId().substring(10, 13)) == 216) { // 虚拟组织增加BusinessGroupID字段
  606 + catalogXml.append("<BusinessGroupID>" + channel.getParentId() + "</BusinessGroupID>\r\n");
  607 + }
599 if (channel.getChannelType() == 2) { // 业务分组/虚拟组织/行政区划 不设置以下属性 608 if (channel.getChannelType() == 2) { // 业务分组/虚拟组织/行政区划 不设置以下属性
600 catalogXml.append("<Model>" + channel.getModel() + "</Model>\r\n"); 609 catalogXml.append("<Model>" + channel.getModel() + "</Model>\r\n");
601 catalogXml.append("<Owner>0</Owner>\r\n"); 610 catalogXml.append("<Owner>0</Owner>\r\n");
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/CatalogNotifyMessageHandler.java
@@ -79,6 +79,11 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple @@ -79,6 +79,11 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple
79 deviceChannel.setParental(1); 79 deviceChannel.setParental(1);
80 deviceChannel.setParentId(catalog.getParentId()); 80 deviceChannel.setParentId(catalog.getParentId());
81 deviceChannel.setRegisterWay(1); 81 deviceChannel.setRegisterWay(1);
  82 + if (catalog.getParentId() != null && catalog.getParentId().length() <= 10) {
  83 + deviceChannel.setCivilCode(catalog.getParentId());
  84 + }else {
  85 + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
  86 + }
82 deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); 87 deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
83 deviceChannel.setModel("live"); 88 deviceChannel.setModel("live");
84 deviceChannel.setOwner("wvp-pro"); 89 deviceChannel.setOwner("wvp-pro");
@@ -95,7 +100,12 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple @@ -95,7 +100,12 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple
95 DeviceChannel deviceChannel = storage.queryChannel(channel.getDeviceId(), channel.getChannelId()); 100 DeviceChannel deviceChannel = storage.queryChannel(channel.getDeviceId(), channel.getChannelId());
96 deviceChannel.setParental(0); 101 deviceChannel.setParental(0);
97 deviceChannel.setParentId(channel.getCatalogId()); 102 deviceChannel.setParentId(channel.getCatalogId());
98 - deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0, 6)); 103 + if (channel.getCatalogId() != null && channel.getCatalogId().length() <= 10) {
  104 + channel.setCivilCode(channel.getCatalogId());
  105 + }else {
  106 + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
  107 + }
  108 +
99 allChannels.add(deviceChannel); 109 allChannels.add(deviceChannel);
100 } 110 }
101 } 111 }
@@ -116,7 +126,11 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple @@ -116,7 +126,11 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple
116 deviceChannel.setStatus(1); 126 deviceChannel.setStatus(1);
117 deviceChannel.setParentId(gbStream.getCatalogId()); 127 deviceChannel.setParentId(gbStream.getCatalogId());
118 deviceChannel.setRegisterWay(1); 128 deviceChannel.setRegisterWay(1);
119 - deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); 129 + if (gbStream.getCatalogId() != null && gbStream.getCatalogId().length() <= 10) {
  130 + deviceChannel.setCivilCode(gbStream.getCatalogId());
  131 + }else {
  132 + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
  133 + }
120 deviceChannel.setModel("live"); 134 deviceChannel.setModel("live");
121 deviceChannel.setOwner("wvp-pro"); 135 deviceChannel.setOwner("wvp-pro");
122 deviceChannel.setParental(0); 136 deviceChannel.setParental(0);
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/CatalogQueryMessageHandler.java
@@ -93,7 +93,11 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem @@ -93,7 +93,11 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
93 deviceChannel.setParental(1); 93 deviceChannel.setParental(1);
94 deviceChannel.setParentId(catalog.getParentId()); 94 deviceChannel.setParentId(catalog.getParentId());
95 deviceChannel.setRegisterWay(1); 95 deviceChannel.setRegisterWay(1);
96 - deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); 96 + if (catalog.getParentId() != null && catalog.getParentId().length() < 10) {
  97 + deviceChannel.setCivilCode(catalog.getParentId());
  98 + }else {
  99 + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
  100 + }
97 allChannels.add(deviceChannel); 101 allChannels.add(deviceChannel);
98 } 102 }
99 } 103 }
@@ -108,7 +112,11 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem @@ -108,7 +112,11 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
108 deviceChannel.setChannelType(0); 112 deviceChannel.setChannelType(0);
109 deviceChannel.setParental(0); 113 deviceChannel.setParental(0);
110 deviceChannel.setParentId(channel.getCatalogId()); 114 deviceChannel.setParentId(channel.getCatalogId());
111 - deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0, 6)); 115 + if (channel.getCatalogId() != null && channel.getCatalogId().length() < 10) {
  116 + deviceChannel.setCivilCode(channel.getCatalogId());
  117 + }else {
  118 + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
  119 + }
112 allChannels.add(deviceChannel); 120 allChannels.add(deviceChannel);
113 } 121 }
114 } 122 }
@@ -131,7 +139,11 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem @@ -131,7 +139,11 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
131 deviceChannel.setStatus(1); 139 deviceChannel.setStatus(1);
132 deviceChannel.setParentId(gbStream.getCatalogId()); 140 deviceChannel.setParentId(gbStream.getCatalogId());
133 deviceChannel.setRegisterWay(1); 141 deviceChannel.setRegisterWay(1);
134 - deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); 142 + if (gbStream.getCatalogId() != null && gbStream.getCatalogId().length() < 10) {
  143 + deviceChannel.setCivilCode(gbStream.getCatalogId());
  144 + }else {
  145 + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
  146 + }
135 deviceChannel.setModel("live"); 147 deviceChannel.setModel("live");
136 deviceChannel.setOwner("wvp-pro"); 148 deviceChannel.setOwner("wvp-pro");
137 deviceChannel.setParental(0); 149 deviceChannel.setParental(0);
src/main/java/com/genersoft/iot/vmp/service/IGbStreamService.java
@@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.service; @@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.service;
2 2
3 import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; 3 import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
4 import com.genersoft.iot.vmp.gb28181.bean.GbStream; 4 import com.genersoft.iot.vmp.gb28181.bean.GbStream;
  5 +import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
5 import com.github.pagehelper.PageInfo; 6 import com.github.pagehelper.PageInfo;
6 7
7 import java.util.List; 8 import java.util.List;
@@ -40,7 +41,7 @@ public interface IGbStreamService { @@ -40,7 +41,7 @@ public interface IGbStreamService {
40 */ 41 */
41 boolean delPlatformInfo(String platformId, List<GbStream> gbStreams); 42 boolean delPlatformInfo(String platformId, List<GbStream> gbStreams);
42 43
43 - DeviceChannel getDeviceChannelListByStream(GbStream gbStream, String catalogId, String deviceGBId); 44 + DeviceChannel getDeviceChannelListByStream(GbStream gbStream, String catalogId, ParentPlatform platform);
44 45
45 void sendCatalogMsg(GbStream gbStream, String type); 46 void sendCatalogMsg(GbStream gbStream, String type);
46 void sendCatalogMsgs(List<GbStream> gbStreams, String type); 47 void sendCatalogMsgs(List<GbStream> gbStreams, String type);
src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java
@@ -78,7 +78,7 @@ public class GbStreamServiceImpl implements IGbStreamService { @@ -78,7 +78,7 @@ public class GbStreamServiceImpl implements IGbStreamService {
78 gbStream.setPlatformId(platformId); 78 gbStream.setPlatformId(platformId);
79 // TODO 修改为批量提交 79 // TODO 修改为批量提交
80 platformGbStreamMapper.add(gbStream); 80 platformGbStreamMapper.add(gbStream);
81 - DeviceChannel deviceChannelListByStream = getDeviceChannelListByStream(gbStream, catalogId, parentPlatform.getDeviceGBId()); 81 + DeviceChannel deviceChannelListByStream = getDeviceChannelListByStream(gbStream, catalogId, parentPlatform);
82 deviceChannelList.add(deviceChannelListByStream); 82 deviceChannelList.add(deviceChannelListByStream);
83 } 83 }
84 dataSourceTransactionManager.commit(transactionStatus); //手动提交 84 dataSourceTransactionManager.commit(transactionStatus); //手动提交
@@ -92,19 +92,23 @@ public class GbStreamServiceImpl implements IGbStreamService { @@ -92,19 +92,23 @@ public class GbStreamServiceImpl implements IGbStreamService {
92 } 92 }
93 93
94 @Override 94 @Override
95 - public DeviceChannel getDeviceChannelListByStream(GbStream gbStream, String catalogId, String deviceGBId) { 95 + public DeviceChannel getDeviceChannelListByStream(GbStream gbStream, String catalogId, ParentPlatform platform) {
96 DeviceChannel deviceChannel = new DeviceChannel(); 96 DeviceChannel deviceChannel = new DeviceChannel();
97 deviceChannel.setChannelId(gbStream.getGbId()); 97 deviceChannel.setChannelId(gbStream.getGbId());
98 deviceChannel.setName(gbStream.getName()); 98 deviceChannel.setName(gbStream.getName());
99 deviceChannel.setLongitude(gbStream.getLongitude()); 99 deviceChannel.setLongitude(gbStream.getLongitude());
100 deviceChannel.setLatitude(gbStream.getLatitude()); 100 deviceChannel.setLatitude(gbStream.getLatitude());
101 - deviceChannel.setDeviceId(deviceGBId); 101 + deviceChannel.setDeviceId(platform.getDeviceGBId());
102 deviceChannel.setManufacture("wvp-pro"); 102 deviceChannel.setManufacture("wvp-pro");
103 // deviceChannel.setStatus(gbStream.isStatus()?1:0); 103 // deviceChannel.setStatus(gbStream.isStatus()?1:0);
104 deviceChannel.setStatus(1); 104 deviceChannel.setStatus(1);
105 deviceChannel.setParentId(catalogId ==null?gbStream.getCatalogId():catalogId); 105 deviceChannel.setParentId(catalogId ==null?gbStream.getCatalogId():catalogId);
106 deviceChannel.setRegisterWay(1); 106 deviceChannel.setRegisterWay(1);
107 - deviceChannel.setCivilCode(deviceGBId.substring(0, 6)); 107 + if (catalogId.length() <= 10) { // 父节点是行政区划,则设置CivilCode使用此行政区划
  108 + deviceChannel.setCivilCode(catalogId);
  109 + }else {
  110 + deviceChannel.setCivilCode(platform.getAdministrativeDivision());
  111 + }
108 deviceChannel.setModel("live"); 112 deviceChannel.setModel("live");
109 deviceChannel.setOwner("wvp-pro"); 113 deviceChannel.setOwner("wvp-pro");
110 deviceChannel.setParental(0); 114 deviceChannel.setParental(0);
web_src/src/components/channelList.vue
@@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
40 <el-table-column label="快照" width="80" align="center"> 40 <el-table-column label="快照" width="80" align="center">
41 <template slot-scope="scope"> 41 <template slot-scope="scope">
42 <img style="max-height: 3rem;max-width: 4rem;" 42 <img style="max-height: 3rem;max-width: 4rem;"
  43 + v-if="scope.row.subCount === 0 && scope.row.parental === 0"
43 :id="scope.row.deviceId + '_' + scope.row.channelId" 44 :id="scope.row.deviceId + '_' + scope.row.channelId"
44 :src="getSnap(scope.row)" 45 :src="getSnap(scope.row)"
45 @error="getSnapErrorEvent($event.target.id)" 46 @error="getSnapErrorEvent($event.target.id)"
@@ -89,7 +90,7 @@ @@ -89,7 +90,7 @@
89 <el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="!!scope.row.streamId" 90 <el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="!!scope.row.streamId"
90 @click="stopDevicePush(scope.row)">停止 91 @click="stopDevicePush(scope.row)">停止
91 </el-button> 92 </el-button>
92 - <el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.subCount > 0" 93 + <el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.subCount > 0 || scope.row.parental === 1"
93 @click="changeSubchannel(scope.row)">查看 94 @click="changeSubchannel(scope.row)">查看
94 </el-button> 95 </el-button>
95 <el-button size="mini" icon="el-icon-video-camera" type="primary" @click="queryRecords(scope.row)">设备录象 96 <el-button size="mini" icon="el-icon-video-camera" type="primary" @click="queryRecords(scope.row)">设备录象
web_src/src/components/common/DeviceTree.vue
@@ -109,7 +109,7 @@ export default { @@ -109,7 +109,7 @@ export default {
109 let nodeList = [] 109 let nodeList = []
110 for (let i = 0; i < data.length; i++) { 110 for (let i = 0; i < data.length; i++) {
111 let type = 3; 111 let type = 3;
112 - if (data[i].subCount > 0) { 112 + if (data[i].subCount > 0 || data[i].parental === 1) {
113 type = 2; 113 type = 2;
114 }else if (data[i].ptztype === 1 ) { // 1-球机;2-半球;3-固定枪机;4-遥控枪机 114 }else if (data[i].ptztype === 1 ) { // 1-球机;2-半球;3-固定枪机;4-遥控枪机
115 type = 4; 115 type = 4;