From 6a6ddba71a4d483fc762217575b9f8dcf4493596 Mon Sep 17 00:00:00 2001 From: zhangmj <1373657463@qq.com> Date: Thu, 25 Dec 2025 18:33:15 +0800 Subject: [PATCH] second commit --- .env.development | 6 +- .env.production | 4 +- src/api/identification.js | 132 ++++ src/api/login/index.js | 2 +- src/api/map/index.js | 5 +- src/api/uav.js | 52 ++ src/assets/images/common/icon-triangle.png | Bin 0 -> 760 bytes src/components/Map/index.vue | 80 ++- src/components/Map/lbtbox/boatTerminal.js | 8 +- src/components/Map/map-config.js | 6 +- src/components/Map/window/index.vue | 24 +- src/components/Map/window/monitor.vue | 3 +- src/components/Map/window/trawler.vue | 4 +- src/components/Player/HikPlayer-back.vue | 2 +- src/components/Player/HikPlayer.vue | 4 +- src/store/modules/map.js | 18 +- src/utils/common.js | 65 ++ src/utils/request.js | 4 +- src/views/business/alarm/device.vue | 2 +- src/views/business/alarm/list.vue | 2 +- src/views/business/alarm/monitor.vue | 1 - src/views/business/drone/control.vue | 665 ------------------ src/views/business/drone/device.vue | 389 ---------- src/views/business/drone/index.vue | 16 - .../business/identification/alarm/index.vue | 44 +- src/views/business/identification/index.vue | 33 +- src/views/business/index.vue | 10 +- src/views/business/largeModel/history.vue | 20 +- src/views/business/largeModel/index.vue | 50 +- src/views/business/largeModel/realDialog.vue | 42 +- src/views/business/wall/grid.vue | 7 +- src/views/business/wall/index.vue | 45 +- src/views/business/wall/tree.vue | 5 +- src/views/login/index.vue | 3 +- 34 files changed, 527 insertions(+), 1226 deletions(-) create mode 100644 src/api/identification.js create mode 100644 src/api/uav.js create mode 100644 src/assets/images/common/icon-triangle.png delete mode 100644 src/views/business/drone/control.vue delete mode 100644 src/views/business/drone/device.vue delete mode 100644 src/views/business/drone/index.vue diff --git a/.env.development b/.env.development index 1282570..b736588 100644 --- a/.env.development +++ b/.env.development @@ -3,8 +3,10 @@ NODE_ENV = 'development' # 渔船点位 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://119.167.138.11:7282/video-service' +# VITE_APP_BASE_URL = 'http://125.124.131.105:6811/api' +# 成彬本地 +VITE_APP_BASE_URL = 'http://100.95.157.241:6061/api' +# VITE_APP_BASE_URL = 'http://119.167.138.11:6061/video-service' # 智能体访问地址 # 宋凯忠本地 diff --git a/.env.production b/.env.production index 7e31766..0639041 100644 --- a/.env.production +++ b/.env.production @@ -3,9 +3,9 @@ NODE_ENV = 'production' # 渔船点位 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_APPKEY = '28273161' diff --git a/src/api/identification.js b/src/api/identification.js new file mode 100644 index 0000000..767c135 --- /dev/null +++ b/src/api/identification.js @@ -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' + }) +} \ No newline at end of file diff --git a/src/api/login/index.js b/src/api/login/index.js index 2bb95f9..442aca0 100644 --- a/src/api/login/index.js +++ b/src/api/login/index.js @@ -6,7 +6,7 @@ import request from '@/utils/request' */ export const login = (data) => { return request({ - url: '/validateLogin', + url: '/login', headers: { isToken: false, repeatSubmit: false diff --git a/src/api/map/index.js b/src/api/map/index.js index 29054b4..e04a9e5 100644 --- a/src/api/map/index.js +++ b/src/api/map/index.js @@ -18,9 +18,10 @@ export const findByCurrent = (data) => service({ */ export const findAISPointPositionByMmsi = (data) => { return service({ - url: '/boatData/findAISPointPositionByMmsi', + url: '/aisSolr/findAISPointPositionByMmsi', method: 'post', - data: data + data: data, + timeout: 60000 }) } diff --git a/src/api/uav.js b/src/api/uav.js new file mode 100644 index 0000000..4fbcf56 --- /dev/null +++ b/src/api/uav.js @@ -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' + } + }) +} \ No newline at end of file diff --git a/src/assets/images/common/icon-triangle.png b/src/assets/images/common/icon-triangle.png new file mode 100644 index 0000000000000000000000000000000000000000..e258c2c1c76fe5137d1d903ac928ffb7a0d59b49 GIT binary patch literal 760 zcmVn zDuXMwfjfzHo(pvX?O-e}aVGA!YvQBMoq*68oaZw!Bx$H{E6}1oO^L^?)c@XxfKZ>L z#IPj3!M1jKEx$ezxDTRZ`Qw%AFL8kg8^Im{9Yfh?y_)n^B~I1>$QP1Slyqap~% zdtw{8?lIJ#Vh9Mf#ejW}0ZBDc908$TgTL~ni6RNSG`*P6z)Ra=2pD|jYIIG2v{3|s z&zMGqqyJ3{FYV(BSbV}->^J@RAuw4Yroeb}puhXY(Hr?LR9)W^5L2*D4p1d*rSr@$~r{%9V!G<|&uJR$svGyr+qxEHV(BK)bm zU}^ii6|i`~d;V}jzb2J&OxBmUR9pYS&jaZ?L$7QXOyxk&Ic%*P_KH!rOgX!a`5uHyw} q00030|07BZMF0Q*21!IgR09AzNP%JZ>@acw0000 { id: item.id, symbol: $configs.getDevicePointSymbol('_monitor', { ...item, name: item.videoName }), properties: item, - zIndex: 1 + zIndex: 2 } ) marker.addTo(vector.monitor) drawSector('_monitor', [ item.longitude, item.latitude ], 5 * 1000, item.id, 30) 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 } }) }) } @@ -144,18 +167,46 @@ const addUAVToMap = () => { id: item.id, symbol: $configs.getDevicePointSymbol('_UAV', { ...item, name: item.videoName }), properties: item, - zIndex: 1 + zIndex: 2 } ) marker.addTo(vector.UAV) drawSector('_UAV', [ item.longitude, item.latitude ], 5 * 1000, item.id) 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 } }) }) } }) 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 sectorId = `sector_${type}${id}` @@ -171,7 +222,7 @@ const drawSector = (type, center, radius, id, angle) => { } let circle = new maptalks.Circle(center, radius, { - id: sectorId, + id: sectorId + '_circle', symbol: { lineColor: '#1CA8FF', lineWidth: 1, @@ -182,12 +233,14 @@ const drawSector = (type, center, radius, id, angle) => { }) if(angle) { let ellipse = new maptalks.Sector(center, radius - 1 * 1000, angle - 30, angle + 30, { + id: sectorId + '_ellipse', symbol: { lineColor: '#FF8D1C', polygonFill: '#ff8d1c29' } }) let line = new maptalks.Sector(center, radius + 1 * 1000, angle, angle, { + id: sectorId + '_line', symbol: { lineColor: '#FF8D1C', polygonFill: '#ff8d1c29', @@ -199,7 +252,8 @@ const drawSector = (type, center, radius, id, angle) => { vector['sectors' + type].addGeometry(circle) } // 添加到可视域图层 - vector['sectors' + type].hide() + changeSectorsInLayer('sectors' + type, false) + // vector['sectors' + type].hide() } /** * 叠加ais基站数据 @@ -219,7 +273,7 @@ const addAisStationToMap = () => { id: item.id, symbol: $configs.getDevicePointSymbol('_ais_station', { ...item }), properties: item, - zIndex: 1 + zIndex: 2 } ) marker.addTo(vector.ais_station) @@ -247,7 +301,7 @@ const addEnvironmentalToMap = () => { id: item.id, symbol: $configs.getDevicePointSymbol('_environmental', { ...item }), properties: item, - zIndex: 1 + zIndex: 2 } ) marker.addTo(vector.environmental) @@ -336,18 +390,22 @@ watch(() => fence.value, () => { watch(() => sector.value.monitor, (newVal) => { if(vector.sectors_monitor) { if(newVal) { - vector.sectors_monitor.show() + // vector.sectors_monitor.show() + changeSectorsInLayer('sectors_monitor', true) } else { - vector.sectors_monitor.hide() + // vector.sectors_monitor.hide() + changeSectorsInLayer('sectors_monitor', false) } } }) watch(() => sector.value.UAV, (newVal) => { if(vector.sectors_UAV) { if(newVal) { - vector.sectors_UAV.show() + // vector.sectors_UAV.show() + changeSectorsInLayer('sectors_UAV', true) } else { - vector.sectors_UAV.hide() + // vector.sectors_UAV.hide() + changeSectorsInLayer('sectors_UAV', false) } } }) @@ -425,6 +483,8 @@ onUnmounted(() => { border-radius: 0; padding: 0; .el-dialog__header{ + display: flex; + justify-content: space-between; padding: 0 16px; background: linear-gradient(0deg, rgba(10, 169, 255, 0) 0%, rgba(10, 169, 255, 0.5) 100%); .title{ diff --git a/src/components/Map/lbtbox/boatTerminal.js b/src/components/Map/lbtbox/boatTerminal.js index f8b7f11..5bf87db 100644 --- a/src/components/Map/lbtbox/boatTerminal.js +++ b/src/components/Map/lbtbox/boatTerminal.js @@ -54,16 +54,16 @@ const setStyleToBoatLayer = (key, zIndex) => { type: 'interval', stops: [ [ 5, 5 ], - [ 10, 10 ], - [ 11, 0 ] + [ 10, 10 ] + // [ 11, 0 ] ] }, markerHeight: { type: 'interval', stops: [ [ 5, 10 ], - [ 10, 20 ], - [ 11, 0 ] + [ 10, 20 ] + // [ 11, 0 ] ] }, markerFill: { diff --git a/src/components/Map/map-config.js b/src/components/Map/map-config.js index b7b8b50..4218421 100644 --- a/src/components/Map/map-config.js +++ b/src/components/Map/map-config.js @@ -2,7 +2,8 @@ import { getAssetsFile } from '@/utils/common' // 底图配置 const baseLayerConfig = { baseConfig: { - satellite: [ 'tdt_image', 'tdt_cia' ], + // satellite: [ 'tdt_image', 'tdt_cia' ], + satellite: [ 'tdt_image' ], sea: [ 'sea' ], light: [ 'light' ], dark: [ 'tdt_ter', 'tdt_tbo', 'tdt_cta' ] @@ -39,7 +40,8 @@ const baseLayerConfig = { maxAvailableZoom: 18, subdomains: [ '0', '1', '2', '3', '4', '5', '6', '7' ], 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: { max: 18, diff --git a/src/components/Map/window/index.vue b/src/components/Map/window/index.vue index 598e0a7..f87f458 100644 --- a/src/components/Map/window/index.vue +++ b/src/components/Map/window/index.vue @@ -1,5 +1,5 @@ @@ -11,7 +11,7 @@ import MonitorComponent from './monitor.vue' import UAVComponent from './uav.vue' import MeteorologyComponent from './meteorology.vue' import useMapStore from '@/store/modules/map' -import { dragEvent } from '@/utils/common' +import { dragEvent, resizeEvent } from '@/utils/common' const mapStore = useMapStore() @@ -43,12 +43,22 @@ const close = () => { * */ const drag = (e) => { - dragEvent(e, 'el-dialog-title', () => { - if(component.value.HikCCTV) { - component.value.HikCCTV.initResize(false) - } - }) + if(e.target.className.includes('el-dialog-title')) { + dragEvent(e, 'el-dialog-title', () => { + if(component.value.HikCCTV) { + component.value.HikCCTV.initResize(false) + } + }) + }else{ + resizeEvent(e, 'el-dialog', () => { + if(component.value?.HikCCTV) { + component.value.HikCCTV.initResize() + } + }) + } + } + => \ No newline at end of file diff --git a/src/components/Map/window/trawler.vue b/src/components/Map/window/trawler.vue index 3bd8621..b234d52 100644 --- a/src/components/Map/window/trawler.vue +++ b/src/components/Map/window/trawler.vue @@ -205,10 +205,8 @@ const handleExitServo = () => { const handleTrack = () => { globalMap = GlobalMap.instance findAISPointPositionByMmsi({ mmsi: data.value.terminalCode }).then(res => { - if (res.success) { - const arr = res.result[data.value.terminalCode] + const arr = res.data[data.value.terminalCode] new ShipPathInMap(globalMap.map, globalMap.map.getLayer('track'), formatTrackData(arr)) - } }).finally(() => { mapStore.updateWindowInfo(false) }) diff --git a/src/components/Player/HikPlayer-back.vue b/src/components/Player/HikPlayer-back.vue index 2bfa162..6622fd8 100644 --- a/src/components/Player/HikPlayer-back.vue +++ b/src/components/Player/HikPlayer-back.vue @@ -308,7 +308,7 @@ export default { //列表选项在下方 this.width = document.getElementsByClassName( this.videoWindowClassName - )[0].scrollWidth; + )[0].clientWidth; var btnHeight = 0; if (document.getElementsByClassName("playBtn").length > 0) { btnHeight = document.getElementsByClassName("playBtn")[0].clientHeight; diff --git a/src/components/Player/HikPlayer.vue b/src/components/Player/HikPlayer.vue index b7974f2..4f924d6 100644 --- a/src/components/Player/HikPlayer.vue +++ b/src/components/Player/HikPlayer.vue @@ -296,13 +296,13 @@ const destroy = () => { const windowChange = () => { // 列表选项在下方 - width = document.getElementsByClassName(`video-window${props.id}`)[0].scrollWidth + width = document.getElementsByClassName(`video-window${props.id}`)[0].clientWidth let btnHeight = 0 if (document.getElementsByClassName('playBtn').length > 0) { btnHeight = document.getElementsByClassName('playBtn')[0].clientHeight height = document.getElementsByClassName(`video-window${props.id}`)[0].scrollHeight - btnHeight - 10 } 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}`)) { document.getElementById(`playWnd${props.id}`).style.height = `${height}px` diff --git a/src/store/modules/map.js b/src/store/modules/map.js index f2a7002..7877d40 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -26,8 +26,13 @@ const useMapStore = defineStore( level: 1, data: {} }, - dialogVisible: { - type: '' // 弹窗类型 alarm/CCTV/UAV + dialog: { + visible: false, + type: '' // 弹窗类型 alarm/CCTV/UAV + }, + // 无人机信息 + uavs: { + data: {} } }), actions: { @@ -51,8 +56,13 @@ const useMapStore = defineStore( this.hik.level = level this.hik.data = data }, - updateDialog(type) { - this.dialogVisible.type = type + updateDialog(option) { + const { visible = false, type = '' } = option + this.dialog.visible = visible + this.dialog.type = type + }, + updateUavData(option) { + this.uavs.data = option } } }) diff --git a/src/utils/common.js b/src/utils/common.js index be11d85..322f8ff 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -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 将十进制转为度分秒 * @returns { degrees: number, minutes: number, seconds: number } degrees:度 minutes:分 seconds:秒 diff --git a/src/utils/request.js b/src/utils/request.js index 60ebbc7..9fb0ba0 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -21,7 +21,7 @@ const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 baseURL: import.meta.env.VITE_APP_BASE_URL, // 超时 - timeout: 10000 + timeout: 20000 }) // request拦截器 @@ -102,7 +102,7 @@ service.interceptors.response.use(res => { } else if (code === 601) { ElMessage({ message: msg, type: 'warning' }) return Promise.reject(new Error(msg)) - } else if (code !== 200) { + } else if (code != 200) { ElNotification.error({ title: msg }) return Promise.reject('error') } diff --git a/src/views/business/alarm/device.vue b/src/views/business/alarm/device.vue index 7584c31..7709a7c 100644 --- a/src/views/business/alarm/device.vue +++ b/src/views/business/alarm/device.vue @@ -9,7 +9,7 @@ import useMapStore from '@/store/modules/map' const mapStore = useMapStore() const handle = (type) => { - mapStore.updateDialog(type) + mapStore.updateDialog({ visible: true, type }) } \ No newline at end of file diff --git a/src/views/business/drone/device.vue b/src/views/business/drone/device.vue deleted file mode 100644 index 8d27a19..0000000 --- a/src/views/business/drone/device.vue +++ /dev/null @@ -1,389 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/business/drone/index.vue b/src/views/business/drone/index.vue deleted file mode 100644 index bfbe544..0000000 --- a/src/views/business/drone/index.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/business/identification/alarm/index.vue b/src/views/business/identification/alarm/index.vue index f654dc9..ef0c803 100644 --- a/src/views/business/identification/alarm/index.vue +++ b/src/views/business/identification/alarm/index.vue @@ -90,7 +90,7 @@ import FilterCom from '@/components/Filter/index.vue' import { nextTick, onBeforeUnmount, onMounted, onUnmounted, reactive, ref } from 'vue' import TableComponent from '@/components/Table/index2.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 { dayjs, ElMessage, ElMessageBox } from 'element-plus' import { useRoute } from 'vue-router' @@ -337,20 +337,20 @@ const edit = reactive({ const initData = () => { loading.value = true - const params = new FormData() - const obj = { - ...model, - // illegalType: illegalType.value.join(','), - illegalType: illegalType.value, - beginTime: model.time && model.time[0] ? model.time[0] : '', - endTime: model.time && model.time[1] ? model.time[1] : '', - pageNo: pagination.current, - pageSize: pagination.size - } - delete obj.time - Object.keys(obj).forEach((key) => { - params.append(key, obj[key]) - }) + // const params = new FormData() + // const obj = { + // ...model, + // // illegalType: illegalType.value.join(','), + // illegalType: illegalType.value, + // beginTime: model.time && model.time[0] ? model.time[0] : '', + // endTime: model.time && model.time[1] ? model.time[1] : '', + // pageNo: pagination.current, + // pageSize: pagination.size + // } + // delete obj.time + // Object.keys(obj).forEach((key) => { + // params.append(key, obj[key]) + // }) // videoIdentificationPage(params).then(res => { // if (res.success) { // tableData.value = res.result.records.map(i => { @@ -368,7 +368,7 @@ const initData = () => { // // 有识别记录数据,默认查看第一条详情 // handle('check', res.result.total > 0 ? tableData.value[0] : {}) // } else { - // Message.error(res.msg || '查询失败!') + // ElMessage.error(res.msg || '查询失败!') // } // }).finally(() => { loading.value = false @@ -464,7 +464,6 @@ const handle = (type, data) => { } case 'check': { closeVideo() - console.log(data, 'datatata') detail.data = [ { ...data, videoName: '', trackerPicPath: data.trackerPicPath.split(',') @@ -497,10 +496,10 @@ const handle = (type, data) => { cancelButtonText: '取消', type: 'warning' }).then(() => { - // removeVideoIdentification({ id: data.id }).then(() => { - // ElMessage.success('删除成功') - // initData() - // }) + removeVideoIdentification({ id: data.id }).then(() => { + ElMessage.success('删除成功') + initData() + }) }) break default: @@ -538,6 +537,9 @@ onBeforeUnmount(() => { closeVideo() }) +defineExpose({ + appPlayer +}) diff --git a/src/views/business/wall/tree.vue b/src/views/business/wall/tree.vue index 89bcb8e..cc5f97f 100644 --- a/src/views/business/wall/tree.vue +++ b/src/views/business/wall/tree.vue @@ -55,6 +55,9 @@ const refresh = (type) => { } const handleNodeClick = (data, node) => { + if(data.status && data.status === 'offline') { + return false + } if(!data.children || data.children.length === 0) { emit('handle', node.data) } @@ -107,7 +110,7 @@ defineExpose({ border: 1px solid #5FA4FF; &::before { - background-image: url('@/assets/images/livePreview/icon-monitor-active.png'); + // background-image: url('@/assets/images/livePreview/icon-monitor-active.png'); } &:has(.offline) { background-color: none; diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 2217c9b..f30af9c 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -146,10 +146,11 @@ getCode() color: #FFFFFF; line-height: 46px; letter-spacing: 8px; - text-align: left; + text-align: center; position:absolute; top: 108px; z-index: 10; + width: 766px; } .title-line{ background-image: url('@/assets/images/login/icon-title-line.png');