diff --git a/src/api/infra/apiErrorLog/index.ts b/src/api/infra/apiErrorLog/index.ts index 59ee21431..2e1f47079 100644 --- a/src/api/infra/apiErrorLog/index.ts +++ b/src/api/infra/apiErrorLog/index.ts @@ -46,3 +46,4 @@ export const exportApiErrorLog = (params) => { params }) } + diff --git a/src/api/infra/apiMqError/index.ts b/src/api/infra/apiMqError/index.ts index a29aa9bbc..c74f4e832 100644 --- a/src/api/infra/apiMqError/index.ts +++ b/src/api/infra/apiMqError/index.ts @@ -52,4 +52,19 @@ export const exportApiMqError = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/infra/api-mq-error/get-import-template' }) +} + + + +export const retryTable = (id: number) => { + return request.get({ + url: '/wms/apimqerror/retryTable?id=' + id + }) +} + + +export const retryInterface = (id: number) => { + return request.get({ + url: '/wms/apimqerror/retryInterface?id=' + id + }) } \ No newline at end of file diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 73b968041..4bf0a9845 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -1404,6 +1404,18 @@ export function outBtn(option: any) { hasPermi: '' }) } +// 主列表-重试 +export function retryBtn(option: any) { + return __defaultBtnOption(option, { + label: '重试', + name: 'retry', + hide: false, + type: 'danger', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} // 默认按钮规则 function __defaultBtnOption(option: any, specific: any) { return { diff --git a/src/views/infra/apiMqError/apiMqError.data.ts b/src/views/infra/apiMqError/apiMqError.data.ts index edc1c7467..a9bab59f6 100644 --- a/src/views/infra/apiMqError/apiMqError.data.ts +++ b/src/views/infra/apiMqError/apiMqError.data.ts @@ -11,7 +11,7 @@ export const ApiMqErrorRules = reactive({ export const ApiMqError = useCrudSchemas(reactive([ { - label: '编号', + label: '业务编号', field: 'number', sort: 'custom', isSearch: true @@ -48,6 +48,19 @@ export const ApiMqError = useCrudSchemas(reactive([ value: 0 } }, + { + label: '错误信息', + field: 'errorMsg', + sort: 'custom', + isSearch: true, + form: { + component: 'Editor', + componentProps: { + valueHtml: '', + height: 200 + } + } + }, // { // label: '是否可用', // field: 'available', @@ -108,13 +121,13 @@ export const ApiMqError = useCrudSchemas(reactive([ // value: 0 // } // }, - // { - // label: '操作', - // field: 'action', - // isForm: false, - // table: { - // width: 150, - // fixed: 'right' - // } - // } + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } ])) diff --git a/src/views/infra/apiMqError/index.vue b/src/views/infra/apiMqError/index.vue index e62adac0e..f3e483652 100644 --- a/src/views/infra/apiMqError/index.vue +++ b/src/views/infra/apiMqError/index.vue @@ -135,6 +135,7 @@ const buttonBaseClick = (val, item) => { const butttondata = [ // defaultButtons.mainListEditBtn({hasPermi:'wms:apiMqError:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hasPermi:'wms:apiMqError:delete'}), // 删除 + defaultButtons.retryBtn(null), // 重试 ] // 列表-操作按钮事件 @@ -143,6 +144,8 @@ const buttonTableClick = async (val, row) => { openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) + } else if (val == 'retry') { // 重试 + handleRetry(row) } } @@ -235,6 +238,21 @@ const searchFormClick = (searchData) => { getList() // 刷新当前列表 } +const handleRetry = (row) => { + if(row.type == "interface:method"){ + ApiMqErrorApi.retryInterface(row.id).then(res => { + message.success(t('common.retrySuccess')) + getList() + }) + }else if(row.type == "table"){ + ApiMqErrorApi.retryTable(row.id).then(res => { + message.success(t('common.retrySuccess')) + getList() + }) + } +} + + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/infra/apiMqHis/apiMqHis.data.ts b/src/views/infra/apiMqHis/apiMqHis.data.ts index 049afc60d..ddb20d43f 100644 --- a/src/views/infra/apiMqHis/apiMqHis.data.ts +++ b/src/views/infra/apiMqHis/apiMqHis.data.ts @@ -16,7 +16,7 @@ export const ApiMqHis = useCrudSchemas(reactive([ // isForm: false // }, { - label: '编号', + label: '业务编号', field: 'number', sort: 'custom', isSearch: true @@ -40,6 +40,19 @@ export const ApiMqHis = useCrudSchemas(reactive([ value: 0 } }, + { + label: '执行数据', + field: 'content', + sort: 'custom', + isSearch: true, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + }, + value: 0 + } + }, // { // label: '是否可用', // field: 'available',