|
|
|
|
@ -17,7 +17,7 @@
|
|
|
|
|
>
|
|
|
|
|
<div class="group-container">
|
|
|
|
|
<a-form-item ref="name" label="计划名称" name="taskName">
|
|
|
|
|
<a-input v-model:value="submitForm.taskName" placeholder="请输入计划名称" />
|
|
|
|
|
<a-input v-model:value="submitForm.taskName" placeholder="请输入计划名称" :disabled="props.workPlanStatus === 'detail'" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@ -35,7 +35,7 @@
|
|
|
|
|
|
|
|
|
|
<a-form-item ref="workspaceId" label="选择项目" name="workspaceId">
|
|
|
|
|
<div class="">
|
|
|
|
|
<a-select v-model:value="submitForm.workspaceId" placeholder="请选择所属项目">
|
|
|
|
|
<a-select v-model:value="submitForm.workspaceId" placeholder="请选择所属项目" :disabled="props.workPlanStatus === 'detail'" >
|
|
|
|
|
<a-select-option
|
|
|
|
|
v-for="(item, index) in workspaceList"
|
|
|
|
|
:key="index"
|
|
|
|
|
@ -60,7 +60,7 @@
|
|
|
|
|
|
|
|
|
|
<div class="select-item" v-show="submitForm.airLineId">
|
|
|
|
|
<div class="item-name">{{ submitForm.taskAirLineName }}</div>
|
|
|
|
|
<div class="item-operate" @click="selectAriLine">
|
|
|
|
|
<div class="item-operate" @click="props.workPlanStatus =='create' ? selectAriLine() : null" :style="{'cursor' : props.workPlanStatus =='create' ? '' : 'not-allowed'}">
|
|
|
|
|
<MoreOutlined />
|
|
|
|
|
<a-dropdown v-if="false">
|
|
|
|
|
<MoreOutlined />
|
|
|
|
|
@ -96,7 +96,7 @@
|
|
|
|
|
|
|
|
|
|
<div class="select-item" v-show="submitForm.taskDronePort">
|
|
|
|
|
<div class="item-name">{{ submitForm.taskDronePortName }}</div>
|
|
|
|
|
<div class="item-operate" @click="selectAircraft">
|
|
|
|
|
<div class="item-operate" @click="props.workPlanStatus =='create' ? selectAircraft() : null" :style="{'cursor' : props.workPlanStatus =='create' ? '' : 'not-allowed'}">
|
|
|
|
|
<MoreOutlined />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -115,7 +115,7 @@
|
|
|
|
|
:class="
|
|
|
|
|
submitForm.waylinePrecisionType == item.value ? 'radio-item-active' : 'radio-item'
|
|
|
|
|
"
|
|
|
|
|
@click="submitForm.waylinePrecisionType = item.value"
|
|
|
|
|
@click="props.workPlanStatus =='create' ? submitForm.waylinePrecisionType = item.value : null" :style="{'cursor' : props.workPlanStatus =='create' ? '' : 'not-allowed'}"
|
|
|
|
|
>
|
|
|
|
|
{{ item.label }}
|
|
|
|
|
</div>
|
|
|
|
|
@ -128,7 +128,7 @@
|
|
|
|
|
v-for="(item, index) in periodicFormulaOptions"
|
|
|
|
|
:key="index"
|
|
|
|
|
:class="submitForm.taskType == item.value ? 'radio-item-active' : 'radio-item'"
|
|
|
|
|
@click="submitForm.taskType = item.value"
|
|
|
|
|
@click="props.workPlanStatus =='create' ? submitForm.taskType = item.value : null" :style="{'cursor' : props.workPlanStatus =='create' ? '' : 'not-allowed'}"
|
|
|
|
|
>
|
|
|
|
|
{{ item.label }}
|
|
|
|
|
</div>
|
|
|
|
|
@ -145,6 +145,7 @@
|
|
|
|
|
show-time
|
|
|
|
|
placeholder="选择时间"
|
|
|
|
|
@change="onOnceTimeChange"
|
|
|
|
|
:disabled="props.workPlanStatus === 'detail'"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
@ -156,6 +157,7 @@
|
|
|
|
|
valueFormat="YYYY-M-D"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
@change="onRepeatDateChange"
|
|
|
|
|
:disabled="props.workPlanStatus === 'detail'"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
@ -166,6 +168,7 @@
|
|
|
|
|
valueFormat="H:m:s"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
@change="onRepeatTimeChange"
|
|
|
|
|
:disabled="props.workPlanStatus === 'detail'"
|
|
|
|
|
/>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
@ -180,6 +183,7 @@
|
|
|
|
|
ref="select"
|
|
|
|
|
v-model:value="repeatTime.type"
|
|
|
|
|
@change="handleRepeatTypeChange"
|
|
|
|
|
:disabled="props.workPlanStatus === 'detail'"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option value="date">天</a-select-option>
|
|
|
|
|
<!-- <a-select-option value="week">周</a-select-option> -->
|
|
|
|
|
@ -204,14 +208,44 @@
|
|
|
|
|
<div style="flex: 1">智能巡检</div>
|
|
|
|
|
<div>
|
|
|
|
|
<a-switch
|
|
|
|
|
v-model:checked="submitForm.aiInspection"
|
|
|
|
|
:checked="submitForm.aiInspection == 'true'"
|
|
|
|
|
checked-color="#3A57E8"
|
|
|
|
|
un-checked-color="#cccccc"
|
|
|
|
|
@change="changeAiInspection"
|
|
|
|
|
:disabled="props.workPlanStatus === 'detail'"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-if="submitForm.aiInspection == 'true'">
|
|
|
|
|
<a-form-item ref="algoInstanceld" label="选择AI算法实例" name="algoInstanceld">
|
|
|
|
|
<div class="">
|
|
|
|
|
<a-select v-model:value="submitForm.algoInstanceld" placeholder="请选择所属项目" :disabled="props.workPlanStatus === 'detail'" >
|
|
|
|
|
<a-select-option
|
|
|
|
|
v-for="(item, index) in aiList"
|
|
|
|
|
:key="index"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
>
|
|
|
|
|
{{ item.displayScheme }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
<a-form-item ref="name" label="警告提示标题" name="">
|
|
|
|
|
<a-input v-model:value="submitForm.warningTitle" placeholder="请输入警告提示标题" :disabled="props.workPlanStatus === 'detail'" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
|
|
|
|
<a-form-item ref="name" label="警告提示内容" name="">
|
|
|
|
|
<a-textarea rows="4" v-model:value="submitForm.warningContent" style="resize: none;" placeholder="请输入警告提示内容" :disabled="props.workPlanStatus === 'detail'" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="group-container">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a-form-item ref="outOfContact" label="返航高度(相对机场返航高度)" name="outOfContact">
|
|
|
|
|
<div class="return-height">
|
|
|
|
|
<div @click="submitForm.returnAltitude -= 100">-100</div>
|
|
|
|
|
@ -223,6 +257,7 @@
|
|
|
|
|
size="small"
|
|
|
|
|
v-model:value="submitForm.returnAltitude"
|
|
|
|
|
style="width: 40px"
|
|
|
|
|
:disabled="props.workPlanStatus === 'detail'"
|
|
|
|
|
></a-input>
|
|
|
|
|
</div>
|
|
|
|
|
<div>m</div>
|
|
|
|
|
@ -240,7 +275,7 @@
|
|
|
|
|
:class="
|
|
|
|
|
submitForm.lossOfControlAction == item.value ? 'radio-item-active' : 'radio-item'
|
|
|
|
|
"
|
|
|
|
|
@click="submitForm.lossOfControlAction = item.value"
|
|
|
|
|
@click="props.workPlanStatus =='create' ? submitForm.lossOfControlAction = item.value : null" :style="{'cursor' : props.workPlanStatus =='create' ? '' : 'not-allowed'}"
|
|
|
|
|
>
|
|
|
|
|
{{ item.label }}
|
|
|
|
|
</div>
|
|
|
|
|
@ -260,7 +295,8 @@
|
|
|
|
|
:class="
|
|
|
|
|
submitForm.continuationMode == item.value ? 'radio-item-active' : 'radio-item'
|
|
|
|
|
"
|
|
|
|
|
@click="submitForm.continuationMode = item.value"
|
|
|
|
|
@click="props.workPlanStatus =='create' ? submitForm.continuationMode = item.value : null" :style="{'cursor' : props.workPlanStatus =='create' ? '' : 'not-allowed'}"
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
{{ item.label }}
|
|
|
|
|
</div>
|
|
|
|
|
@ -342,6 +378,7 @@
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import JSZip from 'jszip';
|
|
|
|
|
import { GetMediaFile } from '@/api/demo/mediaLibrary';
|
|
|
|
|
import {GetAlgoInstanceList} from '@/api/demo/aiinstance';
|
|
|
|
|
import { XMLParser, XMLBuilder } from 'fast-xml-parser';
|
|
|
|
|
import { Modal, message } from 'ant-design-vue';
|
|
|
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
|
|
|
@ -376,7 +413,6 @@
|
|
|
|
|
returnAltitude: 100,
|
|
|
|
|
lossOfControlAction: 1,
|
|
|
|
|
continuationMode: 0,
|
|
|
|
|
aiInspection: null,
|
|
|
|
|
status: 0,
|
|
|
|
|
periodicFormula: null,
|
|
|
|
|
airLineId: null,
|
|
|
|
|
@ -395,6 +431,10 @@
|
|
|
|
|
flightId: null,
|
|
|
|
|
reason: null,
|
|
|
|
|
externalTaskId: null,
|
|
|
|
|
aiInspection: null, // ai算法
|
|
|
|
|
algoInstanceld:null,
|
|
|
|
|
warningTitle:null,
|
|
|
|
|
warningContent:null,
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
editMode: {
|
|
|
|
|
@ -418,7 +458,6 @@
|
|
|
|
|
returnAltitude: 20,
|
|
|
|
|
lossOfControlAction: 1,
|
|
|
|
|
continuationMode: 0,
|
|
|
|
|
aiInspection: null,
|
|
|
|
|
status: 0,
|
|
|
|
|
periodicFormula: null,
|
|
|
|
|
airLineId: null,
|
|
|
|
|
@ -437,6 +476,10 @@
|
|
|
|
|
flightId: null,
|
|
|
|
|
reason: null,
|
|
|
|
|
externalTaskId: null,
|
|
|
|
|
aiInspection: null, // ai算法
|
|
|
|
|
algoInstanceld:null,
|
|
|
|
|
warningTitle:null,
|
|
|
|
|
warningContent:null,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 获取workspace
|
|
|
|
|
@ -444,6 +487,7 @@
|
|
|
|
|
|
|
|
|
|
const loadWorkspaceList = async () => {
|
|
|
|
|
let res = await getWorkspaceList({ isjoin: 0 });
|
|
|
|
|
|
|
|
|
|
workspaceList.value = res;
|
|
|
|
|
|
|
|
|
|
if (res) {
|
|
|
|
|
@ -454,6 +498,20 @@
|
|
|
|
|
|
|
|
|
|
loadWorkspaceList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取AI算法实例实例
|
|
|
|
|
const aiList = ref([]);
|
|
|
|
|
|
|
|
|
|
const loadAIList = async()=>{
|
|
|
|
|
let res = await GetAlgoInstanceList({page:1,size:999});
|
|
|
|
|
|
|
|
|
|
aiList.value = res.items;
|
|
|
|
|
|
|
|
|
|
console.log("aiLlist",aiList.value,)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
loadAIList();
|
|
|
|
|
|
|
|
|
|
const weekdays = ref([
|
|
|
|
|
{
|
|
|
|
|
label: '周日',
|
|
|
|
|
@ -737,6 +795,7 @@
|
|
|
|
|
taskName: [{ required: true, message: '计划名称不能为空!', trigger: 'blur' }],
|
|
|
|
|
workspaceId: [{ required: true, message: '请选择项目!', trigger: 'blur' }],
|
|
|
|
|
onceTime: [{ required: true, message: '时间不能为空!', trigger: 'blur' }],
|
|
|
|
|
algoInstanceld:[{ required: true, message: '算法实例不能为空!', trigger: 'blur' }]
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const onSubmit = async () => {
|
|
|
|
|
@ -759,7 +818,8 @@
|
|
|
|
|
|
|
|
|
|
if (props.formData) {
|
|
|
|
|
// 编辑
|
|
|
|
|
let data = { ...submitForm.value, ...patrol.value };
|
|
|
|
|
// let data = { ...submitForm.value, ...patrol.value };
|
|
|
|
|
let data = { ...submitForm.value };
|
|
|
|
|
|
|
|
|
|
// let res = editTask(data);
|
|
|
|
|
addTask(data).then((res) => {
|
|
|
|
|
@ -775,9 +835,9 @@
|
|
|
|
|
submitForm.value.externalTaskId = paramValue;
|
|
|
|
|
}
|
|
|
|
|
// 创建
|
|
|
|
|
|
|
|
|
|
const query = {
|
|
|
|
|
...submitForm.value,
|
|
|
|
|
...patrol.value,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
addTask(query).then((res) => {
|
|
|
|
|
@ -921,7 +981,8 @@
|
|
|
|
|
const changeAiInspection = (val) => {
|
|
|
|
|
|
|
|
|
|
if (val) {
|
|
|
|
|
emit('intelligentPatrol');
|
|
|
|
|
submitForm.value.aiInspection = 'true';
|
|
|
|
|
// emit('intelligentPatrol');
|
|
|
|
|
}else{
|
|
|
|
|
submitForm.value.aiInspection = null;
|
|
|
|
|
}
|
|
|
|
|
|