Compare commits
2 Commits
f9973fe0b8
...
9836661532
| Author | SHA1 | Date |
|---|---|---|
|
|
9836661532 | |
|
|
534b0bd61c |
|
|
@ -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});
|
||||
}
|
||||
|
||||
// 任务
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
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
|
||||
export const calculateGsd = (height,uavModel) => {
|
||||
let gsd = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue