second commit

This commit is contained in:
2025-12-25 18:33:15 +08:00
parent 78407f1cbd
commit 6a6ddba71a
34 changed files with 527 additions and 1226 deletions

View File

@@ -3,8 +3,10 @@ NODE_ENV = 'development'
# 渔船点位 # 渔船点位
VITE_WS_BASE_URL ='ws://220.185.188.222:8055/api/gisWs' VITE_WS_BASE_URL ='ws://220.185.188.222:8055/api/gisWs'
VITE_APP_BASE_URL = 'http://125.124.131.105:6811/api' # VITE_APP_BASE_URL = 'http://125.124.131.105:6811/api'
# VITE_APP_BASE_URL = 'http://119.167.138.11:7282/video-service' # 成彬本地
VITE_APP_BASE_URL = 'http://100.95.157.241:6061/api'
# VITE_APP_BASE_URL = 'http://119.167.138.11:6061/video-service'
# 智能体访问地址 # 智能体访问地址
# 宋凯忠本地 # 宋凯忠本地

View File

@@ -3,9 +3,9 @@ NODE_ENV = 'production'
# 渔船点位 # 渔船点位
VITE_WS_BASE_URL ='ws://100.95.225.221:6810/api/gisWs' VITE_WS_BASE_URL ='ws://100.95.225.221:6810/api/gisWs'
VITE_APP_BASE_URL = 'http://125.124.131.105:6811/api' VITE_APP_BASE_URL = 'http://198.16.74.211:7284/api'
# 智能体访问地址 # 智能体访问地址
VITE_APP_MODEL_URL = 'http://198.16.74.211:7282/zhinengti' VITE_APP_MODEL_URL = 'http://198.16.74.211:7284/zhinengti'
# 海康播放插件配置 # 海康播放插件配置
VITE_APP_HAIKANG_SECRET = 'pvQSichVMqtLGh4Ltedo' VITE_APP_HAIKANG_SECRET = 'pvQSichVMqtLGh4Ltedo'
VITE_APP_HAIKANG_APPKEY = '28273161' VITE_APP_HAIKANG_APPKEY = '28273161'

132
src/api/identification.js Normal file
View File

@@ -0,0 +1,132 @@
import request from '@/utils/request'
/**
* 分页查询渔船识别记录
* 查询
* @param data
* @returns {*}
*/
export const videoIdentificationPage = (data) => {
return request({
url: '/videoIdentification/findByPage',
method: 'post',
data: data
})
}
/**
* 渔船识别记录
* 修改
* @param data
* @returns {*}
*/
export const updateVideoIdentification = (data) => {
return request({
url: '/videoIdentification/updateVideoIdentification',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json;charset=utf-8'
}
})
}
/**
* 渔船识别记录
* 删除
* @param data
* @returns {*}
*/
export const removeVideoIdentification = (data) => {
return request({
url: '/videoIdentification/removeVideoIdentification',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json;charset=utf-8'
}
})
}
/**
* 实时预览-识别率
* 查询
* @param data
* @returns {*}
*/
export const getIdentityRate = (params) => {
return request({
url: `/videoIdentification/getIdentityRate?type=${params.type}`,
method: 'get'
})
}
/**
* 卡口流量趋势
* 查询
* @param data
* @returns {*}
*/
export const getPortTrend = () => {
return request({
url: '/videoIdentification/getPortTrend',
method: 'get'
})
}
/**
* 无人机执行次数
* 查询
* @param data
* @returns {*}
*/
export const getVAVOperateCount = () => {
return request({
url: '/videoIdentification/getVAVOperateCount',
method: 'get'
})
}
/**
* 卡口识别累计
* 查询
* @param data
* @returns {*}
*/
export const getPortIdentityTotal = () => {
return request({
url: '/videoIdentification/getPortIdentityTotal',
method: 'get'
})
}
/**
* 无人机识别累计
* 查询
* @param data
* @returns {*}
*/
export const getUAVIdentityTotal = () => {
return request({
url: '/videoIdentification/getUAVIdentityTotal',
method: 'get'
})
}
/**
* 航道流速信息
* 查询
* @param data
* @returns {*}
*/
export const getWaterwayVelocity = (params) => {
return request({
url: `/videoIdentification/getWaterwayVelocity?waterwayVelocity=${params.waterwayVelocity}`,
method: 'get'
})
}
/**
* 航道气象信息
* 查询
* @param data
* @returns {*}
*/
export const getWaterwayWeather = (params) => {
return request({
url: `/videoIdentification/getWaterwayWeather?waterwayVelocity=${params.waterwayVelocity}`,
method: 'get'
})
}

View File

