岗位 通知
This commit is contained in:
parent
3eeca164af
commit
63a06c7eca
@ -26,14 +26,14 @@ export type SystemNoticeRequest = {
|
||||
|
||||
/** 获取系统通知列表 */
|
||||
export const getSystemNoticeListApi = (params?: SystemNoticeQuery) => {
|
||||
return http.request<PageDTO<SystemNoticeDTO>>("get", "/system/notices", {
|
||||
return http.request<PageDTO<SystemNoticeDTO>>("get", "/system/notices/list", {
|
||||
params
|
||||
});
|
||||
};
|
||||
|
||||
/** 添加系统通知 */
|
||||
export const addSystemNoticeApi = (data: SystemNoticeRequest) => {
|
||||
return http.request<ResponseData<void>>("post", "/system/notices", {
|
||||
return http.request<ResponseData<void>>("post", "/system/notices/create", {
|
||||
data
|
||||
});
|
||||
};
|
||||
@ -41,8 +41,8 @@ export const addSystemNoticeApi = (data: SystemNoticeRequest) => {
|
||||
/** 修改系统通知 */
|
||||
export const updateSystemNoticeApi = (data: SystemNoticeRequest) => {
|
||||
return http.request<ResponseData<void>>(
|
||||
"put",
|
||||
`/system/notices/${data.noticeId}`,
|
||||
"post",
|
||||
`/system/notices/update/${data.noticeId}`,
|
||||
{
|
||||
data
|
||||
}
|
||||
@ -51,10 +51,11 @@ export const updateSystemNoticeApi = (data: SystemNoticeRequest) => {
|
||||
|
||||
/** 删除系统通知 */
|
||||
export const deleteSystemNoticeApi = (data: Array<number>) => {
|
||||
return http.request<ResponseData<void>>("delete", "/system/notices", {
|
||||
params: {
|
||||
// 需要将数组转换为字符串 否则Axios会将参数变成 noticeIds[0]:1 noticeIds[1]:2 这种格式,后端接收参数不成功
|
||||
noticeIds: data.toString()
|
||||
}
|
||||
return http.request<ResponseData<void>>("post", "/system/notices/del", {
|
||||
// params: {
|
||||
// // 需要将数组转换为字符串 否则Axios会将参数变成 noticeIds[0]:1 noticeIds[1]:2 这种格式,后端接收参数不成功
|
||||
// noticeIds: data.toString()
|
||||
// }
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
@ -37,11 +37,12 @@ export const exportPostExcelApi = (
|
||||
};
|
||||
|
||||
export const deletePostApi = (data: Array<number>) => {
|
||||
return http.request<ResponseData<void>>("delete", "/system/post", {
|
||||
params: {
|
||||
// 需要将数组转换为字符串 否则Axios会将参数变成 noticeIds[0]:1 noticeIds[1]:2 这种格式,后端接收参数不成功
|
||||
ids: data.toString()
|
||||
}
|
||||
return http.request<ResponseData<void>>("post", "/system/post/del", {
|
||||
// params: {
|
||||
// // 需要将数组转换为字符串 否则Axios会将参数变成 noticeIds[0]:1 noticeIds[1]:2 这种格式,后端接收参数不成功
|
||||
// ids: data.toString()
|
||||
// }
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
@ -64,7 +65,7 @@ export interface UpdatePostCommand extends AddPostCommand {
|
||||
}
|
||||
|
||||
export const updatePostApi = (data: UpdatePostCommand) => {
|
||||
return http.request<ResponseData<void>>("put", "/system/post", {
|
||||
return http.request<ResponseData<void>>("post", "/system/post/update", {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
@ -49,8 +49,8 @@ export class CommonUtils {
|
||||
if (sort == null) {
|
||||
return;
|
||||
}
|
||||
baseQuery.orderColumn = sort.prop;
|
||||
baseQuery.orderDirection = sort.order;
|
||||
baseQuery.orderByColumn = sort.prop;
|
||||
baseQuery.isAsc = sort.order;
|
||||
}
|
||||
|
||||
/** 适用于BaseQuery中固定的时间参数 beginTime和endTime参数 */
|
||||
|
||||
@ -126,8 +126,8 @@ export function useLoginLogHook() {
|
||||
// 清空查询参数
|
||||
formEl.resetFields();
|
||||
// 清空排序
|
||||
searchFormParams.orderColumn = undefined;
|
||||
searchFormParams.orderDirection = undefined;
|
||||
searchFormParams.orderByColumn = undefined;
|
||||
searchFormParams.isAsc = undefined;
|
||||
// 清空时间查询 TODO 这块有点繁琐 有可以优化的地方吗?
|
||||
// Form组件的resetFields方法无法清除datepicker里面的数据。
|
||||
timeRange.value = [];
|
||||
|
||||
@ -139,8 +139,8 @@ export function useOperationLogHook() {
|
||||
// 清空查询参数
|
||||
formEl.resetFields();
|
||||
// 清空排序
|
||||
searchFormParams.orderColumn = undefined;
|
||||
searchFormParams.orderDirection = undefined;
|
||||
searchFormParams.orderByColumn = undefined;
|
||||
searchFormParams.isAsc = undefined;
|
||||
// 清空时间查询 TODO 这块有点繁琐 有可以优化的地方吗?
|
||||
// Form组件的resetFields方法无法清除datepicker里面的数据。
|
||||
timeRange.value = [];
|
||||
|
||||
@ -36,8 +36,8 @@ export function useNoticeHook() {
|
||||
noticeTitle: undefined,
|
||||
noticeType: undefined,
|
||||
creatorName: undefined,
|
||||
orderColumn: defaultSort.prop,
|
||||
orderDirection: defaultSort.order
|
||||
orderByColumn: defaultSort.prop,
|
||||
isAsc: defaultSort.order
|
||||
});
|
||||
|
||||
// TODO ******困惑的问题*******
|
||||
@ -139,8 +139,8 @@ export function useNoticeHook() {
|
||||
// 清空查询参数
|
||||
formEl.resetFields();
|
||||
// 清空排序
|
||||
searchFormParams.orderColumn = undefined;
|
||||
searchFormParams.orderDirection = undefined;
|
||||
searchFormParams.orderByColumn = undefined;
|
||||
searchFormParams.isAsc = undefined;
|
||||
tableRef.getTableRef().clearSort();
|
||||
// 重置分页并查询
|
||||
onSearch();
|
||||
|
||||
@ -129,6 +129,9 @@ export function usePostHook() {
|
||||
if (!formEl) return;
|
||||
// 清空查询参数
|
||||
formEl.resetFields();
|
||||
// 清空排序
|
||||
searchFormParams.orderByColumn = undefined;
|
||||
searchFormParams.isAsc = undefined;
|
||||
// 清空时间查询 TODO 这块有点繁琐 有可以优化的地方吗?
|
||||
// Form组件的resetFields方法无法清除datepicker里面的数据。
|
||||
searchFormParams.beginTime = undefined;
|
||||
|
||||
@ -126,8 +126,8 @@ export function useLoginLogHook() {
|
||||
// 清空查询参数
|
||||
formEl.resetFields();
|
||||
// 清空排序
|
||||
searchFormParams.orderColumn = undefined;
|
||||
searchFormParams.orderDirection = undefined;
|
||||
searchFormParams.orderByColumn = undefined;
|
||||
searchFormParams.isAsc = undefined;
|
||||
// 清空时间查询 TODO 这块有点繁琐 有可以优化的地方吗?
|
||||
// Form组件的resetFields方法无法清除datepicker里面的数据。
|
||||
timeRange.value = [];
|
||||
|
||||
4
types/index.d.ts
vendored
4
types/index.d.ts
vendored
@ -68,8 +68,8 @@ interface BasePageQuery extends BaseQuery {
|
||||
interface BaseQuery {
|
||||
beginTime?: string;
|
||||
endTime?: string;
|
||||
orderColumn?: string;
|
||||
orderDirection?: string;
|
||||
orderByColumn?: string;
|
||||
isAsc?: string;
|
||||
timeRangeColumn?: string;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user