Files
cody-crm/frontend/packages/lib-shared/models/system/org.ts
wangziqi 72e2110987
Some checks failed
Synchronize to Gitee / repo-sync (push) Has been cancelled
Typos Checking / Spell Check with Typos (push) Has been cancelled
chore: initial commit
2026-06-23 11:56:23 +08:00

110 lines
2.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { TableQueryParams } from '../common';
import { UserInfo } from '../user';
import { SelectedUsersItem } from '@lib/shared/models/system/module';
// 添加部门
export interface DepartmentItemParams {
name: string;
parentId: string;
}
export interface UpdateDepartmentItemParams {
name: string;
id: string;
}
// 设置部门负责人
export interface SetCommanderParams {
departmentId: string;
commanderId: string | null;
}
export interface SetCommanderForm extends SetCommanderParams {
ownerIds: SelectedUsersItem[];
}
export interface MemberRoleItem {
id: string;
name: string;
userId: string;
}
export interface UserTableQueryParams extends TableQueryParams {
departmentId?: string;
}
export interface BaseMemberInfo {
phone: string;
gender: boolean; // 性别(false-男/true-女)
email: string;
name: string;
departmentId: string | null;
position: string; // 职位
employeeId: string; // 工号
employeeType: string | null; // 员工类型
supervisorId: string | null; // 直属上级
workCity: string | null; // 工作城市
enable: boolean; // 是否启用
roleIds: string[]; // 角色
userGroupIds: string[]; // 用户组
onboardingDate: number | null; // 入职日期
}
export interface MemberItem extends BaseMemberInfo {
id: string;
userId: string; // 用户ID
userName: string;
organizationId: string;
roles: MemberRoleItem[];
userGroups: MemberRoleItem[];
createUser: string;
createUserName: string;
updateUser: string;
updateUserName: string;
createTime: number;
updateTime: number;
departmentName: string;
supervisorName: string; // 直属上级名称
commander: boolean; // 是否是负责人
}
export interface MemberParams extends BaseMemberInfo {
id?: string;
userName: string;
roles: {
id: string;
name: string;
userId: string;
}[];
}
export interface ErrorMessagesType {
rowNum: number;
errMsg: string;
}
// 导入校验信息
export interface ValidateInfo {
failCount: number;
successCount: number;
errorMessages: ErrorMessagesType[];
}
export interface OrgUserInfo extends Omit<UserInfo, 'roles'> {
userId: string;
userName: string;
departmentName: string;
roles: MemberRoleItem[];
}
export interface DragNodeParams {
dragNodeId: string;
dropNodeId: string;
dropPosition: -1 | 0 | 1; // -1dropNodeId节点之前。 1dropNodeId节点后 0dropNodeId节点内
}
export interface DEToken {
url: string;
token: string;
}