@@ -6,7 +6,7 @@ import request from '@/utils/request'
*/ */
export const login = (data) => { export const login = (data) => {
return request({ return request({
url: '/validateLogin', url: '/login',
headers: { headers: {
isToken: false, isToken: false,
repeatSubmit: false repeatSubmit: false

View File

@@ -18,9 +18,10 @@ export const findByCurrent = (data) => service({
*/ */
export const findAISPointPositionByMmsi = (data) => { export const findAISPointPositionByMmsi = (data) => {
return service({ return service({
url: '/boatData/findAISPointPositionByMmsi', url: '/aisSolr/findAISPointPositionByMmsi',
method: 'post', method: 'post',
data: data data: data,
timeout: 60000
}) })
} }

52
src/api/uav.js Normal file
View File

@@ -0,0 +1,52 @@
import request from '@/utils/request'
/**
* 获取视频流检测算法开关
* 查询
* @param data
* @returns {*}
*/
export const videoStreamDetectSwitch = (data) => {
return request({
url: '/rest/drone/videoStreamDetectSwitch',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json;charset=utf-8'
}
})
}
/**
* 获取视频流地址
* 查询
* @param data
* @returns {*}
*/
export const getVideoStream = (data) => {
return request({
url: '/rest/drone/getVideoStream',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json;charset=utf-8'
}
})
}
/**
* 开启/关闭算法
* 查询
* @param data
* @returns {*}
*/
export const doStartOrStopUavAlgorithm = (data) => {
return request({
url: '/rest/drone/doStartOrStopUavAlgorithm',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json;charset=utf-8'
}
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

View File

@@ -113,12 +113,35 @@ const addMonitorToMap = () => {
id: item.id, id: item.id,
symbol: $configs.getDevicePointSymbol('_monitor', { ...item, name: item.videoName }), symbol: $configs.getDevicePointSymbol('_monitor', { ...item, name: item.videoName }),
properties: item, properties: item,
zIndex: 1 zIndex: 2
} }
) )
marker.addTo(vector.monitor) marker.addTo(vector.monitor)
drawSector('_monitor', [ item.longitude, item.latitude ], 5 * 1000, item.id, 30) drawSector('_monitor', [ item.longitude, item.latitude ], 5 * 1000, item.id, 30)
marker.on('click', (evt) => { marker.on('click', (evt) => {
// 先隐藏所有扇形
changeSectorsInLayer('sectors_monitor', false)
// 确保扇形图层是可见的
if (!vector.sectors_monitor.isVisible()) {
vector.sectors_monitor.show()
}
// 显示当前点击项的所有相关扇形(圆、椭圆、线)
const baseId = `sector__monitor${item.id}`
const circleGeometry = vector.sectors_monitor.getGeometryById(baseId + '_circle')
const ellipseGeometry = vector.sectors_monitor.getGeometryById(baseId + '_ellipse')
const lineGeometry = vector.sectors_monitor.getGeometryById(baseId + '_line')
if (circleGeometry) {
circleGeometry.show()
}
if (ellipseGeometry) {
ellipseGeometry.show()
}
if (lineGeometry) {
lineGeometry.show()
}
mapStore.updateWindowInfo({ visible: true, type: '_monitor', data: { ...item } }) mapStore.updateWindowInfo({ visible: true, type: '_monitor', data: { ...item } })
}) })
} }
@@ -144,18 +167,46 @@ const addUAVToMap = () => {
id: item.id, id: item.id,
symbol: $configs.getDevicePointSymbol('_UAV', { ...item, name: item.videoName }), symbol: $configs.getDevicePointSymbol('_UAV', { ...item, name: item.videoName }),
properties: item, properties: item,
zIndex: 1 zIndex: 2
} }
) )
marker.addTo(vector.UAV) marker.addTo(vector.UAV)
drawSector('_UAV', [ item.longitude, item.latitude ], 5 * 1000, item.id) drawSector('_UAV', [ item.longitude, item.latitude ], 5 * 1000, item.id)
marker.on('click', (evt) => { marker.on('click', (evt) => {
// 先隐藏所有扇形
changeSectorsInLayer('sectors_UAV', false)
// 确保扇形图层是可见的
if (!vector.sectors_UAV.isVisible()) {
vector.sectors_UAV.show()
}
// 显示当前点击项的所有相关扇形(圆、椭圆、线)
const baseId = `sector__UAV${item.id}`
const circleGeometry = vector.sectors_UAV.getGeometryById(baseId + '_circle')
if (circleGeometry) {
circleGeometry.show()
}
mapStore.updateWindowInfo({ visible: true, type: '_UAV', data: { ...item } }) mapStore.updateWindowInfo({ visible: true, type: '_UAV', data: { ...item } })
}) })
} }
}) })
vector.UAV.show() vector.UAV.show()
} }
// 添加辅助函数来隐藏所有扇形
const changeSectorsInLayer = (layerName, show) => {
if (vector[layerName]) {
const allGeometries = vector[layerName].getGeometries()
allGeometries.forEach(geometry => {
if(show) {
geometry.show()
}else{
geometry.hide()
}
})
}
}
// 需要监控的起始角度和结束角度,修改视野范围可以传递经纬度坐标 // 需要监控的起始角度和结束角度,修改视野范围可以传递经纬度坐标
const drawSector = (type, center, radius, id, angle) => { const drawSector = (type, center, radius, id, angle) => {
const sectorId = `sector_${type}${id}` const sectorId = `sector_${type}${id}`
@@ -171,7 +222,7 @@ const drawSector = (type, center, radius, id, angle) => {
} }
let circle = new maptalks.Circle(center, radius, { let circle = new maptalks.Circle(center, radius, {
id: sectorId, id: sectorId + '_circle',
symbol: { symbol: {
lineColor: '#1CA8FF', lineColor: '#1CA8FF',
lineWidth: 1, lineWidth: 1,
@@ -182,12 +233,14 @@ const drawSector = (type, center, radius, id, angle) => {
}) })
if(angle) { if(angle) {
let ellipse = new maptalks.Sector(center, radius - 1 * 1000, angle - 30, angle + 30, { let ellipse = new maptalks.Sector(center, radius - 1 * 1000, angle - 30, angle + 30, {
id: sectorId + '_ellipse',
symbol: { symbol: {
lineColor: '#FF8D1C', lineColor: '#FF8D1C',
polygonFill: '#ff8d1c29' polygonFill: '#ff8d1c29'
} }
}) })
let line = new maptalks.Sector(center, radius + 1 * 1000, angle, angle, { let line = new maptalks.Sector(center, radius + 1 * 1000, angle, angle, {
id: sectorId + '_line',
symbol: { symbol: {
lineColor: '#FF8D1C', lineColor: '#FF8D1C',
polygonFill: '#ff8d1c29', polygonFill: '#ff8d1c29',
@@ -199,7 +252,8 @@ const drawSector = (type, center, radius, id, angle) => {
vector['sectors' + type].addGeometry(circle) vector['sectors' + type].addGeometry(circle)
} }
// 添加到可视域图层 // 添加到可视域图层
vector['sectors' + type].hide() changeSectorsInLayer('sectors' + type, false)
// vector['sectors' + type].hide()
} }
/** /**
* 叠加ais基站数据 * 叠加ais基站数据
@@ -219,7 +273,7 @@ const addAisStationToMap = () => {
id: item.id, id: item.id,
symbol: $configs.getDevicePointSymbol('_ais_station', { ...item }), symbol: $configs.getDevicePointSymbol('_ais_station', { ...item }),
properties: item, properties: item,
zIndex: 1 zIndex: 2
} }
) )
marker.addTo(vector.ais_station) marker.addTo(vector.ais_station)
@@ -247,7 +301,7 @@ const addEnvironmentalToMap = () => {
id: item.id, id: item.id,
symbol: $configs.getDevicePointSymbol('_environmental', { ...item }), symbol: $configs.getDevicePointSymbol('_environmental', { ...item }),
properties: item, properties: item,
zIndex: 1 zIndex: 2
} }
) )
marker.addTo(vector.environmental) marker.addTo(vector.environmental)
@@ -336,18 +390,22 @@ watch(() => fence.value, () => {
watch(() => sector.value.monitor, (newVal) => { watch(() => sector.value.monitor, (newVal) => {
if(vector.sectors_monitor) { if(vector.sectors_monitor) {
if(newVal) { if(newVal) {
vector.sectors_monitor.show() // vector.sectors_monitor.show()
changeSectorsInLayer('sectors_monitor', true)
} else { } else {
vector.sectors_monitor.hide() // vector.sectors_monitor.hide()
changeSectorsInLayer('sectors_monitor', false)
} }
} }
}) })
watch(() => sector.value.UAV, (newVal) => { watch(() => sector.value.UAV, (newVal) => {
if(vector.sectors_UAV) { if(vector.sectors_UAV) {
if(newVal) { if(newVal) {
vector.sectors_UAV.show() // vector.sectors_UAV.show()
changeSectorsInLayer('sectors_UAV', true)
} else { } else {
vector.sectors_UAV.hide() // vector.sectors_UAV.hide()
changeSectorsInLayer('sectors_UAV', false)
} }
} }
}) })
@@ -425,6 +483,8 @@ onUnmounted(() => {
border-radius: 0; border-radius: 0;
padding: 0; padding: 0;
.el-dialog__header{ .el-dialog__header{
display: flex;
justify-content: space-between;
padding: 0 16px; padding: 0 16px;
background: linear-gradient(0deg, rgba(10, 169, 255, 0) 0%, rgba(10, 169, 255, 0.5) 100%); background: linear-gradient(0deg, rgba(10, 169, 255, 0) 0%, rgba(10, 169, 255, 0.5) 100%);
.title{ .title{

View File

@@ -54,16 +54,16 @@ const setStyleToBoatLayer = (key, zIndex) => {
type: 'interval', type: 'interval',
stops: [ stops: [
[ 5, 5 ], [ 5, 5 ],
[ 10, 10 ], [ 10, 10 ]
[ 11, 0 ] // [ 11, 0 ]
] ]
}, },
markerHeight: { markerHeight: {
type: 'interval', type: 'interval',
stops: [ stops: [
[ 5, 10 ], [ 5, 10 ],
[ 10, 20 ], [ 10, 20 ]
[ 11, 0 ] // [ 11, 0 ]
] ]
}, },
markerFill: { markerFill: {

View File

@@ -2,7 +2,8 @@ import { getAssetsFile } from '@/utils/common'
// 底图配置 // 底图配置
const baseLayerConfig = { const baseLayerConfig = {
baseConfig: { baseConfig: {
satellite: [ 'tdt_image', 'tdt_cia' ], // satellite: [ 'tdt_image', 'tdt_cia' ],
satellite: [ 'tdt_image' ],
sea: [ 'sea' ], sea: [ 'sea' ],
light: [ 'light' ], light: [ 'light' ],
dark: [ 'tdt_ter', 'tdt_tbo', 'tdt_cta' ] dark: [ 'tdt_ter', 'tdt_tbo', 'tdt_cta' ]
@@ -39,7 +40,8 @@ const baseLayerConfig = {
maxAvailableZoom: 18, maxAvailableZoom: 18,
subdomains: [ '0', '1', '2', '3', '4', '5', '6', '7' ], subdomains: [ '0', '1', '2', '3', '4', '5', '6', '7' ],
urlTemplate: urlTemplate:
'https://inner.qdlimap.cn:9443/gisAssistant/wmts/grid_tile/tianditu/img_w/{z}/{y}/{x}' 'http://198.16.74.211:5000/{z}/{x}/{y}.png'
// 'https://inner.qdlimap.cn:9443/gisAssistant/wmts/grid_tile/tianditu/img_w/{z}/{y}/{x}'
}, },
tdt_tbo: { tdt_tbo: {
max: 18, max: 18,

View File

@@ -1,5 +1,5 @@
<template> <template>
<DialogComponent @mousedown="drag" :style="{ resize: 'both', overflow: 'auto' }" v-if="visible && option[type]" :title="option[type].title" :width="type==='_UAV' ? 1800:395" :draggable="true" :modal="false" @close="close"> <DialogComponent @mousedown="drag" @resize="handleResize" :style="{ resize: 'both', overflow: 'auto' }" v-if="visible && option[type]" :title="option[type].title" :width="type==='_UAV' ? 1800:395" :draggable="true" :modal="false" @close="close">
<component :is="option[type].component" ref="component"/> <component :is="option[type].component" ref="component"/>
</DialogComponent> </DialogComponent>
</template> </template>
@@ -11,7 +11,7 @@ import MonitorComponent from './monitor.vue'
import UAVComponent from './uav.vue' import UAVComponent from './uav.vue'
import MeteorologyComponent from './meteorology.vue' import MeteorologyComponent from './meteorology.vue'
import useMapStore from '@/store/modules/map' import useMapStore from '@/store/modules/map'
import { dragEvent } from '@/utils/common' import { dragEvent, resizeEvent } from '@/utils/common'
const mapStore = useMapStore() const mapStore = useMapStore()
@@ -43,12 +43,22 @@ const close = () => {
* *
*/ */
const drag = (e) => { const drag = (e) => {
if(e.target.className.includes('el-dialog-title')) {
dragEvent(e, 'el-dialog-title', () => { dragEvent(e, 'el-dialog-title', () => {
if(component.value.HikCCTV) { if(component.value.HikCCTV) {
component.value.HikCCTV.initResize(false) component.value.HikCCTV.initResize(false)
} }
}) })
}else{
resizeEvent(e, 'el-dialog', () => {
if(component.value?.HikCCTV) {
component.value.HikCCTV.initResize()
} }
})
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -169,7 +169,8 @@ defineExpose({
} }
} }
.monitor-cctv{ .monitor-cctv{
height: 289px; min-height: 289px;
width: 100%; width: 100%;
height: -webkit-fill-available;
} }
</style>=> </style>=>

View File

@@ -205,10 +205,8 @@ const handleExitServo = () => {
const handleTrack = () => { const handleTrack = () => {
globalMap = GlobalMap.instance globalMap = GlobalMap.instance
findAISPointPositionByMmsi({ mmsi: data.value.terminalCode }).then(res => { findAISPointPositionByMmsi({ mmsi: data.value.terminalCode }).then(res => {
if (res.success) { const arr = res.data[data.value.terminalCode]
const arr = res.result[data.value.terminalCode]
new ShipPathInMap(globalMap.map, globalMap.map.getLayer('track'), formatTrackData(arr)) new ShipPathInMap(globalMap.map, globalMap.map.getLayer('track'), formatTrackData(arr))
}
}).finally(() => { }).finally(() => {
mapStore.updateWindowInfo(false) mapStore.updateWindowInfo(false)
}) })

View File

@@ -308,7 +308,7 @@ export default {
//列表选项在下方 //列表选项在下方
this.width = document.getElementsByClassName( this.width = document.getElementsByClassName(
this.videoWindowClassName this.videoWindowClassName
)[0].scrollWidth; )[0].clientWidth;
var btnHeight = 0; var btnHeight = 0;
if (document.getElementsByClassName("playBtn").length > 0) { if (document.getElementsByClassName("playBtn").length > 0) {
btnHeight = document.getElementsByClassName("playBtn")[0].clientHeight; btnHeight = document.getElementsByClassName("playBtn")[0].clientHeight;

View File

@@ -296,13 +296,13 @@ const destroy = () => {
const windowChange = () => { const windowChange = () => {
// 列表选项在下方 // 列表选项在下方
width = document.getElementsByClassName(`video-window${props.id}`)[0].scrollWidth width = document.getElementsByClassName(`video-window${props.id}`)[0].clientWidth
let btnHeight = 0 let btnHeight = 0
if (document.getElementsByClassName('playBtn').length > 0) { if (document.getElementsByClassName('playBtn').length > 0) {
btnHeight = document.getElementsByClassName('playBtn')[0].clientHeight btnHeight = document.getElementsByClassName('playBtn')[0].clientHeight
height = document.getElementsByClassName(`video-window${props.id}`)[0].scrollHeight - btnHeight - 10 height = document.getElementsByClassName(`video-window${props.id}`)[0].scrollHeight - btnHeight - 10
} else { } else {
height = document.getElementsByClassName(`video-window${props.id}`)[0].scrollHeight height = document.getElementsByClassName(`video-window${props.id}`)[0].clientHeight
} }
if (document.getElementById(`playWnd${props.id}`)) { if (document.getElementById(`playWnd${props.id}`)) {
document.getElementById(`playWnd${props.id}`).style.height = `${height}px` document.getElementById(`playWnd${props.id}`).style.height = `${height}px`

View File

@@ -26,8 +26,13 @@ const useMapStore = defineStore(
level: 1, level: 1,
data: {} data: {}
}, },
dialogVisible: { dialog: {
visible: false,
type: '' // 弹窗类型 alarm/CCTV/UAV type: '' // 弹窗类型 alarm/CCTV/UAV
},
// 无人机信息
uavs: {
data: {}
} }
}), }),
actions: { actions: {
@@ -51,8 +56,13 @@ const useMapStore = defineStore(
this.hik.level = level this.hik.level = level
this.hik.data = data this.hik.data = data
}, },
updateDialog(type) { updateDialog(option) {
this.dialogVisible.type = type const { visible = false, type = '' } = option
this.dialog.visible = visible
this.dialog.type = type
},
updateUavData(option) {
this.uavs.data = option
} }
} }
}) })

View File

@@ -191,6 +191,71 @@ export function dragEvent(e, className, moving, moveEnd) {
} }
} }
} }
export function resizeEvent(e, className, resizing, resizeEnd) {
if (e.target.nodeName === 'INPUT' || e.target.nodeName === 'TEXTAREA' || e.target.nodeName === 'svg' || e.target.nodeName === 'path') {
return
}
if (className && !e.target.className.includes(className)) {
return
}
const dialogElement = e.target.closest('.el-dialog') || e.target // 获取对话框元素
if (!dialogElement) {
return
}
const startX = e.clientX
const startY = e.clientY
const startWidth = parseInt(document.defaultView.getComputedStyle(dialogElement).width, 10)
const startHeight = parseInt(document.defaultView.getComputedStyle(dialogElement).height, 10)
// 防止文本在拖拽过程中被选中
document.body.style.userSelect = 'none'
document.onmousemove = (e) => {
const newWidth = startWidth + (e.clientX - startX)
const newHeight = startHeight + (e.clientY - startY)
// 设置最小宽度和高度限制
const minWidth = 200
const minHeight = 150
const width = Math.max(newWidth, minWidth)
const height = Math.max(newHeight, minHeight)
dialogElement.style.width = `${width}px`
dialogElement.style.height = `${height}px`
// 同时调整 el-dialog__body 的尺寸
const dialogBody = dialogElement.querySelector('.el-dialog__body')
if (dialogBody) {
// 计算头部和底部的高度(通常为固定值)
const dialogHeader = dialogElement.querySelector('.el-dialog__header')
const dialogFooter = dialogElement.querySelector('.el-dialog__footer')
let headerHeight = dialogHeader ? dialogHeader.offsetHeight : 56 // 默认头部高度
let footerHeight = dialogFooter ? dialogFooter.offsetHeight : 0 // 默认底部高度
const bodyHeight = height - headerHeight - footerHeight - 20 // 20px 为上下边距
dialogBody.style.height = `${bodyHeight}px`
dialogBody.style.width = 'calc(100% - 20px)' // 减去左右边距
}
if (resizing) {
resizing({ width, height })
}
}
document.onmouseup = (e) => {
// 恢复文本选择功能
document.body.style.userSelect = ''
document.onmousemove = null
document.onmouseup = null
if (resizeEnd) {
resizeEnd()
}
}
}
/** /**
* @param value 将十进制转为度分秒 * @param value 将十进制转为度分秒
* @returns { degrees: number, minutes: number, seconds: number } degrees:度 minutes:分 seconds:秒 * @returns { degrees: number, minutes: number, seconds: number } degrees:度 minutes:分 seconds:秒

View File

@@ -21,7 +21,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分 // axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: import.meta.env.VITE_APP_BASE_URL, baseURL: import.meta.env.VITE_APP_BASE_URL,
// 超时 // 超时
timeout: 10000 timeout: 20000
}) })
// request拦截器 // request拦截器
@@ -102,7 +102,7 @@ service.interceptors.response.use(res => {
} else if (code === 601) { } else if (code === 601) {
ElMessage({ message: msg, type: 'warning' }) ElMessage({ message: msg, type: 'warning' })
return Promise.reject(new Error(msg)) return Promise.reject(new Error(msg))
} else if (code !== 200) { } else if (code != 200) {
ElNotification.error({ title: msg }) ElNotification.error({ title: msg })
return Promise.reject('error') return Promise.reject('error')
} }

View File

@@ -9,7 +9,7 @@ import useMapStore from '@/store/modules/map'
const mapStore = useMapStore() const mapStore = useMapStore()
const handle = (type) => { const handle = (type) => {
mapStore.updateDialog(type) mapStore.updateDialog({ visible: true, type })
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@@ -111,7 +111,7 @@ const toggle = (index) => {
const handle = (type, item) => { const handle = (type, item) => {
switch (type) { switch (type) {
case 'more': case 'more':
mapStore.updateDialog('alarm') mapStore.updateDialog({ visible: true, type: 'alarm' })
break break
default: default:
break break

View File

@@ -7,7 +7,6 @@
@click="handle(index)">{{item}}</div> @click="handle(index)">{{item}}</div>
</div> </div>
<!-- <div class="flv-container"><FlvPlayerComponent :url="uavDialog.url"/></div> --> <!-- <div class="flv-container"><FlvPlayerComponent :url="uavDialog.url"/></div> -->
<video class="flv-container" :src="getAssetsFile('alarm/mock2.mp4')" autoplay controls muted loop></video>
</div> </div>
</template> </template>
<script setup> <script setup>

File diff suppressed because one or more lines are too long

View File

@@ -1,389 +0,0 @@
<template>
<div class="device-wrapper">
<div :class="['device-content', isFold ? 'fold' : '']">
<div class="tab-wrapper">
<div :class="['tab-button', current === index ? 'active' : '']" v-for="(item, index) in tabs" :key="index"
@click="toggleDevice(index)">{{ item.label }}</div>
</div>
<div class="list-wrapper">
<template v-if="current === 0">
<el-tree :data="tableData" ref="treeRef" :props="{ label: 'videoName', children: 'children' }" node-key="id"
@node-click="handleNodeClick">
<template v-slot="{ node }">
<img src="@/assets/images/livePreview/icon-monitor.png" alt="">
<span>{{ node.label }}</span>
</template>
</el-tree>
</template>
<template v-else>
<div class="list-item" v-for="item in tableData" :key="item.id" @click="handleDevice(item)">
<span>{{ item.videoName }}</span>
</div>
</template>
</div>
</div>
<div class="fold-button" @click="toggleFold">
<template v-if="isFold">
<span>展开</span>
<img src="@/assets/images/drone/icon-arrow-right.png" alt="">
</template>
<template v-else>
<span>收起</span>
<img src="@/assets/images/drone/icon-arrow-left.png" alt="">
</template>
</div>
</div>
</template>
<script setup>
import { ref, reactive, watch } from 'vue'
import { videoCameraFindPage, findUavPage, findEnvPage } from '@/api/device.js'
import { Message } from '@element-plus/icons-vue'
const preview = reactive({
visible: false,
codes: []
})
const current = ref(1)
const isFold = ref(false)
const tabs = [
{
label: '监控设备',
value: 'monitor'
},
{
label: '无人机设备',
value: 'plane'
},
{
label: '环境监测设备',
value: 'environment'
},
{
label: '感知设备',
value: 'AIS'
}
]
const tableData = ref([])
const initMonitor = () => {
const params = new FormData()
params.append('pageNo', 1)
params.append('pageSize', 999)
videoCameraFindPage(params).then(res => {
if (res.success) {
const data = res.result.records
const groupedData = {}
data.forEach(item => {
const belong = item.videoBelong
if (!groupedData[belong]) {
groupedData[belong] = []
}
groupedData[belong].push(item)
})
// 转换为树形结构
const result = Object.keys(groupedData).map(belong => {
const children = groupedData[belong]
if (children.length === 1) {
// 只有一个子元素,直接返回该子元素
return children[0]
}
// 有多个子元素,返回分组节点
return {
videoName: belong,
children: children
}
})
tableData.value = result
} else {
Message.error(res.msg || '查询失败!')
}
})
}
const initPlane = () => {
const params = new FormData()
params.append('pageNo', 1)
params.append('pageSize', 999)
findUavPage(params).then(res => {
if (res.success) {
tableData.value = res.result.records
} else {
Message.error(res.msg || '查询失败!')
}
})
}
const initEnvironment = () => {
const params = new FormData()
params.append('pageNo', 1)
params.append('pageSize', 999)
params.append('videoType', '航道流速设备,气象观测站设备')
findEnvPage(params).then(res => {
if (res.success) {
tableData.value = res.result.records
} else {
Message.error(res.msg || '查询失败!')
}
})
}
const initAIS = () => {
const params = new FormData()
params.append('pageNo', 1)
params.append('pageSize', 999)
params.append('videoType', 'AIS基站设备')
findEnvPage(params).then(res => {
if (res.success) {
tableData.value = res.result.records
} else {
Message.error(res.msg || '查询失败!')
}
})
}
const initMap = {
'monitor': initMonitor,
'plane': initPlane,
'environment': initEnvironment,
'AIS': initAIS
}
const initData = () => {
tableData.value = []
const tabValue = tabs[current.value].value
const initFunction = initMap[tabValue]
if (initFunction) {
try {
initFunction()
} catch (error) {
console.error(error)
}
}
}
const toggleDevice = (index) => {
current.value = index
}
const handleDevice = (item) => {
preview.visible = true
}
const handleNodeClick = (node) => {
if (!node.children || node.children.length === 0) {
// 雷云一体机一个视频
if (node.videoName.indexOf('雷云') !== -1) {
preview.codes = ['0f69d447002a40629e15f8a251fc46fa']
} else {
preview.codes = ['b7f9fff8e3504e419cb2f5fad5b2845c', '9b49bdc8988e430baad9ca727fed545a', 'e0a42cd6cbf940a6a4fc0aa789d43a04']
}
preview.visible = true
}
}
const toggleFold = () => {
isFold.value = !isFold.value
}
watch(() => current.value, () => {
initData()
}, { immediate: true })
</script>
<style lang="scss" scoped>
.device-wrapper {
position: absolute;
left: 45px;
top: 89px;
bottom: 411px;
.device-content {
width: 401px;
height: 100%;
padding: 10px;
background: linear-gradient( 90deg, #0C1929 0%, rgba(12,25,41,0.6) 100%);
border-radius: 0px 0px 0px 0px;
border: 1px solid;
border-image: linear-gradient(270deg, rgba(42, 159, 255, 0.2), rgba(42, 159, 255, 0.8)) 1 1;
box-sizing: border-box;
display: flex;
gap: 6px;
opacity: 1;
visibility: visible;
transition: all 0.3s ease-in-out;
&.fold {
width: 0;
overflow: hidden;
opacity: 0;
visibility: hidden;
}
.tab-wrapper {
width: 28px;
height: 100%;
.tab-button {
position: relative;
width: 100%;
height: 25%;
// height: 130px;
color: #FFFFFF;
font-size: 12px;
text-align: center;
line-height: 28px;
writing-mode: vertical-rl;
text-orientation: upright;
background-color: #2061bd;
border-radius: 3px 0 0 28px;
cursor: pointer;
margin-bottom: -7px;
opacity: .6;
&:not(:first-of-type) {
border-radius: 0 28px 0 28px;
&::before {
content: '';
display: block;
width: 28px;
height: 28px;
position: absolute;
background: radial-gradient(circle at 28px 3px, transparent 28px, #2162bd 28px);
top: -24px;
left: 0;
}
}
&::after {
content: '';
display: block;
width: 28px;
height: 28px;
position: absolute;
background: radial-gradient(circle at 0px 25px, transparent 28px, #2061bd 28px);
bottom: -24px;
right: 0;
}
&.active {
background-color: #2061BD;
opacity: 1;
}
}
}
.list-wrapper {
flex: 1;
display: flex;
flex-direction: column;
gap: 4px;
overflow: auto;
background: transparent;
.list-item {
width: 100%;
height: 44px;
padding-left: 20px;
background-color: rgba(24, 128, 254, 0.3);
border-radius: 3px 3px 3px 3px;
font-size: 14px;
color: #E1F1FAFF;
display: flex;
align-items: center;
box-sizing: border-box;
border: 1px solid rgba(24, 128, 254, 0);
flex-shrink: 0;
cursor: pointer;
&::before {
content: '';
display: inline-block;
width: 16px;
height: 16px;
background-image: url('@/assets/images/livePreview/icon-monitor.png');
background-size: 100% 100%;
background-repeat: no-repeat;
margin-right: 10px;
}
&.active,
&:hover {
color: #0EF8F8FF;
background-color: rgba(24, 128, 254, 0.5);
border: 1px solid #5FA4FF;
&::before {
background-image: url('@/assets/images/livePreview/icon-monitor-active.png');
}
}
}
.el-tree {
background: transparent;
}
:deep(.el-tree-node) {
width: 100%;
margin-bottom: 4px;
background-color: rgba(24, 128, 254, 0.3);
border-radius: 3px 3px 3px 3px;
font-size: 14px;
align-items: center;
box-sizing: border-box;
border: 1px solid rgba(24, 128, 254, 0);
flex-shrink: 0;
cursor: pointer;
.el-tree-node__content {
height: 44px;
border: 1px solid transparent;
box-sizing: border-box;
}
img {
margin-right: 10px;
}
span {
color: #E1F1FAFF;
}
&:focus>.el-tree-node__content,
.el-tree-node__content:hover {
color: #0EF8F8FF;
background-color: rgba(24, 128, 254, 0.5);
border: 1px solid #5FA4FF;
&::before {
background-image: url('@/assets/images/livePreview/icon-monitor-active.png');
}
}
}
}
}
.fold-button {
position: absolute;
right: -17px;
top: 0;
width: 17px;
height: 82px;
background-image: url('@/assets/images/drone/subscript-background-vertical.png');
background-size: 100% 100%;
background-repeat: no-repeat;
color: #FFFFFFCC;
font-size: 12px;
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
visibility: visible;
}
}
</style>

View File

@@ -1,16 +0,0 @@
<template>
<div>
<DeviceComponent/>
<ControlComponent/>
</div>
</template>
<script setup>
import DeviceComponent from './device.vue'
import ControlComponent from './control.vue'
</script>
<style lang="scss" scoped>
</style>

View File

@@ -90,7 +90,7 @@ import FilterCom from '@/components/Filter/index.vue'
import { nextTick, onBeforeUnmount, onMounted, onUnmounted, reactive, ref } from 'vue' import { nextTick, onBeforeUnmount, onMounted, onUnmounted, reactive, ref } from 'vue'
import TableComponent from '@/components/Table/index2.vue' import TableComponent from '@/components/Table/index2.vue'
import TitleComponent from '@/components/Title/index.vue' import TitleComponent from '@/components/Title/index.vue'
// import { videoIdentificationPage, removeVideoIdentification } from '@/api/identification.js' import { videoIdentificationPage, removeVideoIdentification } from '@/api/identification.js'
import HikPlayerBackCom from '@/components/Player/HikPlayer-back.vue' import HikPlayerBackCom from '@/components/Player/HikPlayer-back.vue'
import { dayjs, ElMessage, ElMessageBox } from 'element-plus' import { dayjs, ElMessage, ElMessageBox } from 'element-plus'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
@@ -337,20 +337,20 @@ const edit = reactive({
const initData = () => { const initData = () => {
loading.value = true loading.value = true
const params = new FormData() // const params = new FormData()
const obj = { // const obj = {
...model, // ...model,
// illegalType: illegalType.value.join(','), // // illegalType: illegalType.value.join(','),
illegalType: illegalType.value, // illegalType: illegalType.value,
beginTime: model.time && model.time[0] ? model.time[0] : '', // beginTime: model.time && model.time[0] ? model.time[0] : '',
endTime: model.time && model.time[1] ? model.time[1] : '', // endTime: model.time && model.time[1] ? model.time[1] : '',
pageNo: pagination.current, // pageNo: pagination.current,
pageSize: pagination.size // pageSize: pagination.size
} // }
delete obj.time // delete obj.time
Object.keys(obj).forEach((key) => { // Object.keys(obj).forEach((key) => {
params.append(key, obj[key]) // params.append(key, obj[key])
}) // })
// videoIdentificationPage(params).then(res => { // videoIdentificationPage(params).then(res => {
// if (res.success) { // if (res.success) {
// tableData.value = res.result.records.map(i => { // tableData.value = res.result.records.map(i => {
@@ -368,7 +368,7 @@ const initData = () => {
// // 有识别记录数据,默认查看第一条详情 // // 有识别记录数据,默认查看第一条详情
// handle('check', res.result.total > 0 ? tableData.value[0] : {}) // handle('check', res.result.total > 0 ? tableData.value[0] : {})
// } else { // } else {
// Message.error(res.msg || '查询失败!') // ElMessage.error(res.msg || '查询失败!')
// } // }
// }).finally(() => { // }).finally(() => {
loading.value = false loading.value = false
@@ -464,7 +464,6 @@ const handle = (type, data) => {
} }
case 'check': { case 'check': {
closeVideo() closeVideo()
console.log(data, 'datatata')
detail.data = [ { ...data, detail.data = [ { ...data,
videoName: '', videoName: '',
trackerPicPath: data.trackerPicPath.split(',') trackerPicPath: data.trackerPicPath.split(',')
@@ -497,10 +496,10 @@ const handle = (type, data) => {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// removeVideoIdentification({ id: data.id }).then(() => { removeVideoIdentification({ id: data.id }).then(() => {
// ElMessage.success('删除成功') ElMessage.success('删除成功')
// initData() initData()
// }) })
}) })
break break
default: default:
@@ -538,6 +537,9 @@ onBeforeUnmount(() => {
closeVideo() closeVideo()
}) })
defineExpose({
appPlayer
})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.content-container{ .content-container{

View File

@@ -1,25 +1,44 @@
<template> <template>
<!-- 识别记录页面 --> <!-- 识别记录页面 -->
<DialogComponent :style="{ resize: 'both', overflow: 'auto' }" v-if="type === 'alarm'" title="识别记录" width="1800" :draggable="true" :modal="false" @close="close"> <DialogComponent @mousedown="drag" :style="{ resize: 'both', overflow: 'auto' }" title="识别记录" width="1800" :draggable="true" :modal="false" @close="close">
<AlarmCom/> <AlarmCom ref="alarm"/>
</DialogComponent> </DialogComponent>
</template> </template>
<script setup> <script setup>
import { computed } from 'vue' import { computed, ref } from 'vue'
import DialogComponent from '@/components/Dialog/screen.vue' import DialogComponent from '@/components/Dialog/screen.vue'
import AlarmCom from './alarm/index.vue' import AlarmCom from './alarm/index.vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import useMapStore from '@/store/modules/map' import useMapStore from '@/store/modules/map'
import { dragEvent, resizeEvent } from '@/utils/common'
const mapStore = useMapStore() const mapStore = useMapStore()
const router = useRouter() const router = useRouter()
const type = computed(() => mapStore.dialogVisible.type) const alarm = ref(null)
const close = () => { const close = () => {
mapStore.updateDialog('') mapStore.updateDialog(false)
router.back() }
/**
* 拖拽事件
* @param e
*
*/
const drag = (e) => {
if(e.target.className.includes('el-dialog-title')) {
dragEvent(e, 'el-dialog-title', () => {
if(alarm.value.appPlayer) {
alarm.value.appPlayer[0].onResize(false)
}
})
}else{
resizeEvent(e, 'el-dialog', () => {
if(alarm.value?.appPlayer) {
alarm.value.appPlayer[0].onResize()
}
})
} }
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.el-tabs { .el-tabs {

View File

@@ -7,8 +7,8 @@
</div> </div>
<Alarm/> <Alarm/>
<LargeModelCom v-if="largeModel"/> <LargeModelCom v-if="largeModel"/>
<IdentificationCom/> <IdentificationCom v-if="visible && type === 'alarm'"/>
<WallCom/> <WallCom v-if="visible && (type==='CCTV'|| type==='UAV')"/>
</div> </div>
</template> </template>
<script setup> <script setup>
@@ -25,6 +25,8 @@ const mapStore = useMapStore()
const largeModel = computed(() => { const largeModel = computed(() => {
return mapStore.largeModel return mapStore.largeModel
}) })
const visible = computed(() => mapStore.dialog.visible)
const type = computed(() => mapStore.dialog.type)
window.name = 'business_window' window.name = 'business_window'
</script> </script>
@@ -203,7 +205,7 @@ window.name = 'business_window'
position: absolute; position: absolute;
right: 7px; right: 7px;
i:not(.el-select__clear) { i:not(.el-select__clear) {
background: url("@/assets/images/common/icon_suffix.png") center center no-repeat; // background: url("@/assets/images/common/icon_suffix.png") center center no-repeat;
background-size: 8px 6px; background-size: 8px 6px;
width: 8px; width: 8px;
height: 6px; height: 6px;
@@ -231,7 +233,7 @@ window.name = 'business_window'
right: 7px; right: 7px;
top: 13px; top: 13px;
.el-input__suffix-inner{ .el-input__suffix-inner{
background: url("@/assets/images/common/icon_suffix.png") center center no-repeat; // background: url("@/assets/images/common/icon_suffix.png") center center no-repeat;
background-size: 8px 6px; background-size: 8px 6px;
width: 8px; width: 8px;
height: 6px; height: 6px;

View File

@@ -22,7 +22,7 @@
<script setup> <script setup>
import { nextTick, onMounted, onUnmounted, ref } from 'vue' import { nextTick, onMounted, onUnmounted, ref } from 'vue'
// import { getHistory } from '@/api/model' import { getHistory } from '@/api/model'
import axios from 'axios' import axios from 'axios'
const emit = defineEmits([ 'changeDialog' ]) const emit = defineEmits([ 'changeDialog' ])
@@ -34,15 +34,15 @@ const show = ref(true)
let resizeObserver = null let resizeObserver = null
const initList = () => { const initList = () => {
// axios.get(getHistory, {}, { axios.get(getHistory, {}, {
// headers: { headers: {
// 'Content-Type': 'application/json' 'Content-Type': 'application/json'
// } }
// }).then((res) => { }).then((res) => {
// if(res.status === 200) { if(res.status === 200) {
// list.value = res.data.reverse() list.value = res.data.reverse()
// } }
// }) })
} }
const toggleExpand = () => { const toggleExpand = () => {
collapse.value = !collapse.value collapse.value = !collapse.value

View File

@@ -51,7 +51,7 @@ import { initResizeDetection, cleanupAndRestoreHik
import HikPlayerComponent from '@/components/Player/HikPlayer.vue' import HikPlayerComponent from '@/components/Player/HikPlayer.vue'
import FlvPlayerComponent from '@/components/FlvPlayer/index.vue' import FlvPlayerComponent from '@/components/FlvPlayer/index.vue'
import { dragEvent } from '@/utils/common' import { dragEvent } from '@/utils/common'
// import { getVideoStream, doStartOrStopUavAlgorithm } from '@/api/uav' import { getVideoStream, doStartOrStopUavAlgorithm } from '@/api/uav'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import useMapStore from '@/store/modules/map' import useMapStore from '@/store/modules/map'
@@ -123,13 +123,13 @@ const openUav = (data) => {
sn: data.droneSn, sn: data.droneSn,
enable_orc: false enable_orc: false
} }
// getVideoStream(params).then(res => { getVideoStream(params).then(res => {
// if(res.success) { if(res.success) {
// setTimeout(() => { setTimeout(() => {
// uavDialog.url = res.result.httpUrl uavDialog.url = res.result.httpUrl
// }, 10000) }, 10000)
// } }
// }) })
}, 20000) }, 20000)
} }
// 开启/关闭算法 // 开启/关闭算法
@@ -150,14 +150,14 @@ const handleAlgorithm = () => {
status: 'start', status: 'start',
sn: uavData.value.droneSn sn: uavData.value.droneSn
} }
// doStartOrStopUavAlgorithm(params).then(res => { doStartOrStopUavAlgorithm(params).then(res => {
// if(res.success) { if(res.success) {
// algorithmStatus.value = true algorithmStatus.value = true
// ElMessage.success('算法已开启') ElMessage.success('算法已开启')
// }else { }else {
// ElMessage.error(res.result) ElMessage.error(res.result)
// } }
// }) })
} }
} }
// 算法关闭 // 算法关闭
@@ -166,15 +166,15 @@ const closeAlgorithm = () => {
status: 'stop', status: 'stop',
sn: uavData.value.droneSn sn: uavData.value.droneSn
} }
// doStartOrStopUavAlgorithm(params).then(res => { doStartOrStopUavAlgorithm(params).then(res => {
// if(res.success) { if(res.success) {
// algorithmStatus.value = false algorithmStatus.value = false
// algorithmValue.value = [] algorithmValue.value = []
// ElMessage.success(res.result) ElMessage.success(res.result)
// }else { }else {
// ElMessage.error(res.result) ElMessage.error(res.result)
// } }
// }) })
} }
/** /**
* 拖拽事件 * 拖拽事件

View File

@@ -41,10 +41,10 @@
<script setup> <script setup>
import { nextTick, onMounted, onUnmounted, ref } from 'vue' import { nextTick, onMounted, onUnmounted, ref } from 'vue'
import { marked } from 'marked' import { marked } from 'marked'
// import { useStore } from 'vuex' import GlobalMap from '@/components/Map/js/GlobalMap.js'
import GlobalMap from '@/components/map/js/GlobalMap.js' import useMapStore from '@/store/modules/map'
// const store = useStore() const mapStore = useMapStore()
const emit = defineEmits([ 'openVideo', 'openUav' ]) const emit = defineEmits([ 'openVideo', 'openUav' ])
const videoArr = ref([]) const videoArr = ref([])
const uavArr = ref([]) const uavArr = ref([])
@@ -193,29 +193,7 @@ return ''
// 监控视频查看 // 监控视频查看
const openVideoHandler = (index) => { const openVideoHandler = (index) => {
const data = videoArr.value[index] const data = videoArr.value[index]
// 雷云一体机一个视频
if(data.videoName.indexOf('雷云') !== -1) {
const videos = videoArr.value.filter(i => i.videoName.indexOf('雷云') !== -1).sort((a, b) => {
const index1 = a.videoName[a.videoName.length - 1]
const index2 = b.videoName[b.videoName.length - 1]
return index1 - index2
})
codes.value = [ videos[0].videoCode ]
}else{
if(data.videoName.indexOf('球机') !== -1) {
const videos = videoArr.value.filter(i => i.videoName.indexOf('球机') !== -1).sort((a, b) => {
const index1 = a.videoName[a.videoName.length - 1]
const index2 = b.videoName[b.videoName.length - 1]
return index1 - index2
})
codes.value = videos.map((i, index) => {
return i.previewUrl
})
}else{
codes.value = [ data.videoCode ] codes.value = [ data.videoCode ]
}
}
nextTick(() => { nextTick(() => {
setTimeout(() => { setTimeout(() => {
visible.value = true visible.value = true
@@ -235,17 +213,17 @@ const openImageHandle = (url) => {
// 开启无人机控制 // 开启无人机控制
const openUavHandler = (index) => { const openUavHandler = (index) => {
const data = uavArr.value[index] const data = uavArr.value[index]
// store.commit('mapStore/updateUavData', { ...data }) mapStore.updateUavData({ ...data })
emit('openUav', { ...data }) emit('openUav', { ...data })
} }
// 渔船追踪 // 渔船追踪
const openTrawlerHandler = (index) => { const openTrawlerHandler = (index) => {
const data = boatArr.value[index] const data = boatArr.value[index]
// store.commit('mapStore/updateWindowInfo', { mapStore.updateWindowInfo({
// visible: true, visible: true,
// type: '_trawler_dynamic', type: '_trawler_dynamic',
// data: { ...data } data: { ...data }
// }) })
GlobalMap.instance.map.animateTo( GlobalMap.instance.map.animateTo(
{ {
zoom: 20, zoom: 20,

View File

@@ -92,7 +92,8 @@ const handleNodeClick = (node) => {
} }
changeGridType(4) changeGridType(4)
defineExpose({ defineExpose({
handleNodeClick handleNodeClick,
videoPreview
}) })
onUnmounted(() => { onUnmounted(() => {
if(videoPreview.value) { if(videoPreview.value) {
@@ -105,7 +106,7 @@ onUnmounted(() => {
<style lang="scss" scoped> <style lang="scss" scoped>
.wall-wrapper { .wall-wrapper {
height: 812px; height: calc(100% - 36px);
position: relative; position: relative;
width: 80%; width: 80%;
.treeTool{ .treeTool{
@@ -141,7 +142,7 @@ onUnmounted(() => {
justify-content: flex-end; justify-content: flex-end;
} }
.con_right{ .con_right{
height: 100%; height: calc(100% - 36px);
padding: 5px; padding: 5px;
width: 100%; width: 100%;
display: flex; display: flex;

View File

@@ -1,6 +1,6 @@
<template> <template>
<!-- 电视墙页面 --> <!-- 电视墙页面 -->
<DialogComponent class="wall-dialog" :style="{ resize: 'both', overflow: 'auto' }" v-if="type==='CCTV'|| type==='UAV'" :title="title" width="1800" :draggable="true" :modal="false" @close="close"> <DialogComponent @mousedown="drag" class="wall-dialog" :style="{ resize: 'both', overflow: 'auto' }" :title="title" width="1800" :draggable="true" :modal="false" @close="close">
<div class="wall-container"> <div class="wall-container">
<TreeCom ref="Tree" @handle="handle"/> <TreeCom ref="Tree" @handle="handle"/>
<GridCom ref="Grid"/> <GridCom ref="Grid"/>
@@ -14,10 +14,11 @@ import TreeCom from './tree.vue'
import GridCom from './grid.vue' import GridCom from './grid.vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import useMapStore from '@/store/modules/map' import useMapStore from '@/store/modules/map'
import { dragEvent, resizeEvent } from '@/utils/common'
const mapStore = useMapStore() const mapStore = useMapStore()
const router = useRouter() const router = useRouter()
const type = computed(() => mapStore.dialogVisible.type) const type = computed(() => mapStore.dialog.type)
const Tree = ref(null) const Tree = ref(null)
const Grid = ref(null) const Grid = ref(null)
@@ -31,8 +32,7 @@ const handle = (node) => {
Grid.value.handleNodeClick(node) Grid.value.handleNodeClick(node)
} }
const close = () => { const close = () => {
mapStore.updateDialog('') mapStore.updateDialog(false)
router.back()
} }
watch(() => type.value, () => { watch(() => type.value, () => {
if(type.value) { if(type.value) {
@@ -41,10 +41,43 @@ watch(() => type.value, () => {
}) })
} }
}, { immediate: true })
/**
* 拖拽事件
* @param e
*
*/
const drag = (e) => {
if(e.target.className.includes('el-dialog-title')) {
dragEvent(e, 'el-dialog-title', () => {
if(Grid.value.videoPreview) {
Grid.value.videoPreview.forEach(i => {
i.initResize(false)
}) })
}
})
}else{
resizeEvent(e, 'el-dialog', () => {
if(Grid.value?.videoPreview) {
Grid.value.videoPreview.forEach(i => {
i.initResize()
})
}
})
}
}
</script> </script>
<style scoped lang="scss"> <style lang="scss">
.wall-dialog{
height: 900px;
.el-dialog__body{
height: calc(100% - 56px) !important;
}
}
.wall-container{ .wall-container{
display: flex; display: flex;
height: 100%;
} }
</style> </style>

