From f32b675836c285282658147903b8555effafab13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E5=AF=B8=E7=81=B0?= Date: Sat, 21 Dec 2024 14:36:55 +0800 Subject: [PATCH] feat(projects): :sparkles: sync add VTableGantt (#31) --- src/locales/langs/en-us.ts | 2 + src/locales/langs/zh-cn.ts | 2 + src/router/elegant/imports.ts | 3 +- src/router/elegant/routes.ts | 25 +- src/router/elegant/transform.ts | 2 + src/typings/elegant-router.d.ts | 5 +- src/views/alova/user/modules/user-search.vue | 2 +- src/views/plugin/gantt/{ => dhtmlx}/data.ts | 0 src/views/plugin/gantt/{ => dhtmlx}/index.vue | 0 src/views/plugin/gantt/vtable/data.ts | 721 ++++++++++++++++ src/views/plugin/gantt/vtable/index.vue | 792 ++++++++++++++++++ 11 files changed, 1549 insertions(+), 5 deletions(-) rename src/views/plugin/gantt/{ => dhtmlx}/data.ts (100%) rename src/views/plugin/gantt/{ => dhtmlx}/index.vue (100%) create mode 100644 src/views/plugin/gantt/vtable/data.ts create mode 100644 src/views/plugin/gantt/vtable/index.vue diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index eed191e..19f3efb 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -220,6 +220,8 @@ const local: App.I18n.Schema = { plugin_excel: 'Excel', plugin_pdf: 'PDF preview', plugin_gantt: 'Gantt Chart', + plugin_gantt_dhtmlx: 'dhtmlxGantt', + plugin_gantt_vtable: 'VTableGantt', plugin_typeit: 'Typeit', plugin_tables: 'Tables', plugin_tables_vtable: 'VTable' diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 9c34400..30237b9 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -220,6 +220,8 @@ const local: App.I18n.Schema = { plugin_excel: 'Excel', plugin_pdf: 'PDF 预览', plugin_gantt: '甘特图', + plugin_gantt_dhtmlx: 'dhtmlxGantt', + plugin_gantt_vtable: 'VTableGantt', plugin_typeit: '打字机', plugin_tables: '表格', plugin_tables_vtable: 'VTable' diff --git a/src/router/elegant/imports.ts b/src/router/elegant/imports.ts index 40a4ff0..27bc8c4 100644 --- a/src/router/elegant/imports.ts +++ b/src/router/elegant/imports.ts @@ -47,7 +47,8 @@ export const views: Record Promise import("@/views/plugin/editor/markdown/index.vue"), plugin_editor_quill: () => import("@/views/plugin/editor/quill/index.vue"), plugin_excel: () => import("@/views/plugin/excel/index.vue"), - plugin_gantt: () => import("@/views/plugin/gantt/index.vue"), + plugin_gantt_dhtmlx: () => import("@/views/plugin/gantt/dhtmlx/index.vue"), + plugin_gantt_vtable: () => import("@/views/plugin/gantt/vtable/index.vue"), plugin_icon: () => import("@/views/plugin/icon/index.vue"), plugin_map: () => import("@/views/plugin/map/index.vue"), plugin_pdf: () => import("@/views/plugin/pdf/index.vue"), diff --git a/src/router/elegant/routes.ts b/src/router/elegant/routes.ts index e8078e2..38b1147 100644 --- a/src/router/elegant/routes.ts +++ b/src/router/elegant/routes.ts @@ -492,12 +492,33 @@ export const generatedRoutes: GeneratedRoute[] = [ { name: 'plugin_gantt', path: '/plugin/gantt', - component: 'view.plugin_gantt', meta: { title: 'plugin_gantt', i18nKey: 'route.plugin_gantt', icon: 'ant-design:bar-chart-outlined' - } + }, + children: [ + { + name: 'plugin_gantt_dhtmlx', + path: '/plugin/gantt/dhtmlx', + component: 'view.plugin_gantt_dhtmlx', + meta: { + title: 'plugin_gantt_dhtmlx', + i18nKey: 'route.plugin_gantt_dhtmlx', + icon: 'gridicons:posts' + } + }, + { + name: 'plugin_gantt_vtable', + path: '/plugin/gantt/vtable', + component: 'view.plugin_gantt_vtable', + meta: { + title: 'plugin_gantt_vtable', + i18nKey: 'route.plugin_gantt_vtable', + localIcon: 'visactor' + } + } + ] }, { name: 'plugin_icon', diff --git a/src/router/elegant/transform.ts b/src/router/elegant/transform.ts index 5eb0871..e67e538 100644 --- a/src/router/elegant/transform.ts +++ b/src/router/elegant/transform.ts @@ -221,6 +221,8 @@ const routeMap: RouteMap = { "plugin_editor_quill": "/plugin/editor/quill", "plugin_excel": "/plugin/excel", "plugin_gantt": "/plugin/gantt", + "plugin_gantt_dhtmlx": "/plugin/gantt/dhtmlx", + "plugin_gantt_vtable": "/plugin/gantt/vtable", "plugin_icon": "/plugin/icon", "plugin_map": "/plugin/map", "plugin_pdf": "/plugin/pdf", diff --git a/src/typings/elegant-router.d.ts b/src/typings/elegant-router.d.ts index 30f8723..886f637 100644 --- a/src/typings/elegant-router.d.ts +++ b/src/typings/elegant-router.d.ts @@ -75,6 +75,8 @@ declare module "@elegant-router/types" { "plugin_editor_quill": "/plugin/editor/quill"; "plugin_excel": "/plugin/excel"; "plugin_gantt": "/plugin/gantt"; + "plugin_gantt_dhtmlx": "/plugin/gantt/dhtmlx"; + "plugin_gantt_vtable": "/plugin/gantt/vtable"; "plugin_icon": "/plugin/icon"; "plugin_map": "/plugin/map"; "plugin_pdf": "/plugin/pdf"; @@ -194,7 +196,8 @@ declare module "@elegant-router/types" { | "plugin_editor_markdown" | "plugin_editor_quill" | "plugin_excel" - | "plugin_gantt" + | "plugin_gantt_dhtmlx" + | "plugin_gantt_vtable" | "plugin_icon" | "plugin_map" | "plugin_pdf" diff --git a/src/views/alova/user/modules/user-search.vue b/src/views/alova/user/modules/user-search.vue index 9cf237b..6e32f9d 100644 --- a/src/views/alova/user/modules/user-search.vue +++ b/src/views/alova/user/modules/user-search.vue @@ -43,7 +43,7 @@ async function search() {