Commit a6d9b227 authored by 郭铭瑶's avatar 郭铭瑶 🤘

接入为老,地标,历保,易积水,拆迁范围地图撒点数据&更改生产环境下监控视屏域名.待测试.

parent 576a7a2d
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,9 +6,9 @@
<link rel="icon" href="./favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>南京东路街道</title>
<script type="module" crossorigin src="./assets/index.bd59cd64.js"></script>
<script type="module" crossorigin src="./assets/index.f042b6d4.js"></script>
<link rel="modulepreload" href="./assets/vendor.0a2bc783.js">
<link rel="stylesheet" href="./assets/index.02bb8e20.css">
<link rel="stylesheet" href="./assets/index.65e0a3c6.css">
</head>
<body>
......
......@@ -335,7 +335,7 @@ export default defineComponent({
// 添加线状覆盖物
function addPolyLine({
key,
paths,
paths = [],
attributes = {},
strokeColor = 'rgba(51,145,255,.6)',
width = 2,
......@@ -346,6 +346,7 @@ export default defineComponent({
strokeColor: string
width: number
}) {
if (!map) return
const polyline = {
id: key,
attributes,
......
......@@ -6,6 +6,10 @@ import shi from '@/assets/images/shi.png'
import zhu from '@/assets/images/zhu.png'
import xing from '@/assets/images/xing.png'
import other from '@/assets/images/other.png'
import water from '@/assets/images/water.png'
import land from '@/assets/images/land.png'
import history from '@/assets/images/history.png'
import old from '@/assets/images/old.png'
import smStar from '@/assets/images/star-sm.png'
import star from '@/assets/images/star.png'
......@@ -321,7 +325,77 @@ export default {
return item
}),
]
commit('SET_ECOLOGY_POINTS', result)
const waterPoints = (
(
await ajax.get({
url: api.GET_MARKETS,
params: { labelName: '易积水点位', pageSize: 10000 },
})
)?.data?.content || []
).map((item: any) => {
item.icon = water
item._type = 'water'
return item
})
const rangePaths = (
(
await ajax.get({
url: api.GET_MARKETS,
params: { labelName: '拆迁范围', pageSize: 10000 },
})
)?.data?.content || []
).map((item: any) => {
item._type = 'range'
if (item.gis) {
const path = JSON.parse(item.gis)
item.path = path.map((e: any) => [+e.x, +e.y])
}
return item
})
const landMarkers = (
(
await ajax.get({
url: api.GET_MARKETS,
params: { labelName_l: '地标性建筑', pageSize: 10000 },
})
)?.data?.content || []
).map((item: any) => {
item.icon = land
item._type = 'sign'
return item
})
const historyPoints = (
(
await ajax.get({
url: api.GET_MARKETS,
params: { labelName_l: '历史保护建筑', pageSize: 10000 },
})
)?.data?.content || []
).map((item: any) => {
item.icon = history
item._type = 'history'
return item
})
const oldPoints = (
(
await ajax.get({
url: api.GET_FOR_OLD,
params: { pageSize: 10000 },
})
)?.data?.content || []
).map((item: any) => {
item.icon = old
item._type = 'old'
return item
})
commit('SET_ECOLOGY_POINTS', [
...result,
...waterPoints,
...rangePaths,
...landMarkers,
...historyPoints,
...oldPoints,
])
},
async getEcologyConvenient({ commit }: Method): Promise<void> {
const { content } = (
......
......@@ -12,12 +12,14 @@ export default {
'zhu',
'xing',
'other',
'非居',
'old',
'sign',
'history',
'community',
'居住',
'water',
'range',
// 'community',
// '非居',
// '居住',
],
viewOptions: [
// 屏幕切换选项
......
......@@ -153,11 +153,18 @@ export default function useSwitchMap(map: any): any {
}
)
let mapPoints: any = null
let moveRangePaths: any = null
const emergencyPoints = computed(() => store.state.emergencyPoints)
let mapEmergency: any = null
function handlePoint(type: null | string, keys: string[]) {
if (!map.value) return
const { showCommunity, hideCommunity, addPoint, remove } = map.value
const {
showCommunity,
hideCommunity,
addPoint,
addPolyLine,
remove,
} = map.value
if (keys.length === 0) {
hideCommunity()
......@@ -180,12 +187,14 @@ export default function useSwitchMap(map: any): any {
const xingPoints = pointData.filter((e) => e.labelName === '行')
const otherPoints = pointData.filter((e) => e._type === 'other')
const governPoints = pointData.filter((e) => e._type === 'govern')
// const oldPoints = []
// const signPoints = []
// const historyPoints = []
const oldPoints = pointData.filter((e) => e._type === 'old')
const signPoints = pointData.filter((e) => e._type === 'sign')
const historyPoints = pointData.filter((e) => e._type === 'history')
const waterPoints = pointData.filter((e) => e._type === 'water')
const moveRanges = pointData.filter((e) => e._type === 'range')
remove(mapEmergency)
remove(mapPoints)
remove(moveRangePaths)
mapPoints = addPoint({
key: 'map-points',
size: 20,
......@@ -195,25 +204,22 @@ export default function useSwitchMap(map: any): any {
...(keys.some((key) => key === 'zhu') ? zhuPoints : []),
...(keys.some((key) => key === 'xing') ? xingPoints : []),
...(keys.some((key) => key === 'other') ? otherPoints : []),
...(keys.some((key) => key === 'old') ? oldPoints : []),
...(keys.some((key) => key === 'sign') ? signPoints : []),
...(keys.some((key) => key === 'history') ? historyPoints : []),
...(keys.some((key) => key === 'water') ? waterPoints : []),
...governPoints,
// {
// icon: star,
// '479477007408168960': '上海市人民政府',
// stAddr: '人民大道200号',
// belong: '第一工作站',
// x: 130.78,
// y: -433.2,
// },
// {
// icon: smStar,
// '479477007408168960': '南京东路街道',
// stAddr: '大沽路123号',
// belong: '第一工作站',
// x: 17.95,
// y: -788.21,
// },
],
})
if (keys.some((key) => key === 'range')) {
moveRangePaths = moveRanges.map((item: any) =>
addPolyLine({
key: 'move-rangs',
paths: item.paths,
strokeColor: '#ffd700',
})
)
}
}
watch(
......
......@@ -116,9 +116,15 @@ export default defineComponent({
).then((res) => {
const urls = res.map((item) => item?.data?.content || null)
list.value.forEach((item, i) => {
if (process.env.NODE_ENV === 'production') {
item.video =
urls[i] && urls[i].replace('open.ys7.com', '60.190.232.46')
} else {
item.video = urls[i]
}
})
videoList.value = [...list.value]
console.log(videoList.value)
})
})
const curScene = ref('all')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment