消息详情支持重新发送

This commit is contained in:
许晓东
2021-12-21 14:08:36 +08:00
parent 98f33bb2cc
commit 5930e44fdf
9 changed files with 94 additions and 3 deletions

View File

@@ -107,6 +107,18 @@
</div>
</a-table>
</div>
<div>
<h4>操作</h4>
<hr />
<a-popconfirm
title="确定将当前这条消息重新发回broker"
ok-text="确认"
cancel-text="取消"
@confirm="resend"
>
<a-button type="primary" icon="reload"> 重新发送 </a-button>
</a-popconfirm>
</div>
</a-spin>
</div>
</a-modal>
@@ -199,6 +211,25 @@ export default {
valueDeserializerChange() {
this.getMessageDetail();
},
resend() {
const params = Object.assign({}, this.data);
this.loading = true;
request({
url: KafkaMessageApi.resend.url,
method: KafkaMessageApi.resend.method,
data: params,
}).then((res) => {
this.loading = false;
if (res.code != 0) {
notification.error({
message: "error",
description: res.msg,
});
} else {
this.$message.success(res.msg);
}
});
},
},
};
const columns = [