| | |
| | | <!-- 执行时间 --> |
| | | <template #duration="{ record }"> |
| | | <div class="flex-row" style="white-space: pre-wrap"> |
| | | <div v-if="record.taskType >2"> |
| | | <div>{{ formatTaskTime(record.executeStartTime) }}</div> |
| | | <div>{{ formatTaskTime(record.executeEndTime) }}</div> |
| | | </div> |
| | | <div v-else> |
| | | <div>{{formatTaskTime(record.executeSingleTime)}}</div> |
| | | <div> |
| | | <div>{{ formatTaskTime(record.begin_time) }}</div> |
| | | <div>{{ formatTaskTime(record.end_time) }}</div> |
| | | </div> |
| | | <div class="ml10"> |
| | | <div>{{ formatTaskTime(record.execute_time) }}</div> |
| | |
| | | <div class="action-area"> |
| | | <a-popconfirm |
| | | v-if="record.status === TaskStatus.Wait" |
| | | title="是否删除飞行计划?" |
| | | ok-text="是" |
| | | cancel-text="否" |
| | | title="你确定要删除该计划吗?" |
| | | ok-text="确定" |
| | | cancel-text="取消" |
| | | @confirm="onDeleteTask(record.job_id)" |
| | | > |
| | | <a-button type="primary" size="small">删除</a-button> |
| | | </a-popconfirm> |
| | | <a-popconfirm |
| | | v-if="record.status === TaskStatus.Carrying" |
| | | title="是否暂停?" |
| | | ok-text="是" |
| | | cancel-text="否" |
| | | title="你确定要暂停该任务吗?" |
| | | ok-text="确定" |
| | | cancel-text="取消" |
| | | @confirm="onSuspendTask(record.job_id)" |
| | | > |
| | | <a-button type="primary" size="small">暂停</a-button> |
| | | </a-popconfirm> |
| | | <a-popconfirm |
| | | v-if="record.status === TaskStatus.Paused" |
| | | title="是否重新开始?" |
| | | ok-text="是" |
| | | cancel-text="否" |
| | | title="你确定要重新开始吗?" |
| | | ok-text="确定" |
| | | cancel-text="取消" |
| | | @confirm="onResumeTask(record.job_id)" |
| | | > |
| | | <a-button type="primary" size="small">重启</a-button> |
| | | <a-button type="primary" size="small">重新开始</a-button> |
| | | </a-popconfirm> |
| | | </div> |
| | | </template> |
| | |
| | | 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, |
| | |
| | | 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: '操作', |
| | |
| | | |
| | | 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 |
| | | }) |
| | | } |
| | | |