diff --git a/apps/web-antd/src/api/infra/file/index.ts b/apps/web-antd/src/api/infra/file/index.ts index 785dce14a..5f352432f 100644 --- a/apps/web-antd/src/api/infra/file/index.ts +++ b/apps/web-antd/src/api/infra/file/index.ts @@ -27,7 +27,7 @@ export namespace InfraFileApi { /** 上传文件 */ export interface FileUploadReqVO { - file: File; + file: globalThis.File; path?: string; } } @@ -60,7 +60,6 @@ export function createFile(data: InfraFileApi.File) { } /** 上传文件 */ -// TODO @芋艿:这里有爆红 export function uploadFile( data: InfraFileApi.FileUploadReqVO, onUploadProgress?: AxiosProgressEvent, diff --git a/apps/web-antd/src/api/system/dict/data/index.ts b/apps/web-antd/src/api/system/dict/data/index.ts index a873d63c0..a64330cda 100644 --- a/apps/web-antd/src/api/system/dict/data/index.ts +++ b/apps/web-antd/src/api/system/dict/data/index.ts @@ -1,3 +1,5 @@ +import type { PageParam } from '@vben/request'; + import { requestClient } from '#/api/request'; export namespace SystemDictDataApi { @@ -22,7 +24,7 @@ export function getSimpleDictDataList() { } // 查询字典数据列表 -export function getDictDataPage(params: any) { +export function getDictDataPage(params: PageParam) { return requestClient.get('/system/dict-data/page', { params }); } diff --git a/apps/web-antd/src/components/upload/use-upload.ts b/apps/web-antd/src/components/upload/use-upload.ts index c7c7aa2e4..94e238d1c 100644 --- a/apps/web-antd/src/components/upload/use-upload.ts +++ b/apps/web-antd/src/components/upload/use-upload.ts @@ -113,7 +113,6 @@ export const useUpload = () => { }); } else { // 模式二:后端上传 - // TODO @芋艿:这里有爆红 return uploadFile({ file }, onUploadProgress); } }; diff --git a/apps/web-antd/src/router/access.ts b/apps/web-antd/src/router/access.ts index de84f93f9..c4b161a5d 100644 --- a/apps/web-antd/src/router/access.ts +++ b/apps/web-antd/src/router/access.ts @@ -1,4 +1,5 @@ import type { + AppRouteRecordRaw, ComponentRecordType, GenerateMenuAndRoutesOptions, } from '@vben/types'; @@ -25,8 +26,8 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) { ...options, fetchMenuListAsync: async () => { // 由于 yudao 通过 accessStore 读取,所以不在进行 message.loading 提示 - const accessMenus = accessStore.accessMenus; - // TODO @芋艿:爆红!!! + // 补充说明:accessStore.accessMenus 一开始是 AppRouteRecordRaw 类型(后端加载),后面被赋值成 MenuRecordRaw 类型(前端转换) + const accessMenus = accessStore.accessMenus as AppRouteRecordRaw[]; return convertServerMenuToRouteRecordStringComponent(accessMenus); }, // 可以指定没有权限跳转403页面 diff --git a/apps/web-antd/src/router/routes/modules/demos.ts b/apps/web-antd/src/router/routes/modules/demos.ts index beb3dc075..b1f9b7916 100644 --- a/apps/web-antd/src/router/routes/modules/demos.ts +++ b/apps/web-antd/src/router/routes/modules/demos.ts @@ -1,28 +1,28 @@ import type { RouteRecordRaw } from 'vue-router'; -import { $t } from '#/locales'; +// import { $t } from '#/locales'; const routes: RouteRecordRaw[] = [ - { - meta: { - icon: 'ic:baseline-view-in-ar', - keepAlive: true, - order: 1000, - title: $t('demos.title'), - }, - name: 'Demos', - path: '/demos', - children: [ - { - meta: { - title: $t('demos.antd'), - }, - name: 'AntDesignDemos', - path: '/demos/ant-design', - component: () => import('#/views/demos/antd/index.vue'), - }, - ], - }, + // { + // meta: { + // icon: 'ic:baseline-view-in-ar', + // keepAlive: true, + // order: 1000, + // title: $t('demos.title'), + // }, + // name: 'Demos', + // path: '/demos', + // children: [ + // { + // meta: { + // title: $t('demos.antd'), + // }, + // name: 'AntDesignDemos', + // path: '/demos/ant-design', + // component: () => import('#/views/demos/antd/index.vue'), + // }, + // ], + // }, ]; -// export default routes; // update by 芋艿:不展示 \ No newline at end of file +export default routes; // update by 芋艿:不展示 diff --git a/apps/web-antd/src/router/routes/modules/vben.ts b/apps/web-antd/src/router/routes/modules/vben.ts index 36aeeab08..96f980d10 100644 --- a/apps/web-antd/src/router/routes/modules/vben.ts +++ b/apps/web-antd/src/router/routes/modules/vben.ts @@ -1,81 +1,81 @@ import type { RouteRecordRaw } from 'vue-router'; -import { - VBEN_DOC_URL, - VBEN_ELE_PREVIEW_URL, - VBEN_GITHUB_URL, - VBEN_LOGO_URL, - VBEN_NAIVE_PREVIEW_URL, -} from '@vben/constants'; - -import { IFrameView } from '#/layouts'; -import { $t } from '#/locales'; +// import { +// VBEN_DOC_URL, +// VBEN_ELE_PREVIEW_URL, +// VBEN_GITHUB_URL, +// VBEN_LOGO_URL, +// VBEN_NAIVE_PREVIEW_URL, +// } from '@vben/constants'; +// +// import { IFrameView } from '#/layouts'; +// import { $t } from '#/locales'; const routes: RouteRecordRaw[] = [ - { - meta: { - badgeType: 'dot', - icon: VBEN_LOGO_URL, - order: 9998, - title: $t('demos.vben.title'), - }, - name: 'VbenProject', - path: '/vben-admin', - children: [ - { - name: 'VbenDocument', - path: '/vben-admin/document', - component: IFrameView, - meta: { - icon: 'lucide:book-open-text', - link: VBEN_DOC_URL, - title: $t('demos.vben.document'), - }, - }, - { - name: 'VbenGithub', - path: '/vben-admin/github', - component: IFrameView, - meta: { - icon: 'mdi:github', - link: VBEN_GITHUB_URL, - title: 'Github', - }, - }, - { - name: 'VbenNaive', - path: '/vben-admin/naive', - component: IFrameView, - meta: { - badgeType: 'dot', - icon: 'logos:naiveui', - link: VBEN_NAIVE_PREVIEW_URL, - title: $t('demos.vben.naive-ui'), - }, - }, - { - name: 'VbenElementPlus', - path: '/vben-admin/ele', - component: IFrameView, - meta: { - badgeType: 'dot', - icon: 'logos:element', - link: VBEN_ELE_PREVIEW_URL, - title: $t('demos.vben.element-plus'), - }, - }, - ], - }, - { - name: 'VbenAbout', - path: '/vben-admin/about', - component: () => import('#/views/_core/about/index.vue'), - meta: { - icon: 'lucide:copyright', - title: $t('demos.vben.about'), - order: 9999, - }, - }, + // { + // meta: { + // badgeType: 'dot', + // icon: VBEN_LOGO_URL, + // order: 9998, + // title: $t('demos.vben.title'), + // }, + // name: 'VbenProject', + // path: '/vben-admin', + // children: [ + // { + // name: 'VbenDocument', + // path: '/vben-admin/document', + // component: IFrameView, + // meta: { + // icon: 'lucide:book-open-text', + // link: VBEN_DOC_URL, + // title: $t('demos.vben.document'), + // }, + // }, + // { + // name: 'VbenGithub', + // path: '/vben-admin/github', + // component: IFrameView, + // meta: { + // icon: 'mdi:github', + // link: VBEN_GITHUB_URL, + // title: 'Github', + // }, + // }, + // { + // name: 'VbenNaive', + // path: '/vben-admin/naive', + // component: IFrameView, + // meta: { + // badgeType: 'dot', + // icon: 'logos:naiveui', + // link: VBEN_NAIVE_PREVIEW_URL, + // title: $t('demos.vben.naive-ui'), + // }, + // }, + // { + // name: 'VbenElementPlus', + // path: '/vben-admin/ele', + // component: IFrameView, + // meta: { + // badgeType: 'dot', + // icon: 'logos:element', + // link: VBEN_ELE_PREVIEW_URL, + // title: $t('demos.vben.element-plus'), + // }, + // }, + // ], + // }, + // { + // name: 'VbenAbout', + // path: '/vben-admin/about', + // component: () => import('#/views/_core/about/index.vue'), + // meta: { + // icon: 'lucide:copyright', + // title: $t('demos.vben.about'), + // order: 9999, + // }, + // }, ]; -// export default routes; // update by 芋艿:不展示 +export default routes; // update by 芋艿:不展示 diff --git a/apps/web-antd/src/views/_core/profile/modules/profile-user.vue b/apps/web-antd/src/views/_core/profile/modules/profile-user.vue index 5c4c86abc..b205991c9 100644 --- a/apps/web-antd/src/views/_core/profile/modules/profile-user.vue +++ b/apps/web-antd/src/views/_core/profile/modules/profile-user.vue @@ -1,17 +1,21 @@ \ No newline at end of file + diff --git a/apps/web-antd/src/views/bpm/processInstance/create/index.vue b/apps/web-antd/src/views/bpm/processInstance/create/index.vue index 0c4ec29ec..3a439c08e 100644 --- a/apps/web-antd/src/views/bpm/processInstance/create/index.vue +++ b/apps/web-antd/src/views/bpm/processInstance/create/index.vue @@ -1,17 +1,28 @@ \ No newline at end of file + diff --git a/apps/web-antd/src/views/infra/apiAccessLog/modules/detail.vue b/apps/web-antd/src/views/infra/apiAccessLog/modules/detail.vue index edb378e6b..93828c113 100644 --- a/apps/web-antd/src/views/infra/apiAccessLog/modules/detail.vue +++ b/apps/web-antd/src/views/infra/apiAccessLog/modules/detail.vue @@ -84,8 +84,7 @@ const [Modal, modalApi] = useVbenModal({
正常
- -
+
失败 | {{ formData?.resultCode }} | {{ formData?.resultMsg }}
diff --git a/apps/web-antd/src/views/infra/demo/demo03/inner/modules/form.vue b/apps/web-antd/src/views/infra/demo/demo03/inner/modules/form.vue index 08fd4bec7..c834daee7 100644 --- a/apps/web-antd/src/views/infra/demo/demo03/inner/modules/form.vue +++ b/apps/web-antd/src/views/infra/demo/demo03/inner/modules/form.vue @@ -54,6 +54,7 @@ const [Modal, modalApi] = useVbenModal({ // 提交表单 const data = (await formApi.getValues()) as Demo03StudentApi.Demo03Student; // 拼接子表的数据 + // TODO @puhui999:字段对不上 data.demo03Courses = demo03CourseFormRef.value?.getData(); data.demo03Grade = await demo03GradeFormRef.value?.getValues(); try { diff --git a/apps/web-antd/src/views/system/dict/data.ts b/apps/web-antd/src/views/system/dict/data.ts index 72aeed3eb..4aafabd19 100644 --- a/apps/web-antd/src/views/system/dict/data.ts +++ b/apps/web-antd/src/views/system/dict/data.ts @@ -1,5 +1,7 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; +import type { SystemDictDataApi } from '#/api/system/dict/data'; +import type { SystemDictTypeApi } from '#/api/system/dict/type'; import { useAccess } from '@vben/access'; @@ -94,7 +96,7 @@ export function useTypeGridFormSchema(): VbenFormSchema[] { } /** 类型列表的字段 */ -export function useTypeGridColumns( +export function useTypeGridColumns( onActionClick: OnActionClickFn, ): VxeTableGridOptions['columns'] { return [ @@ -312,7 +314,7 @@ export function useDataGridFormSchema(): VbenFormSchema[] { /** * 字典数据表格列 */ -export function useDataGridColumns( +export function useDataGridColumns( onActionClick: OnActionClickFn, ): VxeTableGridOptions['columns'] { return [ diff --git a/apps/web-antd/src/views/system/dict/modules/data-grid.vue b/apps/web-antd/src/views/system/dict/modules/data-grid.vue index a6688a248..ff9f34214 100644 --- a/apps/web-antd/src/views/system/dict/modules/data-grid.vue +++ b/apps/web-antd/src/views/system/dict/modules/data-grid.vue @@ -1,5 +1,9 @@ diff --git a/apps/web-antd/src/views/system/notify/my/modules/detail.vue b/apps/web-antd/src/views/system/notify/my/modules/detail.vue index 24b424bc9..5f1c124a9 100644 --- a/apps/web-antd/src/views/system/notify/my/modules/detail.vue +++ b/apps/web-antd/src/views/system/notify/my/modules/detail.vue @@ -43,7 +43,6 @@ const [Modal, modalApi] = useVbenModal({ {{ formData?.templateNickname }} - {{ formatDateTime(formData?.createTime) }} diff --git a/packages/@core/base/shared/src/utils/date.ts b/packages/@core/base/shared/src/utils/date.ts index 17e5848f3..b66654d0e 100644 --- a/packages/@core/base/shared/src/utils/date.ts +++ b/packages/@core/base/shared/src/utils/date.ts @@ -1,6 +1,12 @@ import dayjs from 'dayjs'; -export function formatDate(time: number | string | Date, format = 'YYYY-MM-DD') { +export function formatDate( + time: Date | number | string | undefined, + format = 'YYYY-MM-DD', +) { + if (!time) { + return time; + } try { const date = dayjs(time); if (!date.isValid()) { @@ -13,7 +19,10 @@ export function formatDate(time: number | string | Date, format = 'YYYY-MM-DD') } } -export function formatDateTime(time: number | string | Date) { +export function formatDateTime(time: Date | number | string | undefined) { + if (!time) { + return time; + } return formatDate(time, 'YYYY-MM-DD HH:mm:ss'); } diff --git a/packages/effects/common-ui/src/components/captcha/verification/Verify/VerifyPoints.vue b/packages/effects/common-ui/src/components/captcha/verification/Verify/VerifyPoints.vue index f1dc502d7..498d7ada6 100644 --- a/packages/effects/common-ui/src/components/captcha/verification/Verify/VerifyPoints.vue +++ b/packages/effects/common-ui/src/components/captcha/verification/Verify/VerifyPoints.vue @@ -1,8 +1,9 @@