From 332c1b190c326b8b23cd4b0367a9d6232feb1ae0 Mon Sep 17 00:00:00 2001 From: ah--desktop Date: Tue, 28 Oct 2025 01:28:02 +0800 Subject: [PATCH] =?UTF-8?q?wip:=20=E5=85=AC=E5=8F=B8=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/organization/company-menu/apis.ts | 19 ++ .../api/organization/company-menu/index.ts | 1 + .../src/components/CompanyMenuDrawer.vue | 314 ++++++++++++++++++ .../src/views/organization/company/index.vue | 13 + 4 files changed, 347 insertions(+) create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/organization/company-menu/apis.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/organization/company-menu/index.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/components/CompanyMenuDrawer.vue diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/organization/company-menu/apis.ts b/ecom-dmb-frontend/apps/web-antd/src/api/organization/company-menu/apis.ts new file mode 100644 index 00000000..9341c8a9 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/organization/company-menu/apis.ts @@ -0,0 +1,19 @@ +import { requestClient } from '#/api/request'; + +/** + * 公司菜单管理API + */ + +/** + * 获取公司所有菜单ID + */ +export async function getCompanyMenuIdsApi(id: number) { + return requestClient.get(`/company-menu/menu-ids/${id}`); +} + +/** + * 批量更新公司菜单 + */ +export async function batchUpdateCompanyMenusApi(id: number, menuIds: number[]) { + return requestClient.post(`/company-menu/batch-update/${id}`, menuIds); +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/organization/company-menu/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/organization/company-menu/index.ts new file mode 100644 index 00000000..3cefd991 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/organization/company-menu/index.ts @@ -0,0 +1 @@ +export * from './apis'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/components/CompanyMenuDrawer.vue b/ecom-dmb-frontend/apps/web-antd/src/components/CompanyMenuDrawer.vue new file mode 100644 index 00000000..b36c100e --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/components/CompanyMenuDrawer.vue @@ -0,0 +1,314 @@ + + + + + + diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/organization/company/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/organization/company/index.vue index 787d0f5d..0de3554a 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/organization/company/index.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/organization/company/index.vue @@ -15,6 +15,7 @@ import { } from '#/api/organization/company'; import type { PageQueryDTO } from '#/types/common'; import CompanyFormModal from './components/CompanyFormModal.vue'; +import CompanyMenuDrawer from '#/components/CompanyMenuDrawer.vue'; // 创建图标组件 const PlusIcon = createIconifyIcon('lucide:plus'); @@ -24,6 +25,7 @@ defineOptions({ name: 'CompanyManagement' }); // 响应式数据 const loading = ref(false); const companyFormModalRef = ref(); +const companyMenuDrawerRef = ref(); // 搜索表单 const searchForm = ref({ @@ -261,6 +263,11 @@ function handleModalSuccess() { refreshTable(); } +// 处理菜单管理 +function handleMenuManage(record: any) { + companyMenuDrawerRef.value?.open(record); +} + // 创建 VbenVxeGrid 实例 const [Grid, gridApi] = useVbenVxeGrid({ gridOptions, @@ -332,6 +339,9 @@ const [Grid, gridApi] = useVbenVxeGrid({ + @@ -344,5 +354,8 @@ const [Grid, gridApi] = useVbenVxeGrid({ ref="companyFormModalRef" @success="handleModalSuccess" /> + + +