gtsoft-snail-job-server/frontend/src/views/task/RetryTaskInfo.vue

112 lines
3.3 KiB
Vue
Raw Normal View History

2023-01-14 21:02:18 +08:00
<template>
<div>
<page-header-wrapper @back="() => $router.go(-1)" style="margin: -24px -1px 0">
<div></div>
2023-01-14 21:02:18 +08:00
</page-header-wrapper>
<a-card :bordered="false">
<a-descriptions title="" bordered>
<a-descriptions-item label="组名称">
{{ retryTaskInfo.groupName }}
</a-descriptions-item>
<a-descriptions-item label="场景名称">
{{ retryTaskInfo.sceneName }}
</a-descriptions-item>
<a-descriptions-item label="幂等id">
{{ retryTaskInfo.idempotentId }}
</a-descriptions-item>
<a-descriptions-item label="唯一id">
{{ retryTaskInfo.uniqueId }}
</a-descriptions-item>
<a-descriptions-item label="业务编号">
{{ retryTaskInfo.bizNo }}
</a-descriptions-item>
<a-descriptions-item label="重试次数">
{{ retryTaskInfo.retryCount }}
</a-descriptions-item>
<a-descriptions-item label="重试状态 | 数据类型">
<a-tag color="red">
{{ retryStatus[retryTaskInfo.retryStatus] }}
</a-tag>
<a-divider type="vertical" />
<a-tag :color="taskType[retryTaskInfo.taskType].color">
{{ taskType[retryTaskInfo.taskType].name }}
</a-tag>
</a-descriptions-item>
<a-descriptions-item label="触发时间">
{{ retryTaskInfo.createDt }}
</a-descriptions-item>
<a-descriptions-item label="更新时间">
{{ retryTaskInfo.updateDt }}
</a-descriptions-item>
<a-descriptions-item label="执行器名称" span="3">
{{ retryTaskInfo.executorName }}
</a-descriptions-item>
<a-descriptions-item label="参数" span="3">
{{ retryTaskInfo.argsStr }}
</a-descriptions-item>
<a-descriptions-item label="扩展参数" span="3">
{{ retryTaskInfo.extAttrs }}
</a-descriptions-item>
</a-descriptions>
</a-card>
<div style="margin: 20px"></div>
<a-card title="日志列表" style="width: 100%">
<RetryLogList v-if="retryTaskInfo !== null" ref="retryLogListRef" :showSearch="false" :group-name="retryTaskInfo.groupName" :unique-id="retryTaskInfo.uniqueId"/>
</a-card>
2023-01-14 21:02:18 +08:00
</div>
</template>
<script>
import { getRetryTaskById } from '@/api/manage'
import moment from 'moment'
import RetryLogList from './RetryLogList'
2023-01-14 21:02:18 +08:00
export default {
name: 'RetryTaskInfo',
components: {
RetryLogList
},
2023-01-14 21:02:18 +08:00
data () {
return {
retryTaskInfo: {},
retryStatus: {
'0': '处理中',
'1': '处理成功',
2023-01-14 21:02:18 +08:00
'2': '最大次数'
},
taskType: {
'1': {
'name': '重试数据',
'color': '#d06892'
},
'2': {
'name': '回调数据',
'color': '#f5a22d'
}
2023-01-14 21:02:18 +08:00
}
}
},
created () {
const id = this.$route.query.id
const groupName = this.$route.query.groupName
if (id && groupName) {
getRetryTaskById(id, { 'groupName': groupName }).then(res => {
this.retryTaskInfo = res.data
this.$refs.retryLogListRef.refreshTable(res.data)
2023-01-14 21:02:18 +08:00
})
} else {
this.$router.push({ path: '/404' })
2023-01-14 21:02:18 +08:00
}
},
methods: {
parseDate (date) {
return moment(date).format('YYYY-MM-DD HH:mm:ss')
}
}
}
</script>
<style scoped>
</style>