refactor(projects): 1、优化新增 产品和新增项目;2、调整角色提示信息
This commit is contained in:
30
src/typings/api/product.d.ts
vendored
30
src/typings/api/product.d.ts
vendored
@@ -99,15 +99,10 @@ declare namespace Api {
|
||||
userNickname: string;
|
||||
/** 角色 ID */
|
||||
roleId: string;
|
||||
/** 角色名称(主角色) */
|
||||
/** 角色名称 */
|
||||
roleName: string;
|
||||
/** 角色编码(主角色) */
|
||||
/** 角色编码 */
|
||||
roleCode: string;
|
||||
/**
|
||||
* 非主角色的中文名列表(多角色合并展示用,按字典序升序)
|
||||
* 单角色时为空数组 [];典型场景:创建者 + 经理重合时,主行 manager,creator 名进此列表
|
||||
*/
|
||||
additionalRoleNames: string[];
|
||||
/** 是否当前产品经理 */
|
||||
managerFlag: boolean;
|
||||
/** 成员状态 */
|
||||
@@ -215,6 +210,20 @@ declare namespace Api {
|
||||
previousManagerRoleId?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增产品成员参数
|
||||
*
|
||||
* 刻意不复用 CreateProductMemberParams:批量接口不承担「产品经理交接」语义,
|
||||
* 后端兜底拒绝 roleId 为产品经理角色的项。
|
||||
*/
|
||||
interface BatchCreateProductMembersParams {
|
||||
members: Array<{
|
||||
userId: string;
|
||||
roleId: string;
|
||||
remark?: string | null;
|
||||
}>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品创建(含初始团队)原子接口参数
|
||||
*
|
||||
@@ -223,7 +232,7 @@ declare namespace Api {
|
||||
interface CreateProductWithTeamParams {
|
||||
product: SaveProductParams;
|
||||
members: CreateProductMemberParams[];
|
||||
/** 关心人 user_id 数组(选填);后端按 (user, object, role) 三元组幂等写入 product_watcher 角色 */
|
||||
/** 关注人 user_id 数组(选填);后端按 (user, object, role) 三元组幂等写入 product_watcher 角色 */
|
||||
watcherUserIds?: string[];
|
||||
}
|
||||
|
||||
@@ -239,6 +248,11 @@ declare namespace Api {
|
||||
reason?: string | null;
|
||||
}
|
||||
|
||||
interface BatchInactiveProductMembersParams {
|
||||
memberIds: string[];
|
||||
reason?: string | null;
|
||||
}
|
||||
|
||||
// ========== 产品需求相关类型定义 ==========
|
||||
/** 需求状态编码 */
|
||||
type RequirementStatusCode =
|
||||
|
||||
31
src/typings/api/project.d.ts
vendored
31
src/typings/api/project.d.ts
vendored
@@ -519,15 +519,10 @@ declare namespace Api {
|
||||
userNickname: string;
|
||||
/** 角色 ID */
|
||||
roleId: string;
|
||||
/** 角色名称(主角色) */
|
||||
/** 角色名称 */
|
||||
roleName: string;
|
||||
/** 角色编码(主角色) */
|
||||
/** 角色编码 */
|
||||
roleCode: string;
|
||||
/**
|
||||
* 非主角色的中文名列表(多角色合并展示用,按字典序升序)
|
||||
* 单角色时为空数组 [];典型场景:创建者 + 负责人重合时,主行 manager,creator 名进此列表
|
||||
*/
|
||||
additionalRoleNames: string[];
|
||||
/** 是否项目负责人 */
|
||||
managerFlag: boolean;
|
||||
/** 成员状态 */
|
||||
@@ -625,6 +620,26 @@ declare namespace Api {
|
||||
reason: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增项目成员参数
|
||||
*
|
||||
* 刻意不复用 CreateProjectMemberParams:批量接口不承担"项目负责人交接"语义,
|
||||
* 后端兜底拒绝 roleId 为项目负责人角色的项。
|
||||
*/
|
||||
interface BatchCreateProjectMembersParams {
|
||||
members: Array<{
|
||||
userId: string;
|
||||
roleId: string;
|
||||
remark?: string | null;
|
||||
}>;
|
||||
}
|
||||
|
||||
/** 批量移出项目成员参数 */
|
||||
interface BatchInactiveProjectMembersParams {
|
||||
memberIds: string[];
|
||||
reason?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目创建(含初始团队)原子接口参数
|
||||
*
|
||||
@@ -633,7 +648,7 @@ declare namespace Api {
|
||||
interface CreateProjectWithTeamParams {
|
||||
project: SaveProjectParams;
|
||||
members: CreateProjectMemberParams[];
|
||||
/** 关心人 user_id 数组(选填);后端按 (user, object, role) 三元组幂等写入 project_watcher 角色 */
|
||||
/** 关注人 user_id 数组(选填);后端按 (user, object, role) 三元组幂等写入 project_watcher 角色 */
|
||||
watcherUserIds?: string[];
|
||||
}
|
||||
|
||||
|
||||
4
src/typings/api/system-manage.d.ts
vendored
4
src/typings/api/system-manage.d.ts
vendored
@@ -47,6 +47,8 @@ declare namespace Api {
|
||||
type: RoleType;
|
||||
/** remark */
|
||||
remark?: string | null;
|
||||
/** 是否在前端选择面板可见:0 不可见 / 1 可见,缺省视作可见 */
|
||||
visible?: 0 | 1 | null;
|
||||
/** create time */
|
||||
createTime: number;
|
||||
}
|
||||
@@ -226,7 +228,7 @@ declare namespace Api {
|
||||
|
||||
type PostList = PageResult<Post>;
|
||||
|
||||
type RoleSimple = Pick<Role, 'id' | 'name' | 'code' | 'status' | 'sort'>;
|
||||
type RoleSimple = Pick<Role, 'id' | 'name' | 'code' | 'status' | 'sort' | 'remark' | 'visible'>;
|
||||
|
||||
type RoleSimpleList = RoleSimple[];
|
||||
|
||||
|
||||
4
src/typings/components.d.ts
vendored
4
src/typings/components.d.ts
vendored
@@ -100,6 +100,10 @@ declare module 'vue' {
|
||||
IconCarbonStop: typeof import('~icons/carbon/stop')['default']
|
||||
'IconCharm:download': typeof import('~icons/charm/download')['default']
|
||||
'IconEp:arrowDown': typeof import('~icons/ep/arrow-down')['default']
|
||||
'IconEp:box': typeof import('~icons/ep/box')['default']
|
||||
'IconEp:files': typeof import('~icons/ep/files')['default']
|
||||
'IconEp:infoFilled': typeof import('~icons/ep/info-filled')['default']
|
||||
'IconEp:plus': typeof import('~icons/ep/plus')['default']
|
||||
IconEpRemoveFilled: typeof import('~icons/ep/remove-filled')['default']
|
||||
IconEpSuccessFilled: typeof import('~icons/ep/success-filled')['default']
|
||||
'IconF7:circleFill': typeof import('~icons/f7/circle-fill')['default']
|
||||
|
||||
Reference in New Issue
Block a user