| | |
| | | |
| | | <!--表格--> |
| | | <div class="plan-panel-wrapper"> |
| | | <a-table :loading="tableLoading" class="plan-table" :columns="columns" :data-source="plansData.data" |
| | | <a-table :loading="tableLoading" class="plan-table" :columns="columns" :data-source="plansData.data" @expand="expand" :indentSize="200" |
| | | row-key="job_id" |
| | | :pagination="paginationProp" :scroll="{ x: '100%', y: 600 }" @change="refreshData"> |
| | | <!-- 执行时间 --> |
| | |
| | | getWaylineJobs, |
| | | Task, |
| | | uploadMediaFileNow, |
| | | TaskQueryParam |
| | | TaskQueryParam, getWaylineChildrenJobs |
| | | } from '/@/api/wayline' |
| | | import { useMyStore } from '/@/store' |
| | | import { ELocalStorageKey } from '/@/types/enums' |
| | |
| | | { |
| | | title: '计划|实际时间', |
| | | dataIndex: 'duration', |
| | | width: 200, |
| | | width: 240, |
| | | slots: { customRender: 'duration' }, |
| | | }, |
| | | { |
| | |
| | | getPlans() |
| | | }) |
| | | |
| | | function expand (expand:any, record:any) { |
| | | if (!expand) { |
| | | return |
| | | } |
| | | tableLoading.value = true |
| | | const params = { |
| | | parentId: record.job_id |
| | | } |
| | | |
| | | getWaylineChildrenJobs(workspaceId, params).then(res => { |
| | | const data = res.data |
| | | plansData.data.forEach(item => { |
| | | if (item.job_id === record.job_id) { |
| | | item.children = data |
| | | } |
| | | }) |
| | | |
| | | tableLoading.value = false |
| | | }) |
| | | } |
| | | |
| | | function dateChange (value: any) { |
| | | searchQuery.startTime = value[0] |
| | | searchQuery.endTime = value[1] |
| | |
| | | if (res.code !== 0) { |
| | | return |
| | | } |
| | | |
| | | res.data.list.forEach(e => { |
| | | if (e.has_children === '1') { |
| | | e.children = [] |
| | | } |
| | | }) |
| | | |
| | | plansData.data = res.data.list |
| | | paginationProp.total = res.data.pagination.total |
| | | paginationProp.current = res.data.pagination.page |
| | |
| | | .plan-table { |
| | | background: #fff; |
| | | margin-top: 10px; |
| | | |
| | | :deep(.ant-table-tbody) { |
| | | |
| | | tr.ant-table-row-level-0 { |
| | | td:first-child { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | tr.ant-table-row-level-1 { |
| | | td:first-child { |
| | | padding-left: 60px; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | .action-area { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | </style> |