diff --git a/apps/web-antd/src/views/mp/autoReply/data.ts b/apps/web-antd/src/views/mp/autoReply/data.ts
index 3bd3ab03c..2f8c3e497 100644
--- a/apps/web-antd/src/views/mp/autoReply/data.ts
+++ b/apps/web-antd/src/views/mp/autoReply/data.ts
@@ -25,7 +25,6 @@ export function useGridColumns(
minWidth: 120,
});
}
-
// 关键词列(仅关键词回复显示)
if (msgType === AutoReplyMsgType.Keyword) {
columns.push({
@@ -34,7 +33,6 @@ export function useGridColumns(
minWidth: 150,
});
}
-
// 匹配类型列(仅关键词回复显示)
if (msgType === AutoReplyMsgType.Keyword) {
columns.push({
@@ -47,7 +45,6 @@ export function useGridColumns(
},
});
}
-
// 回复消息类型列
columns.push(
{
@@ -84,7 +81,6 @@ export function useGridColumns(
/** 新增/修改的表单 */
export function useFormSchema(msgType: AutoReplyMsgType): VbenFormSchema[] {
const schema: VbenFormSchema[] = [];
-
// 消息类型(仅消息回复显示)
if (msgType === AutoReplyMsgType.Message) {
schema.push({
@@ -99,7 +95,6 @@ export function useFormSchema(msgType: AutoReplyMsgType): VbenFormSchema[] {
},
});
}
-
// 匹配类型(仅关键词回复显示)
if (msgType === AutoReplyMsgType.Keyword) {
schema.push({
@@ -117,7 +112,6 @@ export function useFormSchema(msgType: AutoReplyMsgType): VbenFormSchema[] {
rules: 'required',
});
}
-
// 关键词(仅关键词回复显示)
if (msgType === AutoReplyMsgType.Keyword) {
schema.push({
diff --git a/apps/web-antd/src/views/mp/autoReply/index.vue b/apps/web-antd/src/views/mp/autoReply/index.vue
index 71191c594..cf528c16d 100644
--- a/apps/web-antd/src/views/mp/autoReply/index.vue
+++ b/apps/web-antd/src/views/mp/autoReply/index.vue
@@ -4,7 +4,7 @@ import type { MpAutoReplyApi } from '#/api/mp/autoReply';
import { computed, nextTick, ref } from 'vue';
-import { confirm, DocAlert, Page, useVbenModal } from '@vben/common-ui';
+import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
import { AutoReplyMsgType } from '@vben/constants';
import { IconifyIcon } from '@vben/icons';
@@ -20,7 +20,7 @@ import { $t } from '#/locales';
import { WxAccountSelect } from '#/views/mp/components';
import { useGridColumns, useGridFormSchema } from './data';
-import ReplyContentCell from './modules/content.vue';
+import ReplyContent from './modules/content.vue';
import Form from './modules/form.vue';
defineOptions({ name: 'MpAutoReply' });
@@ -78,8 +78,8 @@ async function handleCreate() {
}
/** 修改自动回复 */
-async function handleEdit(row: any) {
- const data = (await getAutoReply(row.id)) as any;
+async function handleEdit(row: MpAutoReplyApi.AutoReply) {
+ const data = await getAutoReply(row.id!);
formModalApi
.setData({
msgType: Number(msgType.value) as AutoReplyMsgType,
@@ -90,15 +90,14 @@ async function handleEdit(row: any) {
}
/** 删除自动回复 */
-async function handleDelete(row: any) {
- await confirm('是否确认删除此数据?');
+async function handleDelete(row: MpAutoReplyApi.AutoReply) {
const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', ['自动回复']),
duration: 0,
});
try {
- await deleteAutoReply(row.id);
- message.success('删除成功');
+ await deleteAutoReply(row.id!);
+ message.success($t('ui.actionMessage.deleteSuccess'));
handleRefresh();
} finally {
hideLoading();
@@ -184,7 +183,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
-
-
+
-
-
+