@@ -71,8 +71,8 @@
- 在线
- 离线
+ 在线
+ 离线
@@ -112,6 +112,8 @@
import devicePlayer from './dialog/devicePlayer.vue'
import uiHeader from '../layout/UiHeader.vue'
import moment from "moment";
+import DviceService from "./service/DeviceService";
+import DeviceService from "./service/DeviceService";
export default {
name: 'channelList',
@@ -121,6 +123,8 @@ export default {
},
data() {
return {
+ deviceService: new DeviceService(),
+ device: null,
deviceId: this.$route.params.deviceId,
parentChannelId: this.$route.params.parentChannelId,
deviceChannelList: [],
@@ -141,7 +145,17 @@ export default {
},
mounted() {
+ if (this.deviceId) {
+ this.deviceService.getDevice(this.deviceId, (result)=>{
+ this.device = result;
+
+ }, (error)=>{
+ console.log("获取设备信息失败")
+ console.error(error)
+ })
+ }
this.initData();
+
},
destroyed() {
this.$destroy('videojs');
diff --git a/web_src/src/components/control.vue b/web_src/src/components/control.vue
index b8b3e344..507cc0da 100644
--- a/web_src/src/components/control.vue
+++ b/web_src/src/components/control.vue
@@ -235,10 +235,8 @@
-
-
-
-
+
+
移除
diff --git a/web_src/src/components/dialog/deviceEdit.vue b/web_src/src/components/dialog/deviceEdit.vue
index 233fa567..ed17d171 100644
--- a/web_src/src/components/dialog/deviceEdit.vue
+++ b/web_src/src/components/dialog/deviceEdit.vue
@@ -38,8 +38,8 @@
-
+
diff --git a/web_src/src/components/map.vue b/web_src/src/components/map.vue
index caf36d4a..e9e86287 100644
--- a/web_src/src/components/map.vue
+++ b/web_src/src/components/map.vue
@@ -266,7 +266,20 @@ export default {
this.channel = channels[0]
}
this.$nextTick(() => {
- this.infoBoxId = this.$refs.map.openInfoBox([this.channel.longitude, this.channel.latitude], this.$refs.infobox, [0, -50])
+ let longitudeStr;
+ let latitudeStr;
+ if (window.mapParam.coordinateSystem == "GCJ-02") {
+ longitudeStr = "longitudeGcj02";
+ latitudeStr = "latitudeGcj02";
+ }else if (window.mapParam.coordinateSystem == "WGS84") {
+ longitudeStr = "longitudeWgs84";
+ latitudeStr = "latitudeWgs84";
+ }else {
+ longitudeStr = "longitude";
+ latitudeStr = "latitude";
+ }
+ let position = [this.channel[longitudeStr], this.channel[latitudeStr]];
+ this.infoBoxId = this.$refs.map.openInfoBox(position, this.$refs.infobox, [0, -50])
})
},
closeInfoBox: function () {
diff --git a/web_src/src/components/service/DeviceService.js b/web_src/src/components/service/DeviceService.js
index 4700e793..fb663744 100644
--- a/web_src/src/components/service/DeviceService.js
+++ b/web_src/src/components/service/DeviceService.js
@@ -21,6 +21,19 @@ class DeviceService{
if (typeof (errorCallback) == "function") errorCallback(error)
});
}
+
+ getDevice(deviceId, callback, errorCallback){
+ this.$axios({
+ method: 'get',
+ url:`/api/device/query/devices/${deviceId}`,
+ }).then((res) => {
+ if (typeof (callback) == "function") callback(res.data)
+ }).catch((error) => {
+ console.log(error);
+ if (typeof (errorCallback) == "function") errorCallback(error)
+ });
+ }
+
getAllDeviceList(callback,endCallback, errorCallback) {
let currentPage = 1;
let count = 100;