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

118 lines
3.1 KiB
Vue
Raw Normal View History

2023-01-14 21:02:18 +08:00
<template>
<div>
<page-header-wrapper @back="() => $router.replace('/retry/log/list')" style="margin: -24px -1px 0" v-if="showHeader">
<div></div>
2023-01-14 21:02:18 +08:00
</page-header-wrapper>
2024-03-22 17:15:07 +08:00
<a-card :bordered="false" :loading="loading">
<a-descriptions title="" :column="column" bordered>
<a-descriptions-item label="组名称">
{{ retryInfo.groupName }}
</a-descriptions-item>
<a-descriptions-item label="场景名称">
{{ retryInfo.sceneName }}
</a-descriptions-item>
<a-descriptions-item label="唯一id">
{{ retryInfo.uniqueId }}
</a-descriptions-item>
<a-descriptions-item label="幂等id" :span="2">
{{ retryInfo.idempotentId }}
</a-descriptions-item>
<a-descriptions-item label="业务编号">
{{ retryInfo.bizNo }}
</a-descriptions-item>
2023-06-06 23:23:59 +08:00
<a-descriptions-item label="当前重试状态 | 数据类型">
2024-03-22 17:15:07 +08:00
<a-tag v-if="retryInfo.taskType" color="red">
{{ retryStatus[retryInfo.retryStatus] }}
</a-tag>
2023-06-06 23:23:59 +08:00
<a-divider type="vertical" />
2024-03-22 17:15:07 +08:00
<a-tag v-if="retryInfo.taskType" :color="taskType[retryInfo.taskType].color">
2023-06-06 23:23:59 +08:00
{{ taskType[retryInfo.taskType].name }}
</a-tag>
</a-descriptions-item>
<a-descriptions-item label="创建时间">
{{ retryInfo.createDt }}
</a-descriptions-item>
<a-descriptions-item label="执行器名称" :span="3">
{{ retryInfo.executorName }}
</a-descriptions-item>
<a-descriptions-item label="参数" :span="3">
{{ retryInfo.argsStr }}
</a-descriptions-item>
<a-descriptions-item label="扩展参数" :span="3">
{{ retryInfo.extAttrs }}
</a-descriptions-item>
</a-descriptions>
</a-card>
2024-03-22 17:15:07 +08:00
<RetryTaskLogMessage :value="retryInfo" />
2023-01-14 21:02:18 +08:00
</div>
</template>
<script>
import { getRetryTaskLogById } from '@/api/manage'
2023-06-16 23:26:40 +08:00
import { STable } from '@/components'
2024-03-22 17:15:07 +08:00
import RetryTaskLogMessage from '@/views/task/RetryTaskLogMessage'
2023-01-14 21:02:18 +08:00
export default {
name: 'RetryLogInfo',
2023-06-16 23:26:40 +08:00
components: {
2024-03-22 17:15:07 +08:00
RetryTaskLogMessage,
2023-06-16 23:26:40 +08:00
STable
},
props: {
showHeader: {
type: Boolean,
default: true
},
column: {
type: Number,
default: 3
}
},
2023-01-14 21:02:18 +08:00
data () {
return {
2024-03-22 17:15:07 +08:00
loading: true,
retryInfo: {},
2023-01-14 21:02:18 +08:00
retryStatus: {
'0': '处理中',
'1': '处理成功',
2023-01-14 21:02:18 +08:00
'2': '最大次数'
2023-06-06 23:23:59 +08:00
},
taskType: {
'1': {
'name': '重试数据',
'color': '#d06892'
},
'2': {
'name': '回调数据',
'color': '#f5a22d'
}
2023-01-14 21:02:18 +08:00
}
}
},
created () {
const id = this.$route.query.id
if (id) {
this.getRetryTaskLogById(id)
}
},
methods: {
getRetryTaskLogById (id) {
2023-01-14 21:02:18 +08:00
getRetryTaskLogById(id).then(res => {
this.retryInfo = res.data
2023-06-16 23:26:40 +08:00
this.queryParam = {
2024-03-22 17:15:07 +08:00
groupName: res.data.groupName,
uniqueId: res.data.uniqueId
2023-06-16 23:26:40 +08:00
}
2024-03-22 17:15:07 +08:00
}).finally(() => {
this.loading = false
2023-01-14 21:02:18 +08:00
})
}
2023-01-14 21:02:18 +08:00
}
}
</script>
<style scoped>
</style>