View File

@@ -55,6 +55,9 @@ const refresh = (type) => {
} }
const handleNodeClick = (data, node) => { const handleNodeClick = (data, node) => {
if(data.status && data.status === 'offline') {
return false
}
if(!data.children || data.children.length === 0) { if(!data.children || data.children.length === 0) {
emit('handle', node.data) emit('handle', node.data)
} }
@@ -107,7 +110,7 @@ defineExpose({
border: 1px solid #5FA4FF; border: 1px solid #5FA4FF;
&::before { &::before {
background-image: url('@/assets/images/livePreview/icon-monitor-active.png'); // background-image: url('@/assets/images/livePreview/icon-monitor-active.png');
} }
&:has(.offline) { &:has(.offline) {
background-color: none; background-color: none;

View File

@@ -146,10 +146,11 @@ getCode()
color: #FFFFFF; color: #FFFFFF;
line-height: 46px; line-height: 46px;
letter-spacing: 8px; letter-spacing: 8px;
text-align: left; text-align: center;
position:absolute; position:absolute;
top: 108px; top: 108px;
z-index: 10; z-index: 10;
width: 766px;
} }
.title-line{ .title-line{
background-image: url('@/assets/images/login/icon-title-line.png'); background-image: url('@/assets/images/login/icon-title-line.png');