Compare commits
2 Commits
f9973fe0b8
...
9836661532
| Author | SHA1 | Date |
|---|---|---|
|
|
9836661532 | |
|
|
534b0bd61c |
|
|
@ -36,8 +36,8 @@ enum Api{
|
||||||
}
|
}
|
||||||
|
|
||||||
// 项目
|
// 项目
|
||||||
export function getWorkspaceList(){
|
export function getWorkspaceList(params){
|
||||||
return defHttp.get({ url: Api.GetTaskPageList, params });
|
return defHttp.get({ url: Api.GetWorkspaceList,params});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 任务
|
// 任务
|
||||||
|
|
|
||||||
|
|
@ -33,19 +33,20 @@
|
||||||
</div>
|
</div>
|
||||||
</a-form-item> -->
|
</a-form-item> -->
|
||||||
|
|
||||||
<!-- <a-form-item ref="name" label="选择项目" name="name">
|
<a-form-item ref="workspaceId" label="选择项目" name="workspaceId">
|
||||||
<a-button type="primary" style="width:100%;" @click="selectAriLine" v-show="!submitForm.airLineId">
|
<div class="">
|
||||||
<PlusOutlined />
|
<a-select
|
||||||
选择项目
|
v-model:value="submitForm.workspaceId"
|
||||||
</a-button>
|
placeholder="请选择所属项目"
|
||||||
|
>
|
||||||
<div class="select-item" v-show="submitForm.airLineId">
|
<a-select-option
|
||||||
<div class="item-name">{{submitForm.taskAirLineName}}</div>
|
v-for="(item,index) in workspaceList" :key="index" :value="item.Id">
|
||||||
<div class="item-operate" @click="selectAriLine">
|
{{item.WorkspaceName}}
|
||||||
<MoreOutlined />
|
</a-select-option>
|
||||||
</div>
|
|
||||||
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item> -->
|
</a-form-item>
|
||||||
|
|
||||||
|
|
||||||
<a-form-item ref="name" label="选择航线" name="name">
|
<a-form-item ref="name" label="选择航线" name="name">
|
||||||
|
|
@ -223,7 +224,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, defineEmits, defineProps, watch } from "vue";
|
import { ref, defineEmits, defineProps, watch } from "vue";
|
||||||
import { PlusOutlined,LeftOutlined,DeleteOutlined,MoreOutlined } from '@ant-design/icons-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 { Modal, message } from 'ant-design-vue';
|
||||||
import { useRoute,useRouter } from 'vue-router'
|
import { useRoute,useRouter } from 'vue-router'
|
||||||
|
|
@ -318,6 +319,16 @@ const submitForm = ref({
|
||||||
"externalTaskId": null,
|
"externalTaskId": null,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 获取workspace
|
||||||
|
const workspaceList = ref([]);
|
||||||
|
|
||||||
|
const loadWorkspaceList = async () => {
|
||||||
|
let res = await getWorkspaceList({isjoin:0});
|
||||||
|
workspaceList.value = res;
|
||||||
|
}
|
||||||
|
|
||||||
|
loadWorkspaceList();
|
||||||
|
|
||||||
|
|
||||||
const weekdays = ref([
|
const weekdays = ref([
|
||||||
{
|
{
|
||||||
|
|
@ -559,6 +570,9 @@ const rules = {
|
||||||
"taskName":[
|
"taskName":[
|
||||||
{ required: true, message: "计划名称不能为空!", trigger: "blur" },
|
{ required: true, message: "计划名称不能为空!", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
"workspaceId":[
|
||||||
|
{ required: true, message: "请选择项目!", trigger: "blur" },
|
||||||
|
],
|
||||||
"onceTime":[
|
"onceTime":[
|
||||||
{ required: true, message: "时间不能为空!", trigger: "blur" },
|
{ required: true, message: "时间不能为空!", trigger: "blur" },
|
||||||
]
|
]
|
||||||
|
|
@ -975,4 +989,9 @@ const handleRepeatTypeChange = ()=>{
|
||||||
-webkit-text-fill-color: #ffffff; /* 修改文字颜色(红色) */
|
-webkit-text-fill-color: #ffffff; /* 修改文字颜色(红色) */
|
||||||
transition: background-color 5000s ease-in-out 0s; /* 防止背景色闪烁 */
|
transition: background-color 5000s ease-in-out 0s; /* 防止背景色闪烁 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::v-deep .ant-select-selection-search-input::placeholder{
|
||||||
|
color:red!important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -288,14 +288,14 @@
|
||||||
watch(
|
watch(
|
||||||
() => props.wayline,
|
() => props.wayline,
|
||||||
(newVal, oldVal) => {
|
(newVal, oldVal) => {
|
||||||
generatePreviewPoint(newVal?.Folder?.Placemark);
|
// generatePreviewPoint(newVal?.Folder?.Placemark);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.waylineInfo,
|
() => props.waylineInfo,
|
||||||
(newVal,oldVal) => {
|
(newVal,oldVal) => {
|
||||||
console.log("newval999",newVal);
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,15 @@
|
||||||
<div class="ari-line" v-for="(item,index) in ariLineList" :key="index">
|
<div class="ari-line" v-for="(item,index) in ariLineList" :key="index">
|
||||||
<div class="title">
|
<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}">
|
<a-tooltip placement="top">
|
||||||
{{ opt.label }}
|
<template #title v-if="item.status == 2">
|
||||||
</div>
|
<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;">
|
<div style="flex:1;">
|
||||||
{{item.taskName}}
|
{{item.taskName}}
|
||||||
|
|
@ -361,6 +367,7 @@
|
||||||
padding:0px 4px;
|
padding:0px 4px;
|
||||||
position:relative;
|
position:relative;
|
||||||
top:2px;
|
top:2px;
|
||||||
|
cursor:pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ari-line .state-no{
|
.ari-line .state-no{
|
||||||
|
|
|
||||||
|
|
@ -238,12 +238,10 @@ const workPlanStatus = ref("");
|
||||||
const planDetail =async (item) => {
|
const planDetail =async (item) => {
|
||||||
formData.value = item;
|
formData.value = item;
|
||||||
let info =await getAirLine({airLineId : formData.value?.airLineId});
|
let info =await getAirLine({airLineId : formData.value?.airLineId});
|
||||||
|
|
||||||
if(info){
|
if(info){
|
||||||
waylineInfo.value = info;
|
waylineInfo.value = info;
|
||||||
wayline.value = await airLineDetail(info);
|
wayline.value = await airLineDetail(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
workPlanFormShow.value = true;
|
workPlanFormShow.value = true;
|
||||||
workPlanStatus.value = "detail"
|
workPlanStatus.value = "detail"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,33 @@
|
||||||
// 相机参数
|
// 相机参数
|
||||||
export const uavModel = {
|
export const uavModel = {
|
||||||
"m4td":{
|
"m4td":{
|
||||||
"focalLength":6.83,
|
"focalLength":6.72,
|
||||||
"sensorLength":9.85,
|
"sensorLength":9.6,
|
||||||
"imageWidth":4032,
|
"imageWidth":4032,
|
||||||
"imageHeight":3024,
|
"imageHeight":3024,
|
||||||
|
"pixelLength":0.23914590747330963
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 输入gsd计算高度
|
// 输入gsd计算高度
|
||||||
export const calculateHeight = (gsd,uavModel) => {
|
export const calculateHeight = (gsd,uavModel) => {
|
||||||
let height = 0;
|
|
||||||
height = ( (gsd / 100) * (uavModel['focalLength'] / 1000) * uavModel['imageWidth'] ) / ( uavModel['sensorLength'] / 1000 );
|
|
||||||
return height.toFixed(2);
|
|
||||||
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 140.2 = 5 * 6.72 / x
|
||||||
|
|
||||||
|
|
||||||
// 输入高度计算gsd
|
// 输入高度计算gsd
|
||||||
export const calculateGsd = (height,uavModel) => {
|
export const calculateGsd = (height,uavModel) => {
|
||||||
let gsd = 0;
|
let gsd = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue