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