| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import { ApiInstance } from '../type'
- export interface AddTeamProps {
- name: string,
- deptId: number,
- managerId: number,
- systemCode: string,
- attribute: number, // 1 团队 2 渠道 3 电销
- describeInformation?: string
- }
- interface SearchTeamProps {
- attribute: number, // 1 团队 2 渠道 3 电销
- param?: string,
- }
- export interface EditTeamProps extends AddTeamProps {
- id:string
- }
- interface GetTeamUserProps {
- id: string,
- [key: string]: any
- }
- interface DeleteAssociatedUsers {
- id: string,
- userIds: string[]
- }
- interface SetResponsiblePersonProps {
- id: string,
- managerId: string
- }
- const teamApi = (axiosInstance: ApiInstance) => ({
- teamList: (data: SearchTeamProps) => axiosInstance.post('/sysOrganization/leftList', data), // 查询(不分页)
- addTeam: (data: AddTeamProps) => axiosInstance.post('/sysOrganization/save', data), // 新增
- queryPageList: (data: any) => axiosInstance.post('/sysOrganization/queryPageList', data), // 查询(分页)
- deleteById: (data: string) => axiosInstance.get(`/sysOrganization/deleteById?id=${data}`, ), // 删除团队
- updateTeam: (data: EditTeamProps) => axiosInstance.post('/sysOrganization/update', data), // 编辑团队
- getTeamUser: (data: GetTeamUserProps) => axiosInstance.post('/sysOrganization/getTeamUserPage', data), // 获取团队成员
- deleteAssociatedUsers: (data: DeleteAssociatedUsers) => axiosInstance.post('/sysOrganization/deleteAssociatedUsers', data), // 删除人员
- setResponsiblePerson: (data: SetResponsiblePersonProps) => axiosInstance.post('/sysOrganization/setResponsiblePerson', data), // 设置负责人
- })
- export default teamApi
|