@@ -963,7 +971,121 @@ const selectA = (selectedKeys: any, e: any) => {
console.log('🚀 ~ selectA ~ error:', error)
}
}
+const getSubstanceInfoWindowContent = (obj: any, type: any) => {
+ // console.log('obj', obj, type)
+ if (type == '1' || type == '3') {
+ return `
+
+ 设备号:
+ ${obj['alarmSource'] == undefined || null ? '--' : obj['alarmSource']}
+ 名称:
+ ${obj['alarmTarget'] == undefined || null ? '--' : obj['alarmTarget']}
+
+
+ 联系人:
+ ${obj['user1Name'] == undefined || null ? '--' : obj['user1Name']}
+ 电话:
+ ${obj['user1Phone'] == undefined || null ? '--' : obj['user1Phone']}
+
+
+ 地址:
+ ${obj['address'] == undefined || null ? '--' : obj['address']}
+
+
+ 时间:
+ ${obj['timestamp'] == undefined || null ? '--' : obj['timestamp']}
+
+
+
+
+ `
+ } else {
+ return `
+
+
+ 第一联系人:
+ ${obj['userName'] == undefined || obj['userName'] == null || obj['userName'] == ' ' ? '--' : obj['userName']}
+
+
+ 电话:
+ ${obj['userPhone'] == undefined || obj['userPhone'] == null || obj['userPhone'] == ' ' ? '--' : obj['userPhone']}
+
+
+
+
+ 第二联系人:
+ ${obj['user2Name'] == undefined || obj['user2Name'] == null || obj['user2Name'] == ' ' ? '--' : obj['user2Name']}
+
+
+ 电话:
+ ${obj['user2Phone'] == undefined || obj['user2Phone'] == null || obj['user2Phone'] == ' ' ? '--' : obj['user2Phone']}
+
+
+
+
+ 第三联系人:
+ ${obj['user3Name'] == undefined || obj['user3Name'] == null || obj['user3Name'] == ' ' ? '--' : obj['user3Name']}
+
+
+ 电话:
+ ${obj['user3Phone'] == undefined || obj['user3Phone'] == null || obj['user3Phone'] == ' ' ? '--' : obj['user3Phone']}
+
+
+
+
+ 区域码:
+ ${obj['subCode'] == undefined || obj['subCode'] == null || obj['subCode'] == ' ' ? '--' : obj['subCode']}
+
+
+ `
+ }
+}
+const getSubstanceInfoWindowContent2 = (obj: any, type: any) => {
+ console.log('🚀 ~ getSubstanceInfoWindowContent2 ~ obj, type:', obj, type)
+ if (obj.deviceType == '04' || obj.deviceType == '00') {
+ return `
+
+ 归属单位:
+ ${obj['dwmc'] == undefined || null ? '--' : obj['dwmc']}
+ 名称:
+ ${obj['title'] == undefined || null ? '--' : obj['title']}
+
+
+ 联系人:
+ ${obj['user2Name'] == undefined || null ? '--' : obj['user2Name']}
+ 电话:
+ ${obj['user2Phone'] == undefined || null ? '--' : obj['user2Phone']}
+
+
+ 地址:
+ ${obj['pointAddress'] == undefined || null ? '--' : obj['pointAddress']}
+
+
+
+
+ `
+ } else {
+ return `
+
+ 归属单位:
+ ${obj['dwmc'] == undefined || null ? '--' : obj['dwmc']}
+ 名称:
+ ${obj['title'] == undefined || null ? '--' : obj['title']}
+
+
+ 联系人:
+ ${obj['user2Name'] == undefined || null ? '--' : obj['user2Name']}
+ 电话:
+ ${obj['user2Phone'] == undefined || null ? '--' : obj['user2Phone']}
+
+
+ 地址:
+ ${obj['pointAddress'] == undefined || null ? '--' : obj['pointAddress']}
+
+ `
+ }
+}
const createSubstanceInfowindow = (obj: any, type: any) => {
//定义顶部标题
var mdinfoTop = document.createElement('div')
@@ -1076,52 +1198,6 @@ const createSubstanceInfowindow2 = (obj: any, type: any) => {
return mdinfoTop
}
-const getSubstanceInfoWindowContent2 = (obj: any, type: any) => {
- console.log('🚀 ~ getSubstanceInfoWindowContent2 ~ obj, type:', obj, type)
- if (obj.deviceType == '04' || obj.deviceType == '00') {
- return `
-
- 归属单位:
- ${obj['dwmc'] == undefined || null ? '--' : obj['dwmc']}
- 名称:
- ${obj['title'] == undefined || null ? '--' : obj['title']}
-
-
- 联系人:
- ${obj['user2Name'] == undefined || null ? '--' : obj['user2Name']}
- 电话:
- ${obj['user2Phone'] == undefined || null ? '--' : obj['user2Phone']}
-
-
- 地址:
- ${obj['pointAddress'] == undefined || null ? '--' : obj['pointAddress']}
-
-
-
-
- `
- } else {
- return `
-
- 归属单位:
- ${obj['dwmc'] == undefined || null ? '--' : obj['dwmc']}
- 名称:
- ${obj['title'] == undefined || null ? '--' : obj['title']}
-
-
- 联系人:
- ${obj['user2Name'] == undefined || null ? '--' : obj['user2Name']}
- 电话:
- ${obj['user2Phone'] == undefined || null ? '--' : obj['user2Phone']}
-
-
- 地址:
- ${obj['pointAddress'] == undefined || null ? '--' : obj['pointAddress']}
-
- `
- }
-}
-
;(window as any).addrt = (a: any) => {
console.log('播放_______________', a)
if (a.deviceType == '00') {
@@ -1186,77 +1262,6 @@ const getSubstanceInfoWindowContent2 = (obj: any, type: any) => {
}
}
-const getSubstanceInfoWindowContent = (obj: any, type: any) => {
- // console.log('obj', obj, type)
-
- if (type == '1' || type == '3') {
- return `
-
- 设备号:
- ${obj['alarmSource'] == undefined || null ? '--' : obj['alarmSource']}
- 名称:
- ${obj['alarmTarget'] == undefined || null ? '--' : obj['alarmTarget']}
-
-
- 联系人:
- ${obj['user1Name'] == undefined || null ? '--' : obj['user1Name']}
- 电话:
- ${obj['user1Phone'] == undefined || null ? '--' : obj['user1Phone']}
-
-
- 地址:
- ${obj['address'] == undefined || null ? '--' : obj['address']}
-
-
- 时间:
- ${obj['timestamp'] == undefined || null ? '--' : obj['timestamp']}
-
-
-
-
- `
- } else {
- return `
-
-
- 第一联系人:
- ${obj['userName'] == undefined || obj['userName'] == null || obj['userName'] == ' ' ? '--' : obj['userName']}
-
-
- 电话:
- ${obj['userPhone'] == undefined || obj['userPhone'] == null || obj['userPhone'] == ' ' ? '--' : obj['userPhone']}
-
-
-
-
- 第二联系人:
- ${obj['user2Name'] == undefined || obj['user2Name'] == null || obj['user2Name'] == ' ' ? '--' : obj['user2Name']}
-
-
- 电话:
- ${obj['user2Phone'] == undefined || obj['user2Phone'] == null || obj['user2Phone'] == ' ' ? '--' : obj['user2Phone']}
-
-
-
-
- 第三联系人:
- ${obj['user3Name'] == undefined || obj['user3Name'] == null || obj['user3Name'] == ' ' ? '--' : obj['user3Name']}
-
-
- 电话:
- ${obj['user3Phone'] == undefined || obj['user3Phone'] == null || obj['user3Phone'] == ' ' ? '--' : obj['user3Phone']}
-
-
-
-
- 区域码:
- ${obj['subCode'] == undefined || obj['subCode'] == null || obj['subCode'] == ' ' ? '--' : obj['subCode']}
-
-
- `
- }
-}
-
//实时警情
const listData = ref([])
const getRealTimeAlarmSituation = () => {
@@ -1281,7 +1286,7 @@ const getRealTimeAlarmSituation = () => {
icon: L.divIcon({
className: 'indexMarkerImg',
html: `
-
+
@@ -1320,48 +1325,51 @@ const toinfo = (item: any, index: number) => {
listindex.value = index
// dialogTableVisible.value = false;
nextTick(() => {
- infoData.value = item
- if (item.state == 'new') {
- //新事件转成处理中/firectrl/client/sensor/alarm_event/changestate
- api
- .post('/multialarm/client/alarm_event/changestate', {
- eventId: item.multiAlarmId,
- newState: 'processing',
- device: 'web',
- devictype: 'platform',
- operator: localStorage.getItem('loginname'),
- operatortype: '指挥中心'
- })
- .then((res) => {
- getRealTimeAlarmSituation() //跟新实时警情列表
- api
- .post('/multialarm/client/alarm_event/getlog', {
- eventId: item.multiAlarmId
- })
- .then((res) => {
- if (res.code == 0) {
- upstatuslist.value = res.data as any[]
- }
- })
- })
- } else {
- api
- .post('/multialarm/client/alarm_event/getlog', {
- eventId: item.multiAlarmId
- })
- .then((res) => {
- // console.log('PPres1', res)
- if (res.code == 0) {
- upstatuslist.value = res.data as any[]
- }
- })
- }
+ try {
+ infoData.value = item
+ if (item.state == 'new') {
+ //新事件转成处理中/firectrl/client/sensor/alarm_event/changestate
+ api
+ .post('/multialarm/client/alarm_event/changestate', {
+ eventId: item.multiAlarmId,
+ newState: 'processing',
+ device: 'web',
+ devictype: 'platform',
+ operator: localStorage.getItem('loginname'),
+ operatortype: '指挥中心'
+ })
+ .then((res) => {
+ getRealTimeAlarmSituation() //跟新实时警情列表
+ api
+ .post('/multialarm/client/alarm_event/getlog', {
+ eventId: item.multiAlarmId
+ })
+ .then((res) => {
+ if (res.code == 0) {
+ upstatuslist.value = res.data as any[]
+ }
+ })
+ })
+ } else {
+ api
+ .post('/multialarm/client/alarm_event/getlog', {
+ eventId: item.multiAlarmId
+ })
+ .then((res) => {
+ // console.log('PPres1', res)
+ if (res.code == 0) {
+ upstatuslist.value = res.data as any[]
+ }
+ })
+ }
- //跳转地图marke
- let targetLangLat = [item.longitude, item.latitude]
- state.map.panTo(targetLangLat)
- state.map.setZoomAndCenter(15, targetLangLat)
- dialogTableVisible.value = true
+ //跳转地图marke
+ let targetLatLngt = [item.latitude, item.longitude]
+ state.map.setView(targetLatLngt, 15)
+ dialogTableVisible.value = true
+ } catch (error) {
+ console.log('🚀 ~ toinfo ~ error:', error)
+ }
})
}
//
@@ -2016,7 +2024,7 @@ iframe {
top: 115px;
right: 448px;
background: rgb(21, 42, 95);
- z-index: 99;
+ z-index: 999;
width: 349px;
padding: 10px;
border-radius: 5px;