From 1ef360a14efab8a1defa1dfdc13bb5af64a9d621 Mon Sep 17 00:00:00 2001
From: husq <931347610@qq.com>
Date: Mon, 18 Sep 2023 17:02:51 +0800
Subject: [PATCH] 飞行指令打开
---
src/components/task/TaskPanel.vue | 66 +++++++++++++--------------------
1 files changed, 26 insertions(+), 40 deletions(-)
diff --git a/src/components/task/TaskPanel.vue b/src/components/task/TaskPanel.vue
index 09a83aa..a2a42e5 100644
--- a/src/components/task/TaskPanel.vue
+++ b/src/components/task/TaskPanel.vue
@@ -65,30 +65,30 @@
<div class="action-area">
<a-popconfirm
v-if="record.status === TaskStatus.Wait"
- title="Are you sure you want to delete flight task?"
- ok-text="Yes"
- cancel-text="No"
+ title="你确定要删除该计划吗?"
+ ok-text="确定"
+ cancel-text="取消"
@confirm="onDeleteTask(record.job_id)"
>
- <a-button type="primary" size="small">Delete</a-button>
+ <a-button type="primary" size="small">删除</a-button>
</a-popconfirm>
<a-popconfirm
v-if="record.status === TaskStatus.Carrying"
- title="Are you sure you want to suspend?"
- ok-text="Yes"
- cancel-text="No"
+ title="你确定要暂停该任务吗?"
+ ok-text="确定"
+ cancel-text="取消"
@confirm="onSuspendTask(record.job_id)"
>
- <a-button type="primary" size="small">Suspend</a-button>
+ <a-button type="primary" size="small">暂停</a-button>
</a-popconfirm>
<a-popconfirm
v-if="record.status === TaskStatus.Paused"
- title="Are you sure you want to resume?"
- ok-text="Yes"
- cancel-text="No"
+ title="你确定要重新开始吗?"
+ ok-text="确定"
+ cancel-text="取消"
@confirm="onResumeTask(record.job_id)"
>
- <a-button type="primary" size="small">Resume</a-button>
+ <a-button type="primary" size="small">重新开始</a-button>
</a-popconfirm>
</div>
</template>
@@ -113,7 +113,7 @@
import { ExclamationCircleOutlined, UploadOutlined } from '@ant-design/icons-vue'
const store = useMyStore()
-const workspaceId = store.state.common.projectId
+const workspaceId = localStorage.getItem(ELocalStorageKey.WorkspaceId)!
const body: IPage = {
page: 1,
@@ -143,37 +143,26 @@
slots: { customRender: 'status' }
},
{
- title: '类型',
- dataIndex: 'taskType',
- width: 100,
- slots: { customRender: 'taskType' },
- },
- {
title: '计划名称',
- dataIndex: 'name',
- width: 100,
- },
- {
- title: '航线名称',
- dataIndex: 'fileName',
+ dataIndex: 'job_name',
width: 100,
},
{
title: '设备名称',
- dataIndex: 'dockName',
+ dataIndex: 'dock_name',
width: 100,
ellipsis: true
},
{
- title: '创建人',
- dataIndex: 'username',
- width: 120,
+ title: '相对机场返航高度',
+ dataIndex: 'rth_altitude',
+ width: 140,
},
{
- title: '媒体上传',
- key: 'media_upload',
- width: 160,
- slots: { customRender: 'media_upload' }
+ title: '航线飞行中失联',
+ dataIndex: 'out_of_control_action',
+ width: 140,
+ slots: { customRender: 'lostAction' },
},
{
title: '操作',
@@ -253,15 +242,12 @@
function getPlans () {
getWaylineJobs(workspaceId, body).then(res => {
- console.log('计划数据', res)
- const data = res.data
-
- if (res.code !== 5000) {
+ if (res.code !== 0) {
return
}
- plansData.data = data.records
- paginationProp.total = data.records.total
- paginationProp.current = data.records.current
+ plansData.data = res.data.list
+ paginationProp.total = res.data.pagination.total
+ paginationProp.current = res.data.pagination.page
})
}
--
Gitblit v1.9.3