From 5f6bf1841184691e33d420c2a0458c99b3fdcff8 Mon Sep 17 00:00:00 2001 From: baiqi Date: Mon, 4 Sep 2023 11:59:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=85=A8=E5=B1=80):=20=20=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=88=87=E6=8D=A2=E5=8F=96=E6=B6=88=E6=9C=AA=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E8=AF=B7=E6=B1=82&icon=20=E6=9B=B4=E6=96=B0&ms-tree?= =?UTF-8?q?=20=E6=A0=91=E7=BB=84=E4=BB=B6&ms-split-box=20=E5=88=86?= =?UTF-8?q?=E5=89=B2=E7=BB=84=E4=BB=B6&ms-empty=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E7=A9=BA=E7=8A=B6=E6=80=81&=E9=83=A8=E5=88=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 2 +- frontend/src/App.vue | 18 +- frontend/src/api/http/Axios.ts | 10 +- frontend/src/api/http/index.ts | 4 +- .../modules/setting/authorizedManagement.ts | 2 +- frontend/src/api/modules/setting/config.ts | 4 +- frontend/src/api/modules/system.ts | 2 +- frontend/src/api/modules/user/index.ts | 2 +- frontend/src/assets/icon-font/iconfont.css | 13 +- frontend/src/assets/icon-font/iconfont.js | 2 +- frontend/src/assets/icon-font/iconfont.json | 21 + frontend/src/assets/icon-font/iconfont.svg | 6 + frontend/src/assets/icon-font/iconfont.ttf | Bin 71552 -> 71740 bytes frontend/src/assets/icon-font/iconfont.woff | Bin 34408 -> 34520 bytes frontend/src/assets/icon-font/iconfont.woff2 | Bin 28108 -> 28120 bytes frontend/src/assets/style/arco-reset.less | 45 ++- frontend/src/assets/style/global.less | 3 + frontend/src/assets/style/var.less | 1 - .../components/business/ms-cascader/index.vue | 3 + .../src/components/business/ms-tree/index.vue | 376 ++++++++++++++++++ .../src/components/business/ms-tree/types.ts | 28 ++ .../business/ms-user-selector/index.vue | 4 +- .../minder-editor/menu/view/fontOperation.vue | 4 +- .../src/components/pure/ms-empty/index.vue | 24 ++ .../pure/ms-pagination/page-options.vue | 4 +- .../components/pure/ms-split-box/index.vue | 120 ++++++ .../pure/ms-table-more-action/index.vue | 17 +- .../components/pure/ms-table/base-table.vue | 8 +- frontend/src/components/pure/navbar/index.vue | 4 +- frontend/src/config/pathMap.ts | 7 + frontend/src/enums/routeEnum.ts | 2 +- frontend/src/hooks/useVisit.ts | 2 +- frontend/src/locale/en-US/common.ts | 1 + frontend/src/locale/en-US/index.ts | 17 +- frontend/src/locale/zh-CN/common.ts | 1 + frontend/src/locale/zh-CN/index.ts | 1 + frontend/src/router/guard/index.ts | 3 + .../routes/modules/projectManagement.ts | 19 +- frontend/src/store/modules/user/index.ts | 2 +- frontend/src/store/modules/user/types.ts | 2 +- .../system/log/components/logCards.vue | 4 +- .../setting/system/resourcePool/detail.vue | 15 +- .../views/setting/system/user/locale/en-US.ts | 6 +- frontend/types/axios.d.ts | 21 +- 44 files changed, 726 insertions(+), 104 deletions(-) create mode 100644 frontend/src/components/business/ms-tree/index.vue create mode 100644 frontend/src/components/business/ms-tree/types.ts create mode 100644 frontend/src/components/pure/ms-empty/index.vue create mode 100644 frontend/src/components/pure/ms-split-box/index.vue diff --git a/frontend/package.json b/frontend/package.json index ff920348c2..82cb0ff126 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -37,7 +37,7 @@ "dependencies": { "@7polo/kity": "2.0.8", "@7polo/kityminder-core": "1.4.53", - "@arco-design/web-vue": "^2.49.2", + "@arco-design/web-vue": "^2.51.0", "@arco-themes/vue-ms-theme-default": "^0.0.28", "@form-create/arco-design": "^3.1.22", "@types/color": "^3.0.3", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index cf038a28f2..c237fd0ef2 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,25 +1,29 @@ + + diff --git a/frontend/src/components/business/ms-tree/types.ts b/frontend/src/components/business/ms-tree/types.ts new file mode 100644 index 0000000000..8175d5a600 --- /dev/null +++ b/frontend/src/components/business/ms-tree/types.ts @@ -0,0 +1,28 @@ +import type { TreeNodeData, TreeFieldNames } from '@arco-design/web-vue'; + +export interface MsTreeFieldNames extends TreeFieldNames { + key: string; + title: string; + children: string; + isLeaf: string; +} + +export type MsTreeNodeData = { + [key: string]: any; +} & TreeNodeData; + +export interface MsTreeNodeStatus { + loading: boolean; + checked: boolean; + selected: boolean; + indeterminate: boolean; + expanded: boolean; + isLeaf: boolean; +} + +export interface MsTreeSelectedData { + selected?: boolean; + selectedNodes: MsTreeNodeData[]; + node?: MsTreeNodeData; + e?: Event; +} diff --git a/frontend/src/components/business/ms-user-selector/index.vue b/frontend/src/components/business/ms-user-selector/index.vue index 3fa363a56e..0febb3fab2 100644 --- a/frontend/src/components/business/ms-user-selector/index.vue +++ b/frontend/src/components/business/ms-user-selector/index.vue @@ -68,7 +68,9 @@ return currentOptions.value.filter((item) => props.value.includes(item.id)) || []; }); - const change = (value: string | number | Record | (string | number | Record)[]) => { + const change = ( + value: string | number | boolean | Record | (string | number | boolean | Record)[] + ) => { const tmpArr = Array.isArray(value) ? value : [value]; const { valueKey } = props; emit( diff --git a/frontend/src/components/pure/minder-editor/menu/view/fontOperation.vue b/frontend/src/components/pure/minder-editor/menu/view/fontOperation.vue index 36c24271b5..68f24a46ec 100644 --- a/frontend/src/components/pure/minder-editor/menu/view/fontOperation.vue +++ b/frontend/src/components/pure/minder-editor/menu/view/fontOperation.vue @@ -225,7 +225,7 @@ }); function execCommandFontFamily( - value: string | number | Record | (string | number | Record)[] + value: string | number | boolean | Record | (string | number | boolean | Record)[] ) { if (value === t('minder.menu.font.font')) { return; @@ -234,7 +234,7 @@ } function execCommandFontSize( - value: string | number | Record | (string | number | Record)[] + value: string | number | boolean | Record | (string | number | boolean | Record)[] ) { if (typeof value !== 'number') { return; diff --git a/frontend/src/components/pure/ms-empty/index.vue b/frontend/src/components/pure/ms-empty/index.vue new file mode 100644 index 0000000000..1fcbbf50de --- /dev/null +++ b/frontend/src/components/pure/ms-empty/index.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/frontend/src/components/pure/ms-pagination/page-options.vue b/frontend/src/components/pure/ms-pagination/page-options.vue index a91d080eff..840d7ca932 100644 --- a/frontend/src/components/pure/ms-pagination/page-options.vue +++ b/frontend/src/components/pure/ms-pagination/page-options.vue @@ -38,7 +38,9 @@ const props = defineProps(); - const handleChange = (value: string | number | Record | (string | number | Record)[]) => { + const handleChange = ( + value: string | number | boolean | Record | (string | number | boolean | Record)[] + ) => { emit('change', value as number); }; diff --git a/frontend/src/components/pure/ms-split-box/index.vue b/frontend/src/components/pure/ms-split-box/index.vue new file mode 100644 index 0000000000..3fd4143682 --- /dev/null +++ b/frontend/src/components/pure/ms-split-box/index.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/frontend/src/components/pure/ms-table-more-action/index.vue b/frontend/src/components/pure/ms-table-more-action/index.vue index b5efe67730..f2a180ee84 100644 --- a/frontend/src/components/pure/ms-table-more-action/index.vue +++ b/frontend/src/components/pure/ms-table-more-action/index.vue @@ -1,8 +1,8 @@