徐景良 1 month ago
commit 8796c81297

@ -37,7 +37,7 @@ export function getAppEnvConfig() {
VITE_GLOB_UPLOAD_URL,
VITE_GLOB_APP_LOGO,
VITE_GLOB_INFO_IMAGE_URL,
VITE_MEDIALIBRARY_IMAGE_URL,
VITE_GLOB_MEDIALIBRARY_IMAGE_URL,
VITE_GLOB_APP_MANAGEMENT_UNIT,
VITE_GLOB_APP_TECHINICAL_SUPPORT,
VITE_GLOB_APP_VERSIONS,
@ -57,7 +57,7 @@ export function getAppEnvConfig() {
VITE_GLOB_UPLOAD_URL,
VITE_GLOB_APP_LOGO,
VITE_GLOB_INFO_IMAGE_URL,
VITE_MEDIALIBRARY_IMAGE_URL,
VITE_GLOB_MEDIALIBRARY_IMAGE_URL,
VITE_GLOB_APP_MANAGEMENT_UNIT,
VITE_GLOB_APP_TECHINICAL_SUPPORT,
VITE_GLOB_APP_VERSIONS,

@ -14,7 +14,6 @@
@setNowShowAnnotationData="setNowShowAnnotationData"
@setNowShowImageData="setNowShowImageData"
@setNowShowAreaData="setNowShowAreaData"
@setAllAnnotationData="setAllAnnotationData"
@setAllAreaData="setAllAreaData"
@deleteAnnotation="deleteAnnotation"
@deleteArea="deleteArea"
@ -28,14 +27,10 @@
:nowShowAnnotationData="nowShowAnnotationData"
:allAreaDataList="allAreaDataList"
:nowShowAreaData="nowShowAreaData"
:allImageDataList="allImageDataList"
:nowShowImageData="nowShowImageData"
@setNowShowAnnotationData="setNowShowAnnotationData"
@setNowShowImageData="setNowShowImageData"
@setNowShowAreaData="setNowShowAreaData"
@setAllAnnotationData="setAllAnnotationData"
@setAllAreaData="setAllAreaData"
@closePathImageInfo="closePathImageInfo"
/>
</div>
<!-- 地图作业区域 -->
@ -55,7 +50,6 @@
import { ref, computed, onMounted } from 'vue';
import { PathLeftMenu, PathMap, PathAreaInfo } from './path';
import { cloneDeep } from 'lodash-es';
import imageJson from './json/image.json';
import {
GetWorkspaceList,
DeleteAnnotation,
@ -118,11 +112,6 @@
}
nowShowAnnotationData.value = value;
}
//
function setAllAnnotationData() {
//
}
//
function deleteAnnotation(value) {
@ -209,13 +198,8 @@
});
}
//
function closePathImageInfo() {
}
//
const nowShowImageData = ref();
const allImageDataList = ref(imageJson);
//
function setNowShowImageData(value) {
@ -281,11 +265,6 @@
// width: auto;
}
.annotationInfoDiv {
position: relative;
height: 100%;
width: 320px;
}
.areaInfoDiv {
position: relative;
@ -293,13 +272,6 @@
width: 320px;
}
.imageInfoDiv {
position: relative;
height: 100%;
// width: 37%;
width: 720px;
// min-width: 720px;
}
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -43,34 +43,16 @@
id: 'infrared',
name: '红外照片',
},
// {
// id: 'alone',
// name: '',
// },
{
id: 'video',
name: '视频资源',
},
],
},
// {
// id: 'achievementModel',
// name: '',
// children: [
// {
// id: '2d',
// name: '',
// },
// {
// id: '3d',
// name: '',
// },
// ],
// },
// {
// id: 'gas',
// name: '',
// },
// {
// id: 'vr',
// name: 'VR',
// },
];
//

