|
|
@@ -79,47 +79,47 @@
|
|
|
</template>
|
|
|
<!-- 媒体上传 -->
|
|
|
<template #media_upload="{ record }">
|
|
|
- <div class="flex-display flex-align-center">
|
|
|
- <span class="circle-icon" :style="{ backgroundColor: formatMediaTaskStatus(record).color }"></span>
|
|
|
- {{ formatMediaTaskStatus(record).text }}
|
|
|
- </div>
|
|
|
- <div class="pl15">
|
|
|
- {{ formatMediaTaskStatus(record).number }}
|
|
|
+ <div style="display: flex;align-items: center;">
|
|
|
+ <div style="display: flex;align-items: center;">
|
|
|
+ <span class="circle-icon" :style="{ backgroundColor: formatMediaTaskStatus(record).color }"></span>
|
|
|
+ {{ formatMediaTaskStatus(record).text }}
|
|
|
+ </div>
|
|
|
+ <div class="pl15">
|
|
|
+ {{ formatMediaTaskStatus(record).number }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template #action="{ record }">
|
|
|
<div class="flex-align-center flex-row" style="color: #2d8cf0">
|
|
|
- <a-tooltip title="断点续飞" v-if="record.breakpoint_continuation && [5].includes(record.status)"
|
|
|
- @click="onClickContinueFlight(record.job_id)">
|
|
|
- <ApiOutlined style="margin-right: 10px;" />
|
|
|
+ <a-tooltip title="查看详情">
|
|
|
+ <EyeOutlined style="margin-right: 10px;" @click="onClickLookDetail(record.job_id)" />
|
|
|
</a-tooltip>
|
|
|
- <a-tooltip title="复制任务" v-if="[0, 1].includes(record.task_type)" @click="onClickCopy(record.job_id)">
|
|
|
- <CopyOutlined style=" margin-right: 10px;" />
|
|
|
+ <a-tooltip title="复制任务" v-if="[0, 1].includes(record.task_type)">
|
|
|
+ <CopyOutlined style=" margin-right: 10px;" @click="onClickCopy(record.job_id)" />
|
|
|
</a-tooltip>
|
|
|
- <a-tooltip title="查看轨迹" v-if="false">
|
|
|
- <GatewayOutlined style="margin-right: 10px;" />
|
|
|
+ <a-tooltip title="断点续飞" v-if="record.breakpoint_continuation && record.wayline_mission_state === 7">
|
|
|
+ <ApiOutlined style="margin-right: 10px;" @click="onClickContinueFlight(record.job_id)" />
|
|
|
</a-tooltip>
|
|
|
- <a-tooltip title="删除">
|
|
|
+ <a-tooltip title="删除" v-if="record.status !== 4">
|
|
|
<DeleteOutlined @click="onClickDelete(record.job_id, record.job_name)" />
|
|
|
</a-tooltip>
|
|
|
</div>
|
|
|
</template>
|
|
|
</a-table>
|
|
|
</div>
|
|
|
- <CreateTaskModal :jobId="state.currentJobId" :visible="state.visible"
|
|
|
- :onClickConfirm="createTaskModalOnClickConfirm" :onClickCancel="createTaskModalOnClickCancel"
|
|
|
- v-if="state.visible" />
|
|
|
+ <TaskModal :jobId="state.currentJobId" :type="state.currentType" :visible="state.visible"
|
|
|
+ :onClickConfirm="taskModalOnClickConfirm" :onClickCancel="taskModalOnClickCancel" v-if="state.visible" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { reactive, onMounted, watch } from 'vue';
|
|
|
import { Modal, message } from 'ant-design-vue';
|
|
|
-import { ExclamationCircleOutlined, ApiOutlined, CopyOutlined, GatewayOutlined, DeleteOutlined } from '@ant-design/icons-vue';
|
|
|
+import { ExclamationCircleOutlined, ApiOutlined, CopyOutlined, EyeOutlined, DeleteOutlined } from '@ant-design/icons-vue';
|
|
|
import Search from './components/Search.vue';
|
|
|
import Airport from '/@/components/airport/index.vue';
|
|
|
-import CreateTaskModal from './components/CreateTaskModal.vue';
|
|
|
+import TaskModal from './components/TaskModal.vue';
|
|
|
import noDataSrc from '/@/assets/icons/no-data.png';
|
|
|
import { useFormatTask } from '/@/components/task/use-format-task';
|
|
|
import { apis } from '/@/api/custom';
|
|
|
@@ -131,6 +131,7 @@ import { EDeviceTypeName } from '/@/types';
|
|
|
|
|
|
interface State {
|
|
|
currentJobId: string,
|
|
|
+ currentType: 'COPY' | 'DETAIL' | 'CREATE',
|
|
|
visible: boolean,
|
|
|
collapsed: boolean,
|
|
|
onlineDockListLoading: boolean,
|
|
|
@@ -142,6 +143,7 @@ interface State {
|
|
|
|
|
|
const state: State = reactive({
|
|
|
currentJobId: '',
|
|
|
+ currentType: 'CREATE',
|
|
|
visible: false,
|
|
|
collapsed: true,
|
|
|
onlineDockListLoading: false,
|
|
|
@@ -234,10 +236,8 @@ const fetchList = async () => {
|
|
|
}
|
|
|
|
|
|
onMounted(async () => {
|
|
|
- await Promise.all([
|
|
|
- fetchOnlineDock(),
|
|
|
- fetchList(),
|
|
|
- ])
|
|
|
+ await fetchOnlineDock();
|
|
|
+ await fetchList();
|
|
|
});
|
|
|
|
|
|
// 全选
|
|
|
@@ -261,8 +261,8 @@ const onClickCheckItem = async (sn: string) => {
|
|
|
await fetchList();
|
|
|
}
|
|
|
|
|
|
-// 新建机场任务弹出层-点击确定
|
|
|
-const createTaskModalOnClickConfirm = async (data: any) => {
|
|
|
+// 机场任务弹出层-点击确定
|
|
|
+const taskModalOnClickConfirm = async (data: any) => {
|
|
|
try {
|
|
|
const res = await createPlan(getWorkspaceId(), data);
|
|
|
if (res.code === 0) {
|
|
|
@@ -275,8 +275,8 @@ const createTaskModalOnClickConfirm = async (data: any) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 新建机场任务弹出层-点击取消
|
|
|
-const createTaskModalOnClickCancel = () => {
|
|
|
+// 机场任务弹出层-点击取消
|
|
|
+const taskModalOnClickCancel = () => {
|
|
|
state.visible = false;
|
|
|
}
|
|
|
|
|
|
@@ -293,7 +293,7 @@ const columns = [
|
|
|
{
|
|
|
title: '计划|实际时间',
|
|
|
dataIndex: 'duration',
|
|
|
- width: 300,
|
|
|
+ width: 350,
|
|
|
slots: { customRender: 'duration' },
|
|
|
},
|
|
|
{
|
|
|
@@ -379,6 +379,7 @@ const refreshData = async (page: any) => {
|
|
|
// 点击创建任务
|
|
|
const onClickCreateTask = () => {
|
|
|
state.currentJobId = '';
|
|
|
+ state.currentType = 'CREATE';
|
|
|
state.visible = true
|
|
|
}
|
|
|
|
|
|
@@ -394,6 +395,20 @@ const onClickReset = async (query: any) => {
|
|
|
await fetchList();
|
|
|
}
|
|
|
|
|
|
+// 点击查看详情
|
|
|
+const onClickLookDetail = (id: string) => {
|
|
|
+ state.currentJobId = id;
|
|
|
+ state.currentType = 'DETAIL';
|
|
|
+ state.visible = true;
|
|
|
+}
|
|
|
+
|
|
|
+// 点击复制
|
|
|
+const onClickCopy = (id: string) => {
|
|
|
+ state.currentJobId = id;
|
|
|
+ state.currentType = 'COPY';
|
|
|
+ state.visible = true;
|
|
|
+}
|
|
|
+
|
|
|
// 点击断点续飞
|
|
|
const onClickContinueFlight = async (id: string) => {
|
|
|
try {
|
|
|
@@ -407,12 +422,6 @@ const onClickContinueFlight = async (id: string) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 点击复制
|
|
|
-const onClickCopy = (id: string) => {
|
|
|
- state.currentJobId = id;
|
|
|
- state.visible = true;
|
|
|
-}
|
|
|
-
|
|
|
// 点击删除
|
|
|
const onClickDelete = (id: string, name: string) => {
|
|
|
Modal.confirm({
|