From 2dc5ed888f755f574cb569f36f99bce675955ae0 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 16 Dec 2025 23:53:40 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=20createTime=20?= =?UTF-8?q?=E4=B8=BA=20date=EF=BC=8C=E5=B9=B6=E4=B8=94=E4=B8=BA=E5=8F=AF?= =?UTF-8?q?=E9=80=89=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bpm/task/index.ts | 4 +- src/api/infra/apiAccessLog/index.ts | 6 +- src/api/infra/apiErrorLog/index.ts | 6 +- src/api/system/dept/index.ts | 2 +- src/api/system/dict/data/index.ts | 2 +- src/api/system/menu/index.ts | 2 +- src/api/system/notice/index.ts | 39 ++++ src/api/system/notify/index.ts | 4 +- src/api/system/role/index.ts | 2 +- src/api/system/user/profile/index.ts | 4 +- src/pages-system/dept/form/index.vue | 2 +- src/pages-system/menu/form/index.vue | 2 +- src/pages-system/post/form/index.vue | 2 +- src/pages-system/role/form/index.vue | 3 +- src/pages-system/user/form/index.vue | 2 +- src/pages/message/components/search-form.vue | 179 +++++-------------- src/pages/user/feedback/index.vue | 7 +- 17 files changed, 109 insertions(+), 159 deletions(-) create mode 100644 src/api/system/notice/index.ts diff --git a/src/api/bpm/task/index.ts b/src/api/bpm/task/index.ts index d0d162f..aa5d426 100644 --- a/src/api/bpm/task/index.ts +++ b/src/api/bpm/task/index.ts @@ -16,8 +16,8 @@ export interface Task { id: string name: string status: number - createTime: number - endTime?: number + createTime: Date + endTime?: Date reason?: string assigneeUser?: TaskUser ownerUser?: TaskUser diff --git a/src/api/infra/apiAccessLog/index.ts b/src/api/infra/apiAccessLog/index.ts index 035c4bd..86f93ef 100644 --- a/src/api/infra/apiAccessLog/index.ts +++ b/src/api/infra/apiAccessLog/index.ts @@ -17,12 +17,12 @@ export interface ApiAccessLog { operateModule: string operateName: string operateType: number - beginTime: string - endTime: string + beginTime: Date + endTime: Date duration: number resultCode: number resultMsg: string - createTime: string + createTime: Date } /** 获取 API 访问日志分页列表 */ diff --git a/src/api/infra/apiErrorLog/index.ts b/src/api/infra/apiErrorLog/index.ts index a4e650c..6dc9cf0 100644 --- a/src/api/infra/apiErrorLog/index.ts +++ b/src/api/infra/apiErrorLog/index.ts @@ -13,7 +13,7 @@ export interface ApiErrorLog { requestUrl: string userIp: string userAgent: string - exceptionTime: string + exceptionTime: Date exceptionName: string exceptionMessage: string exceptionRootCauseMessage: string @@ -24,9 +24,9 @@ export interface ApiErrorLog { exceptionLineNumber: number processUserId: number processStatus: number - processTime: string + processTime: Date resultCode: number - createTime: string + createTime: Date } /** 获取 API 错误日志分页列表 */ diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts index 0588e39..5640cf7 100644 --- a/src/api/system/dept/index.ts +++ b/src/api/system/dept/index.ts @@ -10,7 +10,7 @@ export interface Dept { leaderUserId?: number phone?: string email?: string - createTime?: string + createTime?: Date children?: Dept[] } diff --git a/src/api/system/dict/data/index.ts b/src/api/system/dict/data/index.ts index ceb56cb..9ab0bed 100644 --- a/src/api/system/dict/data/index.ts +++ b/src/api/system/dict/data/index.ts @@ -11,7 +11,7 @@ export interface DictData { sort?: number status: number remark?: string - createTime?: string + createTime?: Date } /** 查询字典数据(精简)列表 */ diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts index c4cbd7d..b22b7f0 100644 --- a/src/api/system/menu/index.ts +++ b/src/api/system/menu/index.ts @@ -16,7 +16,7 @@ export interface Menu { visible: boolean keepAlive: boolean alwaysShow?: boolean - createTime?: string + createTime?: Date children?: Menu[] } diff --git a/src/api/system/notice/index.ts b/src/api/system/notice/index.ts new file mode 100644 index 0000000..091b4aa --- /dev/null +++ b/src/api/system/notice/index.ts @@ -0,0 +1,39 @@ +import type { PageParam, PageResult } from '@/http/types' +import { http } from '@/http/http' + +const baseUrl = '/system/notice' + +/** 通知公告信息 */ +export interface Notice { + id?: number + title: string + content: string + type: number + status: number + createTime?: Date +} + +/** 获取通知公告分页列表 */ +export function getNoticePage(params: PageParam) { + return http.get>(`${baseUrl}/page`, params) +} + +/** 获取通知公告详情 */ +export function getNotice(id: number) { + return http.get(`${baseUrl}/get?id=${id}`) +} + +/** 创建通知公告 */ +export function createNotice(data: Notice) { + return http.post(`${baseUrl}/create`, data) +} + +/** 更新通知公告 */ +export function updateNotice(data: Notice) { + return http.put(`${baseUrl}/update`, data) +} + +/** 删除通知公告 */ +export function deleteNotice(id: number) { + return http.delete(`${baseUrl}/delete?id=${id}`) +} diff --git a/src/api/system/notify/index.ts b/src/api/system/notify/index.ts index 54ef334..18fcdca 100644 --- a/src/api/system/notify/index.ts +++ b/src/api/system/notify/index.ts @@ -13,8 +13,8 @@ export interface NotifyMessage { templateType: number templateParams: string readStatus: boolean - readTime: string - createTime: string + readTime: Date + createTime?: Date } /** 获取我的站内信分页 */ diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts index fc9a194..c39a206 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -12,7 +12,7 @@ export interface Role { remark?: string dataScope?: number dataScopeDeptIds?: number[] - createTime: string + createTime?: Date } /** 获取角色分页列表 */ diff --git a/src/api/system/user/profile/index.ts b/src/api/system/user/profile/index.ts index 054806f..f291326 100644 --- a/src/api/system/user/profile/index.ts +++ b/src/api/system/user/profile/index.ts @@ -10,8 +10,8 @@ export interface UserProfileVO { sex?: number avatar?: string loginIp: string - loginDate: string - createTime: string + loginDate: Date + createTime: Date roles: { id: number, name: string }[] dept: { id: number, name: string } posts: { id: number, name: string }[] diff --git a/src/pages-system/dept/form/index.vue b/src/pages-system/dept/form/index.vue index bcfc5a3..aa6ddbd 100644 --- a/src/pages-system/dept/form/index.vue +++ b/src/pages-system/dept/form/index.vue @@ -99,7 +99,7 @@ definePage({ const toast = useToast() const getTitle = computed(() => props.id ? '编辑部门' : '新增部门') -const formLoading = ref(false) // 提交中状态 +const formLoading = ref(false) const formData = ref({ id: undefined, name: '', diff --git a/src/pages-system/menu/form/index.vue b/src/pages-system/menu/form/index.vue index bbe3b6b..09f8e23 100644 --- a/src/pages-system/menu/form/index.vue +++ b/src/pages-system/menu/form/index.vue @@ -144,7 +144,7 @@ definePage({ const toast = useToast() const getTitle = computed(() => props.id ? '编辑菜单' : '新增菜单') -const formLoading = ref(false) // 提交中状态 +const formLoading = ref(false) const formData = ref({ id: undefined, name: '', diff --git a/src/pages-system/post/form/index.vue b/src/pages-system/post/form/index.vue index 5a3828d..16957d1 100644 --- a/src/pages-system/post/form/index.vue +++ b/src/pages-system/post/form/index.vue @@ -88,7 +88,7 @@ definePage({ const toast = useToast() const getTitle = computed(() => props.id ? '编辑岗位' : '新增岗位') -const formLoading = ref(false) // 提交中状态 +const formLoading = ref(false) const formData = ref({ id: undefined, name: '', diff --git a/src/pages-system/role/form/index.vue b/src/pages-system/role/form/index.vue index 16f4340..28b6af2 100644 --- a/src/pages-system/role/form/index.vue +++ b/src/pages-system/role/form/index.vue @@ -88,7 +88,7 @@ definePage({ const toast = useToast() const getTitle = computed(() => props.id ? '编辑角色' : '新增角色') -const formLoading = ref(false) // 提交中状态 +const formLoading = ref(false) const formData = ref({ id: undefined, name: '', @@ -96,7 +96,6 @@ const formData = ref({ sort: 0, status: CommonStatusEnum.ENABLE, remark: '', - createTime: '', }) const formRules = { name: [{ required: true, message: '角色名称不能为空' }], diff --git a/src/pages-system/user/form/index.vue b/src/pages-system/user/form/index.vue index 9e12bf7..c8b4196 100644 --- a/src/pages-system/user/form/index.vue +++ b/src/pages-system/user/form/index.vue @@ -124,7 +124,7 @@ definePage({ const toast = useToast() const getTitle = computed(() => props.id ? '编辑用户' : '新增用户') -const formLoading = ref(false) // 提交中状态 +const formLoading = ref(false) const formData = ref({ id: undefined, username: '', diff --git a/src/pages/message/components/search-form.vue b/src/pages/message/components/search-form.vue index d7d300b..f148c36 100644 --- a/src/pages/message/components/search-form.vue +++ b/src/pages/message/components/search-form.vue @@ -1,20 +1,11 @@