Compare commits

..

No commits in common. "98366615320c30f910c15ffa9088314c8ea4c262" and "f9973fe0b803b317a765b267cee9c776efdddc18" have entirely different histories.

6 changed files with 25 additions and 61 deletions

View File

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

View File

@ -33,20 +33,19 @@
</div> </div>
</a-form-item> --> </a-form-item> -->
<a-form-item ref="workspaceId" label="选择项目" name="workspaceId"> <!-- <a-form-item ref="name" label="选择项目" name="name">
<div class=""> <a-button type="primary" style="width:100%;" @click="selectAriLine" v-show="!submitForm.airLineId">
<a-select <PlusOutlined />
v-model:value="submitForm.workspaceId" 选择项目
placeholder="请选择所属项目" </a-button>
>
<a-select-option <div class="select-item" v-show="submitForm.airLineId">
v-for="(item,index) in workspaceList" :key="index" :value="item.Id"> <div class="item-name">{{submitForm.taskAirLineName}}</div>
{{item.WorkspaceName}} <div class="item-operate" @click="selectAriLine">
</a-select-option> <MoreOutlined />
</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">
@ -224,7 +223,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,getWorkspaceList } from "@/api/sys/workplan"; import { addTask,editTask } 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'
@ -319,16 +318,6 @@ 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([
{ {
@ -570,9 +559,6 @@ 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" },
] ]
@ -989,9 +975,4 @@ 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>

View File

@ -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);
} }
) )

View File

@ -39,15 +39,9 @@
<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">
<a-tooltip placement="top"> <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}">
<template #title v-if="item.status == 2"> {{ opt.label }}
<span>{{item.reason}}</span> </div>
</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}}
@ -367,7 +361,6 @@
padding:0px 4px; padding:0px 4px;
position:relative; position:relative;
top:2px; top:2px;
cursor:pointer;
} }
.ari-line .state-no{ .ari-line .state-no{

View File

@ -238,10 +238,12 @@ 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"
} }

View File

@ -1,33 +1,21 @@
// 相机参数 // 相机参数
export const uavModel = { export const uavModel = {
"m4td":{ "m4td":{
"focalLength":6.72, "focalLength":6.83,
"sensorLength":9.6, "sensorLength":9.85,
"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; 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 ); 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 // 输入高度计算gsd
export const calculateGsd = (height,uavModel) => { export const calculateGsd = (height,uavModel) => {
let gsd = 0; let gsd = 0;