From 206df3828ebcbd5bab447cd704fa97b400cc179f Mon Sep 17 00:00:00 2001
From: xiaoxian521 <1923740402@qq.com>
Date: Wed, 20 Mar 2024 19:35:07 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=94=98=E7=89=B9?=
=?UTF-8?q?=E5=9B=BE=E7=A4=BA=E4=BE=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
build/optimize.ts | 1 +
locales/en.yaml | 1 +
locales/zh-CN.yaml | 1 +
package.json | 1 +
pnpm-lock.yaml | 16 +++
src/components/ReIcon/src/offlineIcon.ts | 2 +
src/router/enums.ts | 42 +++---
src/router/modules/ganttastic.ts | 23 +++
src/views/ganttastic/index.vue | 170 +++++++++++++++++++++++
9 files changed, 237 insertions(+), 20 deletions(-)
create mode 100644 src/router/modules/ganttastic.ts
create mode 100644 src/views/ganttastic/index.vue
diff --git a/build/optimize.ts b/build/optimize.ts
index 1fe887815..9beb4f0ea 100644
--- a/build/optimize.ts
+++ b/build/optimize.ts
@@ -45,6 +45,7 @@ const include = [
"@amap/amap-jsapi-loader",
"el-table-infinite-scroll",
"vue-waterfall-plugin-next",
+ "@infectoone/vue-ganttastic",
"@wangeditor/editor-for-vue",
"vuedraggable/src/vuedraggable"
];
diff --git a/locales/en.yaml b/locales/en.yaml
index c88f36841..c0be38d89 100644
--- a/locales/en.yaml
+++ b/locales/en.yaml
@@ -71,6 +71,7 @@ menus:
hsTag: Tag
hsStatistic: Statistic
hsCollapse: Collapse
+ hsGanttastic: Gantt Chart
hsProgress: Progress
hsUpload: File Upload
hsCheckCard: CheckCard
diff --git a/locales/zh-CN.yaml b/locales/zh-CN.yaml
index 652a6db34..eb50927fa 100644
--- a/locales/zh-CN.yaml
+++ b/locales/zh-CN.yaml
@@ -71,6 +71,7 @@ menus:
hsTag: 标签
hsStatistic: 统计组件
hsCollapse: 折叠面板
+ hsGanttastic: 甘特图
hsProgress: 进度条
hsUpload: 文件上传
hsCheckCard: 多选卡片
diff --git a/package.json b/package.json
index 2349eab7c..f825622de 100644
--- a/package.json
+++ b/package.json
@@ -50,6 +50,7 @@
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@howdyjs/mouse-menu": "^2.1.3",
+ "@infectoone/vue-ganttastic": "^2.3.1",
"@logicflow/core": "^1.2.22",
"@logicflow/extension": "^1.2.22",
"@pureadmin/descriptions": "^1.2.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c99f4db4a..aa586b38c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -11,6 +11,9 @@ dependencies:
'@howdyjs/mouse-menu':
specifier: ^2.1.3
version: 2.1.3(vue@3.4.21)
+ '@infectoone/vue-ganttastic':
+ specifier: ^2.3.1
+ version: 2.3.1(dayjs@1.11.10)(vue@3.4.21)
'@logicflow/core':
specifier: ^1.2.22
version: 1.2.22
@@ -1312,6 +1315,19 @@ packages:
vue: 3.4.21(typescript@5.4.2)
dev: true
+ /@infectoone/vue-ganttastic@2.3.1(dayjs@1.11.10)(vue@3.4.21):
+ resolution: {integrity: sha512-2P53V2N3SagJhqDMogcfpm50qIhqxEINufJBdWUGGZutnEquLg4CQThHysJsNZ11tght8TUPlBM10wHnZAMGiQ==}
+ peerDependencies:
+ dayjs: ^1.11.5
+ vue: ^3.2.40
+ dependencies:
+ '@vueuse/core': 9.13.0(vue@3.4.21)
+ dayjs: 1.11.10
+ vue: 3.4.21(typescript@5.4.2)
+ transitivePeerDependencies:
+ - '@vue/composition-api'
+ dev: false
+
/@intlify/bundle-utils@7.5.1(vue-i18n@9.10.1):
resolution: {integrity: sha512-UovJl10oBIlmYEcWw+VIHdKY5Uv5sdPG0b/b6bOYxGLln3UwB75+2dlc0F3Fsa0RhoznQ5Rp589/BZpABpE4Xw==}
engines: {node: '>= 14.16'}
diff --git a/src/components/ReIcon/src/offlineIcon.ts b/src/components/ReIcon/src/offlineIcon.ts
index faeacc37d..ffb36b5b6 100644
--- a/src/components/ReIcon/src/offlineIcon.ts
+++ b/src/components/ReIcon/src/offlineIcon.ts
@@ -31,6 +31,7 @@ import Links from "@iconify-icons/ri/links-fill";
import Search from "@iconify-icons/ri/search-line";
import FlUser from "@iconify-icons/ri/admin-line";
import Setting from "@iconify-icons/ri/settings-3-line";
+import BarChart from "@iconify-icons/ri/bar-chart-horizontal-line";
import LoginLog from "@iconify-icons/ri/window-line";
import Artboard from "@iconify-icons/ri/artboard-line";
import SystemLog from "@iconify-icons/ri/file-search-line";
@@ -52,6 +53,7 @@ addIcon("ri:table-line", Table);
addIcon("ri:search-line", Search);
addIcon("ri:admin-line", FlUser);
addIcon("ri:settings-3-line", Setting);
+addIcon("ri:bar-chart-horizontal-line", BarChart);
addIcon("ri:window-line", LoginLog);
addIcon("ri:file-search-line", SystemLog);
addIcon("ri:artboard-line", Artboard);
diff --git a/src/router/enums.ts b/src/router/enums.ts
index 712277558..19c706b2f 100644
--- a/src/router/enums.ts
+++ b/src/router/enums.ts
@@ -2,30 +2,32 @@
const home = 0, // 平台规定只有 home 路由的 rank 才能为 0 ,所以后端在返回 rank 的时候需要从非 0 开始
vueflow = 1,
- components = 2,
- able = 3,
- table = 4,
- list = 5,
- result = 6,
- error = 7,
- frame = 8,
- nested = 9,
- permission = 10,
- system = 11,
- monitor = 12,
- tabs = 13,
- about = 14,
- editor = 15,
- flowchart = 16,
- formdesign = 17,
- board = 18,
- ppt = 19,
- guide = 20,
- menuoverflow = 21;
+ ganttastic = 2,
+ components = 3,
+ able = 4,
+ table = 5,
+ list = 6,
+ result = 7,
+ error = 8,
+ frame = 9,
+ nested = 10,
+ permission = 11,
+ system = 12,
+ monitor = 13,
+ tabs = 14,
+ about = 15,
+ editor = 16,
+ flowchart = 17,
+ formdesign = 18,
+ board = 19,
+ ppt = 20,
+ guide = 21,
+ menuoverflow = 22;
export {
home,
vueflow,
+ ganttastic,
components,
able,
table,
diff --git a/src/router/modules/ganttastic.ts b/src/router/modules/ganttastic.ts
new file mode 100644
index 000000000..33cb3d4a2
--- /dev/null
+++ b/src/router/modules/ganttastic.ts
@@ -0,0 +1,23 @@
+import { $t } from "@/plugins/i18n";
+import { ganttastic } from "@/router/enums";
+
+export default {
+ path: "/ganttastic",
+ redirect: "/ganttastic/index",
+ meta: {
+ icon: "ri:bar-chart-horizontal-line",
+ title: $t("menus.hsGanttastic"),
+ rank: ganttastic
+ },
+ children: [
+ {
+ path: "/ganttastic/index",
+ name: "Ganttastic",
+ component: () => import("@/views/ganttastic/index.vue"),
+ meta: {
+ title: $t("menus.hsGanttastic"),
+ extraIcon: "IF-pure-iconfont-new svg"
+ }
+ }
+ ]
+} satisfies RouteConfigsTable;
diff --git a/src/views/ganttastic/index.vue b/src/views/ganttastic/index.vue
new file mode 100644
index 000000000..c2015d02c
--- /dev/null
+++ b/src/views/ganttastic/index.vue
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+ {{
+ `${weekRangeInChina.currentWeekStart} / ${weekRangeInChina.currentWeekEnd}`
+ }}
+
+
+
+
+