常熟吴彦祖 3 months ago
parent
commit
2dd9ac9952
  1. 3
      src/api/warehouse/ifsCallErrorLog.js
  2. 53
      src/views/modules/warehouse/ifsCallErrorLog.vue

3
src/api/warehouse/ifsCallErrorLog.js

@ -11,3 +11,6 @@ export const markErrorAsIgnored = data => createAPI('api/ifsCallErrorLog/markIgn
// 获取用户授权站点列表 - rqrq
export const getUserAuthorizedSites = data => createAPI('api/ifsCallErrorLog/getUserAuthorizedSites', 'POST', data)
// 手工重试IFS接口调用 - rqrq
export const retryIfsCall = data => createAPI('api/ifsCallErrorLog/retry', 'POST', data)

53
src/views/modules/warehouse/ifsCallErrorLog.vue

@ -103,6 +103,16 @@
@click="showDetailDialog(scope.row)">
查看详情
</el-button>
<el-button
v-if="scope.row.processStatus === 'PENDING'"
type="text"
size="small"
style="color: #E6A23C;"
:loading="scope.row._retrying"
:disabled="scope.row._retrying"
@click="handleRetry(scope.row)">
{{ scope.row._retrying ? '重试中...' : '重试' }}
</el-button>
<span v-else>-</span>
</span>
<span v-else>{{ scope.row[item.columnProp] }}</span>
@ -254,7 +264,8 @@ import {
getIfsErrorLogList,
markErrorAsProcessed,
markErrorAsIgnored,
getUserAuthorizedSites
getUserAuthorizedSites,
retryIfsCall
} from '@/api/warehouse/ifsCallErrorLog.js'
export default {
@ -440,7 +451,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "操作",
columnWidth: 100,
columnWidth: 150,
columnSortable: false,
showOverflowTooltip: true,
fixed: "right"
@ -623,6 +634,44 @@ export default {
}).finally(() => {
this.markIgnoredLoading = false
})
},
// IFS - rqrq
handleRetry(row) {
this.$confirm('确定要重试此记录的IFS接口调用吗?', '确认重试', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// loading - rqrq
this.$set(row, '_retrying', true)
const params = {
id: row.id
}
retryIfsCall(params).then(({data}) => {
if (data && data.code === 0) {
this.$message.success('重试成功,IFS接口调用完成')
// - rqrq
this.getDataList()
} else {
this.$message.error(data.msg || '重试失败')
// - rqrq
this.getDataList()
}
}).catch(error => {
console.error('重试失败:', error)
this.$message.error('重试失败,请稍后再试')
// - rqrq
this.getDataList()
}).finally(() => {
// loading - rqrq
this.$set(row, '_retrying', false)
})
}).catch(() => {
//
})
}
}
}

Loading…
Cancel
Save