From 3354f154b1bf0d259aa8b13e0dd8aaf3550d3928 Mon Sep 17 00:00:00 2001 From: ah--desktop Date: Wed, 15 Oct 2025 23:02:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E6=8E=A5=E5=8F=A3=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=92=8C=E5=AF=B9=E6=8E=A5=E8=B4=A6=E6=88=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/media/{file.apis.ts => file/apis.ts} | 0 .../src/api/{org => media/file}/index.ts | 2 +- .../{types/dto.file.ts => file/types/dto.ts} | 0 .../src/api/media/file/types/index.ts | 6 + .../{types/vo.file.ts => file/types/vo.ts} | 0 .../media/{image.apis.ts => image/apis.ts} | 0 .../web-antd/src/api/media/image/index.ts | 6 + .../dto.image.ts => image/types/dto.ts} | 0 .../src/api/media/image/types/index.ts | 6 + .../{types/vo.image.ts => image/types/vo.ts} | 0 .../apps/web-antd/src/api/media/index.ts | 12 -- .../web-antd/src/api/media/types/index.ts | 11 -- .../apps/web-antd/src/api/org/account/apis.ts | 63 ++++++++ .../web-antd/src/api/org/account/index.ts | 6 + .../src/api/org/{ => account}/types/index.ts | 2 +- .../src/api/org/account/types/types.dto.ts | 71 +++++++++ .../src/api/org/account/types/types.vo.ts | 53 +++++++ .../apps/web-antd/src/api/org/apis.ts | 113 --------------- .../apps/web-antd/src/api/org/company/apis.ts | 49 +++++++ .../web-antd/src/api/org/company/index.ts | 6 + .../src/api/org/company/types/index.ts | 6 + .../src/api/org/company/types/types.dto.ts | 61 ++++++++ .../src/api/org/company/types/types.vo.ts | 35 +++++ .../web-antd/src/api/org/department/apis.ts | 36 +++++ .../web-antd/src/api/org/department/index.ts | 6 + .../src/api/org/department/types/index.ts | 6 + .../src/api/org/department/types/types.dto.ts | 39 +++++ .../src/api/org/department/types/types.vo.ts | 31 ++++ .../web-antd/src/api/org/position/apis.ts | 36 +++++ .../web-antd/src/api/org/position/index.ts | 6 + .../src/api/org/position/types/index.ts | 6 + .../src/api/org/position/types/types.dto.ts | 41 ++++++ .../src/api/org/position/types/types.vo.ts | 31 ++++ .../web-antd/src/api/org/types/types.dto.ts | 135 ------------------ .../web-antd/src/api/org/types/types.vo.ts | 91 ------------ .../components/FileEditModal.vue | 4 +- .../src/views/media/file-repository/index.vue | 5 +- .../image-repository/components/ImageCard.vue | 2 +- .../components/ImageEditModal.vue | 4 +- .../components/ImageGridView.vue | 4 +- .../views/media/image-repository/index.vue | 4 +- .../components/CompanyFormModal.vue | 2 +- .../organization/company-management/index.vue | 2 +- .../components/DepartmentModal.vue | 2 +- .../department-management/index.vue | 2 +- .../components/PositionModal.vue | 2 +- .../position-management/index.vue | 2 +- 47 files changed, 625 insertions(+), 382 deletions(-) rename ecom-dmb-frontend/apps/web-antd/src/api/media/{file.apis.ts => file/apis.ts} (100%) rename ecom-dmb-frontend/apps/web-antd/src/api/{org => media/file}/index.ts (65%) rename ecom-dmb-frontend/apps/web-antd/src/api/media/{types/dto.file.ts => file/types/dto.ts} (100%) create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/media/file/types/index.ts rename ecom-dmb-frontend/apps/web-antd/src/api/media/{types/vo.file.ts => file/types/vo.ts} (100%) rename ecom-dmb-frontend/apps/web-antd/src/api/media/{image.apis.ts => image/apis.ts} (100%) create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/media/image/index.ts rename ecom-dmb-frontend/apps/web-antd/src/api/media/{types/dto.image.ts => image/types/dto.ts} (100%) create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/media/image/types/index.ts rename ecom-dmb-frontend/apps/web-antd/src/api/media/{types/vo.image.ts => image/types/vo.ts} (100%) delete mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/media/index.ts delete mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/media/types/index.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/account/apis.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/account/index.ts rename ecom-dmb-frontend/apps/web-antd/src/api/org/{ => account}/types/index.ts (62%) create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/account/types/types.dto.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/account/types/types.vo.ts delete mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/apis.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/company/apis.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/company/index.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/company/types/index.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/company/types/types.dto.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/company/types/types.vo.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/department/apis.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/department/index.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/department/types/index.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/department/types/types.dto.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/department/types/types.vo.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/position/apis.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/position/index.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/position/types/index.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/position/types/types.dto.ts create mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/position/types/types.vo.ts delete mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/types/types.dto.ts delete mode 100644 ecom-dmb-frontend/apps/web-antd/src/api/org/types/types.vo.ts diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/media/file.apis.ts b/ecom-dmb-frontend/apps/web-antd/src/api/media/file/apis.ts similarity index 100% rename from ecom-dmb-frontend/apps/web-antd/src/api/media/file.apis.ts rename to ecom-dmb-frontend/apps/web-antd/src/api/media/file/apis.ts diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/media/file/index.ts similarity index 65% rename from ecom-dmb-frontend/apps/web-antd/src/api/org/index.ts rename to ecom-dmb-frontend/apps/web-antd/src/api/media/file/index.ts index 3259a8b4..fd52caee 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/api/org/index.ts +++ b/ecom-dmb-frontend/apps/web-antd/src/api/media/file/index.ts @@ -1,5 +1,5 @@ /** - * 组织管理模块API导出 + * 文件管理模块API导出 */ export * from './apis'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/media/types/dto.file.ts b/ecom-dmb-frontend/apps/web-antd/src/api/media/file/types/dto.ts similarity index 100% rename from ecom-dmb-frontend/apps/web-antd/src/api/media/types/dto.file.ts rename to ecom-dmb-frontend/apps/web-antd/src/api/media/file/types/dto.ts diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/media/file/types/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/media/file/types/index.ts new file mode 100644 index 00000000..8686e0ca --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/media/file/types/index.ts @@ -0,0 +1,6 @@ +/** + * 文件管理模块类型定义导出 + */ + +export * from './dto'; +export * from './vo'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/media/types/vo.file.ts b/ecom-dmb-frontend/apps/web-antd/src/api/media/file/types/vo.ts similarity index 100% rename from ecom-dmb-frontend/apps/web-antd/src/api/media/types/vo.file.ts rename to ecom-dmb-frontend/apps/web-antd/src/api/media/file/types/vo.ts diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/media/image.apis.ts b/ecom-dmb-frontend/apps/web-antd/src/api/media/image/apis.ts similarity index 100% rename from ecom-dmb-frontend/apps/web-antd/src/api/media/image.apis.ts rename to ecom-dmb-frontend/apps/web-antd/src/api/media/image/apis.ts diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/media/image/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/media/image/index.ts new file mode 100644 index 00000000..32c126e7 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/media/image/index.ts @@ -0,0 +1,6 @@ +/** + * 图片管理模块API导出 + */ + +export * from './apis'; +export * from './types'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/media/types/dto.image.ts b/ecom-dmb-frontend/apps/web-antd/src/api/media/image/types/dto.ts similarity index 100% rename from ecom-dmb-frontend/apps/web-antd/src/api/media/types/dto.image.ts rename to ecom-dmb-frontend/apps/web-antd/src/api/media/image/types/dto.ts diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/media/image/types/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/media/image/types/index.ts new file mode 100644 index 00000000..03a24ffe --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/media/image/types/index.ts @@ -0,0 +1,6 @@ +/** + * 图片管理模块类型定义导出 + */ + +export * from './dto'; +export * from './vo'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/media/types/vo.image.ts b/ecom-dmb-frontend/apps/web-antd/src/api/media/image/types/vo.ts similarity index 100% rename from ecom-dmb-frontend/apps/web-antd/src/api/media/types/vo.image.ts rename to ecom-dmb-frontend/apps/web-antd/src/api/media/image/types/vo.ts diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/media/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/media/index.ts deleted file mode 100644 index 306724bd..00000000 --- a/ecom-dmb-frontend/apps/web-antd/src/api/media/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * 媒体管理模块API导出 - */ - -// 文件相关API -export * from './file.apis'; - -// 图片相关API -export * from './image.apis'; - -// 类型定义 -export * from './types'; \ No newline at end of file diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/media/types/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/media/types/index.ts deleted file mode 100644 index 992612f7..00000000 --- a/ecom-dmb-frontend/apps/web-antd/src/api/media/types/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * 媒体管理模块类型定义导出 - */ - -// DTO类型导出 -export * from './dto.file'; -export * from './dto.image'; - -// VO类型导出 -export * from './vo.file'; -export * from './vo.image'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/account/apis.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/account/apis.ts new file mode 100644 index 00000000..a91109a8 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/account/apis.ts @@ -0,0 +1,63 @@ +import { requestClient } from '#/api/request'; + +import type { PageQueryDTO, PageResultVO } from '#/types/common'; +import type { AccountDTO, AccountVO } from './types'; + +/** + * 账户管理API + */ + +// ==================== 超管接口 ==================== + +/** + * 创建账户(超管) + */ +export async function createAccountApi(data: AccountDTO.CreateAccountDTO) { + return requestClient.post('/account/create', data); +} + +/** + * 分页查询账户(超管) + */ +export async function getAccountPageApi(params: PageQueryDTO) { + return requestClient.get('/account/page', { params }); +} + +// ==================== 管理员接口 ==================== + +/** + * 创建账户(管理员) + */ +export async function createAccountForCompanyApi(data: AccountDTO.CreateAccountDTO) { + return requestClient.post('/account/company/create', data); +} + +/** + * 分页查询账户(管理员) + */ +export async function getAccountPageForCompanyApi(params: PageQueryDTO) { + return requestClient.get('/account/company/page', { params }); +} + +// ==================== 通用接口 ==================== + +/** + * 更新账户信息 + */ +export async function updateAccountApi(accountId: number, data: AccountDTO.UpdateAccountDTO) { + return requestClient.put(`/account/${accountId}`, data); +} + +/** + * 删除账户 + */ +export async function deleteAccountApi(accountId: number) { + return requestClient.delete(`/account/${accountId}`); +} + +/** + * 获取账户详情 + */ +export async function getAccountDetailApi(accountId: number) { + return requestClient.get(`/account/${accountId}`); +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/account/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/account/index.ts new file mode 100644 index 00000000..fe0f7f37 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/account/index.ts @@ -0,0 +1,6 @@ +/** + * 账户管理模块API导出 + */ + +export * from './apis'; +export * from './types'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/types/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/account/types/index.ts similarity index 62% rename from ecom-dmb-frontend/apps/web-antd/src/api/org/types/index.ts rename to ecom-dmb-frontend/apps/web-antd/src/api/org/account/types/index.ts index df28a751..9263c66b 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/api/org/types/index.ts +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/account/types/index.ts @@ -1,5 +1,5 @@ /** - * 组织管理模块类型定义导出 + * 账户管理模块类型定义导出 */ export * from './types.dto'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/account/types/types.dto.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/account/types/types.dto.ts new file mode 100644 index 00000000..45cd70cd --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/account/types/types.dto.ts @@ -0,0 +1,71 @@ +/** + * 账户管理模块DTO类型定义 + */ + +export namespace AccountDTO { + /** 创建账户参数 */ + export interface CreateAccountDTO { + /** 用户名 */ + username: string; + /** 密码 */ + password: string; + /** 真实姓名 */ + realName: string; + /** 邮箱 */ + email?: string; + /** 手机号 */ + phone?: string; + /** 公司ID */ + companyId?: number; + /** 部门ID */ + departmentId?: number; + /** 职位ID */ + positionId?: number; + /** 角色ID */ + roleId?: number; + /** 状态 (0-禁用 1-正常) */ + status?: number; + } + + /** 更新账户参数 */ + export interface UpdateAccountDTO { + /** 真实姓名 */ + realName?: string; + /** 邮箱 */ + email?: string; + /** 手机号 */ + phone?: string; + /** 公司ID */ + companyId?: number; + /** 部门ID */ + departmentId?: number; + /** 职位ID */ + positionId?: number; + /** 角色ID */ + roleId?: number; + /** 状态 (0-禁用 1-正常) */ + status?: number; + } + + /** 账户过滤条件 */ + export interface AccountFilterDTO { + /** 用户名(模糊查询) */ + username?: string; + /** 真实姓名(模糊查询) */ + realName?: string; + /** 邮箱(精确查询) */ + email?: string; + /** 手机号(精确查询) */ + phone?: string; + /** 公司ID */ + companyId?: number; + /** 部门ID */ + departmentId?: number; + /** 职位ID */ + positionId?: number; + /** 角色ID */ + roleId?: number; + /** 状态 */ + status?: number; + } +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/account/types/types.vo.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/account/types/types.vo.ts new file mode 100644 index 00000000..1e5a8e88 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/account/types/types.vo.ts @@ -0,0 +1,53 @@ +/** + * 账户管理模块VO类型定义 + */ + +export namespace AccountVO { + /** 账户信息 */ + export interface AccountInfoVO { + /** 账户ID */ + id: number; + /** 用户名 */ + username: string; + /** 真实姓名 */ + realName: string; + /** 邮箱 */ + email?: string; + /** 手机号 */ + phone?: string; + /** 公司ID */ + companyId?: number; + /** 公司名称 */ + companyName?: string; + /** 部门ID */ + departmentId?: number; + /** 部门名称 */ + departmentName?: string; + /** 职位ID */ + positionId?: number; + /** 职位名称 */ + positionName?: string; + /** 角色ID */ + roleId?: number; + /** 角色名称 */ + roleName?: string; + /** 状态 (0-禁用 1-正常) */ + status: number; + /** 创建时间 */ + createTime: string; + /** 更新时间 */ + updateTime: string; + } + + /** 账户分页结果 */ + export interface AccountPageVO { + /** 总记录数 */ + total: number; + /** 当前页码 */ + current: number; + /** 每页大小 */ + size: number; + /** 账户列表 */ + records: AccountInfoVO[]; + } +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/apis.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/apis.ts deleted file mode 100644 index 776a2f01..00000000 --- a/ecom-dmb-frontend/apps/web-antd/src/api/org/apis.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { requestClient } from '#/api/request'; - -import type { PageQueryDTO, PageResultVO } from '#/types/common'; -import type { CompanyDTO, CompanyVO, DepartmentDTO, DepartmentVO, PositionDTO, PositionVO } from './types'; - -/** - * 公司管理API - */ - -/** - * 分页获取公司列表 - */ -export async function getCompanyPageApi(params: PageQueryDTO) { - return requestClient.post>('/company/page', params); -} - -/** - * 创建公司 - */ -export async function createCompanyApi(data: CompanyDTO.CreateCompanyDTO) { - return requestClient.post('/company/create', data); -} - -/** - * 更新公司 - */ -export async function updateCompanyApi(id: number, data: CompanyDTO.UpdateCompanyDTO) { - return requestClient.put(`/company/update/${id}`, data); -} - -/** - * 删除公司 - */ -export async function deleteCompanyApi(id: number) { - return requestClient.delete(`/company/delete/${id}`); -} - -/** - * 上传公司Logo - */ -export async function uploadCompanyLogoApi(file: File) { - const formData = new FormData(); - formData.append('file', file); - return requestClient.post('/company/upload-logo', formData, { - headers: { - 'Content-Type': 'multipart/form-data', - }, - }); -} - -/** - * 部门管理API - */ - -/** - * 分页获取部门列表 - */ -export async function getDepartmentPageApi(params: PageQueryDTO) { - return requestClient.post>('/department/page', params); -} - -/** - * 创建部门 - */ -export async function createDepartmentApi(data: DepartmentDTO.CreateDepartmentDTO) { - return requestClient.post('/department/create', data); -} - -/** - * 更新部门 - */ -export async function updateDepartmentApi(id: number, data: DepartmentDTO.UpdateDepartmentDTO) { - return requestClient.put(`/department/update/${id}`, data); -} - -/** - * 删除部门 - */ -export async function deleteDepartmentApi(id: number) { - return requestClient.delete(`/department/delete/${id}`); -} - -/** - * 岗位管理API - */ - -/** - * 分页获取岗位列表 - */ -export async function getPositionPageApi(params: PageQueryDTO) { - return requestClient.post>('/position/page', params); -} - -/** - * 创建岗位 - */ -export async function createPositionApi(data: PositionDTO.CreatePositionDTO) { - return requestClient.post('/position/create', data); -} - -/** - * 更新岗位 - */ -export async function updatePositionApi(id: number, data: PositionDTO.UpdatePositionDTO) { - return requestClient.put(`/position/update/${id}`, data); -} - -/** - * 删除岗位 - */ -export async function deletePositionApi(id: number) { - return requestClient.delete(`/position/delete/${id}`); -} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/company/apis.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/company/apis.ts new file mode 100644 index 00000000..d7e4f337 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/company/apis.ts @@ -0,0 +1,49 @@ +import { requestClient } from '#/api/request'; + +import type { PageQueryDTO, PageResultVO } from '#/types/common'; +import type { CompanyDTO, CompanyVO } from './types'; + +/** + * 公司管理API + */ + +/** + * 分页获取公司列表 + */ +export async function getCompanyPageApi(params: PageQueryDTO) { + return requestClient.post>('/company/page', params); +} + +/** + * 创建公司 + */ +export async function createCompanyApi(data: CompanyDTO.CreateCompanyDTO) { + return requestClient.post('/company/create', data); +} + +/** + * 更新公司 + */ +export async function updateCompanyApi(id: number, data: CompanyDTO.UpdateCompanyDTO) { + return requestClient.put(`/company/update/${id}`, data); +} + +/** + * 删除公司 + */ +export async function deleteCompanyApi(id: number) { + return requestClient.delete(`/company/delete/${id}`); +} + +/** + * 上传公司Logo + */ +export async function uploadCompanyLogoApi(file: File) { + const formData = new FormData(); + formData.append('file', file); + return requestClient.post('/company/upload-logo', formData, { + headers: { + 'Content-Type': 'multipart/form-data', + }, + }); +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/company/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/company/index.ts new file mode 100644 index 00000000..3902309f --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/company/index.ts @@ -0,0 +1,6 @@ +/** + * 公司管理模块API导出 + */ + +export * from './apis'; +export * from './types'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/company/types/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/company/types/index.ts new file mode 100644 index 00000000..72589144 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/company/types/index.ts @@ -0,0 +1,6 @@ +/** + * 公司管理模块类型定义导出 + */ + +export * from './types.dto'; +export * from './types.vo'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/company/types/types.dto.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/company/types/types.dto.ts new file mode 100644 index 00000000..2ec71bd5 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/company/types/types.dto.ts @@ -0,0 +1,61 @@ +/** + * 公司管理模块DTO类型定义 + */ + +export namespace CompanyDTO { + /** 创建公司参数 */ + export interface CreateCompanyDTO { + /** 公司名称 */ + name: string; + /** 公司地址 */ + address?: string; + /** 联系人 */ + contactPerson?: string; + /** 联系电话 */ + contactPhone?: string; + /** 邮箱 */ + email?: string; + /** logo图片ID */ + logoImageId?: number; + /** 状态 (0-禁用 1-正常) */ + status?: number; + /** 订阅到期时间 */ + expireTime?: string; + } + + /** 更新公司参数 */ + export interface UpdateCompanyDTO { + /** 公司名称 */ + name: string; + /** 公司地址 */ + address?: string; + /** 联系人 */ + contactPerson?: string; + /** 联系电话 */ + contactPhone?: string; + /** 邮箱 */ + email?: string; + /** logo图片ID */ + logoImageId?: number; + /** 状态 (0-禁用 1-正常) */ + status?: number; + /** 订阅到期时间 */ + expireTime?: string; + } + + /** 公司过滤条件 */ + export interface CompanyFiltersDTO { + /** 公司名称(模糊查询) */ + name?: string; + /** 联系人(模糊查询) */ + contactPerson?: string; + /** 联系电话(精确查询) */ + contactPhone?: string; + /** 邮箱(精确查询) */ + email?: string; + /** 状态 */ + status?: number; + /** 过期状态查询 */ + expired?: boolean; + } +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/company/types/types.vo.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/company/types/types.vo.ts new file mode 100644 index 00000000..4ad65dc0 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/company/types/types.vo.ts @@ -0,0 +1,35 @@ +/** + * 公司管理模块VO类型定义 + */ + +export namespace CompanyVO { + /** 公司信息 */ + export interface CompanyInfoVO { + /** 公司ID */ + id: number; + /** 公司名称 */ + name: string; + /** 订阅到期时间 */ + expiration?: string; + /** 公司地址 */ + address?: string; + /** 联系人 */ + contactPerson?: string; + /** 联系电话 */ + contactPhone?: string; + /** 邮箱 */ + email?: string; + /** logo */ + logo?: string; + /** 状态 (0-禁用 1-正常) */ + status: number; + /** 订阅到期时间 */ + expireTime?: string; + /** 创建时间 */ + createTime: string; + /** 更新时间 */ + updateTime: string; + /** 是否过期 */ + expired?: boolean; + } +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/department/apis.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/department/apis.ts new file mode 100644 index 00000000..d2a9c130 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/department/apis.ts @@ -0,0 +1,36 @@ +import { requestClient } from '#/api/request'; + +import type { PageQueryDTO, PageResultVO } from '#/types/common'; +import type { DepartmentDTO, DepartmentVO } from './types'; + +/** + * 部门管理API + */ + +/** + * 分页获取部门列表 + */ +export async function getDepartmentPageApi(params: PageQueryDTO) { + return requestClient.post>('/department/page', params); +} + +/** + * 创建部门 + */ +export async function createDepartmentApi(data: DepartmentDTO.CreateDepartmentDTO) { + return requestClient.post('/department/create', data); +} + +/** + * 更新部门 + */ +export async function updateDepartmentApi(id: number, data: DepartmentDTO.UpdateDepartmentDTO) { + return requestClient.put(`/department/update/${id}`, data); +} + +/** + * 删除部门 + */ +export async function deleteDepartmentApi(id: number) { + return requestClient.delete(`/department/delete/${id}`); +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/department/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/department/index.ts new file mode 100644 index 00000000..c2aeb735 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/department/index.ts @@ -0,0 +1,6 @@ +/** + * 部门管理模块API导出 + */ + +export * from './apis'; +export * from './types'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/department/types/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/department/types/index.ts new file mode 100644 index 00000000..4df94680 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/department/types/index.ts @@ -0,0 +1,6 @@ +/** + * 部门管理模块类型定义导出 + */ + +export * from './types.dto'; +export * from './types.vo'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/department/types/types.dto.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/department/types/types.dto.ts new file mode 100644 index 00000000..7ab1da5c --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/department/types/types.dto.ts @@ -0,0 +1,39 @@ +/** + * 部门管理模块DTO类型定义 + */ + +export namespace DepartmentDTO { + /** 创建部门参数 */ + export interface CreateDepartmentDTO { + /** 部门名称 */ + name: string; + /** 父部门ID */ + parentId?: number; + /** 备注 */ + remark?: string; + /** 状态 */ + status?: number; + } + + /** 更新部门参数 */ + export interface UpdateDepartmentDTO { + /** 部门名称 */ + name: string; + /** 父部门ID */ + parentId?: number; + /** 备注 */ + remark?: string; + /** 状态 */ + status?: number; + } + + /** 部门过滤条件 */ + export interface DepartmentFiltersDTO { + /** 部门名称(模糊查询) */ + name?: string; + /** 父级部门ID */ + parentId?: number; + /** 状态 */ + status?: number; + } +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/department/types/types.vo.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/department/types/types.vo.ts new file mode 100644 index 00000000..c9251e96 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/department/types/types.vo.ts @@ -0,0 +1,31 @@ +/** + * 部门管理模块VO类型定义 + */ + +export namespace DepartmentVO { + /** 部门信息 */ + export interface DepartmentInfoVO { + /** 部门ID */ + id: number; + /** 部门名称 */ + name: string; + /** 父部门ID */ + parentId?: number; + /** 公司ID */ + companyId: number; + /** 备注 */ + remark?: string; + /** 状态 */ + status: number; + /** 创建时间 */ + createTime: string; + /** 更新时间 */ + updateTime: string; + /** 创建人ID */ + createBy?: number; + /** 更新人ID */ + updateBy?: number; + /** 子部门 */ + children?: DepartmentInfoVO[]; + } +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/position/apis.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/position/apis.ts new file mode 100644 index 00000000..78f96a1e --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/position/apis.ts @@ -0,0 +1,36 @@ +import { requestClient } from '#/api/request'; + +import type { PageQueryDTO, PageResultVO } from '#/types/common'; +import type { PositionDTO, PositionVO } from './types'; + +/** + * 岗位管理API + */ + +/** + * 分页获取岗位列表 + */ +export async function getPositionPageApi(params: PageQueryDTO) { + return requestClient.post>('/position/page', params); +} + +/** + * 创建岗位 + */ +export async function createPositionApi(data: PositionDTO.CreatePositionDTO) { + return requestClient.post('/position/create', data); +} + +/** + * 更新岗位 + */ +export async function updatePositionApi(id: number, data: PositionDTO.UpdatePositionDTO) { + return requestClient.put(`/position/update/${id}`, data); +} + +/** + * 删除岗位 + */ +export async function deletePositionApi(id: number) { + return requestClient.delete(`/position/delete/${id}`); +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/position/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/position/index.ts new file mode 100644 index 00000000..dbd1937c --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/position/index.ts @@ -0,0 +1,6 @@ +/** + * 岗位管理模块API导出 + */ + +export * from './apis'; +export * from './types'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/position/types/index.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/position/types/index.ts new file mode 100644 index 00000000..6d08e663 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/position/types/index.ts @@ -0,0 +1,6 @@ +/** + * 岗位管理模块类型定义导出 + */ + +export * from './types.dto'; +export * from './types.vo'; diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/position/types/types.dto.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/position/types/types.dto.ts new file mode 100644 index 00000000..01930b7e --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/position/types/types.dto.ts @@ -0,0 +1,41 @@ +/** + * 岗位管理模块DTO类型定义 + */ + +export namespace PositionDTO { + /** 创建岗位参数 */ + export interface CreatePositionDTO { + /** 岗位名称 */ + name: string; + /** 岗位编码 */ + code?: string; + /** 部门ID */ + departmentId?: number; + /** 备注 */ + remark?: string; + /** 状态 */ + status?: number; + } + + /** 更新岗位参数 */ + export interface UpdatePositionDTO { + /** 岗位名称 */ + name: string; + /** 岗位编码 */ + code?: string; + /** 部门ID */ + departmentId?: number; + /** 备注 */ + remark?: string; + /** 状态 */ + status?: number; + } + + /** 岗位过滤条件 */ + export interface PositionFiltersDTO { + /** 岗位名称(模糊查询) */ + name?: string; + /** 状态 */ + status?: number; + } +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/position/types/types.vo.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/position/types/types.vo.ts new file mode 100644 index 00000000..5f0b41b7 --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/api/org/position/types/types.vo.ts @@ -0,0 +1,31 @@ +/** + * 岗位管理模块VO类型定义 + */ + +export namespace PositionVO { + /** 岗位信息 */ + export interface PositionInfoVO { + /** 岗位ID */ + id: number; + /** 岗位名称 */ + name: string; + /** 岗位编码 */ + code?: string; + /** 部门ID */ + departmentId?: number; + /** 备注 */ + remark?: string; + /** 状态 */ + status: number; + /** 公司ID */ + companyId: number; + /** 创建时间 */ + createTime: string; + /** 更新时间 */ + updateTime: string; + /** 创建人ID */ + createBy?: number; + /** 更新人ID */ + updateBy?: number; + } +} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/types/types.dto.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/types/types.dto.ts deleted file mode 100644 index f94f77b9..00000000 --- a/ecom-dmb-frontend/apps/web-antd/src/api/org/types/types.dto.ts +++ /dev/null @@ -1,135 +0,0 @@ -/** - * 组织管理模块DTO类型定义 - */ - -export namespace CompanyDTO { - /** 创建公司参数 */ - export interface CreateCompanyDTO { - /** 公司名称 */ - name: string; - /** 公司地址 */ - address?: string; - /** 联系人 */ - contactPerson?: string; - /** 联系电话 */ - contactPhone?: string; - /** 邮箱 */ - email?: string; - /** logo图片ID */ - logoImageId?: number; - /** 状态 (0-禁用 1-正常) */ - status?: number; - /** 订阅到期时间 */ - expireTime?: string; - } - - /** 更新公司参数 */ - export interface UpdateCompanyDTO { - /** 公司名称 */ - name: string; - /** 公司地址 */ - address?: string; - /** 联系人 */ - contactPerson?: string; - /** 联系电话 */ - contactPhone?: string; - /** 邮箱 */ - email?: string; - /** logo图片ID */ - logoImageId?: number; - /** 状态 (0-禁用 1-正常) */ - status?: number; - /** 订阅到期时间 */ - expireTime?: string; - } - - /** 公司过滤条件 */ - export interface CompanyFiltersDTO { - /** 公司名称(模糊查询) */ - name?: string; - /** 联系人(模糊查询) */ - contactPerson?: string; - /** 联系电话(精确查询) */ - contactPhone?: string; - /** 邮箱(精确查询) */ - email?: string; - /** 状态 */ - status?: number; - /** 过期状态查询 */ - expired?: boolean; - } -} - -export namespace DepartmentDTO { - /** 创建部门参数 */ - export interface CreateDepartmentDTO { - /** 部门名称 */ - name: string; - /** 父部门ID */ - parentId?: number; - /** 备注 */ - remark?: string; - /** 状态 */ - status?: number; - } - - /** 更新部门参数 */ - export interface UpdateDepartmentDTO { - /** 部门名称 */ - name: string; - /** 父部门ID */ - parentId?: number; - /** 备注 */ - remark?: string; - /** 状态 */ - status?: number; - } - - /** 部门过滤条件 */ - export interface DepartmentFiltersDTO { - /** 部门名称(模糊查询) */ - name?: string; - /** 父级部门ID */ - parentId?: number; - /** 状态 */ - status?: number; - } -} - -export namespace PositionDTO { - /** 创建岗位参数 */ - export interface CreatePositionDTO { - /** 岗位名称 */ - name: string; - /** 岗位编码 */ - code?: string; - /** 部门ID */ - departmentId?: number; - /** 备注 */ - remark?: string; - /** 状态 */ - status?: number; - } - - /** 更新岗位参数 */ - export interface UpdatePositionDTO { - /** 岗位名称 */ - name: string; - /** 岗位编码 */ - code?: string; - /** 部门ID */ - departmentId?: number; - /** 备注 */ - remark?: string; - /** 状态 */ - status?: number; - } - - /** 岗位过滤条件 */ - export interface PositionFiltersDTO { - /** 岗位名称(模糊查询) */ - name?: string; - /** 状态 */ - status?: number; - } -} diff --git a/ecom-dmb-frontend/apps/web-antd/src/api/org/types/types.vo.ts b/ecom-dmb-frontend/apps/web-antd/src/api/org/types/types.vo.ts deleted file mode 100644 index ca7f4f3a..00000000 --- a/ecom-dmb-frontend/apps/web-antd/src/api/org/types/types.vo.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * 组织管理模块VO类型定义 - */ - -export namespace CompanyVO { - /** 公司信息 */ - export interface CompanyInfoVO { - /** 公司ID */ - id: number; - /** 公司名称 */ - name: string; - /** 订阅到期时间 */ - expiration?: string; - /** 公司地址 */ - address?: string; - /** 联系人 */ - contactPerson?: string; - /** 联系电话 */ - contactPhone?: string; - /** 邮箱 */ - email?: string; - /** logo */ - logo?: string; - /** 状态 (0-禁用 1-正常) */ - status: number; - /** 订阅到期时间 */ - expireTime?: string; - /** 创建时间 */ - createTime: string; - /** 更新时间 */ - updateTime: string; - /** 是否过期 */ - expired?: boolean; - } -} - -export namespace DepartmentVO { - /** 部门信息 */ - export interface DepartmentInfoVO { - /** 部门ID */ - id: number; - /** 部门名称 */ - name: string; - /** 父部门ID */ - parentId?: number; - /** 公司ID */ - companyId: number; - /** 备注 */ - remark?: string; - /** 状态 */ - status: number; - /** 创建时间 */ - createTime: string; - /** 更新时间 */ - updateTime: string; - /** 创建人ID */ - createBy?: number; - /** 更新人ID */ - updateBy?: number; - /** 子部门 */ - children?: DepartmentInfoVO[]; - } -} - -export namespace PositionVO { - /** 岗位信息 */ - export interface PositionInfoVO { - /** 岗位ID */ - id: number; - /** 岗位名称 */ - name: string; - /** 岗位编码 */ - code?: string; - /** 部门ID */ - departmentId?: number; - /** 备注 */ - remark?: string; - /** 状态 */ - status: number; - /** 公司ID */ - companyId: number; - /** 创建时间 */ - createTime: string; - /** 更新时间 */ - updateTime: string; - /** 创建人ID */ - createBy?: number; - /** 更新人ID */ - updateBy?: number; - } -} diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/media/file-repository/components/FileEditModal.vue b/ecom-dmb-frontend/apps/web-antd/src/views/media/file-repository/components/FileEditModal.vue index f9c1aa81..433f7a1a 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/media/file-repository/components/FileEditModal.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/media/file-repository/components/FileEditModal.vue @@ -31,8 +31,8 @@