刘妍 1 month ago
commit 467a0435d0

@ -36,8 +36,8 @@ enum Api{
}
// 项目
export function getWorkspaceList(){
return defHttp.get({ url: Api.GetTaskPageList, params });
export function getWorkspaceList(params){
return defHttp.get({ url: Api.GetWorkspaceList,params});
}
// 任务

@ -219,7 +219,7 @@
<RenameModal @register="renameModal" @handleSuccess="handleSuccess" />
<!-- 预览弹窗 -->
<a-modal
v-model:open="open"
v-model:open="openPreview"
width="100%"
wrap-class-name="full-modal"
:centered="true"
@ -268,7 +268,7 @@
</PageWrapper>
</template>
<script lang="ts" setup>
import { reactive, ref, watch, h } from 'vue';
import { reactive, ref, watch, h, onMounted } from 'vue';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { PageWrapper } from '@/components/Page';
import { useModal } from '@/components/Modal';
@ -302,8 +302,9 @@
import { AddFolderModal, MoveFileModal, CompressFileModal, RenameModal } from './modal/modal';
import { PermissionBtn } from '@/components/PermissionBtn/index';
import { getAppEnvConfig } from '@/utils/env';
import { useRoute, useRouter } from 'vue-router';
import { useMessage } from '@/hooks/web/useMessage';
import { columns, searchFormSchema, svg_showOnMap_0, svg_showOnMap_1 } from './modal.data';
import { columns, searchFormSchema } from './modal.data';
import dayjs from 'dayjs';
import { cloneDeep } from 'lodash-es';
@ -323,11 +324,20 @@
//
if (newval === 'store') {
//
GetMediaFile({
parentKey: nowParentKey.value,
page: 1,
limit: 1000,
}).then((res) => {
let query = { ...searchParams.value, page: 1, limit: 1000 };
if (routeFlag.value) {
query = {
...query,
taskId: route.query.flightId,
objectKeyExist: 1,
};
} else {
query = {
...query,
parentKey: nowParentKey.value,
};
}
GetMediaFile(query).then((res) => {
showTableData.value = res.items;
tableTypeAfterShow.value = newval;
// -
@ -416,6 +426,34 @@
}
}
//
const route = useRoute();
const router = useRouter();
const routeFlag = ref(true);
onMounted(() => {
if (route.query.flightId) {
routeFlag.value = true;
//
getFloder();
} else {
routeFlag.value = false;
}
});
//
async function getFloder() {
GetMediaFile({
taskId: route.query.flightId,
objectKeyExist: 0,
page: 1,
limit: 10,
}).then((res) => {
floders.value.push({
id: res.items[0].id,
name: res.items[0].name,
});
});
}
//
//
const floders = ref([
@ -455,13 +493,26 @@
showTableSetting: true,
beforeFetch: (data) => {
//
let temp = {
...data,
page: tableTypeAfterShow.value == 'table' ? data.page : 1,
limit: tableTypeAfterShow.value == 'table' ? data.limit : 1000,
parentKey: nowParentKey.value,
};
return temp;
// -
if (routeFlag.value) {
let temp = {
...data,
page: tableTypeAfterShow.value == 'table' ? data.page : 1,
limit: tableTypeAfterShow.value == 'table' ? data.limit : 1000,
taskId: route.query.flightId,
objectKeyExist: 1,
};
return temp;
} else {
//
let temp = {
...data,
page: tableTypeAfterShow.value == 'table' ? data.page : 1,
limit: tableTypeAfterShow.value == 'table' ? data.limit : 1000,
parentKey: nowParentKey.value,
};
return temp;
}
},
handleSearchInfoFn(info) {
if (info.startTime && info.endTime) {
@ -475,7 +526,8 @@
return info;
},
afterFetch: (res) => {
res.forEach((arr) => {
let result = res;
result.forEach((arr) => {
if (arr.fileTags) {
arr.fileTags = JSON.parse(arr.fileTags);
} else {
@ -487,18 +539,28 @@
arr.graffitiJson = [];
}
});
return res;
return result;
},
});
//
function getChildrenByProp(f, index) {
nowParentKey.value = f.id;
floders.value = floders.value.splice(0, index + 1);
clearSelectedRowKeys();
reload().then((res) => {
showTableData.value = res;
});
async function getChildrenByProp(f, index) {
// -
if (f.name == '全部文件' && routeFlag.value) {
const cleanQuery = { ...route.query };
delete cleanQuery.flightId;
await router.replace({
path: route.path,
query: cleanQuery,
});
} else {
nowParentKey.value = f.id;
floders.value = floders.value.splice(0, index + 1);
clearSelectedRowKeys();
reload().then((res) => {
showTableData.value = res;
});
}
}
// ----------------------------------------------------------------------
@ -522,18 +584,26 @@
if (previewRecordList.value.length != 0) {
nowPreviewRecord.value = previewRecordList.value[index];
} else {
open.value = false;
openPreview.value = false;
}
}
});
} else {
//
GetMediaFile({
...searchParams.value,
parentKey: nowParentKey.value,
page: 1,
limit: 1000,
}).then((res) => {
let query = { ...searchParams.value, page: 1, limit: 1000 };
if (routeFlag.value) {
query = {
...query,
taskId: route.query.flightId,
objectKeyExist: 1,
};
} else {
query = {
...query,
parentKey: nowParentKey.value,
};
}
GetMediaFile(query).then((res) => {
previewRecordList.value = uniqueByKey(res.items, nowPreviewRecord.value).sort((a, b) => {
return dayjs(a.createTime) - dayjs(b.createTime);
});
@ -615,7 +685,7 @@
}
// ----------------------------------------------------------------------------
const open = ref(false);
const openPreview = ref(false);
//
const nowPreviewRecord: any = ref();
//
@ -624,18 +694,26 @@
async function lookRecord(record) {
//
if (record.objectKey) {
GetMediaFile({
...searchParams.value,
parentKey: nowParentKey.value,
page: 1,
limit: 100,
}).then((res) => {
let query = { ...searchParams.value, page: 1, limit: 1000 };
if (routeFlag.value) {
query = {
...query,
taskId: route.query.flightId,
objectKeyExist: 1,
};
} else {
query = {
...query,
parentKey: nowParentKey.value,
};
}
GetMediaFile(query).then((res) => {
nowPreviewRecord.value = record;
//
previewRecordList.value = uniqueByKey(res.items, record).sort((a, b) => {
return dayjs(a.createTime) - dayjs(b.createTime);
});
open.value = true;
openPreview.value = true;
});
}
//
@ -695,7 +773,7 @@
//
function closeModal() {
document.body.style.cursor = 'auto';
open.value = false;
openPreview.value = false;
}
// ----------------------------------------------------------------------
@ -717,11 +795,20 @@
//
const pathDivShow = ref(false);
function showPathDiv(record) {
GetMediaFile({
parentKey: record.parentKey,
page: 1,
limit: 1000,
}).then((res) => {
let query = { ...searchParams.value, page: 1, limit: 1000 };
if (routeFlag.value) {
query = {
...query,
taskId: route.query.flightId,
objectKeyExist: 1,
};
} else {
query = {
...query,
parentKey: nowParentKey.value,
};
}
GetMediaFile(query).then((res) => {
allImageDataList.value = res.items.filter(
(item) => item.objectKey && item.objectKey.includes('.jpeg'),
);

@ -201,30 +201,4 @@ export const renameSchema: FormSchema[] = [
label: '新名称',
required: true,
}
];
export const svg_showOnMap_1 = `<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 24 24"
width="16"
height="16"
>
<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="#000000"
></path>
</svg>`;
export const svg_showOnMap_0 = `<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 24 24"
width="16"
height="16"
>
<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="#000000"
></path>
</svg>`;
];

@ -35,7 +35,7 @@
{{
props.nowShowImageData.siz
? (props.nowShowImageData.size / 1024 / 1024).toFixed(2) + 'M' + '&nbsp;&nbsp;&nbsp;'
: ''
: imageSize + '&nbsp;&nbsp;&nbsp;'
}}
</span>
<span>
@ -835,6 +835,8 @@
}
//
setScrollLeft();
//
getImageSize();
editNameFlag.value = true;
},
{
@ -848,6 +850,31 @@
setScrollLeft();
});
//
const imageSize = ref('');
async function getImageSize() {
try {
const response = await fetch(
VITE_GLOB_MEDIALIBRARY_IMAGE_URL + props.nowShowImageData.objectKey,
{ method: 'HEAD' },
);
if (!response.ok) {
imageSize.value = '--';
throw new Error(`HTTP error! status: ${response.status}`);
}
const contentLength = response.headers.get('Content-Length');
if (contentLength) {
const sizeInBytes = parseInt(contentLength, 10);
const sizeInMB = (sizeInBytes / (1024 * 1024)).toFixed(2);
imageSize.value = parseFloat(sizeInMB) + 'M';
} else {
imageSize.value = '--';
}
} catch (error) {
imageSize.value = '--';
}
}
//
function addFileTagsChange() {
addFileTagsFlag.value = true;
@ -1407,7 +1434,7 @@
//
.closeButton {
position: absolute;
top: 30px;
top: 2%;
right: 20px;
z-index: 200;
}

@ -139,7 +139,6 @@
CheckCircleOutlined,
StopOutlined,
} from '@ant-design/icons-vue';
import { showOnMap_1, showOnMap_0 } from './svg';
import {
UpdatePicStatus,
Deletepic,
@ -217,7 +216,6 @@
const searchValue = ref('');
function handleChangeImageSearch() {
let filterImageData = props.allImageDataList;
// let filterImageData = props.allImageDataList.filter((item) => item.showOnMap == 1);
//
if (tagSelect.value.length > 0) {
tagSelect.value.forEach((tag) => {
@ -270,13 +268,6 @@
//
function funShowOnMapOrDisplay(show, type) {
// if (type == 'showOnMap') {
// if (show.showOnMap == 1) {
// show.showOnMap = 0;
// } else {
// show.showOnMap = 1;
// }
// }
if (type == 'display') {
if (show.display == 1) {
show.display = 0;
@ -291,13 +282,6 @@
display: show.display,
showOnMap: show.showOnMap,
}).then((res) => {
// if (type == 'showOnMap') {
// if (show.showOnMap) {
// createMessage.success('');
// } else {
// createMessage.success('');
// }
// }
emits('handleSuccessPath');
emits('funUpdateDisplayOrShowOnMapData', show);
});
@ -425,7 +409,7 @@
.closeButton {
position: absolute;
top: 2%;
top: 1%;
right: -25px;
width: 20px;
height: 20px;

@ -1,30 +1,3 @@
export const showOnMap_1 = `<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 24 24"
width="18"
height="18"
>
<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>`;
export const showOnMap_0 = `<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 24 24"
width="18"
height="18"
>
<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>`;
export const graffiti_svg = `<svg width="25px" height="25px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="作业区域-新增迭代724-展开" transform="translate(-1692, -817)">

@ -3,13 +3,14 @@
<div class="title">
<div class="title-1">{{ props.nowPreviewRecord.name }}</div>
<div class="title-2">
{{
props.nowPreviewRecord.createTime +
' ' +
props.nowPreviewRecord.size +
' ' +
props.nowPreviewRecord.id
}}
<ClockCircleOutlined />
<span>
{{
'&nbsp;&nbsp;' +
dayjs(props.nowPreviewRecord.createTime).format('YYYY-MM-DD HH:mm:ss (UTCZ)') +
'&nbsp;&nbsp;&nbsp;'
}}
</span>
</div>
</div>
<div class="closeButton">
@ -74,14 +75,14 @@
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { CloseOutlined } from '@ant-design/icons-vue';
import { CloseOutlined, ClockCircleOutlined } from '@ant-design/icons-vue';
import {
PreviewImage,
PreviewImageInformation,
PreviewVideo,
PreviewVideoInformation,
} from './preview';
import dayjs from 'dayjs';
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
const emits = defineEmits([
'closeModal',
@ -132,11 +133,12 @@
z-index: 100;
.title-1 {
font-size: 20px;
font-size: 24px;
font-weight: 500;
color: #ffffff;
}
.title-2 {
font-size: 16px;
font-size: 18px;
color: #f0f3f3;
}
}

@ -326,42 +326,6 @@
<BorderHorizontalOutlined @click="c" />
</a-tooltip>
</div>
<!-- 加载到地图上 -->
<!-- <div class="button2" @click="funShowOnMap">
<a-tooltip placement="top">
<template #title>
<span>
{{ props.nowPreviewRecord.showOnMap == 1 ? '在地图上取消加载' : '在地图上加载' }}
</span>
</template>
<svg
v-if="props.nowPreviewRecord.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.nowPreviewRecord.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>
</div> -->
<!-- 复制到剪贴板 -->
<div class="button">
<a-tooltip placement="top">
@ -700,29 +664,6 @@
}
};
// //
// function funShowOnMap() {
// if (props.nowPreviewRecord.showOnMap == 1) {
// props.nowPreviewRecord.showOnMap = 0;
// } else {
// props.nowPreviewRecord.showOnMap = 1;
// }
// UpdatePicStatus({
// id: props.nowPreviewRecord.id,
// fileTags: JSON.stringify(fileTags.value),
// graffitiJson: JSON.stringify(graffitis.value),
// display: props.nowPreviewRecord.display,
// showOnMap: props.nowPreviewRecord.showOnMap,
// }).then((res) => {
// if (props.nowPreviewRecord.showOnMap == 1) {
// createMessage.success('');
// } else {
// createMessage.success('');
// }
// emits('handleSuccessPreview');
// });
// }
//
async function fetchAndDownloadImage(url) {
try {

@ -51,7 +51,7 @@
{{
props.nowPreviewRecord.size
? (props.nowPreviewRecord.size / 1024 / 1024).toFixed(2) + 'M'
: '--'
: imageSize
}}
</span>
</a-col>
@ -59,13 +59,13 @@
<span class="infotitle">拍摄飞机</span>
</a-col>
<a-col :span="17">
<span class="infovalue">{{ props.nowPreviewRecord.taskDronePortName || '--' }} </span>
<span class="infovalue">{{ props.nowPreviewRecord.droneModelName || '0-100-1' }} </span>
</a-col>
<a-col :span="7">
<span class="infotitle">拍摄负载</span>
</a-col>
<a-col :span="17">
<span class="infovalue">{{ props.nowPreviewRecord.payloadModelKey || '--' }} </span>
<span class="infovalue">{{ props.nowPreviewRecord.payloadModelName || '1-99-0' }} </span>
</a-col>
<a-col :span="7">
<span class="infotitle">拍摄人员</span>
@ -225,6 +225,8 @@
import { Map } from './preview';
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage, createConfirm } = useMessage();
import { getAppEnvConfig } from '@/utils/env';
const { VITE_GLOB_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const props = defineProps(['nowPreviewRecord', 'previewRecordList', 'hideOrShowTextboxFlag']);
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccessPreview', 'openPathModal']);
@ -278,6 +280,7 @@
: [];
fileTags.value = props.nowPreviewRecord.fileTags ? props.nowPreviewRecord.fileTags : [];
editNameFlag.value = true;
getImageSize();
},
{
deep: true,
@ -364,10 +367,30 @@
emits('chooseNowPreviewRecord', value);
}
// //
// function openPathModal() {
// emits('openPathModal', props.nowPreviewRecord);
// }
//
const imageSize = ref('');
async function getImageSize() {
try {
const response = await fetch(
VITE_GLOB_MEDIALIBRARY_IMAGE_URL + props.nowPreviewRecord.objectKey,
{ method: 'HEAD' },
);
if (!response.ok) {
imageSize.value = '--';
throw new Error(`HTTP error! status: ${response.status}`);
}
const contentLength = response.headers.get('Content-Length');
if (contentLength) {
const sizeInBytes = parseInt(contentLength, 10);
const sizeInMB = (sizeInBytes / (1024 * 1024)).toFixed(2);
imageSize.value = parseFloat(sizeInMB) + 'M';
} else {
imageSize.value = '--';
}
} catch (error) {
imageSize.value = '--';
}
}
</script>
<style lang="less" scoped>
.title {

@ -30,13 +30,13 @@
<span class="infotitle">航线名称</span>
</a-col>
<a-col :span="17">
<span class="infovalue">{{ props.nowPreviewRecord.taskAirLineName || '--' }} </span>
<span class="infovalue">{{ props.nowPreviewRecord.airLineName || '--' }} </span>
</a-col>
<a-col :span="7">
<span class="infotitle">视频时长</span>
</a-col>
<a-col :span="17">
<span class="infovalue">{{ taskAirLineName || '--' }} </span>
<span class="infovalue">{{ videoDuration }} </span>
</a-col>
<a-col :span="7">
<span class="infotitle">视频分辨率</span>
@ -45,8 +45,8 @@
<span class="infovalue">
{{
props.nowPreviewRecord.width && props.nowPreviewRecord.height
? props.nowPreviewRecord.width + '*' + props.nowPreviewRecord.height
: '--'
? props.nowPreviewRecord.width + ' * ' + props.nowPreviewRecord.height
: videoWidth + ' * ' + videoHeight
}}
</span>
</a-col>
@ -55,20 +55,20 @@
</a-col>
<a-col :span="17">
<span class="infovalue">
{{ props.nowPreviewRecord.size || '--' }}
{{ props.nowPreviewRecord.size || videoSize }}
</span>
</a-col>
<a-col :span="7">
<span class="infotitle">拍摄负载</span>
</a-col>
<a-col :span="17">
<span class="infovalue">{{ props.nowPreviewRecord.payloadModelKey || '--' }} </span>
<span class="infovalue">{{ props.nowPreviewRecord.payloadModelName || '1-99-0' }} </span>
</a-col>
<a-col :span="7">
<span class="infotitle">文件来源</span>
</a-col>
<a-col :span="17">
<span class="infovalue">{{ createUserName || '--' }}</span>
<span class="infovalue">{{ props.nowPreviewRecord.createUserName || '--' }}</span>
</a-col>
<a-col :span="7">
<span class="infotitle">拍摄时间</span>
@ -155,6 +155,8 @@
import { UpdatePicName, UpdatePicStatus } from '@/api/demo/mediaLibrary';
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage } = useMessage();
import { getAppEnvConfig } from '@/utils/env';
const { VITE_GLOB_MEDIALIBRARY_IMAGE_URL } = getAppEnvConfig();
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccessPreview']);
@ -204,6 +206,8 @@
() => {
fileTags.value = props.nowPreviewRecord.fileTags ? props.nowPreviewRecord.fileTags : [];
editNameFlag.value = true;
getVideoSize();
getVideoDurationAndWH();
},
{
deep: true,
@ -253,6 +257,54 @@
});
}
//
const videoSize = ref('');
async function getVideoSize() {
try {
const response = await fetch(
VITE_GLOB_MEDIALIBRARY_IMAGE_URL + props.nowPreviewRecord.objectKey,
{ method: 'HEAD' },
);
if (!response.ok) {
videoSize.value = '--';
throw new Error(`HTTP error! status: ${response.status}`);
}
const contentLength = response.headers.get('Content-Length');
if (contentLength) {
const sizeInBytes = parseInt(contentLength, 10);
const sizeInMB = (sizeInBytes / (1024 * 1024)).toFixed(2);
videoSize.value = sizeInMB + 'M';
} else {
videoSize.value = '--';
}
} catch (error) {
videoSize.value = '--';
}
}
//
const videoDuration = ref('--');
const videoHeight = ref(0);
const videoWidth = ref(0);
function getVideoDurationAndWH() {
return new Promise((resolve, reject) => {
const video = document.createElement('video');
video.preload = 'metadata';
video.src = VITE_GLOB_MEDIALIBRARY_IMAGE_URL + props.nowPreviewRecord.objectKey;
video.onloadedmetadata = () => {
const duration = video.duration;
const minutes = Math.floor(duration / 60);
const seconds = Math.floor(duration % 60);
videoDuration.value = minutes + ':' + seconds.toString().padStart(2, '0');
videoHeight.value = video.videoHeight;
videoWidth.value = video.videoWidth;
video.remove();
};
video.onerror = (err) => {
videoDuration.value = '--';
};
});
}
//
function chooseNowPreviewRecord(value) {
emits('chooseNowPreviewRecord', value);

@ -33,19 +33,20 @@
</div>
</a-form-item> -->
<!-- <a-form-item ref="name" label="选择项目" name="name">
<a-button type="primary" style="width:100%;" @click="selectAriLine" v-show="!submitForm.airLineId">
<PlusOutlined />
选择项目
</a-button>
<div class="select-item" v-show="submitForm.airLineId">
<div class="item-name">{{submitForm.taskAirLineName}}</div>
<div class="item-operate" @click="selectAriLine">
<MoreOutlined />
</div>
<a-form-item ref="workspaceId" label="选择项目" name="workspaceId">
<div class="">
<a-select
v-model:value="submitForm.workspaceId"
placeholder="请选择所属项目"
>
<a-select-option
v-for="(item,index) in workspaceList" :key="index" :value="item.Id">
{{item.WorkspaceName}}
</a-select-option>
</a-select>
</div>
</a-form-item> -->
</a-form-item>
<a-form-item ref="name" label="选择航线" name="name">
@ -223,7 +224,7 @@
<script lang="ts" setup>
import { ref, defineEmits, defineProps, watch } from "vue";
import { PlusOutlined,LeftOutlined,DeleteOutlined,MoreOutlined } from '@ant-design/icons-vue';
import { addTask,editTask } from "@/api/sys/workplan";
import { addTask,editTask,getWorkspaceList } from "@/api/sys/workplan";
import { Modal, message } from 'ant-design-vue';
import { useRoute,useRouter } from 'vue-router'
@ -318,6 +319,16 @@ const submitForm = ref({
"externalTaskId": null,
})
// workspace
const workspaceList = ref([]);
const loadWorkspaceList = async () => {
let res = await getWorkspaceList({isjoin:0});
workspaceList.value = res;
}
loadWorkspaceList();
const weekdays = ref([
{
@ -559,6 +570,9 @@ const rules = {
"taskName":[
{ required: true, message: "计划名称不能为空!", trigger: "blur" },
],
"workspaceId":[
{ required: true, message: "请选择项目!", trigger: "blur" },
],
"onceTime":[
{ required: true, message: "时间不能为空!", trigger: "blur" },
]
@ -975,4 +989,9 @@ const handleRepeatTypeChange = ()=>{
-webkit-text-fill-color: #ffffff; /* 修改文字颜色(红色) */
transition: background-color 5000s ease-in-out 0s; /* 防止背景色闪烁 */
}
::v-deep .ant-select-selection-search-input::placeholder{
color:red!important;
}
</style>

@ -288,14 +288,14 @@
watch(
() => props.wayline,
(newVal, oldVal) => {
generatePreviewPoint(newVal?.Folder?.Placemark);
// generatePreviewPoint(newVal?.Folder?.Placemark);
},
);
watch(
() => props.waylineInfo,
(newVal,oldVal) => {
console.log("newval999",newVal);
}
)

@ -39,9 +39,15 @@
<div class="ari-line" v-for="(item,index) in ariLineList" :key="index">
<div class="title">
<div v-for="(opt,idx) in planStatusOptions" :key="idx" v-show="item.status == opt.status" class="state" :style="{'border-color':opt.color,'color':opt.color}">
{{ opt.label }}
</div>
<a-tooltip placement="top">
<template #title v-if="item.status == 2">
<span>{{item.reason}}</span>
</template>
<div v-for="(opt,idx) in planStatusOptions" :key="idx" v-show="item.status == opt.status" class="state" :style="{'border-color':opt.color,'color':opt.color}">
{{ opt.label }}
</div>
</a-tooltip>
<div style="flex:1;">
{{item.taskName}}
@ -361,6 +367,7 @@
padding:0px 4px;
position:relative;
top:2px;
cursor:pointer;
}
.ari-line .state-no{

@ -238,12 +238,10 @@ const workPlanStatus = ref("");
const planDetail =async (item) => {
formData.value = item;
let info =await getAirLine({airLineId : formData.value?.airLineId});
if(info){
waylineInfo.value = info;
wayline.value = await airLineDetail(info);
}
workPlanFormShow.value = true;
workPlanStatus.value = "detail"
}

@ -1,21 +1,33 @@
// 相机参数
export const uavModel = {
"m4td":{
"focalLength":6.83,
"sensorLength":9.85,
"focalLength":6.72,
"sensorLength":9.6,
"imageWidth":4032,
"imageHeight":3024,
"pixelLength":0.23914590747330963
}
}
// 输入gsd计算高度
export const calculateHeight = (gsd,uavModel) => {
let height = 0;
// 飞行高度= GSD(cm)×实际焦距(mm)/像元尺寸(um)
let abc = (gsd * uavModel['focalLength'] / uavModel['pixelLength']);
console.log("abc",abc);
height = ( (gsd / 100) * (uavModel['focalLength'] / 1000) * uavModel['imageWidth'] ) / ( uavModel['sensorLength'] / 1000 );
return height.toFixed(2);
return height.toFixed(2);
}
// 140.2 = 5 * 6.72 / x
// 输入高度计算gsd
export const calculateGsd = (height,uavModel) => {
let gsd = 0;

Loading…
Cancel
Save