diff --git a/frontend/src/api/classHour/jointTraining.js b/frontend/src/api/classHour/jointTraining.js new file mode 100644 index 00000000..2422e153 --- /dev/null +++ b/frontend/src/api/classHour/jointTraining.js @@ -0,0 +1,69 @@ +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 + }) +} + +// 导入联教联训 Excel(multipart,字段名 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' + }) +}