diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java index 1e6ef773..95576f38 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java @@ -4,7 +4,7 @@ public class DeviceChannel { /** - * 数据库自赠ID + * 数据库自增ID */ private int id; diff --git a/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java b/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java index d57f8127..d3a9ae9e 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java @@ -5,7 +5,6 @@ import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem; import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; import com.genersoft.iot.vmp.service.bean.GPSMsgInfo; import com.genersoft.iot.vmp.storager.dao.dto.ChannelSourceInfo; -import com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTree; import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; import com.github.pagehelper.PageInfo; @@ -94,12 +93,6 @@ public interface IVideoManagerStorage { public List queryChannelsByDeviceIdWithStartAndLimit(String deviceId, String query, Boolean hasSubChannel, Boolean online, int start, int limit); - /** - * 获取某个设备的通道树 - * @param deviceId 设备ID - * @return - */ - List tree(String deviceId); /** * 获取某个设备的通道列表 @@ -285,7 +278,7 @@ public interface IVideoManagerStorage { * @param startTime * @param endTime */ - public List queryMobilePositions(String deviceId, String startTime, String endTime); + public List queryMobilePositions(String deviceId, String channelId, String startTime, String endTime); /** * 查询最新移动位置 diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java index c1ff7a6c..312d3e03 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java @@ -2,7 +2,6 @@ package com.genersoft.iot.vmp.storager.dao; import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; import com.genersoft.iot.vmp.gb28181.bean.DeviceChannelInPlatform; -import com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTree; import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; import org.apache.ibatis.annotations.*; import org.springframework.stereotype.Repository; @@ -236,23 +235,6 @@ public interface DeviceChannelMapper { @Select("SELECT * FROM device_channel WHERE deviceId=#{deviceId} AND status=1") List queryOnlineChannelsByDeviceId(String deviceId); - @Select(" SELECT\n" + - " id,\n" + - " channelId,\n" + - " deviceId,\n" + - " parentId,\n" + - " status,\n" + - " name as title,\n" + - " channelId as \"value\",\n" + - " channelId as \"key\",\n" + - " longitude,\n" + - " latitude,\n" + - " PTZType,\n" + - " subCount\n" + - " from device_channel\n" + - " where deviceId = #{deviceId}") - List tree(String deviceId); - @Delete(value = {" "}) - List queryPositionByDeviceIdAndTime(String deviceId, String startTime, String endTime); + List queryPositionByDeviceIdAndTime(String deviceId, String channelId, String startTime, String endTime); @Select("SELECT * FROM device_mobile_position WHERE deviceId = #{deviceId}" + " ORDER BY time DESC LIMIT 1") diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java index 5d0031f0..661a69b3 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java @@ -13,8 +13,6 @@ import com.genersoft.iot.vmp.storager.IRedisCatchStorage; import com.genersoft.iot.vmp.storager.IVideoManagerStorage; import com.genersoft.iot.vmp.storager.dao.*; import com.genersoft.iot.vmp.storager.dao.dto.ChannelSourceInfo; -import com.genersoft.iot.vmp.utils.node.ForestNodeMerger; -import com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTree; import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @@ -354,10 +352,6 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { return deviceChannelMapper.queryChannelsByDeviceIdWithStartAndLimit(deviceId, null, query, hasSubChannel, online, start, limit); } - @Override - public List tree(String deviceId) { - return ForestNodeMerger.merge(deviceChannelMapper.tree(deviceId)); - } @Override public List queryChannelsByDeviceId(String deviceId) { @@ -504,8 +498,8 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { * @param endTime */ @Override - public synchronized List queryMobilePositions(String deviceId, String startTime, String endTime) { - return deviceMobilePositionMapper.queryPositionByDeviceIdAndTime(deviceId, startTime, endTime); + public synchronized List queryMobilePositions(String deviceId, String channelId, String startTime, String endTime) { + return deviceMobilePositionMapper.queryPositionByDeviceIdAndTime(deviceId, channelId, startTime, endTime); } @Override diff --git a/src/main/java/com/genersoft/iot/vmp/utils/node/BaseNode.java b/src/main/java/com/genersoft/iot/vmp/utils/node/BaseNode.java deleted file mode 100644 index 89e35a54..00000000 --- a/src/main/java/com/genersoft/iot/vmp/utils/node/BaseNode.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.genersoft.iot.vmp.utils.node; - -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.ArrayList; -import java.util.List; - -/** - * 节点基类 - * - */ -public class BaseNode implements INode { - - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - protected String channelId; - - /** - * 父节点ID - */ - protected String parentId; - - /** - * 子孙节点 - */ - @JsonInclude(JsonInclude.Include.NON_EMPTY) - protected List children = new ArrayList(); - - /** - * 是否有子孙节点 - */ - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private Boolean hasChildren; - - /** - * 是否有子孙节点 - * - * @return Boolean - */ - @Override - public Boolean getHasChildren() { - if (children.size() > 0) { - return true; - } else { - return this.hasChildren; - } - } - - @Override - public String getChannelId() { - return channelId; - } - - @Override - public String getParentId() { - return parentId; - } - - @Override - public List getChildren() { - return children; - } - - public void setChildren(List children) { - this.children = children; - } - - public void setHasChildren(Boolean hasChildren) { - this.hasChildren = hasChildren; - } -} diff --git a/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNode.java b/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNode.java deleted file mode 100644 index d983c56b..00000000 --- a/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNode.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.genersoft.iot.vmp.utils.node; - - - -/** - * 森林节点类 - * - */ -public class ForestNode extends BaseNode { - - private static final long serialVersionUID = 1L; - - /** - * 节点内容 - */ - private Object content; - - public ForestNode(String id, String parentId, Object content) { - this.channelId = id; - this.parentId = parentId; - this.content = content; - } - - public Object getContent() { - return content; - } - - public void setContent(Object content) { - this.content = content; - } -} diff --git a/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java b/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java deleted file mode 100644 index affce9d1..00000000 --- a/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.genersoft.iot.vmp.utils.node; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Maps; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * 森林管理类 - * - * @author smallchill - */ -public class ForestNodeManager> { - - /** - * 森林的所有节点 - */ - private final ImmutableMap nodeMap; - - /** - * 森林的父节点ID - */ - private final Map parentIdMap = Maps.newHashMap(); - - public ForestNodeManager(List nodes) { - nodeMap = Maps.uniqueIndex(nodes, INode::getChannelId); - } - - /** - * 根据节点ID获取一个节点 - * - * @param id 节点ID - * @return 对应的节点对象 - */ - public INode getTreeNodeAt(String id) { - if (nodeMap.containsKey(id)) { - return nodeMap.get(id); - } - return null; - } - - /** - * 增加父节点ID - * - * @param parentId 父节点ID - */ - public void addParentId(String parentId) { - parentIdMap.put(parentId, ""); - } - - /** - * 获取树的根节点(一个森林对应多颗树) - * - * @return 树的根节点集合 - */ - public List getRoot() { - List roots = new ArrayList<>(); - nodeMap.forEach((key, node) -> { - if (node.getParentId() == null || parentIdMap.containsKey(node.getChannelId())) { - roots.add(node); - } - }); - return roots; - } - -} diff --git a/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeMerger.java b/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeMerger.java deleted file mode 100644 index 8df6f503..00000000 --- a/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeMerger.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.genersoft.iot.vmp.utils.node; - -import com.genersoft.iot.vmp.utils.CollectionUtil; - -import java.util.List; - -/** - * 森林节点归并类 - * - */ -public class ForestNodeMerger { - - /** - * 将节点数组归并为一个森林(多棵树)(填充节点的children域) - * 时间复杂度为O(n^2) - * - * @param items 节点域 - * @return 多棵树的根节点集合 - */ - public static > List merge(List items) { - ForestNodeManager forestNodeManager = new ForestNodeManager<>(items); - items.forEach(forestNode -> { - if (forestNode.getParentId() != null) { - INode node = forestNodeManager.getTreeNodeAt(forestNode.getParentId()); - if (node != null) { - node.getChildren().add(forestNode); - } else { - forestNodeManager.addParentId(forestNode.getChannelId()); - } - } - }); - return forestNodeManager.getRoot(); - } - - public static > List merge(List items, String[] parentIds) { - ForestNodeManager forestNodeManager = new ForestNodeManager<>(items); - items.forEach(forestNode -> { - if (forestNode.getParentId() != null) { - INode node = forestNodeManager.getTreeNodeAt(forestNode.getParentId()); - if (CollectionUtil.contains(parentIds, forestNode.getChannelId())){ - forestNodeManager.addParentId(forestNode.getChannelId()); - } else { - if (node != null){ - node.getChildren().add(forestNode); - } - } - } - }); - return forestNodeManager.getRoot(); - } -} diff --git a/src/main/java/com/genersoft/iot/vmp/utils/node/INode.java b/src/main/java/com/genersoft/iot/vmp/utils/node/INode.java deleted file mode 100644 index 27727470..00000000 --- a/src/main/java/com/genersoft/iot/vmp/utils/node/INode.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.genersoft.iot.vmp.utils.node; - -import java.io.Serializable; -import java.util.List; - -/** - * - * 节点 - */ -public interface INode extends Serializable { - - /** - * 主键 - * - * @return String - */ - String getChannelId(); - - /** - * 父主键 - * - * @return String - */ - String getParentId(); - - /** - * 子孙节点 - * - * @return List - */ - List getChildren(); - - /** - * 是否有子孙节点 - * - * @return Boolean - */ - default Boolean getHasChildren() { - return false; - } - -} diff --git a/src/main/java/com/genersoft/iot/vmp/utils/node/TreeNode.java b/src/main/java/com/genersoft/iot/vmp/utils/node/TreeNode.java deleted file mode 100644 index 71f1b2b5..00000000 --- a/src/main/java/com/genersoft/iot/vmp/utils/node/TreeNode.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.genersoft.iot.vmp.utils.node; - - - -/** - * 树型节点类 - * - */ -public class TreeNode extends BaseNode { - - private static final long serialVersionUID = 1L; - - private String title; - - private String key; - - private String value; - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } -} diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTree.java b/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTree.java deleted file mode 100644 index 73928a46..00000000 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTree.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.genersoft.iot.vmp.vmanager.bean; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; -import com.genersoft.iot.vmp.utils.node.INode; -import io.swagger.annotations.ApiModel; - -import java.util.ArrayList; -import java.util.List; - -@ApiModel(value = "DeviceChannelTree对象", description = "DeviceChannelTree对象") -public class DeviceChannelTree extends DeviceChannel implements INode { - private static final long serialVersionUID = 1L; - - /** - * 主键ID - */ - private int id; - - /** - * 父节点ID - */ - private String parentId; - - private String parentName; - - private String title; - - private String key; - - private String value; - - /** - * 子孙节点 - */ - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List children; - - /** - * 是否有子孙节点 - */ - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private Boolean hasChildren; - - @Override - public List getChildren() { - if (this.children == null) { - this.children = new ArrayList<>(); - } - return this.children; - } - - @Override - public Boolean getHasChildren() { - if (children.size() > 0) { - return true; - } else { - return this.hasChildren; - } - } - - @Override - public int getId() { - return id; - } - - @Override - public void setId(int id) { - this.id = id; - } - - @Override - public String getParentId() { - return parentId; - } - - @Override - public void setParentId(String parentId) { - this.parentId = parentId; - } - - public String getParentName() { - return parentName; - } - - public void setParentName(String parentName) { - this.parentName = parentName; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public void setChildren(List children) { - this.children = children; - } - - public void setHasChildren(Boolean hasChildren) { - this.hasChildren = hasChildren; - } -} diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTreeNode.java b/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTreeNode.java deleted file mode 100644 index 96577d1f..00000000 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTreeNode.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.genersoft.iot.vmp.vmanager.bean; - -import com.genersoft.iot.vmp.utils.node.TreeNode; - -public class DeviceChannelTreeNode extends TreeNode { - - private Integer status; - - private String deviceId; - - private String channelId; - - private Double lng; - - private Double lat; - - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - public String getDeviceId() { - return deviceId; - } - - public void setDeviceId(String deviceId) { - this.deviceId = deviceId; - } - - public String getChannelId() { - return channelId; - } - - public void setChannelId(String channelId) { - this.channelId = channelId; - } - - public Double getLng() { - return lng; - } - - public void setLng(Double lng) { - this.lng = lng; - } - - public Double getLat() { - return lat; - } - - public void setLat(Double lat) { - this.lat = lat; - } -} diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java index c360843d..7d11b15c 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java @@ -10,6 +10,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; import com.genersoft.iot.vmp.service.IDeviceService; import com.genersoft.iot.vmp.storager.IVideoManagerStorage; +import com.genersoft.iot.vmp.vmanager.bean.WVPResult; import com.github.pagehelper.util.StringUtil; import io.swagger.annotations.Api; @@ -65,10 +66,11 @@ public class MobilePositionController { @ApiImplicitParam(name = "start", value = "开始时间", required = true, dataTypeClass = String.class), @ApiImplicitParam(name = "end", value = "结束时间", required = true, dataTypeClass = String.class), }) - @GetMapping("/history/{deviceId}") - public ResponseEntity> positions(@PathVariable String deviceId, - @RequestParam(required = false) String start, - @RequestParam(required = false) String end) { + @GetMapping("/history/{deviceId}/{channelId}") + public ResponseEntity>> positions(@PathVariable String deviceId, + @PathVariable String channelId, + @RequestParam(required = false) String start, + @RequestParam(required = false) String end) { // if (logger.isDebugEnabled()) { // logger.debug("查询设备" + deviceId + "的历史轨迹"); // } @@ -79,9 +81,11 @@ public class MobilePositionController { if (StringUtil.isEmpty(end)) { end = null; } - - List result = storager.queryMobilePositions(deviceId, start, end); - return new ResponseEntity<>(result, HttpStatus.OK); + WVPResult> wvpResult = new WVPResult<>(); + wvpResult.setCode(0); + List result = storager.queryMobilePositions(deviceId, channelId, start, end); + wvpResult.setData(result); + return new ResponseEntity<>(wvpResult, HttpStatus.OK); } /** diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java index 38cbdee1..ab153ad4 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java @@ -9,7 +9,6 @@ import com.genersoft.iot.vmp.gb28181.bean.SyncStatus; import com.genersoft.iot.vmp.gb28181.event.DeviceOffLineDetector; import com.genersoft.iot.vmp.gb28181.task.ISubscribeTask; import com.genersoft.iot.vmp.gb28181.task.impl.CatalogSubscribeTask; -import com.genersoft.iot.vmp.gb28181.task.impl.MobilePositionSubscribeHandlerTask; import com.genersoft.iot.vmp.gb28181.task.impl.MobilePositionSubscribeTask; import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; @@ -17,14 +16,12 @@ import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; import com.genersoft.iot.vmp.service.IDeviceService; import com.genersoft.iot.vmp.storager.IRedisCatchStorage; import com.genersoft.iot.vmp.storager.IVideoManagerStorage; -import com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTree; import com.genersoft.iot.vmp.vmanager.bean.WVPResult; import com.github.pagehelper.PageInfo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -import org.kxml2.wap.wv.WV; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -450,11 +447,6 @@ public class DeviceQuery { return result; } - @GetMapping("/{deviceId}/tree") - @ApiOperation(value = "通道树形结构", notes = "通道树形结构") - public WVPResult> tree(@PathVariable String deviceId) { - return WVPResult.Data(storager.tree(deviceId)); - } @GetMapping("/{deviceId}/sync_status") @ApiOperation(value = "获取通道同步进度", notes = "获取通道同步进度") diff --git a/web_src/index.html b/web_src/index.html index df23a7f9..24d5ee24 100644 --- a/web_src/index.html +++ b/web_src/index.html @@ -28,7 +28,7 @@ // 默认地图中心点 center:[116.41020, 39.915119], // 地图最大层级 - maxZoom:19, + maxZoom:18, // 地图最小层级 minZoom: 3 } diff --git a/web_src/package-lock.json b/web_src/package-lock.json index f97b032f..0d4c886c 100644 --- a/web_src/package-lock.json +++ b/web_src/package-lock.json @@ -16,6 +16,7 @@ "moment": "^2.29.1", "ol": "^6.14.1", "postcss-pxtorem": "^5.1.1", + "uuid": "^8.3.2", "vue": "^2.6.11", "vue-clipboard2": "^0.3.1", "vue-clipboards": "^1.3.0", @@ -11880,6 +11881,16 @@ "node": ">=0.8.0" } }, + "node_modules/sockjs/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/sort-asc": { "version": "0.1.0", "resolved": "https://registry.npmmirror.com/sort-asc/-/sort-asc-0.1.0.tgz", @@ -12978,13 +12989,11 @@ } }, "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npm.taobao.org/uuid/download/uuid-3.4.0.tgz?cache=0&sync_timestamp=1601826530476&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuuid%2Fdownload%2Fuuid-3.4.0.tgz", - "integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, + "version": "8.3.2", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "bin": { - "uuid": "bin/uuid" + "uuid": "dist/bin/uuid" } }, "node_modules/validate-npm-package-license": { @@ -24308,6 +24317,14 @@ "requires": { "faye-websocket": "^0.10.0", "uuid": "^3.0.1" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } } }, "sockjs-client": { @@ -25260,10 +25277,9 @@ "dev": true }, "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npm.taobao.org/uuid/download/uuid-3.4.0.tgz?cache=0&sync_timestamp=1601826530476&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuuid%2Fdownload%2Fuuid-3.4.0.tgz", - "integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=", - "dev": true + "version": "8.3.2", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, "validate-npm-package-license": { "version": "3.0.4", diff --git a/web_src/package.json b/web_src/package.json index 4fa733e9..1e7f0432 100644 --- a/web_src/package.json +++ b/web_src/package.json @@ -18,6 +18,7 @@ "moment": "^2.29.1", "ol": "^6.14.1", "postcss-pxtorem": "^5.1.1", + "uuid": "^8.3.2", "vue": "^2.6.11", "vue-clipboard2": "^0.3.1", "vue-clipboards": "^1.3.0", diff --git a/web_src/src/api/deviceApi.js b/web_src/src/api/deviceApi.js deleted file mode 100644 index 830164f4..00000000 --- a/web_src/src/api/deviceApi.js +++ /dev/null @@ -1,19 +0,0 @@ -import axios from 'axios'; - -export const tree = (deviceId) => { - return axios({ - url: `/api/device/query/${deviceId}/tree`, - method: 'get' - }) -} - -export const deviceList = (page, count) => { - return axios({ - method: 'get', - url:`/api/device/query/devices`, - params: { - page, - count - } - }) -} \ No newline at end of file diff --git a/web_src/src/components/DeviceList.vue b/web_src/src/components/DeviceList.vue index d934fe60..62cba31f 100644 --- a/web_src/src/components/DeviceList.vue +++ b/web_src/src/components/DeviceList.vue @@ -194,7 +194,7 @@ export default { this.$router.push(`/channelList/${row.deviceId}/0/15/1`); }, showDevicePosition: function (row) { - this.$router.push(`/devicePosition/${row.deviceId}/0/15/1`); + this.$router.push(`/map?deviceId=${row.deviceId}`); }, //gb28181平台对接 diff --git a/web_src/src/components/channelTree.vue b/web_src/src/components/channelTree.vue deleted file mode 100644 index ae9eac7b..00000000 --- a/web_src/src/components/channelTree.vue +++ /dev/null @@ -1,70 +0,0 @@ - - \ No newline at end of file diff --git a/web_src/src/components/channelTreeItem.vue b/web_src/src/components/channelTreeItem.vue deleted file mode 100644 index 7f2a2a59..00000000 --- a/web_src/src/components/channelTreeItem.vue +++ /dev/null @@ -1,74 +0,0 @@ - - diff --git a/web_src/src/components/common/DeviceTree.vue b/web_src/src/components/common/DeviceTree.vue index 43a797bd..fab895fd 100644 --- a/web_src/src/components/common/DeviceTree.vue +++ b/web_src/src/components/common/DeviceTree.vue @@ -1,10 +1,10 @@