xinli/xinli-ui/src/api/psychology/profile.js

113 lines
2.3 KiB
JavaScript
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 request from '@/utils/request'
// 查询档案列表
export function listProfile(query) {
return request({
url: '/psychology/profile/list',
method: 'get',
params: query
})
}
// 查询学员档案列表(仅包含拥有学员角色的用户)
export function listStudentProfile(query) {
return request({
url: '/psychology/profile/student/list',
method: 'get',
params: query
})
}
// 查询档案详细
export function getProfile(profileId) {
return request({
url: '/psychology/profile/' + profileId,
method: 'get'
})
}
// 根据用户ID查询档案
export function getProfileByUserId(userId) {
return request({
url: '/psychology/profile/manage/user/profile/' + userId,
method: 'get'
})
}
// 新增档案
export function addProfile(data) {
return request({
url: '/psychology/profile',
method: 'post',
data: data
})
}
// 修改档案
export function updateProfile(data) {
return request({
url: '/psychology/profile',
method: 'put',
data: data
})
}
// 删除档案
export function delProfile(profileId) {
return request({
url: '/psychology/profile/' + profileId,
method: 'delete'
})
}
// 获取用户信息(用于创建用户对话框)
export function getUserInfo() {
return request({
url: '/psychology/profile/manage/user/create/info',
method: 'get'
})
}
// 创建用户(在用户档案中)
export function addUserInProfile(data) {
return request({
url: '/psychology/profile/manage/user/create',
method: 'post',
data: data
})
}
// 根据用户ID获取用户信息用于修改用户
export function getUserInfoById(userId) {
return request({
url: '/psychology/profile/manage/user/edit/' + userId,
method: 'get'
})
}
// 修改用户(在用户档案中)
export function updateUserInProfile(data) {
return request({
url: '/psychology/profile/manage/user/update',
method: 'put',
data: data
})
}
// 删除用户(在用户档案中)
export function delUserInProfile(userIds) {
return request({
url: '/psychology/profile/manage/user/delete/' + (Array.isArray(userIds) ? userIds.join(',') : userIds),
method: 'delete'
})
}
// 查询档案导入进度
export function getProfileImportProgress() {
return request({
url: '/psychology/profile/importProgress',
method: 'get'
})
}