feat: 完成通知公告页面

This commit is contained in:
valarchie
2023-07-12 16:08:00 +08:00
parent b0c2c47607
commit 4ebdfd21c4
20 changed files with 1035 additions and 253 deletions

View File

@@ -11,7 +11,7 @@ export type ConfigDTO = {
/** 验证码开关 */
isCaptchaOn: boolean;
/** 系统字典配置(下拉选项之类的) */
dictTypes: Map<String, Array<DictionaryData>>;
dictionary: Map<String, Array<DictionaryData>>;
};
export type LoginByPasswordDTO = {
@@ -43,7 +43,7 @@ export type CurrentLoginUserDTO = {
export type DictionaryData = {
label: string;
value: Number;
value: number;
cssTag: string;
};

View File

@@ -19,6 +19,30 @@ type ResultDept = {
data?: Array<any>;
};
interface SystemNoticeQuery extends BasePageQuery {
noticeType: string;
noticeTitle: string;
creatorName: string;
}
type SystemNoticeDTO = {
noticeId: string;
noticeTitle: string;
noticeType: number;
noticeContent: string;
status: number;
createTime: Date;
creatorName: string;
};
export type SystemNoticeRequest = {
noticeId?: number;
noticeTitle: string;
noticeType: number;
noticeContent: string;
status: number;
};
/** 获取用户管理列表 */
export const getUserList = (data?: object) => {
return http.request<Result>("post", "/user", { data });
@@ -33,3 +57,35 @@ export const getRoleList = (data?: object) => {
export const getDeptList = (data?: object) => {
return http.request<ResultDept>("post", "/dept", { data });
};
/** 获取系统通知列表 */
export const getSystemNoticeListApi = (params?: SystemNoticeQuery) => {
return http.request<ResponseData<PageDTO<SystemNoticeDTO>>>(
"get",
"/system/notice/list",
{
params
}
);
};
/** 添加系统通知 */
export const addSystemNoticeApi = (data: SystemNoticeRequest) => {
return http.request<ResponseData<any>>("post", "/system/notice/", {
data
});
};
/** 修改系统通知 */
export const updateSystemNoticeApi = (data: SystemNoticeRequest) => {
return http.request<ResponseData<any>>("put", "/system/notice/", {
data
});
};
/** 删除系统通知 */
export const deleteSystemNoticeApi = (data: Array<number>) => {
return http.request<ResponseData<any>>("delete", `/system/notice/${data}`, {
data
});
};