From be1250e71a38cded256b397d5e33fe84fa49c93b Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Mon, 22 Sep 2025 18:13:52 +0800 Subject: [PATCH] fix: mp tag --- apps/web-antd/src/views/mp/tag/index.vue | 41 +++++++++++------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/apps/web-antd/src/views/mp/tag/index.vue b/apps/web-antd/src/views/mp/tag/index.vue index 75945b7a..c576c245 100644 --- a/apps/web-antd/src/views/mp/tag/index.vue +++ b/apps/web-antd/src/views/mp/tag/index.vue @@ -3,10 +3,8 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { MpTagApi } from '#/api/mp/tag'; import { onMounted, ref } from 'vue'; -import { useRouter } from 'vue-router'; import { Page, useVbenModal } from '@vben/common-ui'; -import { useTabs } from '@vben/hooks'; import { message } from 'ant-design-vue'; @@ -18,9 +16,6 @@ import { $t } from '#/locales'; import { useGridColumns } from './data'; import Form from './modules/form.vue'; -const { push } = useRouter(); // 路由 -const tabs = useTabs(); - const accountId = ref(-1); const accountOptions = ref<{ label: string; value: number }[]>([]); @@ -37,28 +32,28 @@ async function getAccountList() { label: item.name, value: item.id, })); - gridApi.setState({ - formOptions: { - schema: [ - { - fieldName: 'accountId', - label: '公众号', - component: 'Select', - componentProps: { - options: accountOptions, - }, - }, - ], - }, - }); gridApi.formApi.setValues({ accountId: accountId.value, }); } else { message.error('未配置公众号,请在【公众号管理 -> 账号管理】菜单,进行配置'); - await push({ name: 'MpAccount' }); - tabs.closeCurrentTab(); + // await push({ name: 'MpAccount' }); + // tabs.closeCurrentTab(); } + gridApi.setState({ + formOptions: { + schema: [ + { + fieldName: 'accountId', + label: '公众号', + component: 'Select', + componentProps: { + options: accountOptions.value || [], + }, + }, + ], + }, + }); } /** 刷新表格 */ function onRefresh() { @@ -146,12 +141,12 @@ onMounted(async () => {