diff --git a/apps/web-antd/src/api/system/post/index.ts b/apps/web-antd/src/api/system/post/index.ts index 3e1ef2e2..e39f52da 100644 --- a/apps/web-antd/src/api/system/post/index.ts +++ b/apps/web-antd/src/api/system/post/index.ts @@ -1,3 +1,4 @@ +import type { DeptTree } from '../user/model'; import type { Post } from './model'; import type { ID, IDS, PageQuery } from '#/api/common'; @@ -74,3 +75,11 @@ export function postRemove(postIds: IDS) { export function postOptionSelect(deptId: ID) { return requestClient.get(Api.postSelect, { params: { deptId } }); } + +/** + * 岗位专用 - 获取部门树 + * @returns 部门树 + */ +export function postDeptTreeSelect() { + return requestClient.get('/system/post/deptTree'); +} diff --git a/apps/web-antd/src/views/system/post/index.vue b/apps/web-antd/src/views/system/post/index.vue index 7c18a4fc..8abe160a 100644 --- a/apps/web-antd/src/views/system/post/index.vue +++ b/apps/web-antd/src/views/system/post/index.vue @@ -12,7 +12,12 @@ import { getVxePopupContainer } from '@vben/utils'; import { Modal, Popconfirm, Space } from 'ant-design-vue'; import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table'; -import { postExport, postList, postRemove } from '#/api/system/post'; +import { + postDeptTreeSelect, + postExport, + postList, + postRemove, +} from '#/api/system/post'; import { commonDownloadExcel } from '#/utils/file/download'; import DeptTree from '#/views/system/user/dept-tree.vue'; @@ -122,6 +127,7 @@ function handleDownloadExcel() {