From 201cfd7322896abe90e7510fe5c776270f4993f2 Mon Sep 17 00:00:00 2001 From: hujiale <13306077+hujiale9527@user.noreply.gitee.com> Date: Thu, 17 Oct 2024 15:39:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A3=81=E8=B4=B4=E7=BC=96=E8=BE=91=E3=80=81?= =?UTF-8?q?=E7=A3=81=E8=B4=B4=E5=AE=A1=E6=A0=B8=E3=80=81=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-test/src/layouts/user/like.vue | 3 - apps/web-test/src/plugins/fastCrud.ts | 14 + apps/web-test/src/plugins/vxeTable.ts | 202 ++++++++++++ .../src/router/routes/modules/dashboard.ts | 37 ++- .../src/router/routes/modules/demos.ts | 1 + .../src/router/routes/modules/vben.ts | 1 + .../views/dashboard/home/NestedComponent.vue | 38 +++ .../src/views/dashboard/home/audit.vue | 50 +++ .../home/components/CardTiles/index.vue | 111 +++++++ .../home/components/GridGroup/index.vue | 111 +++++-- .../home/components/Output1/index.vue | 2 +- .../home/components/Output2/index.vue | 118 +++++-- .../home/components/Output5/index.vue | 12 +- .../src/views/dashboard/home/index.vue | 306 +++++++++++++----- .../src/views/dashboard/home/main.vue | 41 +++ .../src/views/dashboard/home/portal.vue | 35 ++ .../src/views/dashboard/home/test.vue | 137 ++++++++ .../src/views/dashboard/home/tiles.ts | 10 +- .../widgets/user-dropdown/user-dropdown.vue | 2 +- 19 files changed, 1068 insertions(+), 163 deletions(-) create mode 100644 apps/web-test/src/plugins/fastCrud.ts create mode 100644 apps/web-test/src/plugins/vxeTable.ts create mode 100644 apps/web-test/src/views/dashboard/home/NestedComponent.vue create mode 100644 apps/web-test/src/views/dashboard/home/audit.vue create mode 100644 apps/web-test/src/views/dashboard/home/components/CardTiles/index.vue create mode 100644 apps/web-test/src/views/dashboard/home/main.vue create mode 100644 apps/web-test/src/views/dashboard/home/portal.vue create mode 100644 apps/web-test/src/views/dashboard/home/test.vue diff --git a/apps/web-test/src/layouts/user/like.vue b/apps/web-test/src/layouts/user/like.vue index bf9ecfd7..c13291bc 100644 --- a/apps/web-test/src/layouts/user/like.vue +++ b/apps/web-test/src/layouts/user/like.vue @@ -113,7 +113,6 @@ watch(builtinValue, (n, o) => { builtinType: n } }) -console.log('zzzz',preferences.theme.builtinType); }) let menuOpen = ref(preferences.sidebar.enable) watch(menuOpen, (n, o) => { @@ -122,7 +121,6 @@ watch(menuOpen, (n, o) => { enable: n } }) -console.log('zz111zz',n); }) let menuTheme = ref(preferences.theme.semiDarkSidebar) watch(menuTheme, (n, o) => { @@ -131,7 +129,6 @@ watch(menuTheme, (n, o) => { semiDarkSidebar: n } }) -console.log('zz222zz',n); }) let value1 = ref('') let activeKey = ref('1'); diff --git a/apps/web-test/src/plugins/fastCrud.ts b/apps/web-test/src/plugins/fastCrud.ts new file mode 100644 index 00000000..29c46213 --- /dev/null +++ b/apps/web-test/src/plugins/fastCrud.ts @@ -0,0 +1,14 @@ +import type { App } from 'vue'; + +import FastCrud from '@fast-crud/fast-crud'; +import ui from '@fast-crud/ui-antdv4'; +import Antdv from 'ant-design-vue'; +import '@fast-crud/fast-crud/dist/style.css'; +import '@fast-crud/ui-antdv4/dist/style.css'; + +export function registerFastCrud(app: App) { + app.use(Antdv); + app.use(ui); + app.use(FastCrud, { + }); +} diff --git a/apps/web-test/src/plugins/vxeTable.ts b/apps/web-test/src/plugins/vxeTable.ts new file mode 100644 index 00000000..850334f0 --- /dev/null +++ b/apps/web-test/src/plugins/vxeTable.ts @@ -0,0 +1,202 @@ +import type { App } from 'vue'; + +import VXETable from 'vxe-table' + +import { + VxeTable, + VxeColumn, + VxeColgroup, + VxeGrid, + VxeToolbar +} from 'vxe-table' + +import VxeUI from 'vxe-pc-ui' + +import { + + VxeAlert, + VxeAnchor, + VxeAnchorLink, + VxeBreadcrumb, + VxeBreadcrumbItem, + VxeButton, + VxeButtonGroup, + VxeCalendar, + VxeCard, + VxeCarousel, + VxeCheckbox, + VxeCheckboxGroup, + VxeCol, + VxeCollapse, + VxeCollapsePane, + VxeDatePicker, + VxeDrawer, + VxeForm, + VxeFormDesign, + VxeFormGather, + VxeFormItem, + VxeFormView, + VxeIcon, + VxeIconPicker, + VxeImage, + VxeImageGroup, + VxeImagePreview, + VxeInput, + VxeLayoutAside, + VxeLayoutBody, + VxeLayoutContainer, + VxeLayoutFooter, + VxeLayoutHeader, + VxeLink, + VxeListDesign, + VxeListView, + VxeList, + VxeLoading, + VxeMenu, + VxeModal, + VxeNumberInput, + VxeOptgroup, + VxeOption, + VxePager, + VxePasswordInput, + VxePrintPageBreak, + VxePrint, + VxePulldown, + VxeRadio, + VxeRadioButton, + VxeRadioGroup, + VxeRow, + VxeSelect, + VxeSwitch, + VxeTabPane, + VxeTabs, + VxeTag, + VxeText, + VxeTextarea, + VxeTip, + VxeTooltip, + VxeTree, + VxeTreeSelect, + VxeUpload +} from 'vxe-pc-ui' + +import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx' +import ExcelJS from 'exceljs' + +import VXETablePluginAntd from 'vxe-table-plugin-antd' + +// 导入主题变量,也可以重写主题变量 +import 'vxe-pc-ui/lib/style.css' +import 'vxe-table/lib/style.css' +import 'vxe-table/styles/cssvar.scss' +import 'vxe-pc-ui/styles/cssvar.scss' + +// VxeUI.setTheme('dark') + +VxeUI.component(VxeAlert) +VxeUI.component(VxeAnchor) +VxeUI.component(VxeAnchorLink) +VxeUI.component(VxeBreadcrumb) +VxeUI.component(VxeBreadcrumbItem) +VxeUI.component(VxeButton) +VxeUI.component(VxeButtonGroup) +VxeUI.component(VxeCalendar) +VxeUI.component(VxeCard) +VxeUI.component(VxeCarousel) +VxeUI.component(VxeCheckbox) +VxeUI.component(VxeCheckboxGroup) +VxeUI.component(VxeCol) +VxeUI.component(VxeCollapse) +VxeUI.component(VxeCollapsePane) +VxeUI.component(VxeDatePicker) +VxeUI.component(VxeDrawer) +VxeUI.component(VxeForm) +VxeUI.component(VxeFormDesign) +VxeUI.component(VxeFormGather) +VxeUI.component(VxeFormItem) +VxeUI.component(VxeFormView) +VxeUI.component(VxeIcon) +VxeUI.component(VxeIconPicker) +VxeUI.component(VxeImage) +VxeUI.component(VxeImageGroup) +VxeUI.component(VxeImagePreview) +VxeUI.component(VxeInput) +VxeUI.component(VxeLayoutAside) +VxeUI.component(VxeLayoutBody) +VxeUI.component(VxeLayoutContainer) +VxeUI.component(VxeLayoutFooter) +VxeUI.component(VxeLayoutHeader) +VxeUI.component(VxeLink) +VxeUI.component(VxeListDesign) +VxeUI.component(VxeListView) +VxeUI.component(VxeList) +VxeUI.component(VxeLoading) +VxeUI.component(VxeMenu) +VxeUI.component(VxeModal) +VxeUI.component(VxeNumberInput) +VxeUI.component(VxeOptgroup) +VxeUI.component(VxeOption) +VxeUI.component(VxePager) +VxeUI.component(VxePasswordInput) +VxeUI.component(VxePrintPageBreak) +VxeUI.component(VxePrint) +VxeUI.component(VxePulldown) +VxeUI.component(VxeRadio) +VxeUI.component(VxeRadioButton) +VxeUI.component(VxeRadioGroup) +VxeUI.component(VxeRow) +VxeUI.component(VxeSelect) +VxeUI.component(VxeSwitch) +VxeUI.component(VxeTabPane) +VxeUI.component(VxeTabs) +VxeUI.component(VxeTag) +VxeUI.component(VxeText) +VxeUI.component(VxeTextarea) +VxeUI.component(VxeTip) +VxeUI.component(VxeTooltip) +VxeUI.component(VxeTree) +VxeUI.component(VxeTreeSelect) +VxeUI.component(VxeUpload) + +VxeUI.component(VxeTable) +VxeUI.component(VxeColumn) +VxeUI.component(VxeColgroup) +VxeUI.component(VxeGrid) +VxeUI.component(VxeToolbar) + +VXETable.use(VXETablePluginAntd) + +VXETable.use(VXETablePluginExportXLSX, { + ExcelJS +}) + +VXETable.setConfig({ + // zIndex: 9999, + grid: { + size: 'mini', + proxyConfig: { + props: { + result: 'data.rows', + total: 'data.total', + }, + }, + toolbarConfig: { + enabled: true, + }, + }, + + pager: { + background: true, + pageSize: 50, + pageSizes: [50, 100, 300, 500, 1000], + layouts: ['PrevJump', 'PrevPage', 'Number', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'Total'], + }, +}) +export function registerVxeTable(app: App) { + app.use(VxeUI) + app.use(VxeTable) + app.use(VxeColumn) + app.use(VxeColgroup) + app.use(VxeGrid) + app.use(VxeToolbar) +} diff --git a/apps/web-test/src/router/routes/modules/dashboard.ts b/apps/web-test/src/router/routes/modules/dashboard.ts index a0cd6f86..3f60bfe2 100644 --- a/apps/web-test/src/router/routes/modules/dashboard.ts +++ b/apps/web-test/src/router/routes/modules/dashboard.ts @@ -70,10 +70,43 @@ const routes: RouteRecordRaw[] = [ hideInMenu: true, icon: 'lucide:area-chart', title: '总部系统', + affixTab: true }, }, - ...getRouter(firstRouter, 'first') + ...getRouter(firstRouter, 'first'), + { + name: 'portal', + path: '/portal', + component: () => import('#/views/dashboard/home/portal.vue'), + // component: () => import('#/views/dashboard/home/main.vue'), + meta: { + hideInMenu: true, + icon: 'lucide:area-chart', + title: '磁贴管理', + }, + }, + { + name: 'audit', + path: '/audit', + component: () => import('#/views/dashboard/home/audit.vue'), + // component: () => import('#/views/dashboard/home/main.vue'), + meta: { + hideInMenu: true, + icon: 'lucide:area-chart', + title: '磁贴审核', + }, + }, + // { + // name: 'test', + // path: '/test', + // component: () => import('#/views/dashboard/home/test.vue'), + // // component: () => import('#/views/dashboard/home/main.vue'), + // meta: { + // icon: 'lucide:area-chart', + // title: '测试', + // }, + // }, // { // name: 'zshxgw', // path: '', @@ -105,6 +138,4 @@ const routes: RouteRecordRaw[] = [ ...getRouter(otherRouter,'other') ]; -console.log('999999',...getRouter(otherRouter,'other')); - export default routes; diff --git a/apps/web-test/src/router/routes/modules/demos.ts b/apps/web-test/src/router/routes/modules/demos.ts index 2f06bd0b..296d4a1f 100644 --- a/apps/web-test/src/router/routes/modules/demos.ts +++ b/apps/web-test/src/router/routes/modules/demos.ts @@ -28,3 +28,4 @@ // ]; // export default routes; +export default []; diff --git a/apps/web-test/src/router/routes/modules/vben.ts b/apps/web-test/src/router/routes/modules/vben.ts index d28cc297..ff4bd291 100644 --- a/apps/web-test/src/router/routes/modules/vben.ts +++ b/apps/web-test/src/router/routes/modules/vben.ts @@ -79,3 +79,4 @@ // ]; // export default routes; +export default []; diff --git a/apps/web-test/src/views/dashboard/home/NestedComponent.vue b/apps/web-test/src/views/dashboard/home/NestedComponent.vue new file mode 100644 index 00000000..bf6c4359 --- /dev/null +++ b/apps/web-test/src/views/dashboard/home/NestedComponent.vue @@ -0,0 +1,38 @@ + + + \ No newline at end of file diff --git a/apps/web-test/src/views/dashboard/home/audit.vue b/apps/web-test/src/views/dashboard/home/audit.vue new file mode 100644 index 00000000..8132dbe0 --- /dev/null +++ b/apps/web-test/src/views/dashboard/home/audit.vue @@ -0,0 +1,50 @@ + + + \ No newline at end of file diff --git a/apps/web-test/src/views/dashboard/home/components/CardTiles/index.vue b/apps/web-test/src/views/dashboard/home/components/CardTiles/index.vue new file mode 100644 index 00000000..b1817b81 --- /dev/null +++ b/apps/web-test/src/views/dashboard/home/components/CardTiles/index.vue @@ -0,0 +1,111 @@ + + + \ No newline at end of file diff --git a/apps/web-test/src/views/dashboard/home/components/GridGroup/index.vue b/apps/web-test/src/views/dashboard/home/components/GridGroup/index.vue index c5780437..5faf0602 100644 --- a/apps/web-test/src/views/dashboard/home/components/GridGroup/index.vue +++ b/apps/web-test/src/views/dashboard/home/components/GridGroup/index.vue @@ -1,12 +1,10 @@ \ No newline at end of file diff --git a/apps/web-test/src/views/dashboard/home/components/Output5/index.vue b/apps/web-test/src/views/dashboard/home/components/Output5/index.vue index 30fb66c7..c7010af7 100644 --- a/apps/web-test/src/views/dashboard/home/components/Output5/index.vue +++ b/apps/web-test/src/views/dashboard/home/components/Output5/index.vue @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/apps/web-test/src/views/dashboard/home/index.vue b/apps/web-test/src/views/dashboard/home/index.vue index f93d6714..0b5a33fb 100644 --- a/apps/web-test/src/views/dashboard/home/index.vue +++ b/apps/web-test/src/views/dashboard/home/index.vue @@ -1,17 +1,75 @@ \ No newline at end of file diff --git a/apps/web-test/src/views/dashboard/home/tiles.ts b/apps/web-test/src/views/dashboard/home/tiles.ts index 203ff632..31791080 100644 --- a/apps/web-test/src/views/dashboard/home/tiles.ts +++ b/apps/web-test/src/views/dashboard/home/tiles.ts @@ -7,7 +7,8 @@ let tilesList = [ "w": 1, "h": 2, "component": "./components/Output1/index.vue", - "i": 0 + "i": 0, + "path": "/portal" }, { "name1": "AUTO_1612158921536.png", @@ -17,6 +18,7 @@ let tilesList = [ "w": 4, "h": 6, "component": "./components/Output5/index.vue", + "dom": '.titlt-top', "childer": [ { "name1": "AUTO_1612159241967.png", @@ -41,7 +43,8 @@ let tilesList = [ "w": 8, "h": 5, "component": "./components/Output2/index.vue", - "i": 2 + "i": 2, + "dom": '.titlt-top' }, { "name1": "AUTO_1612159773503.png", @@ -51,7 +54,8 @@ let tilesList = [ "w": 1, "h": 2, "component": "./components/Output1/index.vue", - "i": 3 + "i": 3, + "path": '/audit' }, { "name1": "AUTO_1612160044533.png", diff --git a/packages/effects/layouts/src/widgets/user-dropdown/user-dropdown.vue b/packages/effects/layouts/src/widgets/user-dropdown/user-dropdown.vue index 7406561f..0c820a4f 100644 --- a/packages/effects/layouts/src/widgets/user-dropdown/user-dropdown.vue +++ b/packages/effects/layouts/src/widgets/user-dropdown/user-dropdown.vue @@ -180,7 +180,7 @@ if (enableShortcutKey.value) {
- {{ text }} + 李华 {{ tagText }}