@ -37,7 +37,7 @@
<!-- 图片 -->
<img
v-if="record.objectKey && record.objectKey.includes('jpeg')"
:src="`${VITE_MEDIALIBRARY_IMAGE_URL + (record.minipic ? record.minipic : record.objectKey)}`"
:src="`${VITE_GLOB_MEDIALIBRARY_IMAGE_URL + (record.minipic ? record.minipic : record.objectKey)}`"
:width="30"
:height="20"
/>
@ -115,29 +115,6 @@
<EditOutlined @click="renameRecord(record)" />
</a-button>
</a-tooltip>
<!-- <a-tooltip placement="top">
<template #title>
<span>
{{ record.showOnMap == 1 ? '在地图上取消加载' : '在地图上加载' }}
</span>
</template>
<a-button
type="text"
v-if="record.objectKey && record.objectKey.includes('.jpeg')"
@click="funShowOnMap(record)"
>
<div
v-if="record.showOnMap == 1"
class="svg-container"
v-html="svg_showOnMap_1"
/>
<div
v-if="record.showOnMap != 1"
class="svg-container"
v-html="svg_showOnMap_0"
/>
</a-button>
</a-tooltip> -->
<a-tooltip placement="top">
<template #title>
<div>查看地图图片历史路径</div>
@ -182,7 +159,7 @@
<!-- 图片 -->
<img
v-if="record.objectKey && record.objectKey.includes('jpeg')"
:src="`${VITE_MEDIALIBRARY_IMAGE_URL + (record.minipic ? record.minipic : record.objectKey)}`"
:src="`${VITE_GLOB_MEDIALIBRARY_IMAGE_URL + (record.minipic ? record.minipic : record.objectKey)}`"
:width="100"
:height="60"
style="position: absolute; top: 10px; left: 32.5px"
@ -330,7 +307,7 @@
import dayjs from 'dayjs';
import { cloneDeep } from 'lodash-es';
const { VITE_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const { VITE_GLOB_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const { createConfirm, createMessage } = useMessage();
// --------------------------------------------------------------------
@ -555,9 +532,11 @@
...searchParams.value,
parentKey: nowParentKey.value,
page: 1,
limit: 100,
limit: 1000,
}).then((res) => {
previewRecordList.value = uniqueByKey(res.items, nowPreviewRecord.value);
previewRecordList.value = uniqueByKey(res.items, nowPreviewRecord.value).sort((a, b) => {
return dayjs(a.createTime) - dayjs(b.createTime);
});
nowPreviewRecord.value = getDataSource().find(
(item) => item.id == nowPreviewRecord.value.id,
);
@ -653,7 +632,9 @@
}).then((res) => {
nowPreviewRecord.value = record;
//
previewRecordList.value = uniqueByKey(res.items, record);
previewRecordList.value = uniqueByKey(res.items, record).sort((a, b) => {
return dayjs(a.createTime) - dayjs(b.createTime);
});
open.value = true;
});
}
@ -744,6 +725,9 @@
allImageDataList.value = res.items.filter(
(item) => item.objectKey && item.objectKey.includes('.jpeg'),
);
allImageDataList.value = allImageDataList.value.sort((a, b) => {
return dayjs(a.createTime) - dayjs(b.createTime);
});
allImageDataList.value.forEach((arr) => {
if (arr.fileTags) {
arr.fileTags = JSON.parse(arr.fileTags);

@ -46,7 +46,7 @@
</div>
</div>
<!-- 标签 -->
<div class="tags">
<div class="tagsDiv">
<a-tag color="success" v-for="tag in props.nowShowImageData.fileTags" :key="tag">
{{ tag }}
</a-tag>
@ -105,7 +105,7 @@
v-if="!hideOrShowGraffitiFlag"
style="color: #595959"
/>
<div style="position: absolute; bottom: -12px; right: -5px; pointer-events: none">
<div style="position: absolute; bottom: -10px; right: -5px; pointer-events: none">
<div
v-html="
`${
@ -119,6 +119,11 @@
</a-tooltip>
</div>
</div>
<!-- 退出涂鸦 -->
<div class="escTip" v-if="graffitiFlag">
<div class="whiteEsc">Esc</div>
<div class="blackTip">退出涂鸦</div>
</div>
<!-- 图片部分 -->
<div id="imageDiv" class="imageDiv" style="overflow: hidden">
@ -133,7 +138,7 @@
transition: 'transform 0.2s',
width: `${imageWidth}px`,
height: `${imageHeight}px`,
background: `url(${VITE_MEDIALIBRARY_IMAGE_URL + props.nowShowImageData.objectKey}) no-repeat center center`,
background: `url(${VITE_GLOB_MEDIALIBRARY_IMAGE_URL + props.nowShowImageData.objectKey}) no-repeat center center`,
backgroundSize: 'contain',
backgroundPosition: 'center',
}"
@ -371,16 +376,21 @@
/>
</div>
</div>
<!-- 云台偏航角查看图片 -->
<div class="rimbalGawDegreeButton" @click="rotateGimbalYawDegree">
<a-tooltip placement="left">
<template #title>
<span> {{ rimbalGawDegreeFlag ? '正常查看图片' : '云台偏航角查看图片' }}</span>
</template>
<InstagramOutlined v-if="!rimbalGawDegreeFlag" style="color: #3c3c3c; font-size: 25px" />
<FileImageOutlined v-if="rimbalGawDegreeFlag" style="color: #3c3c3c; font-size: 25px" />
</a-tooltip>
</div>
<!-- 全屏 -->
<div class="expandButton" @click="clickExpandButton">
<ExpandOutlined v-if="!fullscreenFlag" style="color: #3c3c3c; font-size: 25px" />
<CompressOutlined v-if="fullscreenFlag" style="color: #3c3c3c; font-size: 25px" />
</div>
<!-- 退出涂鸦 -->
<div class="escTip" v-if="graffitiFlag">
<div class="whiteEsc">Esc</div>
<div class="blackTip">退出涂鸦</div>
</div>
</div>
<!-- 底部按钮和图片列表 -->
<div class="bottomDiv">
@ -448,50 +458,6 @@
<AimOutlined @click="handlerLocation" />
</a-tooltip>
</div>
<!-- 加载到地图上 -->
<!-- <div class="button2">
<a-popconfirm
placement="top"
title="您是否将该照片在地图上取消加载?取消后照片将不在地图上显示。"
ok-text="确认"
cancel-text="取消"
@confirm="funShowOnMap"
>
<a-tooltip placement="top">
<template #title>
<span>
{{ props.nowShowImageData.showOnMap == 1 ? '在地图上取消加载' : '在地图上加载' }}
</span>
</template>
<svg
v-if="props.nowShowImageData.showOnMap == 1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 24 24"
width="25"
height="25"
>
<path
d="M19 5v11.17l2 2V5c0-1.1-.9-2-2-2H5.83l2 2H19zM2.81 2.81L1.39 4.22L3 5.83V19c0 1.1.9 2 2 2h13.17l1.61 1.61l1.41-1.41L2.81 2.81zM5 19V7.83l7.07 7.07l-.82 1.1L9 13l-3 4h8.17l2 2H5z"
fill="#ffffff"
></path>
</svg>
<svg
v-if="props.nowShowImageData.showOnMap != 1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 24 24"
width="25"
height="25"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14L6 17h12l-3.86-5.14z"
fill="#ffffff"
></path>
</svg>
</a-tooltip>
</a-popconfirm>
</div> -->
</div>
<div class="imageChooseList">
<div
@ -507,7 +473,7 @@
<img
:src="
li.minipic
? VITE_MEDIALIBRARY_IMAGE_URL + li.minipic
? VITE_GLOB_MEDIALIBRARY_IMAGE_URL + li.minipic
: 'https://m.tuniucdn.com/fb2/t1/G5/M00/44/52/Cii-s1soezyIF2UxABn76u-yKl8AAIwBgB34jAAGfwC3020871'
"
loading="lazy"
@ -595,6 +561,8 @@
AimOutlined,
ClockCircleOutlined,
PlusSquareOutlined,
InstagramOutlined,
FileImageOutlined,
} from '@ant-design/icons-vue';
import dayjs from 'dayjs';
import { UpdatePicStatus, UpdatePicName } from '@/api/demo/mediaLibrary';
@ -603,7 +571,7 @@
import { cloneDeep } from 'lodash-es';
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage, createConfirm } = useMessage();
const { VITE_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const { VITE_GLOB_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const props = defineProps(['nowShowImageData', 'allImageDataList']);
const emits = defineEmits([
@ -617,10 +585,12 @@
// --------------------------------
const focusInputRef = ref();
const editNameFlag = ref(true);
const editName = ref(props.nowShowImageData.name.split('.').slice(0, -1).join('.'));
const editName = ref();
function editNameChange() {
if (props.nowShowImageData.name.split('.').length <= 1) {
editName.value = props.nowShowImageData.name;
} else {
editName.value = props.nowShowImageData.name.split('.').slice(0, -1).join('.');
}
setTimeout(() => {
if (focusInputRef.value && focusInputRef.value.focus) {
@ -723,6 +693,20 @@
function rotateCounterClockwise() {
rotationAngle.value -= 90; // -90
}
//
const rimbalGawDegreeFlag = ref(true);
function rotateGimbalYawDegree() {
if (!graffitiFlag.value) {
rimbalGawDegreeFlag.value = !rimbalGawDegreeFlag.value;
if (rimbalGawDegreeFlag.value) {
rotationAngle.value = parseFloat(props.nowShowImageData.gimbalYawDegree) + 180;
} else {
rotationAngle.value = 0;
}
} else {
createMessage.warn('涂鸦状态下不能使用云台偏航角查看图片');
}
}
//
const imageWidth = ref(1040);
@ -766,8 +750,12 @@
//
function refresh() {
scale.value = 0.9;
rotationAngle.value = 0;
// graffitiFlag.value = false;
//
if (rimbalGawDegreeFlag.value) {
rotationAngle.value = parseFloat(props.nowShowImageData.gimbalYawDegree) + 180;
} else {
rotationAngle.value = 0;
}
getImageWidthAndHeight();
//
const dragDocument: any = document.querySelector('.dragModal');
@ -781,37 +769,30 @@
function handlerLocation() {
emits('handlerLocation', props.nowShowImageData);
}
// //
// function funShowOnMap() {
// if (props.nowShowImageData.showOnMap == 1) {
// props.nowShowImageData.showOnMap = 0;
// } else {
// props.nowShowImageData.showOnMap = 1;
// }
// UpdatePicStatus({
// id: props.nowShowImageData.id,
// fileTags: JSON.stringify(fileTags.value),
// graffitiJson: JSON.stringify(graffitis.value),
// display: props.nowShowImageData.display,
// showOnMap: props.nowShowImageData.showOnMap,
// }).then((res) => {
// if (props.nowShowImageData.showOnMap == 1) {
// createMessage.success('');
// } else {
// createMessage.success('');
// }
// emits('funUpdateDisplayOrShowOnMapData', props.nowShowImageData);
// emits('handleSuccessPath', props.nowShowImageData);
// });
// }
// -----------------------------------------------
function setNowShowImageData(value) {
emits('setNowShowImageData', value);
function setNowShowImageData(chooseValue) {
emits('setNowShowImageData', chooseValue);
graffitiFlag.value = false;
refresh();
}
//
function setScrollLeft() {
const imageChooseListDocument: any = document.querySelector('.imageChooseList');
if (imageChooseListDocument) {
let index = props.allImageDataList.findIndex((item) => item.id == props.nowShowImageData.id);
let length = props.allImageDataList.length;
if (index < 5) {
imageChooseListDocument.scrollLeft = 0;
} else if (index + 6 > length) {
imageChooseListDocument.scrollLeft = 95 * length;
} else {
imageChooseListDocument.scrollLeft = 95 * (index - 4);
}
}
}
// or-------------------------------------------------
// or
const graffitiFlag = ref(false);
@ -819,6 +800,9 @@
function setGraffiti() {
refresh();
graffitiFlag.value = !graffitiFlag.value;
//
rimbalGawDegreeFlag.value = false;
rotationAngle.value = 0;
if (graffitiFlag.value) {
document.body.style.cursor = 'crosshair';
} else {
@ -841,6 +825,12 @@
? props.nowShowImageData.graffitiJson
: [];
fileTags.value = props.nowShowImageData.fileTags ? props.nowShowImageData.fileTags : [];
if (rimbalGawDegreeFlag.value) {
rotationAngle.value = parseFloat(props.nowShowImageData.gimbalYawDegree) + 180;
}
//
setScrollLeft();
editNameFlag.value = true;
},
{
deep: true,
@ -848,6 +838,11 @@
},
);
onMounted(() => {
//
setScrollLeft();
});
//
function addFileTagsChange() {
addFileTagsFlag.value = true;
@ -1244,6 +1239,22 @@
height: calc(100% - 120px);
background: #101010;
//
.rimbalGawDegreeButton {
position: absolute;
right: 25px;
bottom: 12%;
z-index: 200;
background: #ffffff;
border-radius: 5px;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
}
//
.expandButton {
position: absolute;
@ -1344,7 +1355,7 @@
//
.titleDiv {
position: absolute;
top: 15px;
top: 1%;
left: 20px;
height: 80px;
width: 80%;
@ -1359,18 +1370,20 @@
color: #ffffff;
}
.titleTime {
margin-top: 5px;
font-size: 16px;
color: #ffffff;
}
.titleCoordinate {
margin-top: 5px;
font-size: 16px;
color: #ffffff;
}
}
//
.tags {
.tagsDiv {
position: absolute;
top: 105px;
top: 11%;
left: 20px;
height: 20px;
width: 80%;
@ -1494,11 +1507,12 @@
.escTip {
position: absolute;
left: 0%;
bottom: 100px;
bottom: 120px;
width: 120px;
height: 40px;
background: #9c9c9c77;
border-radius: 5px;
z-index: 1001;
display: flex;
align-items: center;

@ -87,7 +87,7 @@
<template #title>
<div>
<img
:src="VITE_MEDIALIBRARY_IMAGE_URL + show.minipic"
:src="VITE_GLOB_MEDIALIBRARY_IMAGE_URL + show.minipic"
loading="lazy"
width="230"
height="190"
@ -182,7 +182,7 @@
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage, createConfirm } = useMessage();
import { getAppEnvConfig } from '@/utils/env';
const { VITE_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const { VITE_GLOB_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const props = defineProps(['leftMenuShow', 'floderName', 'allImageDataList', 'nowShowImageData']);
const emits = defineEmits([

@ -26,7 +26,7 @@
import { WktToGeojson, GeojsonToWkt } from '@/components/MapboxMaps/src/WktGeojsonTransform';
import dayjs from 'dayjs';
import { getAppEnvConfig } from '@/utils/env';
const { VITE_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const { VITE_GLOB_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const props = defineProps([
'allImageDataList',
@ -41,8 +41,6 @@
isAutoEditing: true,
});
//
// -
// let bottomPointGraphicData: any = [];
// -
let flightointGraphicData: any = [];
// -线
@ -283,7 +281,17 @@
map.addLayer(graphicLayers);
//
showAllImageDataList();
handlerLocation([118.2958779, 35.1342553]);
let lngList = props.allImageDataList.map((item) => item.lng);
let latList = props.allImageDataList.map((item) => item.lat);
let maxLng = Math.max(...lngList);
let minLng = Math.min(...lngList);
let maxLat = Math.max(...latList);
let minLat = Math.min(...latList);
handlerLocation([(maxLng + minLng) / 2, (maxLat + minLat) / 2 - 0.002], {
height: 300,
heading: 0,
pitch: -45,
});
}
};
@ -291,16 +299,6 @@
() => props.updateDisplayOrShowOnMapData,
(newValue) => {
if (newValue) {
// -
// bottomPointGraphicData.forEach((graphicLayer) => {
// if (graphicLayer.options.id == newValue.id + '_bottom') {
// if (newValue.showOnMap == 1) {
// graphicLayer.show = newValue.display == 1 ? true : false;
// } else {
// graphicLayers.removeGraphic(graphicLayer);
// }
// }
// });
// -
flightointGraphicData.forEach((graphicLayer) => {
if (graphicLayer.options.id == newValue.id + '_flight') {
@ -337,9 +335,6 @@
// --
const showAllImageDataList = async () => {
//
// bottomPointGraphicData?.forEach((graphicLayer) => {
// graphicLayers.removeGraphic(graphicLayer);
// });
flightointGraphicData?.forEach((graphicLayer) => {
graphicLayers.removeGraphic(graphicLayer);
});
@ -350,258 +345,280 @@
graphicLayers.removeGraphic(graphicLayer);
});
//
// bottomPointGraphicData = [];
flightointGraphicData = [];
bottomImagePolylineGraphicData = [];
imageGraphicData = [];
// -
let rotation = 0;
props.allImageDataList.forEach((item, index) => {
if (item.lng && item.lat && item.absoluteAltitude) {
const image = new Image();
image.crossOrigin = 'Anonymous';
if (item.minipic) {
image.src = VITE_MEDIALIBRARY_IMAGE_URL + item.minipic;
} else {
image.src =
'https://m.tuniucdn.com/fb2/t1/G5/M00/44/52/Cii-s1soezyIF2UxABn76u-yKl8AAIwBgB34jAAGfwC3020871';
}
image.onload = () => {
// Canvas
const canvas = document.createElement('canvas');
canvas.width = 34;
canvas.height = 29;
// Canvas
const ctx = canvas.getContext('2d');
ctx.fillStyle = 'white';
ctx?.fillRect(0, 0, canvas.width, canvas.height);
// Canvas
ctx.drawImage(image, 2, 2, 30, 25);
// CanvasURL
const dataURL1 = canvas.toDataURL('image/png');
//
const flightimage = new Image();
flightimage.crossOrigin = 'Anonymous';
flightimage.src = '/src/assets/images/flightoperation/mediaLibraryFlight.png';
flightimage.onload = () => {
let flightRotation = 0;
let flightMapRotation = 0;
// -
props.allImageDataList.forEach((item, index) => {
if (item.lng && item.lat && item.absoluteAltitude) {
const image = new Image();
image.crossOrigin = 'Anonymous';
if (item.minipic) {
image.src = VITE_GLOB_MEDIALIBRARY_IMAGE_URL + item.minipic;
} else {
image.src =
'https://m.tuniucdn.com/fb2/t1/G5/M00/44/52/Cii-s1soezyIF2UxABn76u-yKl8AAIwBgB34jAAGfwC3020871';
}
image.onload = () => {
//
let position = [
parseFloat(item.lng),
parseFloat(item.lat),
parseFloat(item.absoluteAltitude),
];
//
mars3d.PointUtil.getSurfaceHeight(
map.scene,
Cesium.Cartesian3.fromDegrees(position[0], position[1]),
).then((point) => {
// Canvas
const canvas = document.createElement('canvas');
canvas.width = 34;
canvas.height = 29;
// Canvas
const ctx = canvas.getContext('2d');
ctx.fillStyle = '#ffffff00';
ctx?.fillRect(0, 0, canvas.width, canvas.height);
// CanvasimageImage
ctx.drawImage(image, 2, 2, 30, 25);
//
ctx.strokeStyle = '#2d8cef'; //
ctx.lineWidth = 1; //
//
ctx.strokeRect(0.5, 0.5, canvas.width - 1, canvas.height - 1); //
// CanvasURL
const dataURL2 = canvas.toDataURL('image/png');
//
let position = [
parseFloat(item.lng),
parseFloat(item.lat),
parseFloat(item.absoluteAltitude),
];
//
mars3d.PointUtil.getSurfaceHeight(
map.scene,
Cesium.Cartesian3.fromDegrees(position[0], position[1]),
).then((point) => {
//
// let bottomPointGraphic = new mars3d.graphic.BillboardEntity({
// id: item.id + '_bottom',
// position: [position[0], position[1], point.height],
// style: {
// image: '/src/assets/images/flightoperation/mediaLibraryPoint.png',
// clampToGround: true,
// scale: 1,
// verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
// },
// hasEdit: false,
// show: item.display == 1 ? true : false,
// });
if (index + 1 < props.allImageDataList.length) {
const afterItem = props.allImageDataList[index + 1];
let lng = afterItem.lng - item.lng;
let lat = afterItem.lat - item.lat;
let angleARad = Math.atan(lng / lat);
let angleA = (angleARad * 180) / Math.PI;
rotation = angleA;
}
//
let flightointGraphic = new mars3d.graphic.BillboardEntity({
id: item.id + '_flight',
position: [position[0], position[1], position[2] * 2],
style: {
image: '/src/assets/images/flightoperation/mediaLibraryFlight.png',
clampToGround: false,
scale: 1,
verticalOrigin: Cesium.VerticalOrigin.CENTER,
rotation: rotation,
},
hasEdit: false,
show: false,
});
// 线
let bottomImagePolylineGraphic = new mars3d.graphic.PolylineEntity({
id: item.id + '_polyline',
positions: [
Cesium.Cartesian3.fromDegrees(position[0], position[1], point.height),
Cesium.Cartesian3.fromDegrees(position[0], position[1], position[2]),
],
style: {
color: '#ffffff',
width: 1, // 线
clampToGround: false,
},
hasEdit: false,
show: item.display == 1 ? true : false,
//
defaultPosition: position,
//
surfaceHeight: point.height,
});
//
let imageGraphic = new mars3d.graphic.BillboardEntity({
id: item.id + '_image',
position: [position[0], position[1], position[2]],
style: {
image: dataURL1,
clampToGround: false,
scale: 1,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
label: {
text: `${item.name}`,
font_size: 14,
color: '#2d8cf0',
outline: true,
outlineColor: '#ffffff',
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
pixelOffset: [25, -5],
show: false,
},
},
hasEdit: false,
show: item.display == 1 ? true : false,
//
defaultImage: dataURL1,
//
chooseImage: dataURL2,
});
// mouseover
imageGraphic.on(mars3d.EventType.mouseOver, function () {
if (!props.nowShowImageData || props.nowShowImageData.id !== item.id) {
//
imageGraphic.setStyle({
image: dataURL2,
scale: 1.1,
label: {
show: true,
},
});
//
ctx.save();
const centerX = canvas.width / 2;
const centerY = canvas.height / 2;
ctx.translate(centerX, centerY);
const angleInRadians = (Math.PI / 180) * (parseFloat(item.gimbalYawDegree) + 180); //
ctx.rotate(angleInRadians);
ctx.drawImage(image, 2 - centerX, 2 - centerY, 30, 25);
ctx.restore();
// -
if (index + 1 < props.allImageDataList.length) {
const afterItem = props.allImageDataList[index + 1];
let dLng = afterItem.lng - item.lng;
let dLat = afterItem.lat - item.lat;
// 使 atan2
let angleRad = Math.atan2(dLat, dLng);
let angleDeg = Cesium.Math.toDegrees(angleRad);
flightRotation = ((Math.PI / 180) * (90 - angleDeg + 360)) % 360;
flightMapRotation = ((Math.PI / 180) * (angleDeg + 270)) % 360;
}
});
// mouseout
imageGraphic.on(mars3d.EventType.mouseOut, function () {
if (!props.nowShowImageData || props.nowShowImageData.id !== item.id) {
//
imageGraphic.setStyle({
ctx.save();
const imgWAndH = 15;
ctx.translate(18 + imgWAndH / 2, imgWAndH / 2);
ctx.rotate(flightRotation);
ctx.drawImage(flightimage, -imgWAndH / 2, -imgWAndH / 2, imgWAndH, imgWAndH);
ctx.restore();
// 1
ctx.save();
ctx.strokeStyle = '#ffffff';
ctx.lineWidth = 1;
ctx.strokeRect(1, 1, canvas.width - 2, canvas.height - 2);
const dataURL1 = canvas.toDataURL('image/png');
ctx.restore();
// 2
ctx.strokeStyle = '#2d8cef';
ctx.lineWidth = 1;
ctx.strokeRect(1, 1, canvas.width - 2, canvas.height - 2);
const dataURL2 = canvas.toDataURL('image/png');
//
let flightointGraphic = new mars3d.graphic.BillboardEntity({
id: item.id + '_flight',
position: [position[0], position[1], position[2]],
style: {
image: '/src/assets/images/flightoperation/mediaLibraryFlight.png',
clampToGround: false,
verticalOrigin: Cesium.VerticalOrigin.CENTER,
rotation: flightMapRotation,
},
hasEdit: false,
show: false,
});
// 线
let bottomImagePolylineGraphic = new mars3d.graphic.PolylineEntity({
id: item.id + '_polyline',
positions: [
Cesium.Cartesian3.fromDegrees(position[0], position[1], point.height),
Cesium.Cartesian3.fromDegrees(
position[0],
position[1],
point.height + (position[2] - point.height) / 10,
),
],
style: {
color: '#ffffff',
width: 1, // 线
clampToGround: false,
},
hasEdit: false,
show: item.display == 1 ? true : false,
//
defaultPosition: position,
//
surfaceHeight: point.height,
});
//
let imageGraphic = new mars3d.graphic.BillboardEntity({
id: item.id + '_image',
position: [
position[0],
position[1],
point.height + (position[2] - point.height) / 10,
],
style: {
image: dataURL1,
clampToGround: false,
scale: 1,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
label: {
text: `${item.name}`,
font_size: 16,
color: '#ffffff',
outline: true,
outlineWidth: 4,
outlineColor: '#000000',
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
pixelOffset: [25, -5],
show: false,
},
});
}
});
//
imageGraphic.on(mars3d.EventType.click, function () {
//
if (props.nowShowImageData && props.nowShowImageData.id == item.id) {
//
imageRestoreDefault();
emits('setNowShowImageData', {});
} else if (!props.nowShowImageData || props.nowShowImageData.id !== item.id) {
//
//
imageRestoreDefault();
//
// PolylineEntity
bottomImagePolylineGraphic.positions = [
Cesium.Cartesian3.fromDegrees(position[0], position[1], point.height),
Cesium.Cartesian3.fromDegrees(position[0], position[1], position[2] * 2),
];
// PolylineEntity
bottomImagePolylineGraphic.setStyle({
color: '#2d8cf0',
});
//
flightointGraphic.show = true;
//
imageGraphic.setStyle({
image: dataURL2,
label: {
show: true,
},
});
emits('setNowShowImageData', item);
}
});
//
// graphicLayers.addGraphic(bottomPointGraphic);
//
graphicLayers.addGraphic(flightointGraphic);
// 线
graphicLayers.addGraphic(bottomImagePolylineGraphic);
//
graphicLayers.addGraphic(imageGraphic);
//
// bottomPointGraphicData.push(bottomPointGraphic);
flightointGraphicData.push(flightointGraphic);
bottomImagePolylineGraphicData.push(bottomImagePolylineGraphic);
imageGraphicData.push(imageGraphic);
//
if (props.nowShowImageData && props.nowShowImageData.id) {
//
flightointGraphicData?.forEach((graphicLayer) => {
if (props.nowShowImageData.id + '_flight' == graphicLayer.options.id) {
graphicLayer.show = true;
},
hasEdit: false,
show: item.display == 1 ? true : false,
//
defaultImage: dataURL1,
//
chooseImage: dataURL2,
});
// mouseover
imageGraphic.on(mars3d.EventType.mouseOver, function () {
if (!props.nowShowImageData || props.nowShowImageData.id !== item.id) {
//
imageGraphic.setStyle({
image: dataURL2,
scale: 1.3,
label: {
show: true,
},
});
}
});
// 线
bottomImagePolylineGraphicData?.forEach((graphicLayer) => {
if (props.nowShowImageData.id + '_polyline' == graphicLayer.options.id) {
let defaultPosition = graphicLayer.options.defaultPosition;
let surfaceHeight = graphicLayer.options.surfaceHeight;
graphicLayer.positions = [
Cesium.Cartesian3.fromDegrees(
defaultPosition[0],
defaultPosition[1],
surfaceHeight,
),
Cesium.Cartesian3.fromDegrees(
defaultPosition[0],
defaultPosition[1],
defaultPosition[2] * 2,
),
];
graphicLayer.setStyle({
color: '#2d8cf0',
// mouseout
imageGraphic.on(mars3d.EventType.mouseOut, function () {
if (!props.nowShowImageData || props.nowShowImageData.id !== item.id) {
//
imageGraphic.setStyle({
image: dataURL1,
scale: 1,
label: {
show: false,
},
});
}
});
//
imageGraphicData?.forEach((graphicLayer) => {
if (props.nowShowImageData.id + '_image' == graphicLayer.options.id) {
graphicLayer.setStyle({
image: graphicLayer.options.chooseImage,
//
imageGraphic.on(mars3d.EventType.click, function () {
//
// if (props.nowShowImageData && props.nowShowImageData.id == item.id) {
// //
// imageRestoreDefault();
// emits('setNowShowImageData', {});
// } else
if (!props.nowShowImageData || props.nowShowImageData.id !== item.id) {
//
//
imageRestoreDefault();
//
// PolylineEntity
bottomImagePolylineGraphic.positions = [
Cesium.Cartesian3.fromDegrees(position[0], position[1], point.height),
Cesium.Cartesian3.fromDegrees(position[0], position[1], position[2]),
];
// PolylineEntity
bottomImagePolylineGraphic.setStyle({
color: '#2d8cf0',
});
//
flightointGraphic.show = true;
//
imageGraphic.setStyle({
image: dataURL2,
scale: 1.3,
label: {
show: true,
},
});
emits('setNowShowImageData', item);
}
});
}
});
};
}
});
//
graphicLayers.addGraphic(flightointGraphic);
// 线
graphicLayers.addGraphic(bottomImagePolylineGraphic);
//
graphicLayers.addGraphic(imageGraphic);
//
flightointGraphicData.push(flightointGraphic);
bottomImagePolylineGraphicData.push(bottomImagePolylineGraphic);
imageGraphicData.push(imageGraphic);
//
if (props.nowShowImageData && props.nowShowImageData.id) {
//
flightointGraphicData?.forEach((graphicLayer) => {
if (props.nowShowImageData.id + '_flight' == graphicLayer.options.id) {
graphicLayer.show = true;
}
});
// 线
bottomImagePolylineGraphicData?.forEach((graphicLayer) => {
if (props.nowShowImageData.id + '_polyline' == graphicLayer.options.id) {
let defaultPosition = graphicLayer.options.defaultPosition;
let surfaceHeight = graphicLayer.options.surfaceHeight;
graphicLayer.positions = [
Cesium.Cartesian3.fromDegrees(
defaultPosition[0],
defaultPosition[1],
surfaceHeight,
),
Cesium.Cartesian3.fromDegrees(
defaultPosition[0],
defaultPosition[1],
defaultPosition[2],
),
];
graphicLayer.setStyle({
color: '#2d8cf0',
});
}
});
//
imageGraphicData?.forEach((graphicLayer) => {
if (props.nowShowImageData.id + '_image' == graphicLayer.options.id) {
graphicLayer.setStyle({
image: graphicLayer.options.chooseImage,
scale: 1.3,
label: {
show: true,
},
});
}
});
}
});
};
}
});
};
};
// -
@ -621,7 +638,11 @@
});
bottomImagePolylineGraphic.positions = [
Cesium.Cartesian3.fromDegrees(defaultPosition[0], defaultPosition[1], surfaceHeight),
Cesium.Cartesian3.fromDegrees(defaultPosition[0], defaultPosition[1], defaultPosition[2]),
Cesium.Cartesian3.fromDegrees(
defaultPosition[0],
defaultPosition[1],
surfaceHeight + (defaultPosition[2] - surfaceHeight) / 10,
),
];
}
//
@ -663,7 +684,7 @@
Cesium.Cartesian3.fromDegrees(
defaultPosition[0],
defaultPosition[1],
defaultPosition[2] * 2,
defaultPosition[2],
),
];
}
@ -675,6 +696,7 @@
let chooseImage = imageGraphic.options.chooseImage;
imageGraphic.setStyle({
image: chooseImage,
scale: 1.3,
label: {
show: true,
},
@ -685,9 +707,23 @@
}
//
const handlerLocation = (lngLat) => {
const position = Cesium.Cartesian3.fromDegrees(lngLat[0], lngLat[1]);
map.flyToPoint(position);
const handlerLocation = (lngLat, options: any = {}) => {
const { height, heading, pitch } = options;
if (height) {
const destination = Cesium.Cartesian3.fromDegrees(lngLat[0], lngLat[1], height);
map.camera.flyTo({
destination: destination,
orientation: {
heading: Cesium.Math.toRadians(heading),
pitch: Cesium.Math.toRadians(pitch),
roll: 0.0,
},
duration: 1.0,
});
} else {
const position = Cesium.Cartesian3.fromDegrees(lngLat[0], lngLat[1], 150);
map.flyToPoint(position);
}
};
defineExpose({

@ -11,7 +11,7 @@
import * as mars3d from 'mars3d';
import * as Cesium from 'mars3d-cesium';
import { getAppEnvConfig } from '@/utils/env';
const { VITE_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const { VITE_GLOB_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const props = defineProps(['nowPreviewRecord', 'previewRecordList', 'hideOrShowTextboxFlag']);
const emits = defineEmits(['chooseNowPreviewRecord']);
@ -320,7 +320,7 @@
const image = new Image();
image.crossOrigin = 'Anonymous';
if (item.minipic) {
image.src = VITE_MEDIALIBRARY_IMAGE_URL + item.minipic;
image.src = VITE_GLOB_MEDIALIBRARY_IMAGE_URL + item.minipic;
} else {
image.src =
'https://m.tuniucdn.com/fb2/t1/G5/M00/44/52/Cii-s1soezyIF2UxABn76u-yKl8AAIwBgB34jAAGfwC3020871';

@ -12,7 +12,7 @@
transition: 'transform 0.2s',
width: `${imageWidth}px`,
height: `${imageHeight}px`,
background: `url(${VITE_MEDIALIBRARY_IMAGE_URL + props.nowPreviewRecord.objectKey}) no-repeat center center`,
background: `url(${VITE_GLOB_MEDIALIBRARY_IMAGE_URL + props.nowPreviewRecord.objectKey}) no-repeat center center`,
backgroundSize: 'contain',
backgroundPosition: 'center',
}"
@ -390,14 +390,14 @@
</a-tooltip>
</div>
</div>
<div class="imageList">
<div class="imageChooseList">
<div v-for="li in props.previewRecordList" :key="li.id" @click="chooseNowPreviewRecord(li)">
<div
v-if="li.objectKey"
:class="li.id == props.nowPreviewRecord.id ? 'bottom_div_choose' : 'bottom_div'"
>
<img
:src="VITE_MEDIALIBRARY_IMAGE_URL + (li.minipic ? li.minipic : li.objectKey)"
:src="VITE_GLOB_MEDIALIBRARY_IMAGE_URL + (li.minipic ? li.minipic : li.objectKey)"
loading="lazy"
:width="60"
:height="35"
@ -541,7 +541,7 @@
import { useMessage } from '@/hooks/web/useMessage';
import { cloneDeep } from 'lodash-es';
import { getAppEnvConfig } from '@/utils/env';
const { VITE_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const { VITE_GLOB_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const { createConfirm, createMessage } = useMessage();
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
@ -693,7 +693,7 @@
//
const copyToClipboard = async (url) => {
try {
await navigator.clipboard.writeText(VITE_MEDIALIBRARY_IMAGE_URL + url);
await navigator.clipboard.writeText(VITE_GLOB_MEDIALIBRARY_IMAGE_URL + url);
createMessage.success('图片链接已复制到剪贴板');
} catch (err) {
createMessage.error('无法复制图片链接');
@ -726,7 +726,7 @@
//
async function fetchAndDownloadImage(url) {
try {
const response = await fetch(VITE_MEDIALIBRARY_IMAGE_URL + url, {
const response = await fetch(VITE_GLOB_MEDIALIBRARY_IMAGE_URL + url, {
mode: 'cors',
});
if (!response.ok) {
@ -798,12 +798,34 @@
? props.nowPreviewRecord.graffitiJson
: [];
fileTags.value = props.nowPreviewRecord.fileTags ? props.nowPreviewRecord.fileTags : [];
//
setScrollLeft();
},
{
deep: true,
immediate: true,
},
);
onMounted(() => {
//
setScrollLeft();
});
//
function setScrollLeft() {
const imageChooseListDocument: any = document.querySelector('.imageChooseList');
if (imageChooseListDocument) {
let index = props.previewRecordList.findIndex((item) => item.id == props.nowPreviewRecord.id);
let length = props.previewRecordList.length;
if (index < 5) {
imageChooseListDocument.scrollLeft = 0;
} else if (index + 7 > length) {
imageChooseListDocument.scrollLeft = 80 * length;
} else {
imageChooseListDocument.scrollLeft = 80 * (index - 5);
}
}
}
//
function addGraffiti() {
@ -1174,7 +1196,7 @@
}
}
.imageList {
.imageChooseList {
display: inline-flex;
align-items: center;
// justify-content: center;
@ -1198,11 +1220,11 @@
}
}
.imageList::-webkit-scrollbar {
.imageChooseList::-webkit-scrollbar {
display: block;
height: 2px;
}
.imageList {
.imageChooseList {
scrollbar-width: auto;
scrollbar-color: #888 #f1f1f100;
}

@ -231,10 +231,12 @@
// --------------------------------
const editNameFlag = ref(true);
const editName = ref(props.nowPreviewRecord.name.split('.').slice(0, -1).join('.'));
const editName = ref();
function editNameChange() {
if (props.nowPreviewRecord.name.split('.').length <= 1) {
editName.value = props.nowPreviewRecord.name;
} else {
editName.value = props.nowPreviewRecord.name.split('.').slice(0, -1).join('.');
}
editNameFlag.value = false;
}
@ -275,6 +277,7 @@
? props.nowPreviewRecord.graffitiJson
: [];
fileTags.value = props.nowPreviewRecord.fileTags ? props.nowPreviewRecord.fileTags : [];
editNameFlag.value = true;
},
{
deep: true,

@ -2,7 +2,7 @@
<div class="videoDiv">
<div class="showVideo">
<video
:src="`${VITE_MEDIALIBRARY_IMAGE_URL + props.nowPreviewRecord.objectKey}`"
:src="`${VITE_GLOB_MEDIALIBRARY_IMAGE_URL + props.nowPreviewRecord.objectKey}`"
class="video-player"
controls
muted
@ -31,7 +31,7 @@
</a-tooltip>
</div>
</div>
<div class="imageList">
<div class="videoChooseList">
<div v-for="li in props.previewRecordList" :key="li.id" @click="chooseNowPreviewRecord(li)">
<div
v-if="li.objectKey"
@ -62,7 +62,8 @@
import { Deletepic } from '@/api/demo/mediaLibrary';
import { getAppEnvConfig } from '@/utils/env';
import { useMessage } from '@/hooks/web/useMessage';
const { VITE_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
import { ref, watch, onMounted } from 'vue';
const { VITE_GLOB_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const { createConfirm, createMessage } = useMessage();
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
@ -95,7 +96,7 @@
//
async function fetchAndDownloadVideo(url) {
try {
const response = await fetch(VITE_MEDIALIBRARY_IMAGE_URL + url, {
const response = await fetch(VITE_GLOB_MEDIALIBRARY_IMAGE_URL + url, {
mode: 'cors',
});
if (!response.ok) {
@ -144,6 +145,37 @@
function chooseNowPreviewRecord(value) {
emits('chooseNowPreviewRecord', value);
}
watch(
() => props.nowPreviewRecord,
() => {
//
setScrollLeft();
},
{
deep: true,
immediate: true,
},
);
onMounted(() => {
//
setScrollLeft();
});
//
function setScrollLeft() {
const videoChooseListDocument: any = document.querySelector('.videoChooseList');
if (videoChooseListDocument) {
let index = props.previewRecordList.findIndex((item) => item.id == props.nowPreviewRecord.id);
let length = props.previewRecordList.length;
if (index < 5) {
videoChooseListDocument.scrollLeft = 0;
} else if (index + 7 > length) {
videoChooseListDocument.scrollLeft = 80 * length;
} else {
videoChooseListDocument.scrollLeft = 80 * (index - 5);
}
}
}
</script>
<style lang="less" scoped>
.videoDiv {
@ -190,7 +222,7 @@
}
}
.imageList {
.videoChooseList {
display: inline-flex;
align-items: center;
justify-content: center;

@ -179,10 +179,12 @@
// --------------------------------
const editNameFlag = ref(true);
const editName = ref(props.nowPreviewRecord.name.split('.').slice(0, -1).join('.'));
const editName = ref('');
function editNameChange() {
if (props.nowPreviewRecord.name.split('.').length <= 1) {
editName.value = props.nowPreviewRecord.name;
} else {
editName.value = props.nowPreviewRecord.name.split('.').slice(0, -1).join('.');
}
editNameFlag.value = false;
}
@ -219,6 +221,7 @@
() => props.nowPreviewRecord,
() => {
fileTags.value = props.nowPreviewRecord.fileTags ? props.nowPreviewRecord.fileTags : [];
editNameFlag.value = true;
},
{
deep: true,

@ -35,12 +35,14 @@
@changeLoadControl="changeLoadControl"
:msgData="msgData"
:cameraType="cameraType"
:zIndex="zIndex"
/>
<!-- 飞行控制 -->
<FlightControl
@changeFlightControl="changeFlightControl"
@clickTakeOff="clickTakeOff"
@clickFlyTo="clickFlyTo"
:zIndex="zIndex"
v-if="flightControlVisible"
/>
<!-- 一键起飞表单 -->
@ -48,6 +50,7 @@
v-if="takeOffFormVisible"
@changeTakeOffForm="changeTakeOffForm"
:locationVal="locationVal"
:zIndex="zIndex"
/>
<!-- 指点飞行表单 -->
@ -55,10 +58,12 @@
v-if="flyToFormVisible"
@changeFlyToForm="changeFlyToForm"
:locationVal="locationVal"
:zIndex="zIndex"
/>
<AirportLive
:msgData="msgData"
v-if="airportLiveVisible"
:zIndex="zIndex"
@changeAirportLive="airportLiveVisible = false"
/>
<LivePreview
@ -67,6 +72,7 @@
:uavLive="uavLive"
:uavStatus="uavStatus"
:airportLiveVisible="airportLiveVisible"
:zIndex="zIndex"
@loadLiveStreaming="livePreviewVisible = false"
@changeCameraType="changeCameraType"
/>
@ -95,6 +101,7 @@
import { drcUpTopic } from '@/utils/debugging/remote';
import { airPortStore } from '@/store/modules/airport';
const zIndex = ref(0);
const airPortStoreVal = airPortStore();
const airPortInfo = airPortStoreVal.getAirport;
const UAVinfo = airPortStoreVal.getUAV;
@ -123,11 +130,12 @@
connected.value = true;
};
const topicUrl = computed(() => {
return 'thing/product/' + airPortInfo.sn + '/osd'
})
return 'thing/product/' + airPortInfo.sn + '/osd';
});
const topicUAVUrl = computed(() => {
return 'thing/product/' + UAVinfo.sn + '/osd'
})
return 'thing/product/' + UAVinfo.sn + '/osd';
});
const mqttData = ref([]);
onMounted(() => {
destroyConnection();
createConnection(connectCallback);
@ -144,6 +152,8 @@
if (topic == topicUAVUrl.value) {
if (rs.data.latitude && rs.data.longitude) {
uavTrack.value = rs.data;
mqttData.value.push(rs.data);
console.log(mqttData.value);
}
} else if (topic == topicUrl.value) {
if (rs.data.latitude && rs.data.longitude) {
@ -189,21 +199,26 @@
const uavLive = ref(false);
const changeAirportLive = () => {
airportLiveVisible.value = !airportLiveVisible.value;
zIndex.value++;
};
const changeRemote = () => {
remoteVisible.value = !remoteVisible.value;
};
const changeLoadControl = () => {
loadControlVisible.value = !loadControlVisible.value;
zIndex.value++;
};
const changeFlightControl = () => {
flightControlVisible.value = !flightControlVisible.value;
zIndex.value++;
};
const clickTakeOff = () => {
takeOffFormVisible.value = true;
zIndex.value++;
};
const clickFlyTo = () => {
flyToFormVisible.value = true;
zIndex.value++;
};
const changeTakeOffForm = (val) => {
takeOffFormVisible.value = false;
@ -218,6 +233,7 @@
const loadLiveStreaming = (val) => {
livePreviewVisible.value = !livePreviewVisible.value;
uavStatus.value = val;
zIndex.value++;
};
const changeFlyToForm = () => {
flyToFormVisible.value = false;
@ -249,10 +265,10 @@
changeSelectValue.value = value;
const topicUrl = 'thing/product/' + airPortInfo.sn + '/osd';
//
clientSubscribe(topicUrl, { qos: 0 });
clientSubscribe(topicUrl, { qos: 1 });
const topicUAVUrl = 'thing/product/' + UAVinfo.sn + '/osd';
//
clientSubscribe(topicUAVUrl, { qos: 0 });
clientSubscribe(topicUAVUrl, { qos: 1 });
};
</script>
<style lang="less" scoped>

@ -4,6 +4,7 @@
:h="height"
:x="left"
:y="top"
:z="zIndex"
:isActive="true"
:parentLimitation="true"
@dragging="changeSize"
@ -53,21 +54,24 @@
import { getClient } from '@/utils/mqtt';
import VueDragResize from 'vue-drag-resize/src';
const props = defineProps({
msgData: Object,
zIndex: Number,
});
const pageHeight = document.documentElement.clientHeight;
const pageWidth = document.documentElement.clientWidth;
const width = ref(500);
const height = ref(348);
const left = ref(pageWidth - 800);
const top = ref(pageHeight - 460);
const zIndex = ref(props.zIndex);
const axisVal = ref('none');
const airPortStoreVal = airPortStore();
const live_info = airPortStoreVal.getLiveInfo;
const airPort = airPortStoreVal.getAirport;
const { createMessage } = useMessage();
const emits = defineEmits(['changeAirportLive']);
const props = defineProps({
msgData: Object,
});
let player;
const liveCode = ref('5');
console.log(liveCode);

@ -4,6 +4,7 @@
:h="height"
:x="left"
:y="top"
:z="zIndex"
:isActive="true"
:parentLimitation="true"
:isResizable="false"
@ -194,6 +195,9 @@
import { airPortStore } from '@/store/modules/airport';
import { EventBus } from '@/utils/eventBus';
const props = defineProps({
zIndex: Number,
});
const uavStatus = ref(0);
const airPortStoreVal = airPortStore();
const uav = airPortStoreVal.getUAV;
@ -202,6 +206,7 @@
const height = ref(390);
const left = ref(700);
const top = ref(100);
const zIndex = ref(props.zIndex);
const userStore = useUserStore();
const userInfo = userStore.getUserInfo;
const redisUser = ref({});
@ -628,7 +633,8 @@
border-radius: 6px;
backdrop-filter: blur(3px);
color: #fff;
position: relative;
z-index: 10;
.title {
width: 100%;
padding: 10px 0;

@ -4,6 +4,7 @@
:h="height"
:x="left"
:y="top"
:z="zIndex"
:isActive="true"
:parentLimitation="true"
:isResizable="false"
@ -64,15 +65,17 @@
import VueDragResize from 'vue-drag-resize/src';
import { useMessage } from '@/hooks/web/useMessage';
const emits = defineEmits(['changeFlyToForm']);
const props = defineProps({
msgData: Object,
zIndex: Number,
});
const { createMessage } = useMessage();
const width = ref(460);
const height = ref(260);
const left = ref(300);
const top = ref(120);
const emits = defineEmits(['changeFlyToForm']);
const props = defineProps({
msgData: Object,
});
const zIndex = ref(props.zIndex);
const data = reactive({
fly_to_id: buildGUID(),
@ -129,7 +132,6 @@
</script>
<style lang="less" scoped>
.takeoff-information {
z-index: 999;
width: 96%;
height: 98%;
padding: 10px;

@ -4,6 +4,7 @@
:h="height"
:x="left"
:y="top"
:z="zIndex"
:isActive="true"
:parentLimitation="true"
@dragging="changeSize"
@ -80,23 +81,25 @@
import { airPortStore } from '@/store/modules/airport';
import VueDragResize from 'vue-drag-resize/src';
const airPortStoreVal = airPortStore();
const live_info = airPortStoreVal.getLiveInfo;
const uav = airPortStoreVal.getUAV;
const { createMessage } = useMessage();
const emits = defineEmits(['loadLiveStreaming', 'changeCameraType']);
const props = defineProps({
msgData: Object,
uavLive: Boolean,
airportLiveVisible: Boolean,
uavStatus: Number,
zIndex: Number,
});
const emits = defineEmits(['loadLiveStreaming', 'changeCameraType']);
const airPortStoreVal = airPortStore();
const live_info = airPortStoreVal.getLiveInfo;
const uav = airPortStoreVal.getUAV;
const { createMessage } = useMessage();
const pageHeight = document.documentElement.clientHeight;
const pageWidth = document.documentElement.clientWidth;
const width = ref(500);
const height = ref(348);
const left = ref(pageWidth - 800);
const top = ref(pageHeight - 460);
const zIndex = ref(props.zIndex);
if (props.airportLiveVisible) {
top.value = pageHeight - 820;
}

@ -4,6 +4,7 @@
:h="height"
:x="left"
:y="top"
:z="zIndex"
:isActive="true"
:parentLimitation="true"
:isResizable="false"
@ -124,24 +125,26 @@
import { airPortStore } from '@/store/modules/airport';
import VueDragResize from 'vue-drag-resize/src';
const props = defineProps({
msgData: Object,
cameraType: String,
zIndex: Number,
});
const width = ref(400);
const height = ref(440);
const left = ref(300);
const top = ref(100);
const zIndex = ref(props.zIndex);
const airPortStoreVal = airPortStore();
const airPort = airPortStoreVal.getAirport;
const uav = airPortStoreVal.getUAV;
const selectName = ref('');
const userStore = useUserStore();
const userInfo = userStore.getUserInfo;
const redisUser = ref({});
const { createMessage } = useMessage();
const emits = defineEmits(['changeLoadControl']);
const props = defineProps({
msgData: Object,
cameraType: String,
});
const uavStatus = ref();
const monitorDRC = ref(false);
//

@ -4,6 +4,7 @@
:h="height"
:x="left"
:y="top"
:z="zIndex"
:isActive="true"
:parentLimitation="true"
:isResizable="false"
@ -118,18 +119,20 @@
import VueDragResize from 'vue-drag-resize/src';
import { useMessage } from '@/hooks/web/useMessage';
const emits = defineEmits(['changeTakeOffForm']);
const props = defineProps({
msgData: Object,
zIndex: Number,
});
const { createMessage } = useMessage();
const width = ref(460);
const height = ref(620);
const left = ref(300);
const top = ref(100);
const zIndex = ref(props.zIndex);
const airPortStoreVal = airPortStore();
const airPort = airPortStoreVal.getAirport;
const emits = defineEmits(['changeTakeOffForm']);
const props = defineProps({
msgData: Object,
});
const data = reactive({
flight_id: uuid(14, 14),
target_latitude: null,

@ -253,7 +253,6 @@
position: absolute;
top: 360px;
left: 0;
z-index: 999;
width: 260px;
padding: 10px;
background: #0d0e15;

@ -75,7 +75,7 @@
<div class="setting-label">雨量</div>
</div>
<div class="setting-value-div">
<template v-if="!isEdit"> {{ item.rainFall }}</template>
<template v-if="!isEdit"> {{ getRainLevel(item.rainFall) }}</template>
<template v-else>
<a-select
class="setting-weather-select"
@ -104,10 +104,13 @@ const emits = defineEmits([])
const isEdit = ref(false)
const oldValue = ref('')
const weatherOptions = [
{ label: '小雨', value: '小雨' },
{ label: '中雨', value: '中雨' },
{ label: '大雨', value: '大雨' }
{ label: '小雨', value: '1' },
{ label: '中雨', value: '2' },
{ label: '大雨', value: '3' }
]
const getRainLevel = (level) => {
return weatherOptions.find(item => item.value == level)?.label
}
const changeEdit = (value,type) => {
if(value){

2
types/config.d.ts vendored

@ -164,7 +164,7 @@ export interface GlobEnvConfig {
VITE_GLOB_APP_LOGO?: string;
// info image video
VITE_GLOB_INFO_IMAGE_URL?: string;
VITE_MEDIALIBRARY_IMAGE_URL?: string;
VITE_GLOB_MEDIALIBRARY_IMAGE_URL?: string;
VITE_GLOB_APP_MANAGEMENT_UNIT?: string;
VITE_GLOB_APP_TECHINICAL_SUPPORT?: string;
VITE_GLOB_APP_VERSIONS?: string;

Loading…
Cancel
Save