|
|
|
@ -1,93 +1,106 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="shade-container" v-if="drawarea"></div>
|
|
|
|
|
<div class="airport-information">
|
|
|
|
|
<div class="title">选择AI算法实例<span> 航飞要求 </span></div>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<div class="content-edit instantiate" @click="instantiateVisible = !instantiateVisible">
|
|
|
|
|
<div class="input-result">
|
|
|
|
|
<span :style="{ backgroundColor: instantiateItem.displayColor }">
|
|
|
|
|
{{ instantiateItem.displayScheme }}</span
|
|
|
|
|
>
|
|
|
|
|
{{ instantiateItem.name }}
|
|
|
|
|
<VueDragResize
|
|
|
|
|
:w="width"
|
|
|
|
|
:h="height"
|
|
|
|
|
:x="left"
|
|
|
|
|
:y="top"
|
|
|
|
|
:z="zIndex"
|
|
|
|
|
:isActive="true"
|
|
|
|
|
:parentLimitation="true"
|
|
|
|
|
:isResizable="false"
|
|
|
|
|
>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="shade-container" v-if="drawarea"></div>
|
|
|
|
|
<div class="airport-information">
|
|
|
|
|
<div class="title">选择AI算法实例 <span> 航飞要求 </span></div>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<div class="content-edit instantiate" @click="instantiateVisible = !instantiateVisible">
|
|
|
|
|
<div class="input-result">
|
|
|
|
|
<span :style="{ backgroundColor: instantiateItem.displayColor }">
|
|
|
|
|
{{ instantiateItem.displayScheme }}</span
|
|
|
|
|
>
|
|
|
|
|
{{ instantiateItem.name }}
|
|
|
|
|
</div>
|
|
|
|
|
<UpOutlined v-if="instantiateVisible" />
|
|
|
|
|
<DownOutlined v-else />
|
|
|
|
|
<div class="select-result" v-if="instantiateVisible">
|
|
|
|
|
<div
|
|
|
|
|
v-for="(item, index) in instantiateOptions"
|
|
|
|
|
:key="index"
|
|
|
|
|
@click="instantiateSelect(item)"
|
|
|
|
|
>
|
|
|
|
|
<span :style="{ backgroundColor: item.displayColor }">{{
|
|
|
|
|
item.displayScheme
|
|
|
|
|
}}</span>
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<UpOutlined v-if="instantiateVisible" />
|
|
|
|
|
<DownOutlined v-else />
|
|
|
|
|
<div class="select-result" v-if="instantiateVisible">
|
|
|
|
|
<div
|
|
|
|
|
v-for="(item, index) in instantiateOptions"
|
|
|
|
|
:key="index"
|
|
|
|
|
@click="instantiateSelect(item)"
|
|
|
|
|
>
|
|
|
|
|
<span :style="{ backgroundColor: item.displayColor }">{{ item.displayScheme }}</span>
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
<div class="content-edit space">
|
|
|
|
|
<span>空间约束范围</span>
|
|
|
|
|
<div class="space-content">
|
|
|
|
|
<span>导入KML</span>
|
|
|
|
|
<span @click="drawarea = true"><PlusOutlined />新增</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-edit space">
|
|
|
|
|
<span>空间约束范围</span>
|
|
|
|
|
<div class="space-content">
|
|
|
|
|
<span>导入KML</span>
|
|
|
|
|
<span @click="drawarea = true"><PlusOutlined />新增</span>
|
|
|
|
|
<div class="content-title">
|
|
|
|
|
<span>识别时间范围</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-edit">
|
|
|
|
|
<a-select v-model:value="data.time" :options="timeOptions" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-title">
|
|
|
|
|
<span>触发动作</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-edit" style="border: none">
|
|
|
|
|
<a-radio-group v-model:value="data.action" button-style="solid">
|
|
|
|
|
<a-radio-button value="1">关闭</a-radio-button>
|
|
|
|
|
<a-radio-button value="2">等待接管</a-radio-button>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-title">
|
|
|
|
|
<span>警告提示标题</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-edit">
|
|
|
|
|
<a-input v-model:value="data.code" placeholder="异常提示" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-title">
|
|
|
|
|
<span>警告提示内容</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-edit">
|
|
|
|
|
<a-textarea v-model:value="data.desc" placeholder="识别到异常目标" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-button">
|
|
|
|
|
<a-button type="primary" style="background: #3a57e8" @click="emits('changePatrol')"
|
|
|
|
|
>取消</a-button
|
|
|
|
|
>
|
|
|
|
|
<a-button type="primary" style="background: #0a99eb; margin-left: 20px" @click="submit"
|
|
|
|
|
>确定</a-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-title">
|
|
|
|
|
<span>识别时间范围</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-edit">
|
|
|
|
|
<a-select v-model:value="data.time" :options="timeOptions" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-title">
|
|
|
|
|
<span>触发动作</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-edit" style="border: none">
|
|
|
|
|
<a-radio-group v-model:value="data.action" button-style="solid">
|
|
|
|
|
<a-radio-button value="1">关闭</a-radio-button>
|
|
|
|
|
<a-radio-button value="2">等待接管</a-radio-button>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-title">
|
|
|
|
|
<span>警告提示标题</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-edit">
|
|
|
|
|
<a-input v-model:value="data.code" placeholder="异常提示" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-title">
|
|
|
|
|
<span>警告提示内容</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-edit">
|
|
|
|
|
<a-textarea v-model:value="data.desc" placeholder="识别到异常目标" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="patrol-map" v-if="drawarea">
|
|
|
|
|
<div class="title">绘制范围</div>
|
|
|
|
|
<div class="map-container">
|
|
|
|
|
<div class="map-container-content">
|
|
|
|
|
<Map :drawArea="drawarea" @areaData="getAreaData" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-button">
|
|
|
|
|
<a-button type="primary" style="background: #3a57e8" @click="emits('changePatrol')"
|
|
|
|
|
<a-button type="primary" style="background: #3a57e8" @click="drawarea = false"
|
|
|
|
|
>取消</a-button
|
|
|
|
|
>
|
|
|
|
|
<a-button type="primary" style="background: #0a99eb; margin-left: 20px" @click="submit"
|
|
|
|
|
<a-button
|
|
|
|
|
type="primary"
|
|
|
|
|
style="background: #0a99eb; margin-left: 20px"
|
|
|
|
|
@click="patrolMapConfirm"
|
|
|
|
|
>确定</a-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="patrol-map" v-if="drawarea">
|
|
|
|
|
<div class="title">绘制范围</div>
|
|
|
|
|
<div class="map-container">
|
|
|
|
|
<div class="map-container-content">
|
|
|
|
|
<Map :drawArea="drawarea" @areaData="getAreaData" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-button">
|
|
|
|
|
<a-button type="primary" style="background: #3a57e8" @click="drawarea = false"
|
|
|
|
|
>取消</a-button
|
|
|
|
|
>
|
|
|
|
|
<a-button
|
|
|
|
|
type="primary"
|
|
|
|
|
style="background: #0a99eb; margin-left: 20px"
|
|
|
|
|
@click="patrolMapConfirm"
|
|
|
|
|
>确定</a-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</VueDragResize>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { reactive, ref, watch, onMounted } from 'vue';
|
|
|
|
@ -103,6 +116,7 @@
|
|
|
|
|
import { airPortStore } from '@/store/modules/airport';
|
|
|
|
|
import { callAiModel } from '@/api/workmanagement/droneDock';
|
|
|
|
|
import { EventBus } from '@/utils/eventBus';
|
|
|
|
|
import VueDragResize from 'vue-drag-resize/src';
|
|
|
|
|
|
|
|
|
|
const airPortStoreVal = airPortStore();
|
|
|
|
|
|
|
|
|
@ -111,7 +125,14 @@
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
taskId: String,
|
|
|
|
|
type: String,
|
|
|
|
|
zIndex: Number,
|
|
|
|
|
});
|
|
|
|
|
const pageWidth = document.documentElement.clientWidth;
|
|
|
|
|
const width = ref(300);
|
|
|
|
|
const height = ref(550);
|
|
|
|
|
const left = ref(pageWidth - 620);
|
|
|
|
|
const top = ref(100);
|
|
|
|
|
const zIndex = ref(props.zIndex);
|
|
|
|
|
const data = reactive({
|
|
|
|
|
instantiate: null,
|
|
|
|
|
code: '',
|
|
|
|
@ -177,14 +198,14 @@
|
|
|
|
|
createMessage.warning('请选择AI算法实例');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!data.code) {
|
|
|
|
|
createMessage.warning('警告提示标题不能为空');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!data.desc) {
|
|
|
|
|
createMessage.warning('警告提示内容不能为空');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// if (!data.code) {
|
|
|
|
|
// createMessage.warning('警告提示标题不能为空');
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// if (!data.desc) {
|
|
|
|
|
// createMessage.warning('警告提示内容不能为空');
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
if (props.type == 'plan') {
|
|
|
|
|
const querys = {
|
|
|
|
|
algoInstanceId: instantiateItem.value.id,
|
|
|
|
@ -206,7 +227,7 @@
|
|
|
|
|
console.log(res);
|
|
|
|
|
createMessage.success('操作成功');
|
|
|
|
|
airPortStoreVal.setTaskId(props.taskId);
|
|
|
|
|
emits('changePatrol');
|
|
|
|
|
emits('changePatrol', true);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
onMounted(() => {
|
|
|
|
@ -248,8 +269,8 @@
|
|
|
|
|
}
|
|
|
|
|
.airport-information {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 100px;
|
|
|
|
|
right: 140px;
|
|
|
|
|
top: 0;
|
|
|
|
|
right: 5px;
|
|
|
|
|
width: 290px;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
background: #0d0e15;
|
|
|
|
|