From 908af28235bea1b6783dc4eaf98802217545ad94 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Tue, 7 Feb 2023 20:53:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=A0=8F=E5=8F=B3=E4=BE=A7=E6=96=B0=E5=A2=9E=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=9D=A1=EF=BC=88=E6=98=BE=E7=A4=BA=E6=88=96=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A0=8F=E6=8C=89=E9=92=AE=E3=80=81=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E6=8C=89=E9=92=AE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- continew-admin-ui/components.d.ts | 1 + .../config/plugin/styleImport.ts | 1 + .../src/assets/style/global.less | 7 +++ continew-admin-ui/src/components/index.ts | 2 + .../src/components/right-toolbar/index.vue | 45 +++++++++++++++++++ .../src/views/system/dept/index.vue | 13 +++++- 6 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 continew-admin-ui/src/components/right-toolbar/index.vue diff --git a/continew-admin-ui/components.d.ts b/continew-admin-ui/components.d.ts index 54544f7b..eb573b15 100644 --- a/continew-admin-ui/components.d.ts +++ b/continew-admin-ui/components.d.ts @@ -15,6 +15,7 @@ declare module '@vue/runtime-core' { ABreadcrumb: typeof import('@arco-design/web-vue')['Breadcrumb'] ABreadcrumbItem: typeof import('@arco-design/web-vue')['BreadcrumbItem'] AButton: typeof import('@arco-design/web-vue')['Button'] + AButtonGroup: typeof import('@arco-design/web-vue')['ButtonGroup'] ACard: typeof import('@arco-design/web-vue')['Card'] ACardMeta: typeof import('@arco-design/web-vue')['CardMeta'] ACarousel: typeof import('@arco-design/web-vue')['Carousel'] diff --git a/continew-admin-ui/config/plugin/styleImport.ts b/continew-admin-ui/config/plugin/styleImport.ts index 4aca008c..afd13fd2 100644 --- a/continew-admin-ui/config/plugin/styleImport.ts +++ b/continew-admin-ui/config/plugin/styleImport.ts @@ -73,6 +73,7 @@ export default function configStyleImportPlugin() { 'image-preview': 'image', 'image-preview-group': 'image', 'cascader-panel': 'cascader', + 'button-group': 'button', }; if (ignoreList.includes(name)) return ''; // eslint-disable-next-line no-prototype-builtins diff --git a/continew-admin-ui/src/assets/style/global.less b/continew-admin-ui/src/assets/style/global.less index 11dfcba2..9aa31a64 100644 --- a/continew-admin-ui/src/assets/style/global.less +++ b/continew-admin-ui/src/assets/style/global.less @@ -69,6 +69,13 @@ body { &-query { margin-bottom: 8px; } + &-operation { + &-right { + display: flex; + align-items: center; + justify-content: end; + } + } } } diff --git a/continew-admin-ui/src/components/index.ts b/continew-admin-ui/src/components/index.ts index cdd70103..b5888205 100644 --- a/continew-admin-ui/src/components/index.ts +++ b/continew-admin-ui/src/components/index.ts @@ -12,6 +12,7 @@ import { import Chart from './chart/index.vue'; import Breadcrumb from './breadcrumb/index.vue'; import DateRangePicker from './date-range-picker/index.vue'; +import RightToolbar from './right-toolbar/index.vue'; // Manually introduce ECharts modules to reduce packing size @@ -33,5 +34,6 @@ export default { Vue.component('Chart', Chart); Vue.component('Breadcrumb', Breadcrumb); Vue.component('DateRangePicker', DateRangePicker); + Vue.component('RightToolbar', RightToolbar); }, }; diff --git a/continew-admin-ui/src/components/right-toolbar/index.vue b/continew-admin-ui/src/components/right-toolbar/index.vue new file mode 100644 index 00000000..293f1176 --- /dev/null +++ b/continew-admin-ui/src/components/right-toolbar/index.vue @@ -0,0 +1,45 @@ + + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/views/system/dept/index.vue b/continew-admin-ui/src/views/system/dept/index.vue index 586cd997..07425e9e 100644 --- a/continew-admin-ui/src/views/system/dept/index.vue +++ b/continew-admin-ui/src/views/system/dept/index.vue @@ -6,7 +6,7 @@
- + - + +
@@ -266,6 +267,7 @@ const title = ref(''); const single = ref(true); const multiple = ref(true); + const showQuery = ref(true); const loading = ref(false); const detailLoading = ref(false); const exportLoading = ref(false); @@ -478,6 +480,13 @@ document.body.removeChild(downloadElement); // 释放掉 blob 对象 window.URL.revokeObjectURL(href); + }).catch(() => { + proxy.$notification.warning({ + title: '警告', + content: "如果您正在访问演示环境,点击导出会报错。这是由于演示环境开启了 Mock.js,而 Mock.js 会将 responseType 设置为 '',不仅会导致关键判断出错,也会导致导出的文件无法打开。", + duration: 10000, + closable: true, + }); }).finally(() => { exportLoading.value = false; });