兰宝车间质量管理系统-前端
LiuHao
2023-04-02 251d2411f235e23209d57173857e05b637729ce8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import request from '@/utils/request';
import { NoticeForm, NoticeQuery, NoticeVO } from './types';
import { AxiosPromise } from 'axios';
// 查询公告列表
export function listNotice(query: NoticeQuery): AxiosPromise<NoticeVO[]> {
    return request({
        url: '/system/notice/list',
        method: 'get',
        params: query
    });
}
 
// 查询公告详细
export function getNotice(noticeId: string | number): AxiosPromise<NoticeVO> {
    return request({
        url: '/system/notice/' + noticeId,
        method: 'get'
    });
}
 
// 新增公告
export function addNotice(data: NoticeForm) {
    return request({
        url: '/system/notice',
        method: 'post',
        data: data
    });
}
 
// 修改公告
export function updateNotice(data: NoticeForm) {
    return request({
        url: '/system/notice',
        method: 'put',
        data: data
    });
}
 
// 删除公告
export function delNotice(noticeId: string | number | Array<string | number>) {
    return request({
        url: '/system/notice/' + noticeId,
        method: 'delete'
    });
}