parent
51fa1e3069
commit
0868169ffd
File diff suppressed because one or more lines are too long
|
@ -77,18 +77,22 @@
|
|||
var id = getParams("id");
|
||||
var title = getParams("title");
|
||||
let requestBody = {
|
||||
pointId: id
|
||||
pointId: id,
|
||||
useTLS: 0
|
||||
}
|
||||
console.log(window.location, locationUrl, id, title);
|
||||
// console.log(window.location, locationUrl, id, title);
|
||||
try {
|
||||
let url = 'http://175.6.124.250:8083/multialarm/video/preview'
|
||||
|
||||
if (window.location.host === 'www.hndyjqrh.cn') {
|
||||
requestBody.useTLS = 1
|
||||
}
|
||||
// requestBody.useTLS = 1
|
||||
let url = ' https://www.hndyjqrh.cn/api/multialarm/video/preview'
|
||||
axios({
|
||||
method: 'post',
|
||||
url,
|
||||
data: { ...requestBody }
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
var PLAYURL = res.data.data.videoUrl
|
||||
self.player.play(PLAYURL, true, "");
|
||||
|
||||
|
|
|
@ -229,6 +229,7 @@ const confirmEvent = () => {
|
|||
// background: #142738;
|
||||
background: #fff;
|
||||
color: #fff;
|
||||
position: relative;
|
||||
// background-image: url(@/assets/images/community_container.jpg);
|
||||
// background-size: 100% 100%;
|
||||
// background-repeat: no-repeat;
|
||||
|
@ -236,6 +237,8 @@ const confirmEvent = () => {
|
|||
.community_top {
|
||||
width: 100%;
|
||||
height: 77px;
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// background:#4880FF;
|
||||
background: #07315e;
|
||||
background-image: url(@/views/page/imag/titleBg1.png);
|
||||
|
@ -296,6 +299,8 @@ const confirmEvent = () => {
|
|||
width: 100%;
|
||||
height: calc(100% - 68px);
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
// top: 0;
|
||||
// height: 100%;
|
||||
// margin: 10px 50px 30px 50px;
|
||||
// position: absolute;
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
<!-- <button @click="refreshTreeData">刷新</button> -->
|
||||
<!-- height: 75%; -->
|
||||
<div ref="scrollContainer" v-loading="loading" style="padding: 0px 20px; height: 70%; overflow: auto">
|
||||
<div ref="scrollContainer" v-loading="loading" style="margin: 10px 20px; height: 70%; overflow: auto">
|
||||
<!-- —————————————————————————————重要的事情说三遍: key 值必须唯一 ————————————————————————————— -->
|
||||
<!-- —————————————————————————————重要的事情说三遍: key 值必须唯一 ————————————————————————————— -->
|
||||
<!-- —————————————————————————————重要的事情说三遍: key 值必须唯一 ————————————————————————————— -->
|
||||
|
@ -197,7 +197,7 @@
|
|||
</div>
|
||||
</Transition>
|
||||
|
||||
<div v-show="dialogTableVisible" style="position: fixed; top: 115px; right: 448px; background: rgb(21, 42, 95); z-index: 99; width: 349px; padding: 10px; border-radius: 5px; padding-top: 20px">
|
||||
<div v-show="dialogTableVisible" class="dialogTableVisibleClass">
|
||||
<el-popover :visible="visible" :show-arrow="false" placement="left" :width="400" :popper-style="{ background: '#06325F', border: '1px solid #60626654' }">
|
||||
<template #reference>
|
||||
<el-icon @click="clickKz(infoData)" style="top: -6px" size="16px" color="#409EFC">
|
||||
|
@ -383,6 +383,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { JsonResult } from '@/axios'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import type { TreeProps } from 'ant-design-vue'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
|
@ -416,7 +417,7 @@ const cascaderChange = (value: any, selectedOptions: any): void => {
|
|||
// selectedKeys.value.push(value.slice(-1)[0])
|
||||
let title = selectedOptions.slice(-1)[0]?.title
|
||||
expandedKeys.value = value
|
||||
// scrollToMatchedNode(title) //此功能还有bug:滑动会带着父元素一起滑动
|
||||
scrollToMatchedNode(title) //此功能还有bug:滑动会带着父元素一起滑动
|
||||
}
|
||||
|
||||
const showIframe = ref(false)
|
||||
|
@ -492,7 +493,7 @@ const jiesuo = (data: any) => {
|
|||
start: day().format('YYYY-MM-DD HH:mm:ss'),
|
||||
before: 1,
|
||||
})
|
||||
.then((res) => {
|
||||
.then((res: JsonResult<any>) => {
|
||||
if (res.code == 0) {
|
||||
infoData.value.lockState = res.data[listindex.value]['lockState']
|
||||
}
|
||||
|
@ -524,7 +525,7 @@ const lock = (data: any) => {
|
|||
start: day().format('YYYY-MM-DD HH:mm:ss'),
|
||||
before: 1,
|
||||
})
|
||||
.then((res) => {
|
||||
.then((res: JsonResult<any>) => {
|
||||
if (res.code == 0) {
|
||||
infoData.value.lockState = res.data[listindex.value]['lockState']
|
||||
}
|
||||
|
@ -604,8 +605,6 @@ const scrollToMatchedNode = (searchValue: string) => {
|
|||
}
|
||||
})
|
||||
// const parent = matchedNode[0].parentElement
|
||||
|
||||
// // 禁用滚动
|
||||
// parent.style.overflow = 'hidden'
|
||||
if (matchedNode.length === 1) {
|
||||
matchedNode[0].scrollIntoView({ behavior: 'smooth', block: 'center' })
|
||||
|
@ -706,17 +705,11 @@ const gettree4 = (data: any) => {
|
|||
name: localStorage.getItem('loginname'),
|
||||
hylxdm: data,
|
||||
})
|
||||
.then((res1) => {
|
||||
.then((res1: JsonResult<any>) => {
|
||||
res1.data.forEach((ele: any) => {
|
||||
// 给 getlist 数据添加 code
|
||||
|
||||
// ele.code = ele.stationId
|
||||
ele.code = ele.pointId
|
||||
ele.code = ele.pointId //为什么是pointId,因为key需要唯一
|
||||
})
|
||||
|
||||
let data = [res.data]
|
||||
// console.log('data_____________', data)
|
||||
|
||||
data.forEach((tree) => {
|
||||
console.log(tree)
|
||||
printLeafs(tree, res1.data)
|
||||
|
@ -873,7 +866,7 @@ const treedata = () => {
|
|||
name: localStorage.getItem('loginname'),
|
||||
hylxdm: '',
|
||||
})
|
||||
.then((res1) => {
|
||||
.then((res1: JsonResult<any>) => {
|
||||
api
|
||||
.post('/multialarm/client/alarm_point/getlist', {
|
||||
name: localStorage.getItem('loginname'),
|
||||
|
@ -881,11 +874,8 @@ const treedata = () => {
|
|||
pageindex: 0,
|
||||
pagesize: res1.data.count,
|
||||
})
|
||||
.then((res) => {
|
||||
var gridSize = 60
|
||||
// console.log('总数', res)
|
||||
// var points: any[]
|
||||
var points = []
|
||||
.then((res: JsonResult<any>) => {
|
||||
var points: any[] = []
|
||||
|
||||
res.data.map((x: any) => {
|
||||
const marker = new AMap.Marker({
|
||||
|
@ -899,12 +889,12 @@ const treedata = () => {
|
|||
title: '',
|
||||
})
|
||||
marker.on('click', function () {
|
||||
deviceInfoWindow = new AMap.InfoWindow({
|
||||
deviceInfoWindow.value = new AMap.InfoWindow({
|
||||
isCustom: true, //使用自定义窗体
|
||||
content: createSubstanceInfowindow2(x, '1'),
|
||||
offset: new AMap.Pixel(5, -13),
|
||||
})
|
||||
deviceInfoWindow.open(state.map, [x.longitude == null ? 0 : x.longitude, x.latitude == null ? 0 : x.latitude])
|
||||
deviceInfoWindow.value.open(state.map, [x.longitude == null ? 0 : x.longitude, x.latitude == null ? 0 : x.latitude])
|
||||
})
|
||||
state.map.add(marker)
|
||||
points.push(marker)
|
||||
|
@ -957,7 +947,7 @@ const getdayline = () => {
|
|||
start: day().format('YYYY-MM-DD HH:mm:ss'),
|
||||
before: 1,
|
||||
})
|
||||
.then((res) => {
|
||||
.then((res: JsonResult<any>) => {
|
||||
if (res.code == 0) {
|
||||
// console.log('当日报警列表', res)
|
||||
jinbao.value = res.data
|
||||
|
@ -975,12 +965,12 @@ const getdayline = () => {
|
|||
title: '',
|
||||
})
|
||||
marker.on('click', function () {
|
||||
deviceInfoWindow = new AMap.InfoWindow({
|
||||
deviceInfoWindow.value = new AMap.InfoWindow({
|
||||
isCustom: true, //使用自定义窗体
|
||||
content: createSubstanceInfowindow(x, '1'),
|
||||
offset: new AMap.Pixel(5, -13),
|
||||
})
|
||||
deviceInfoWindow.open(state.map, [x.longitude == null ? 0 : x.longitude, x.latitude == null ? 0 : x.latitude])
|
||||
deviceInfoWindow.value.open(state.map, [x.longitude == null ? 0 : x.longitude, x.latitude == null ? 0 : x.latitude])
|
||||
})
|
||||
state.map.add(marker)
|
||||
} else {
|
||||
|
@ -998,12 +988,12 @@ const getdayline = () => {
|
|||
title: '',
|
||||
})
|
||||
marker.on('click', function () {
|
||||
deviceInfoWindow = new AMap.InfoWindow({
|
||||
deviceInfoWindow.value = new AMap.InfoWindow({
|
||||
isCustom: true, //使用自定义窗体
|
||||
content: createSubstanceInfowindow1(x, '1'),
|
||||
offset: new AMap.Pixel(5, -13),
|
||||
})
|
||||
deviceInfoWindow.open(state.map, [x.longitude == null ? 0 : x.longitude, x.latitude == null ? 0 : x.latitude])
|
||||
deviceInfoWindow.value.open(state.map, [x.longitude == null ? 0 : x.longitude, x.latitude == null ? 0 : x.latitude])
|
||||
})
|
||||
state.map.add(marker)
|
||||
}
|
||||
|
@ -1032,7 +1022,7 @@ const getjingqing = () => {
|
|||
})
|
||||
}
|
||||
//获取当日ai预警
|
||||
const AIyujing = ref([])
|
||||
const AIyujing = ref<any[]>([])
|
||||
const getAi = () => {
|
||||
let city = JSON.parse(localStorage.getItem('user-stores'))['userInfo']['levelvalue']
|
||||
api
|
||||
|
@ -1043,7 +1033,7 @@ const getAi = () => {
|
|||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
// console.log('查询当日预警', res)
|
||||
AIyujing.value = res.data
|
||||
AIyujing.value = res.data as any[]
|
||||
} else {
|
||||
}
|
||||
})
|
||||
|
@ -1065,17 +1055,18 @@ const gettotal = () => {
|
|||
})
|
||||
}
|
||||
//
|
||||
let deviceInfoWindow = ref(null)
|
||||
let deviceInfoWindow = ref<any>()
|
||||
const selectA = (selectedKeys: any, e: any) => {
|
||||
console.log('selectedKeys', selectedKeys, e)
|
||||
if (selectedKeys[0].length >= 13) {
|
||||
let targetLangLat = [e.selectedNodes[0].longitude == null ? 0 : e.selectedNodes[0].longitude, e.selectedNodes[0].latitude == null ? 0 : e.selectedNodes[0].latitude]
|
||||
deviceInfoWindow = new AMap.InfoWindow({
|
||||
|
||||
deviceInfoWindow.value = new AMap.InfoWindow({
|
||||
isCustom: true, //使用自定义窗体
|
||||
content: createSubstanceInfowindow2(e.selectedNodes[0], '1'),
|
||||
offset: new AMap.Pixel(5, -13),
|
||||
})
|
||||
deviceInfoWindow.open(state.map, [e.selectedNodes[0].longitude == null ? 0 : e.selectedNodes[0].longitude, e.selectedNodes[0].latitude == null ? 0 : e.selectedNodes[0].latitude])
|
||||
deviceInfoWindow.value.open(state.map, [e.selectedNodes[0].longitude == null ? 0 : e.selectedNodes[0].longitude, e.selectedNodes[0].latitude == null ? 0 : e.selectedNodes[0].latitude])
|
||||
|
||||
state.map.setZoomAndCenter(205, targetLangLat)
|
||||
}
|
||||
|
@ -1095,7 +1086,7 @@ const createSubstanceInfowindow = (obj: any, type: any) => {
|
|||
var closeX = document.createElement('img')
|
||||
closeX.src = closeimag
|
||||
closeX.onclick = () => {
|
||||
deviceInfoWindow.close()
|
||||
deviceInfoWindow.value.close()
|
||||
}
|
||||
|
||||
var popMian = document.createElement('div')
|
||||
|
@ -1126,7 +1117,7 @@ const createSubstanceInfowindow1 = (obj: any, type: any) => {
|
|||
var closeX = document.createElement('img')
|
||||
closeX.src = closeimag
|
||||
closeX.onclick = () => {
|
||||
deviceInfoWindow.close()
|
||||
deviceInfoWindow.value.close()
|
||||
}
|
||||
|
||||
var popMian = document.createElement('div')
|
||||
|
@ -1157,7 +1148,7 @@ const createSubstanceInfowindow2 = (obj: any, type: any) => {
|
|||
var closeX = document.createElement('img')
|
||||
closeX.src = closeimag
|
||||
closeX.onclick = () => {
|
||||
deviceInfoWindow.close()
|
||||
deviceInfoWindow.value.close()
|
||||
}
|
||||
|
||||
var popMian = document.createElement('div')
|
||||
|
@ -1240,7 +1231,8 @@ const pointCode = ref()
|
|||
// window.open(routeData.href, '_blank')
|
||||
|
||||
var url = `/cw_/index.html?id=${a.pointId}&title=${a.title}`
|
||||
const newWindow = window.open(url, '', 'width=' + 1920 + ',height=' + 1080 + ",top=0,left=0,status='no',location='no',resizable='no',toolbar='no'")
|
||||
window.open(url, '_blank')
|
||||
// const newWindow = window.open(url, '', 'width=' + 1920 + ',height=' + 1080 + ",top=0,left=0,status='no',location='no',resizable='no',toolbar='no'")
|
||||
}
|
||||
} else {
|
||||
// 手持设备的播放
|
||||
|
@ -1377,7 +1369,7 @@ const getRealTimeAlarmSituation = () => {
|
|||
start: day(day().format('YYYY-MM-DD')).format('YYYY-MM-DD HH:mm:ss'),
|
||||
end: day().format('YYYY-MM-DD HH:mm:ss'),
|
||||
})
|
||||
.then((res) => {
|
||||
.then((res: JsonResult<any>) => {
|
||||
// console.log('实时警情', res)
|
||||
if (res.code == 0) {
|
||||
listData.value = res.data.reverse()
|
||||
|
@ -1396,12 +1388,12 @@ const getRealTimeAlarmSituation = () => {
|
|||
title: '',
|
||||
})
|
||||
marker.on('click', function () {
|
||||
deviceInfoWindow = new AMap.InfoWindow({
|
||||
deviceInfoWindow.value = new AMap.InfoWindow({
|
||||
isCustom: true, //使用自定义窗体
|
||||
content: createSubstanceInfowindow1(x, '1'),
|
||||
offset: new AMap.Pixel(5, -13),
|
||||
})
|
||||
deviceInfoWindow.open(state.map, [x.longitude == null ? 0 : x.longitude, x.latitude == null ? 0 : x.latitude])
|
||||
deviceInfoWindow.value.open(state.map, [x.longitude == null ? 0 : x.longitude, x.latitude == null ? 0 : x.latitude])
|
||||
})
|
||||
state.map.add(marker)
|
||||
})
|
||||
|
@ -1409,7 +1401,7 @@ const getRealTimeAlarmSituation = () => {
|
|||
})
|
||||
}
|
||||
|
||||
const infoData = ref({})
|
||||
const infoData = ref<any>({})
|
||||
const upstatuslist = ref([])
|
||||
const listindex = ref()
|
||||
const toinfo = (item: any, index: number) => {
|
||||
|
@ -1436,7 +1428,7 @@ const toinfo = (item: any, index: number) => {
|
|||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
upstatuslist.value = res.data
|
||||
upstatuslist.value = res.data as any[]
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -1448,7 +1440,7 @@ const toinfo = (item: any, index: number) => {
|
|||
.then((res) => {
|
||||
// console.log('PPres1', res)
|
||||
if (res.code == 0) {
|
||||
upstatuslist.value = res.data
|
||||
upstatuslist.value = res.data as any[]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -1673,10 +1665,12 @@ const initMap = () => {
|
|||
}
|
||||
|
||||
.dataList {
|
||||
box-sizing: border-box;
|
||||
width: 420px;
|
||||
height: 91%;
|
||||
overflow: auto;
|
||||
margin: 0 auto;
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.dataList li {
|
||||
|
@ -1762,6 +1756,8 @@ const initMap = () => {
|
|||
.indexx {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
// position: absolute;
|
||||
|
||||
.left-cont {
|
||||
box-sizing: border-box;
|
||||
|
@ -1770,12 +1766,13 @@ const initMap = () => {
|
|||
// background-color: rgb(9 45 84 / 80%);
|
||||
background-color: #fff;
|
||||
z-index: 999;
|
||||
border: 10px solid #f2f3f5;
|
||||
// border: 10px solid #f2f3f5;
|
||||
// border-top: 12px solid #f2f3f5;
|
||||
// border-right: 12px solid #f2f3f5;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
overflow: hidden;
|
||||
|
||||
.titleLeftBg {
|
||||
width: 100%;
|
||||
|
@ -2074,4 +2071,15 @@ iframe {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.dialogTableVisibleClass {
|
||||
position: fixed;
|
||||
top: 115px;
|
||||
right: 448px;
|
||||
background: rgb(21, 42, 95);
|
||||
z-index: 99;
|
||||
width: 349px;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
// padding-top: 20px;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue