Files
education/frontend/src/api/classHour/jointTraining.js
T
2026-08-27 10:31:21 +08:00

80 lines
1.8 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'
// ======================== 联教联训管理(课时补助项目) ========================
// 接口前缀 /ks,经 vue.config.js 代理转发为 /api/ks;后端实体为 KSBZXM。
// 新增联教联训(编号为空时后端自动生成 UUID)
export function addJointTraining(data) {
return request({
url: '/ks/yjlx/add',
method: 'post',
data: data
})
}
// 删除联教联训
export function deleteJointTraining(bh) {
return request({
url: '/ks/yjlx/delete',
method: 'post',
params: { bh: bh }
})
}
// 修改联教联训
export function updateJointTraining(data) {
return request({
url: '/ks/yjlx/update',
method: 'post',
data: data
})
}
// 按编号查询联教联训详情
export function getJointTraining(bh) {
return request({
url: '/ks/yjlx/get',
method: 'get',
params: { bh: bh }
})
}
// 分页查询联教联训列表(支持名称模糊)
export function listJointTraining(query) {
return request({
url: '/ks/yjlx/list',
method: 'get',
params: query
})
}
// 导入联教联训 Excelmultipart,字段名 file
export function importJointTraining(file) {
const formData = new FormData()
formData.append('file', file)
return request({
url: '/ks/yjlx/import',
method: 'post',
data: formData
})
}
// 导出联教联训到 Excel(返回 Blob)
export function exportJointTraining() {
return request({
url: '/ks/yjlx/export',
method: 'get',
responseType: 'blob'
})
}
// 下载联教联训导入模板(返回 Blob)
// GET /download/joint-training
export function downloadJointTrainingTemplate() {
return request({
url: '/download/joint-training',
method: 'get',
responseType: 'blob'
})
}