diff --git a/dist.rar b/dist.rar deleted file mode 100644 index 5dbe57d..0000000 Binary files a/dist.rar and /dev/null differ diff --git a/src/api/urls.js b/src/api/urls.js index f054501..fd148ce 100644 --- a/src/api/urls.js +++ b/src/api/urls.js @@ -35,12 +35,13 @@ export const transformMapApi = 'shaoxing-plat/v1/transform-picture/list' export const getM3u8Api = 'shaoxing-plat/v1/video/start' // 获取监控-imou // export const getImouApi = 'shaoxing-plat/v1/video/imou' - +export const getVideoList = 'shaoxing-plat/v1/picture/video-list' // 获取监控-imou export const getImouApi = 'shaoxing-plat/v1/video/imou-live' +export const getNewImouApi = 'shaoxing-plat/v1/video/imou-live-new' // 获取监控回放-imou export const getImouReturnApi = 'shaoxing-plat/v1/video/imou-return' - +export const getNewImouReturnApi = 'shaoxing-plat/v1/video/imou-return-new' /* 公厕信息管理接口 **/ // 获取厕所列表 get export const toiletListApi = 'shaoxing-plat/v1/toilet/page' diff --git a/src/components/Map/ToiletMap.vue b/src/components/Map/ToiletMap.vue index 7a83969..cc58f42 100644 --- a/src/components/Map/ToiletMap.vue +++ b/src/components/Map/ToiletMap.vue @@ -66,7 +66,7 @@ import { coiletConfig, videoConfig } from './config/marker-config' import { toiletGrade } from './config/toiletmap' import request from '@/api/request' -import { toiletMapApi, videoMapApi, toiletDetailApi } from '@/api/urls' +import { toiletMapApi, videoMapApi, toiletDetailApi, getVideoList } from '@/api/urls' import ToiletDetail from './components/ToiletDetail' import Monitor from './components/Monitor' import Map from './components/Map' @@ -202,9 +202,10 @@ export default { ''; el.onclick = function (e) { if (e.target.nodeName === 'A') { - _that.showMonitor(res.data.id, res.data.toiletName) + _that.getVideoLists(res.data.id, res.data.toiletName) } } + console.log(this.$refs.mapContainer) // this.$refs.mapContainer.showInfo(el, info, true, 'top-left', 0, -20) this.$refs.mapContainer.showInfoWin(tdtMap, el, lnglat, 0, -30) } @@ -294,9 +295,22 @@ export default { this.filter.regionParamVOList = this.$store.state.nomalMapArea this.bounds = this.$store.state.nomalMapBounds }, - showMonitor (id, title) { + async getVideoLists (id, title) { + var res = await request.get(getVideoList, { + params: { + toiletId: id + } + }) + if (res.code === '200') { + this.$refs.monitor.viewMonitor(res.data, title) + // this.$emit('showMonitor', res.data, this.title) + } else { + this.$message.info(res.message) + } + }, + showMonitor (data, title) { // this.$message.info('设备离线') - this.$refs.monitor.viewMonitor(id, title) + this.$refs.monitor.viewMonitor(data, title) }, // initTdt() { // this.tdtMap = new T.Map('map-wrapper') diff --git a/src/components/Map/components/Map.vue b/src/components/Map/components/Map.vue index f595766..f5c0060 100644 --- a/src/components/Map/components/Map.vue +++ b/src/components/Map/components/Map.vue @@ -81,6 +81,7 @@ export default { }, onMouseover: function() { const { markerInfo, thisMarker } = this + console.log(thisMarker) _that.$emit('markerHandelMouseover', markerInfo, thisMarker, _that.tdtMap) }, onMouseout: function() { @@ -100,6 +101,7 @@ export default { this.infoWindow.open(this.map, new AMap.LngLat(info.yCoordinates, info.xCoordinates)) }, showInfoWin(tdtMap, name, p, x, y) { + console.log(tdtMap) this.infoWindow = new T.InfoWindow(name, { offset: new T.Point(x, y), closeOnClick: true, diff --git a/src/components/Map/components/Monitor.vue b/src/components/Map/components/Monitor.vue index 80cc8ef..960707c 100644 --- a/src/components/Map/components/Monitor.vue +++ b/src/components/Map/components/Monitor.vue @@ -27,6 +27,9 @@ 回放 监控 +