|
@@ -17,6 +17,7 @@
|
|
|
import Header from './modules/Header.vue'
|
|
|
import ActionPanel from './modules/ActionPanel'
|
|
|
import { AMapService } from '@/service/AMapService'
|
|
|
+import { createDisasterPointHTML, createDisasterInfoWindowHTML } from '@/service/HTMLContent'
|
|
|
|
|
|
export default {
|
|
|
name: 'DefaultLayout',
|
|
@@ -26,11 +27,46 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
data: () => ({
|
|
|
- mapService: null
|
|
|
+ mapService: null,
|
|
|
+ pointsData: [
|
|
|
+ {
|
|
|
+ name: "北碚互通",
|
|
|
+ position: [106.408468,29.812347],
|
|
|
+ content: createDisasterPointHTML,
|
|
|
+ data: {
|
|
|
+ content: createDisasterInfoWindowHTML,
|
|
|
+ data: {
|
|
|
+ type: "火灾扑救",
|
|
|
+ occurrenceTime: "2022年2月16日15:44:50",
|
|
|
+ occurrenceAddress: "重庆市北碚互通",
|
|
|
+ competentOrg: "渝中区北碚消防救援站",
|
|
|
+ outOfResource: "3辆消防车、10人",
|
|
|
+ outOfTime: "2022年2月16日15:57:15",
|
|
|
+ waterTime: "2022年2月16日15:57:15",
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "重庆市北碚区中医院",
|
|
|
+ position: [106.410013,29.801622],
|
|
|
+ content: createDisasterPointHTML,
|
|
|
+ data: {
|
|
|
+ content: createDisasterInfoWindowHTML,
|
|
|
+ data: {
|
|
|
+ type: "火灾扑救",
|
|
|
+ occurrenceTime: "2022年2月16日15:44:50",
|
|
|
+ occurrenceAddress: "重庆市北碚区中医院",
|
|
|
+ competentOrg: "渝中区北碚消防救援站",
|
|
|
+ outOfResource: "3辆消防车、10人",
|
|
|
+ outOfTime: "2022年2月16日15:57:15",
|
|
|
+ waterTime: "2022年2月16日15:57:15",
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }]
|
|
|
}),
|
|
|
created() {
|
|
|
- this.mapService = new AMapService((map) => {
|
|
|
-
|
|
|
+ this.mapService = new AMapService(this.$router,(instance) => {
|
|
|
+ instance.addPoints(this.pointsData)
|
|
|
})
|
|
|
this.mapService.loadMap('amap-container')
|
|
|
},
|
|
@@ -54,9 +90,9 @@ export default {
|
|
|
.cover {
|
|
|
position: relative;
|
|
|
width: 1600px;
|
|
|
- height: 1160px;
|
|
|
+ height: 80vh;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.cover:after {
|
|
|
position: absolute;
|
|
|
content: '';
|
|
@@ -69,7 +105,7 @@ export default {
|
|
|
|
|
|
#amap-container {
|
|
|
width: 1600px;
|
|
|
- height: 1160px;
|
|
|
+ height: 80vh;
|
|
|
}
|
|
|
|
|
|
.view-page {
|