cmc-web/webs/sms-web/src/views/configs/PlatformTask.vue

65 lines
1.2 KiB
Vue
Raw Normal View History

2024-08-20 12:11:31 +00:00
<template>
2024-08-21 01:17:14 +00:00
<cb-advance-table title="任务列表" :search-configs="searchConfigs" :data="list" :params="params" :columns="columns" :get-list="getList" :total="total" :loading="loading"> </cb-advance-table>
2024-08-20 12:11:31 +00:00
</template>
<script>
import { getTasks } from 'services/system/platformTask'
const searchConfigs = [{ label: '名称', value: 'name', type: 'Input' }]
const columns = [
{
label: '名称',
prop: 'name'
},
{
label: '任务内容',
prop: 'content'
},
{
label: '任务结果',
prop: 'result'
},
{
label: '失败原因',
prop: 'errorReason'
},
{
label: '耗时',
prop: 'cost'
},
{
label: '开始时间',
prop: 'gmtBegin'
},
{
label: '结束时间',
prop: 'gmtEnd'
}
]
export default {
data() {
return {
columns,
loading: false,
searchConfigs,
list: null,
total: null,
params: {
page: 1,
rows: 10
}
}
},
methods: {
async getList() {
this.loading = true
const data = await getTasks(this.params)
this.loading = false
if (data.success) {
this.list = data.data.rows
this.total = data.data.total
}
}
}
}
</script>