|
|
|
@ -118,15 +118,16 @@ |
|
|
|
@click="showDetailDialog(scope.row)"> |
|
|
|
查看详情 |
|
|
|
</el-button> |
|
|
|
<!-- rqrq - 使用全局重试状态控制按钮 --> |
|
|
|
<el-button |
|
|
|
v-if="scope.row.processStatus === 'PENDING'" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
style="color: #E6A23C;" |
|
|
|
:loading="scope.row._retrying" |
|
|
|
:disabled="scope.row._retrying" |
|
|
|
:loading="retryingRowId === scope.row.id" |
|
|
|
:disabled="retryingRowId !== null" |
|
|
|
@click="handleRetry(scope.row)"> |
|
|
|
{{ scope.row._retrying ? '重试中...' : '重试' }} |
|
|
|
{{ retryingRowId === scope.row.id ? '重试中...' : '重试' }} |
|
|
|
</el-button> |
|
|
|
<span v-else>-</span> |
|
|
|
</span> |
|
|
|
@ -142,7 +143,21 @@ |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" @click="showDetailDialog(scope.row)">查看详情</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.processStatus === 'PENDING'" @click="handleRetry(scope.row)">重试</a> |
|
|
|
<!-- rqrq - 当前行正在重试时显示"重试中..." --> |
|
|
|
<span |
|
|
|
v-if="scope.row.processStatus === 'PENDING' && retryingRowId === scope.row.id" |
|
|
|
style="color: #E6A23C; margin-left: 10px;">重试中...</span> |
|
|
|
<!-- rqrq - 其他行有重试时,显示禁用状态的重试按钮 --> |
|
|
|
<span |
|
|
|
v-else-if="scope.row.processStatus === 'PENDING' && retryingRowId !== null" |
|
|
|
style="color: #C0C4CC; margin-left: 10px; cursor: not-allowed;" |
|
|
|
@click="handleRetry(scope.row)">重试</span> |
|
|
|
<!-- rqrq - 没有重试时,显示正常的重试按钮 --> |
|
|
|
<a |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
v-else-if="scope.row.processStatus === 'PENDING'" |
|
|
|
@click="handleRetry(scope.row)">重试</a> |
|
|
|
<!-- <a type="text" size="small" v-if="scope.row.processStatus === 'PENDING'" @click="closeRetry(scope.row)">忽略</a>--> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -493,6 +508,7 @@ export default { |
|
|
|
processRemark: '', |
|
|
|
markProcessedLoading: false, |
|
|
|
markIgnoredLoading: false, |
|
|
|
retryingRowId: null, // 正在重试的行ID,全局唯一 - rqrq |
|
|
|
// 导出相关 - rqrq |
|
|
|
exportData: [], |
|
|
|
exportName: 'IFS错误日志' + this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
|
@ -689,12 +705,19 @@ export default { |
|
|
|
|
|
|
|
// 手工重试IFS接口调用 - rqrq |
|
|
|
handleRetry(row) { |
|
|
|
// 检查是否有其他行正在重试 - rqrq |
|
|
|
if (this.retryingRowId !== null) { |
|
|
|
this.$message.warning('请等待当前重试完成后再操作') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.$confirm('确定要重试此记录的IFS接口调用吗?', '确认重试', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
// 设置loading状态 - rqrq |
|
|
|
// 设置全局重试状态 - rqrq |
|
|
|
this.retryingRowId = row.id |
|
|
|
this.$set(row, '_retrying', true) |
|
|
|
|
|
|
|
const params = { |
|
|
|
@ -719,6 +742,7 @@ export default { |
|
|
|
}).finally(() => { |
|
|
|
// 取消loading状态 - rqrq |
|
|
|
this.$set(row, '_retrying', false) |
|
|
|
this.retryingRowId = null |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
// 用户取消操作 |
|
|
|
|