diff --git a/src/api/ywts/cszl/yj.js b/src/api/ywts/cszl/yj.js
index e10baf8..282f3d6 100644
--- a/src/api/ywts/cszl/yj.js
+++ b/src/api/ywts/cszl/yj.js
@@ -42,3 +42,11 @@
data,
})
}
+// 事件
+export function getEventList(data) {
+ return request({
+ url: 'yjzh-gktj/csyj/jcsjzs',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/ywts/cszl/yj.js b/src/api/ywts/cszl/yj.js
index e10baf8..282f3d6 100644
--- a/src/api/ywts/cszl/yj.js
+++ b/src/api/ywts/cszl/yj.js
@@ -42,3 +42,11 @@
data,
})
}
+// 事件
+export function getEventList(data) {
+ return request({
+ url: 'yjzh-gktj/csyj/jcsjzs',
+ method: 'post',
+ data,
+ })
+}
diff --git "a/src/assets/images/icon/\345\272\224\346\200\245/\350\275\246\350\276\206/\346\266\210\351\230\262\350\275\246.png" "b/src/assets/images/icon/\345\272\224\346\200\245/\350\275\246\350\276\206/\346\266\210\351\230\262\350\275\246.png"
index 16018ca..24f1ee8 100644
--- "a/src/assets/images/icon/\345\272\224\346\200\245/\350\275\246\350\276\206/\346\266\210\351\230\262\350\275\246.png"
+++ "b/src/assets/images/icon/\345\272\224\346\200\245/\350\275\246\350\276\206/\346\266\210\351\230\262\350\275\246.png"
Binary files differ
diff --git a/src/api/ywts/cszl/yj.js b/src/api/ywts/cszl/yj.js
index e10baf8..282f3d6 100644
--- a/src/api/ywts/cszl/yj.js
+++ b/src/api/ywts/cszl/yj.js
@@ -42,3 +42,11 @@
data,
})
}
+// 事件
+export function getEventList(data) {
+ return request({
+ url: 'yjzh-gktj/csyj/jcsjzs',
+ method: 'post',
+ data,
+ })
+}
diff --git "a/src/assets/images/icon/\345\272\224\346\200\245/\350\275\246\350\276\206/\346\266\210\351\230\262\350\275\246.png" "b/src/assets/images/icon/\345\272\224\346\200\245/\350\275\246\350\276\206/\346\266\210\351\230\262\350\275\246.png"
index 16018ca..24f1ee8 100644
--- "a/src/assets/images/icon/\345\272\224\346\200\245/\350\275\246\350\276\206/\346\266\210\351\230\262\350\275\246.png"
+++ "b/src/assets/images/icon/\345\272\224\346\200\245/\350\275\246\350\276\206/\346\266\210\351\230\262\350\275\246.png"
Binary files differ
diff --git a/src/components/LayerManagerMix/index.vue b/src/components/LayerManagerMix/index.vue
index 1f5fec3..c287fe8 100644
--- a/src/components/LayerManagerMix/index.vue
+++ b/src/components/LayerManagerMix/index.vue
@@ -8,7 +8,8 @@
+
+
@@ -27,6 +33,7 @@
import TimeManager from "@/components/TimeManager";
import { heat } from '@/utils/freedo/heat'
import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo'
+import Pop from './Pop.vue'
import {
getHeat,
getArea,
@@ -34,14 +41,14 @@
getStatistics,
getCasePointList, getCaseInfo
} from "../../../../api/ywts/cszl/gd";
-import { getPlacePointList, getPersonPointList, getDevicePointList, getResourcePointList, getCarPointList } from '@/api/ywts/cszl/yj'
+import { getPlacePointList, getPersonPointList, getDevicePointList, getResourcePointList, getCarPointList, getEventList } from '@/api/ywts/cszl/yj'
import { AddDivPointHighlight, AddLabel } from "../../../../utils/freedo";
-import { iconFilter, deviceList } from './data'
+import { iconFilter, deviceList, caseList } from './data'
import ListPage from "@/components/ListPage";
export default {
name: 'Yj',
- components: { TimeManager, LayerManagerMix, ListPage, CommonBtn },
+ components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop },
data() {
return {
isListPage: false,
@@ -55,6 +62,10 @@
pageNo: 0,
pageSize: 5
},
+ markerListBak: [],
+ markerList: [],
+ currentSelect: '',
+ showPop: false,
caseTotal: 0,
caseIcon: {
1: require('@/assets/images/icon/事件/已撤案.png'),
@@ -121,7 +132,11 @@
console.log(e.target.id, 'e.target.id')
clearResetMap()
this.isListPage = false
+ this.showPop = false
this.selectIndex = e.target.id
+ this.currentSelect = ''
+ this.markerList = []
+ this.markerListBak = []
switch (this.selectIndex) {
case "caseBtn":
this.casePoint()
@@ -142,7 +157,7 @@
// 设备
this.searchResource({})
break
- case "carBtn":
+ case "carBtn":
// 车辆
this.searchCar({})
break
@@ -170,21 +185,27 @@
// 事件点位
casePoint() {
console.log(this.time)
- getCasePointList(this.time).then(response => {
+ getEventList(this.time).then(response => {
+ console.log(response.data, '事件列表')
if (response.code === 200) {
- clearUpMap()
- const data = []
- response.data.value.forEach(item => {
- if (!data.map(da => da.id).includes(item.id) && !data.map(da => da.lon).includes(item.lon) && item.id !== null) {
- data.push(item)
- }
- })
+ clearResetMap()
+ const data = caseList
+ // response.data.value.forEach(item => {
+ // if (!data.map(da => da.id).includes(item.id) && !data.map(da => da.lon).includes(item.lon) && item.id !== null) {
+ // data.push(item)
+ // }
+ // })
+ this.caseList = caseList
+ console.log(caseList, 'caseList')
+ // todo
+ // this.caseTotal = response.data.value.length
+ this.caseTotal = caseList.length
data.forEach(item => {
AddLabelPoint(
item.id,
'',
- this.caseIcon[item.status],
- [item.lon, item.lat, 0], 'gd-case', item,
+ this.caseIcon[item.eventstatusnameid],
+ [item.longitude, item.latitude, 0], 'gd-case', item,
this.clickCase)
})
}
@@ -260,14 +281,15 @@
},
searchCaseMarkerList() {
// getCaseInfo(this.caseListQuery).then(response => {
- getCaseInfo(this.caseListQuery).then(response => {
+ getEventList(this.caseListQuery).then(response => {
if (response.code === 200) {
- console.log(response.data.value)
+ // console.log(response.data.value)
// 右侧看板
- this.caseList = response.data.value
+ // this.caseList = response.data.value
+ this.caseList = caseList
// todo
// this.caseTotal = response.data.value.length
- this.caseTotal = 12
+ this.caseTotal = caseList.length
}
})
},
@@ -312,14 +334,15 @@
typename: item,
total: initData.filter(citem => citem.typename === item).length,
type: initData.filter(citem => citem.typename === item)[0].type,
- list: initData.filter(citem => citem.typename === item).map((item) => ({ ...item, showType: 'keynote'})),
-
+ list: initData.filter(citem => citem.typename === item).map((item) => ({ ...item, showType: 'keynote' })),
+ // icon: iconFilter(item)
}
})
// const dangerous = ['加油站', '危化品', '易滑坡区域', '易崩塌区域']
// this.menus.dangerous = data.filter(item => dangerous.some(citem => item.typename.includes(citem)))
const keynote = ['学校', '医院', '危化品', '加油站', '易滑坡区域', '易崩塌区域']
- this.menus.keynote = data.filter(item => keynote.some(citem => item.typename === (citem)))
+ this.menus.keynote = data.filter(item => keynote.some(citem => item.typename === (citem))).map(item => ({ ...item, icon: iconFilter(item.typename) }))
+ console.log(this.menus.keynote, 'this.menus.keynote')
// const resources = ['医疗', '仓库', '避难', '应急']
// this.menus.resources = data.filter(item => resources.some(citem => item.typename.includes(citem)))
// const device = ['视频', '设备']
@@ -348,15 +371,56 @@
item.name,
iconFilter(item.typename),
[item.lon, item.lat, 0], 'gd', item,
- this.clickIcon
+ this.clickMarker
)
})
this.markerList = markerList
+ this.markerListBak = JSON.parse(JSON.stringify(markerList))
})
},
// 场所列表点击
menuClickPlace(e) {
console.log(e, '123')
+ clearResetMap()
+ this.showPop = false
+ if (this.currentSelect === e.typename) {
+ // 退出筛选
+ this.markerList = this.markerListBak
+ this.currentSelect = ''
+ }
+ else {
+ this.markerList = this.markerListBak.filter((item) => item.typename === e.typename)
+ this.currentSelect = e.typename
+ }
+ this.markerList.forEach(item => {
+ AddLabelPoint(
+ item.id || new Date().getTime(),
+ item.name,
+ iconFilter(item.typename),
+ [item.lon, item.lat, 0], 'gd', item,
+ this.clickMarker
+ )
+ })
+ },
+ // 点击点位
+ clickMarker(eventArg) {
+ const showPop = (e) => {
+ const item = e._data.data
+ this.showPop = true
+ // console.log(this.$refs.popRef)
+ this.$nextTick(() => {
+ this.$refs.pop.initData(item)
+ })
+ }
+ if (this.showPop) {
+ this.showPop = false
+ setTimeout(() => {
+ showPop(eventArg)
+ }, 100);
+ }
+ else {
+ showPop(eventArg)
+ }
},
// 获取人员
searchPerson() {
@@ -376,10 +440,10 @@
typename: item,
total: initData.filter(citem => citem.typename === item).length,
type: initData.filter(citem => citem.typename === item)[0].type,
- list: initData.filter(citem => citem.typename === item).map((item) => ({ ...item, showType: 'person'})),
+ list: initData.filter(citem => citem.typename === item).map((item) => ({ ...item, showType: 'person' })),
}
})
- this.menus.person = data
+ this.menus.person = data.map(item => ({ ...item, icon: iconFilter(item.typename) }))
this.$refs.layerPerson.refreshMenu(1)
let markerList = []
const marker = [...this.menus.person]
@@ -398,10 +462,11 @@
item.name,
iconFilter(item.typename),
[item.lon, item.lat, 0], 'gd', item,
- this.clickIcon
+ this.clickMarker
)
})
this.markerList = markerList
+ this.markerListBak = JSON.parse(JSON.stringify(markerList))
})
},
// 获取设备
@@ -422,10 +487,10 @@
typename: item,
total: initData.filter(citem => citem.typename === item).length,
type: initData.filter(citem => citem.typename === item)[0].type,
- list: initData.filter(citem => citem.typename === item).map((item) => ({ ...item, showType: 'device'})),
+ list: initData.filter(citem => citem.typename === item).map((item) => ({ ...item, showType: 'device' })),
}
})
- this.menus.device = data
+ this.menus.device = data.map(item => ({ ...item, icon: iconFilter(item.typename) }))
this.$refs.layerDevice.refreshMenu(1)
let markerList = []
const marker = [...this.menus.device]
@@ -443,10 +508,11 @@
item.name,
iconFilter(item.typename),
[item.lon, item.lat, 0], 'gd', item,
- this.clickIcon
+ this.clickMarker
)
})
this.markerList = markerList
+ this.markerListBak = JSON.parse(JSON.stringify(markerList))
})
},
// 获取资源
@@ -467,10 +533,10 @@
typename: item,
total: initData.filter(citem => citem.typename === item).length,
type: initData.filter(citem => citem.typename === item)[0].type,
- list: initData.filter(citem => citem.typename === item).map((item) => ({ ...item, showType: 'resource'})),
+ list: initData.filter(citem => citem.typename === item).map((item) => ({ ...item, showType: 'resource' })),
}
})
- this.menus.resource = data
+ this.menus.resource = data.map(item => ({ ...item, icon: iconFilter(item.typename) }))
this.$refs.layerResource.refreshMenu(1)
// 地图绘制点位
let markerList = []
@@ -494,10 +560,11 @@
item.name,
iconFilter(item.typename),
[item.lon, item.lat, 0], 'gd', item,
- this.clickIcon
+ this.clickMarker
)
})
this.markerList = markerList
+ this.markerListBak = JSON.parse(JSON.stringify(markerList))
})
},
@@ -518,10 +585,10 @@
typename: item,
total: initData.filter(citem => citem.typename === item).length,
type: initData.filter(citem => citem.typename === item)[0].type,
- list: initData.filter(citem => citem.typename === item).map((item) => ({ ...item, showType: 'car'})),
+ list: initData.filter(citem => citem.typename === item).map((item) => ({ ...item, showType: 'car' })),
}
})
- this.menus.car = data
+ this.menus.car = data.map(item => ({ ...item, icon: iconFilter(item.typename) }))
this.$refs.layerCar.refreshMenu(0)
let markerList = []
const marker = [...this.menus.car]
@@ -539,10 +606,11 @@
item.name,
iconFilter(item.typename),
[item.lon, item.lat, 0], 'gd', item,
- this.clickIcon
+ this.clickMarker
)
})
this.markerList = markerList
+ this.markerListBak = JSON.parse(JSON.stringify(markerList))
})
}
}