修改地图标点

master
夜笙歌 4 months ago
parent bdcef51b98
commit a1341c2de1

@ -1,6 +1,7 @@
.DS_Store .DS_Store
node_modules/ node_modules/
dist/ dist/
hwsaas/
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 MiB

@ -245,7 +245,7 @@
<template slot="label"> <template slot="label">
告警类型 告警类型
</template> </template>
{{ warInfo.alarmTypeName }} {{ warInfo.alarmTypeName }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
@ -316,38 +316,38 @@
label="纬度"> label="纬度">
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <el-descriptions class="margin-top" :column="3" border v-for="i in equipmentInfo" style="margin-top: 8px">--> <!-- <el-descriptions class="margin-top" :column="3" border v-for="i in equipmentInfo" style="margin-top: 8px">-->
<!-- <el-descriptions-item>--> <!-- <el-descriptions-item>-->
<!-- <template slot="label">--> <!-- <template slot="label">-->
<!-- 编号--> <!-- 编号-->
<!-- </template>--> <!-- </template>-->
<!-- {{ i.deviceCode }}--> <!-- {{ i.deviceCode }}-->
<!-- </el-descriptions-item>--> <!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>--> <!-- <el-descriptions-item>-->
<!-- <template slot="label">--> <!-- <template slot="label">-->
<!-- 名称--> <!-- 名称-->
<!-- </template>--> <!-- </template>-->
<!-- {{ i.deviceName }}--> <!-- {{ i.deviceName }}-->
<!-- </el-descriptions-item>--> <!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>--> <!-- <el-descriptions-item>-->
<!-- <template slot="label">--> <!-- <template slot="label">-->
<!-- 监控单元--> <!-- 监控单元-->
<!-- </template>--> <!-- </template>-->
<!-- {{ i.monitorUnitName }}--> <!-- {{ i.monitorUnitName }}-->
<!-- </el-descriptions-item>--> <!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>--> <!-- <el-descriptions-item>-->
<!-- <template slot="label">--> <!-- <template slot="label">-->
<!-- 经度--> <!-- 经度-->
<!-- </template>--> <!-- </template>-->
<!-- {{ i.longitude }}--> <!-- {{ i.longitude }}-->
<!-- </el-descriptions-item>--> <!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>--> <!-- <el-descriptions-item>-->
<!-- <template slot="label">--> <!-- <template slot="label">-->
<!-- 纬度--> <!-- 纬度-->
<!-- </template>--> <!-- </template>-->
<!-- {{ i.latitude }}--> <!-- {{ i.latitude }}-->
<!-- </el-descriptions-item>--> <!-- </el-descriptions-item>-->
<!-- </el-descriptions>--> <!-- </el-descriptions>-->
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="equipmentInfoDialog = false"> </el-button> <el-button @click="equipmentInfoDialog = false"> </el-button>
<el-button type="primary" @click="getDeviceInfo" :disabled="!monitorUnitId">设备信息</el-button> <el-button type="primary" @click="getDeviceInfo" :disabled="!monitorUnitId">设备信息</el-button>
@ -358,6 +358,8 @@
</template> </template>
<script> <script>
// import gif from '@/assets/board/index/gif.gif'
import gif from '@/assets/board/index/dot.png'
import containerPic from "@/assets/board/index/container.png"; import containerPic from "@/assets/board/index/container.png";
import Chart from "@/components/Charts/Chart"; import Chart from "@/components/Charts/Chart";
import vueSeamlessScroll from "vue-seamless-scroll"; import vueSeamlessScroll from "vue-seamless-scroll";
@ -393,7 +395,7 @@ export default {
data() { data() {
return { return {
containerPic, containerPic,
markerData:[], markerData: [],
isTown: false, isTown: false,
value: [], value: [],
loading: false, loading: false,
@ -548,7 +550,7 @@ export default {
} }
}, },
async mounted() { async mounted() {
getTenantData(this.$store.getters.tenantId).then(e => { await getTenantData(this.$store.getters.tenantId).then(e => {
this.isMap = e.data.tenantField === '2'; this.isMap = e.data.tenantField === '2';
this.picUrl = e.data.tenantBoardPic this.picUrl = e.data.tenantBoardPic
this.code = parseFloat(e.data.tenantMapCode) || 620000 this.code = parseFloat(e.data.tenantMapCode) || 620000
@ -931,7 +933,7 @@ export default {
let data = await axios.get(`https://geo.datav.aliyun.com/areas_v3/bound/${this.code}_full.json`) let data = await axios.get(`https://geo.datav.aliyun.com/areas_v3/bound/${this.code}_full.json`)
mapData = this.cityJson[params.dataIndex].properties.adcode === 100000 ? ChinaMapData : data.data mapData = this.cityJson[params.dataIndex].properties.adcode === 100000 ? ChinaMapData : data.data
} }
this.getMap(mapData) await this.getMap(mapData)
}) })
this.$refs.mapChart.$el.addEventListener('dblclick', () => { this.$refs.mapChart.$el.addEventListener('dblclick', () => {
this.chartDblClick(this.code) this.chartDblClick(this.code)
@ -1012,7 +1014,7 @@ export default {
}) })
marker.on('dblclick', () => { marker.on('dblclick', () => {
this.equipmentInfoDialog = true this.equipmentInfoDialog = true
this.equipmentInfo = this.markerData.filter(v=>v.monitorUnitId === e.monitorUnitId) this.equipmentInfo = this.markerData.filter(v => v.monitorUnitId === e.monitorUnitId)
this.monitorUnitId = e.monitorUnitId this.monitorUnitId = e.monitorUnitId
// this.$router.push({path: '/board/equipment', query: {monitorUnitId: e.monitorUnitId}}) // this.$router.push({path: '/board/equipment', query: {monitorUnitId: e.monitorUnitId}})
}); });
@ -1023,10 +1025,10 @@ export default {
let marker = new AMap.Marker({ let marker = new AMap.Marker({
position: [e.longitude, e.latitude], position: [e.longitude, e.latitude],
title: `信息\n经度${e.longitude}\n纬度${e.latitude}\n名称${e.deviceName}\n`, title: `信息\n经度${e.longitude}\n纬度${e.latitude}\n名称${e.deviceName}\n`,
offset: new AMap.Pixel(-15, -30), offset: new AMap.Pixel(-20, -40),
content: `<div> <svg t="1718261114618" class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="4305" style="width: 30px;height: 30px;"> content: `<div>
<path fill="${(e.ifAlarm === '1') ? '#3D93FD' : '#ff0000'}" style="animation:an1 2s ease-in-out infinite;" d="M512 64.5c-180.5 0-326.9 146.4-326.9 326.9 0 63.3 18 122.3 49.2 172.4 1.1 2 2.1 4 3.2 5.9 34.9 58.2 113.9 128.8 165.5 194.5 66.3 84.4 93.2 158 93.2 158 1.6 1.4 13.1 35.6 15.1 35.8 2.5 0.2 12.6-34 14.5-35.8 0 0 22-69.2 83.7-146.6 56-70.1 142.8-145.7 177-206 0.9-1.6 1.8-3.3 2.6-5 31.5-50.2 49.7-109.6 49.7-173.3 0.1-180.5-146.3-326.8-326.8-326.8z" p-id="4306"> <img src="${gif}" alt="" width=" 40px" style="animation:an1 2s ease-in-out infinite;" >
</path></svg></div>` </div>`
}); });
marker.on('click', async () => { marker.on('click', async () => {
if (markerIds.includes(e.deviceId)) { if (markerIds.includes(e.deviceId)) {
@ -1047,7 +1049,7 @@ export default {
}) })
marker.on('dblclick', () => { marker.on('dblclick', () => {
this.equipmentInfoDialog = true this.equipmentInfoDialog = true
this.equipmentInfo = this.markerData.filter(v=>v.monitorUnitId === e.monitorUnitId) this.equipmentInfo = this.markerData.filter(v => v.monitorUnitId === e.monitorUnitId)
this.monitorUnitId = e.monitorUnitId this.monitorUnitId = e.monitorUnitId
// this.$router.push({path: '/board/equipment', query: {monitorUnitId: e.monitorUnitId}}) // this.$router.push({path: '/board/equipment', query: {monitorUnitId: e.monitorUnitId}})
}); });

Loading…
Cancel
Save