Files
education/frontend/src/api/teachNotice.js
T
2026-09-18 18:20:36 +08:00

64 lines
1.3 KiB
JavaScript

import request from '@/utils/request'
// 分页查询教学公告列表
export function listTeachNotice(query) {
return request({
url: '/notice-announcement/list',
method: 'get',
params: query
})
}
// 查询公告详情
export function getTeachNotice(Id) {
return request({
url: '/notice-announcement/get',
method: 'get',
params: { id: Id }
})
}
// 新增公告
export function addTeachNotice(data) {
return request({
url: '/notice-announcement/add',
method: 'post',
data: data
})
}
// 修改公告(含下架/上架:更新时附带 status)
export function updateTeachNotice(data) {
return request({
url: '/notice-announcement/update',
method: 'post',
data: data
})
}
// 删除/下架(级联删除:先删通告用户信息表,再删通告表)
export function delTeachNotice(Id) {
return request({
url: '/notice-announcement/delete',
method: 'post',
data: { id: Id }
})
}
// 发布或重新发布公告:{id, scopeType: ALL|ALL_TEACHERS|DEPARTMENTS, departmentIds?}
export function publishTeachNotice(data) {
return request({
url: '/notice-announcement/publish',
method: 'post',
data: data
})
}
// 下架已发布公告
export function downTeachNotice(id) {
return request({
url: '/notice-announcement/down',
method: 'post',
data: { id }
})
}