rt-sim-training-client/src/api/management/distribute.js

108 lines
2.3 KiB
JavaScript
Raw Normal View History

2019-07-25 10:30:30 +08:00
import request from '@/utils/request';
/** 上课权限获取*/
export function getLessons(data) {
return request({
url: '/api/distribute/getLessons',
method: 'get',
data: data
});
}
/** 上课权限分发*/
export function giveLessons(data) {
return request({
url: '/api/distribute/givePermission',
method: 'post',
data: data
});
}
/** 接收课程权限*/
export function receiveLessons(data) {
return request({
url: '/api/distribute/receiveLessons',
method: 'get',
data: data
});
}
/** 考试权限分发*/
export function giveExams(data) {
return request({
url: `/api/distribute/giveExams`,
method: 'post',
data: data
});
}
/** 权限打包分页查询*/
export function listPackagePermission(params) {
return request({
url: '/api/distribute',
method: 'get',
params: params
});
}
/** 打包权限*/
export function packagePermissionDistribute(data) {
return request({
url: `/api/distribute/givePermission/package`,
method: 'post',
data: data
});
}
/** 权限回收*/
export function restorePackagePermission(id) {
return request({
url: `/api/distribute/${id}/restore`,
method: 'put',
});
}
/** 生成打包权限二维码*/
export function getPackageQrCode(params) {
return request({
url: `/api/distribute/package/qrCode`,
method: 'get',
params: params
});
}
/** 权限分发打包详情*/
export function getPermissionPackageDetail(id, params) {
return request({
url: `/api/distribute/package/${id}/detail`,
method: 'get',
params: params
});
}
/** 权限分发打包*/
export function permissionDistributePackage(data) {
return request({
url: `/api/distribute/package`,
method: 'post',
data: data
});
}
/** 权限分发解包*/
export function permissionDistributeUnPackage(permissionId) {
return request({
url: `/api/distribute/${permissionId}/unPackage`,
method: 'delete'
});
}
/** 查询可打包的权限分发*/
export function listCanPackagePermission(params) {
return request({
url: `/api/distribute/package`,
method: 'get',
params: params
});
}