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 9d12eb58..d57f8127 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java @@ -180,7 +180,7 @@ public interface IVideoManagerStorage { * @param count * @return */ - PageInfo querySubChannels(String deviceId, String channelId, String query, Boolean hasSubChannel, String online, int page, int count); + PageInfo querySubChannels(String deviceId, String channelId, String query, Boolean hasSubChannel, Boolean online, int page, int count); /** 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 42e46e10..c1ff7a6c 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 @@ -246,7 +246,9 @@ public interface DeviceChannelMapper { " channelId as \"value\",\n" + " channelId as \"key\",\n" + " longitude,\n" + - " latitude\n" + + " latitude,\n" + + " PTZType,\n" + + " subCount\n" + " from device_channel\n" + " where deviceId = #{deviceId}") List tree(String deviceId); 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 fbb6e38d..5d0031f0 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 @@ -365,9 +365,9 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { } @Override - public PageInfo querySubChannels(String deviceId, String parentChannelId, String query, Boolean hasSubChannel, String online, int page, int count) { + public PageInfo querySubChannels(String deviceId, String parentChannelId, String query, Boolean hasSubChannel, Boolean online, int page, int count) { PageHelper.startPage(page, count); - List all = deviceChannelMapper.queryChannels(deviceId, parentChannelId, null, null, null); + List all = deviceChannelMapper.queryChannels(deviceId, parentChannelId, query, hasSubChannel, online); return new PageInfo<>(all); } 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 95d2843d..38cbdee1 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 @@ -235,7 +235,7 @@ public class DeviceQuery { @ApiImplicitParam(name="page", value = "当前页", required = true, dataTypeClass = Integer.class), @ApiImplicitParam(name="count", value = "每页条数", required = true, dataTypeClass = Integer.class), @ApiImplicitParam(name="query", value = "查询内容", dataTypeClass = String.class), - @ApiImplicitParam(name="online", value = "是否在线", dataTypeClass = String.class), + @ApiImplicitParam(name="online", value = "是否在线", dataTypeClass = Boolean.class), @ApiImplicitParam(name="channelType", value = "通道类型, 子目录", dataTypeClass = Boolean.class), }) @GetMapping("/sub_channels/{deviceId}/{channelId}/channels") @@ -244,7 +244,7 @@ public class DeviceQuery { int page, int count, @RequestParam(required = false) String query, - @RequestParam(required = false) String online, + @RequestParam(required = false) Boolean online, @RequestParam(required = false) Boolean channelType){ // if (logger.isDebugEnabled()) { diff --git a/web_src/index.html b/web_src/index.html index a287331d..df23a7f9 100644 --- a/web_src/index.html +++ b/web_src/index.html @@ -22,7 +22,7 @@ // 地图瓦片地址 tilesUrl: "http://webrd0{1-4}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=8", // 瓦片大小 - tileSize: 512, + tileSize: 256, // 默认层级 zoom:10, // 默认地图中心点 diff --git a/web_src/src/components/UiHeader.vue b/web_src/src/components/UiHeader.vue index 3341428f..af6d665f 100644 --- a/web_src/src/components/UiHeader.vue +++ b/web_src/src/components/UiHeader.vue @@ -10,6 +10,7 @@ 云端录像 节点管理 国标级联 + 设备树 在线文档 diff --git a/web_src/src/components/common/DeviceTree.vue b/web_src/src/components/common/DeviceTree.vue new file mode 100644 index 00000000..43a797bd --- /dev/null +++ b/web_src/src/components/common/DeviceTree.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/web_src/src/components/service/DeviceService.js b/web_src/src/components/service/DeviceService.js index 93c98f6a..aae04189 100644 --- a/web_src/src/components/service/DeviceService.js +++ b/web_src/src/components/service/DeviceService.js @@ -46,21 +46,21 @@ class DeviceService{ } - getAllCatalog(deviceId, callback, errorCallback) { + getAllChannel(isCatalog, deviceId, callback, errorCallback) { let currentPage = 1; let count = 100; let catalogList = [] - this.getAllCatalogIteration(deviceId, catalogList, currentPage, count, callback, errorCallback) + this.getAllChannelIteration(isCatalog, deviceId, catalogList, currentPage, count, callback, errorCallback) } - getAllCatalogIteration(deviceId, catalogList, currentPage, count, callback, errorCallback) { - this.getCatalog(deviceId, currentPage, count, (data) => { + getAllChannelIteration(isCatalog, deviceId, catalogList, currentPage, count, callback, errorCallback) { + this.getChanel(isCatalog, deviceId, currentPage, count, (data) => { console.log(data) if (data.list) { catalogList = catalogList.concat(data.list); if (catalogList.length < data.total) { currentPage ++ - this.getAllCatalogIteration(deviceId, catalogList, currentPage, count, callback, errorCallback) + this.getAllChannelIteration(isCatalog, deviceId, catalogList, currentPage, count, callback, errorCallback) }else { console.log(2222) if (typeof (callback) == "function") callback(catalogList) @@ -68,7 +68,7 @@ class DeviceService{ } }, errorCallback) } - getCatalog(deviceId, currentPage, count, callback, errorCallback) { + getChanel(isCatalog, deviceId, currentPage, count, callback, errorCallback) { this.$axios({ method: 'get', url: `/api/device/query/devices/${deviceId}/channels`, @@ -77,7 +77,7 @@ class DeviceService{ count: count, query: "", online: "", - channelType: true + channelType: isCatalog } }).then((res) =>{ if (typeof (callback) == "function") callback(res.data) @@ -85,29 +85,28 @@ class DeviceService{ } - getAllSubCatalog(deviceId, channelId, callback, errorCallback) { + getAllSubChannel(isCatalog, deviceId, channelId, callback, errorCallback) { let currentPage = 1; let count = 100; let catalogList = [] - this.getAllSubCatalogIteration(deviceId, channelId, catalogList, currentPage, count, callback, errorCallback) + this.getAllSubChannelIteration(isCatalog, deviceId, channelId, catalogList, currentPage, count, callback, errorCallback) } - getAllSubCatalogIteration(deviceId,channelId, catalogList, currentPage, count, callback, errorCallback) { - this.getSubCatalog(deviceId, channelId, currentPage, count, (data) => { + getAllSubChannelIteration(isCatalog, deviceId,channelId, catalogList, currentPage, count, callback, errorCallback) { + this.getSubChannel(isCatalog, deviceId, channelId, currentPage, count, (data) => { console.log(data) if (data.list) { catalogList = catalogList.concat(data.list); if (catalogList.length < data.total) { currentPage ++ - this.getAllSubCatalogIteration(deviceId, channelId, catalogList, currentPage, count, callback, errorCallback) + this.getAllSubChannelIteration(isCatalog, deviceId, channelId, catalogList, currentPage, count, callback, errorCallback) }else { - console.log(2222) if (typeof (callback) == "function") callback(catalogList) } } }, errorCallback) } - getSubCatalog(deviceId, channelId, currentPage, count, callback, errorCallback) { + getSubChannel(isCatalog, deviceId, channelId, currentPage, count, callback, errorCallback) { this.$axios({ method: 'get', url: `/api/device/query/sub_channels/${deviceId}/${channelId}/channels`, @@ -116,12 +115,22 @@ class DeviceService{ count: count, query: "", online: "", - channelType: true + channelType: isCatalog } }).then((res) =>{ if (typeof (callback) == "function") callback(res.data) }).catch(errorCallback); } + getDeviceTree(deviceId, callback, errorCallback){ + this.$axios({ + method: 'get', + url: `/api/device/query/${deviceId}/tree`, + params:{} + }).then((res) =>{ + console.log(res.data) + if (typeof (callback) == "function") callback(res.data.data) + }).catch(errorCallback); + } } export default DeviceService; diff --git a/web_src/src/router/index.js b/web_src/src/router/index.js index 3869fa3e..273fa8ca 100644 --- a/web_src/src/router/index.js +++ b/web_src/src/router/index.js @@ -15,6 +15,7 @@ import web from '../components/setting/Web.vue' import sip from '../components/setting/Sip.vue' import media from '../components/setting/Media.vue' import live from '../components/live.vue' +import deviceTree from '../components/common/DeviceTree.vue' import wasmPlayer from '../components/common/jessibuca.vue' import rtcPlayer from '../components/dialog/rtcPlayer.vue' @@ -115,5 +116,10 @@ export default new VueRouter({ name: 'rtcPlayer', component: rtcPlayer, }, + { + path: '/test', + name: 'deviceTree', + component: deviceTree, + }, ] }) diff --git a/web_src/static/css/iconfont.css b/web_src/static/css/iconfont.css index 06982714..2a08b07f 100644 --- a/web_src/static/css/iconfont.css +++ b/web_src/static/css/iconfont.css @@ -1,8 +1,6 @@ @font-face { font-family: "iconfont"; /* Project id 1291092 */ - src: url('iconfont.woff2?t=1647245982270') format('woff2'), - url('iconfont.woff?t=1647245982270') format('woff'), - url('iconfont.ttf?t=1647245982270') format('truetype'); + src: url('iconfont.woff2?t=1650436696596') format('woff2'); } .iconfont { @@ -13,6 +11,50 @@ -moz-osx-font-smoothing: grayscale; } +.icon-jiedianleizhukongzhongxin1:before { + content: "\e9d0"; +} + +.icon-jiedianleizhukongzhongxin2:before { + content: "\e9d1"; +} + +.icon-jiedianleilianjipingtai:before { + content: "\e9d3"; +} + +.icon-jiedianleiquyu:before { + content: "\e9d4"; +} + +.icon-shebeileigis:before { + content: "\e9ec"; +} + +.icon-shebeileibanqiu:before { + content: "\e9f5"; +} + +.icon-shebeileibanqiugis:before { + content: "\e9f6"; +} + +.icon-shebeileijiankongdian:before { + content: "\ea07"; +} + +.icon-shebeileiqiangjitongdao:before { + content: "\ea15"; +} + +.icon-shebeileiqiuji:before { + content: "\ea17"; +} + +.icon-shebeileiqiujigis:before { + content: "\ea18"; +} + .icon-xitongxinxi:before { content: "\e7d6"; } diff --git a/web_src/static/css/iconfont.woff2 b/web_src/static/css/iconfont.woff2 index 4833708c..7204137a 100644 Binary files a/web_src/static/css/iconfont.woff2 and b/web_src/static/css/iconfont.woff2 differ