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" /> + + +