|
|
@ -49,6 +49,7 @@ |
|
|
|
<script lang="jsx"> |
|
|
|
import { taskListApi, delExcelByTaskIdApi, delTaskApi } from '@/api/task' |
|
|
|
import { useAccountStore, useTaskStore } from '@/store' |
|
|
|
import moment from 'moment' |
|
|
|
import Cookie from '@/utils/cookie' |
|
|
|
const accountStore = useAccountStore() |
|
|
|
const taskStore = useTaskStore() |
|
|
@ -68,6 +69,7 @@ export default { |
|
|
|
{ |
|
|
|
colKey: 'publishTime', |
|
|
|
title: '发布时间', |
|
|
|
cell: (h, { row }) => moment(row.publishTime).format('YYYY-MM-DD'), |
|
|
|
}, |
|
|
|
{ |
|
|
|
colKey: 'nuclearStationName', |
|
|
@ -83,7 +85,11 @@ export default { |
|
|
|
title: '任务状态', |
|
|
|
cell: (h, { row }) => { |
|
|
|
if (row.status == 0) { |
|
|
|
return <t-tag theme="success">开始任务</t-tag> |
|
|
|
return ( |
|
|
|
<t-tag theme="success" onClick={() => this.startTask(row.id)}> |
|
|
|
开始任务 |
|
|
|
</t-tag> |
|
|
|
) |
|
|
|
} else if (row.status == 1) { |
|
|
|
return <t-tag theme="warning">进行中</t-tag> |
|
|
|
} else if (row.status == 2) { |
|
|
@ -137,6 +143,11 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
startTask(taskId) { |
|
|
|
accountStore.changePage(0) |
|
|
|
taskStore.getExcelList(taskId) |
|
|
|
taskStore.updateCurrentTaskId(taskId) |
|
|
|
}, |
|
|
|
viewDetail(taskId) { |
|
|
|
accountStore.changePage(0) |
|
|
|
taskStore.getExcelList(taskId) |
|
|
|