guoshilong
2023-09-11 1506caf8aae1422a2b9a6a929fad62aae05d82cc
src/components/task/TaskPanel.vue
@@ -113,7 +113,7 @@
import { ExclamationCircleOutlined, UploadOutlined } from '@ant-design/icons-vue'
const store = useMyStore()
const workspaceId = localStorage.getItem(ELocalStorageKey.WorkspaceId)!
const workspaceId = store.state.common.projectId
const body: IPage = {
  page: 1,
@@ -131,63 +131,52 @@
const columns = [
  {
    title: 'Planned/Actual Time',
    title: '计划|实际时间',
    dataIndex: 'duration',
    width: 200,
    slots: { customRender: 'duration' },
  },
  {
    title: 'Status',
    title: '执行状态',
    key: 'status',
    width: 150,
    slots: { customRender: 'status' }
  },
  {
    title: 'Plan Name',
    dataIndex: 'job_name',
    width: 100,
  },
  {
    title: 'Type',
    title: '类型',
    dataIndex: 'taskType',
    width: 100,
    slots: { customRender: 'taskType' },
  },
  {
    title: 'Flight Route Name',
    dataIndex: 'file_name',
    title: '计划名称',
    dataIndex: 'name',
    width: 100,
  },
  {
    title: 'Dock Name',
    dataIndex: 'dock_name',
    title: '航线名称',
    dataIndex: 'fileName',
    width: 100,
  },
  {
    title: '设备名称',
    dataIndex: 'dockName',
    width: 100,
    ellipsis: true
  },
  {
    title: 'RTH Altitude Relative to Dock (m)',
    dataIndex: 'rth_altitude',
    width: 120,
  },
  {
    title: 'Lost Action',
    dataIndex: 'out_of_control_action',
    width: 120,
    slots: { customRender: 'lostAction' },
  },
  {
    title: 'Creator',
    title: '创建人',
    dataIndex: 'username',
    width: 120,
  },
  {
    title: 'Media File Upload',
    title: '媒体上传',
    key: 'media_upload',
    width: 160,
    slots: { customRender: 'media_upload' }
  },
  {
    title: 'Action',
    title: '操作',
    width: 120,
    slots: { customRender: 'action' }
  }
@@ -264,12 +253,15 @@
function getPlans () {
  getWaylineJobs(workspaceId, body).then(res => {
    if (res.code !== 0) {
    console.log('计划数据', res)
    const data = res.data
    if (res.code !== 5000) {
      return
    }
    plansData.data = res.data.list
    paginationProp.total = res.data.pagination.total
    paginationProp.current = res.data.pagination.page
    plansData.data = data.records
    paginationProp.total = data.records.total
    paginationProp.current = data.records.current
  })
}