feat: 部门管理

This commit is contained in:
dap
2024-09-23 11:33:55 +08:00
parent 03ea227f1f
commit 719ebbcf37
5 changed files with 359 additions and 4 deletions

View File

@@ -1,9 +1,35 @@
<script setup lang="ts">
import CommonSkeleton from '#/views/common';
import { Page, useVbenDrawer } from '@vben/common-ui';
import { $t } from '@vben/locales';
import { Space } from 'ant-design-vue';
import deptDrawer from './dept-drawer.vue';
const [DeptDrawer, drawerApi] = useVbenDrawer({
connectedComponent: deptDrawer,
});
function handleAdd() {
drawerApi.setData({});
drawerApi.open();
}
function handleTest(id: number | string) {
drawerApi.setData({ id });
drawerApi.open();
}
</script>
<template>
<div>
<CommonSkeleton />
</div>
<Page>
<Space>
<a-button type="primary" @click="handleAdd">
{{ $t('pages.common.add') }}
</a-button>
<a-button @click="handleTest(103)"> 新增 上级id=103 </a-button>
<a-button @click="handleTest(105)"> 新增 上级id=105 </a-button>
</Space>
<DeptDrawer />
</Page>
</template>