diff --git a/config/index.ts b/config/index.ts index 58a9509..5c96895 100644 --- a/config/index.ts +++ b/config/index.ts @@ -1,5 +1,5 @@ import { configUnocss } from './plugins'; -import { configAutoImport, configComponents, configIcons } from './unplugin'; +import { configAutoImport, configComponents,configIcons } from './unplugin'; import viteCompression from 'vite-plugin-compression'; import progress from 'vite-plugin-progress'; import defineOptions from 'unplugin-vue-define-options/vite'; diff --git a/config/unplugin/auto-import.ts b/config/unplugin/auto-import.ts index 6d2de4c..7778cc9 100644 --- a/config/unplugin/auto-import.ts +++ b/config/unplugin/auto-import.ts @@ -1,14 +1,9 @@ -/* - * @Author: RenXiaoDong - * @Date: 2025-06-24 16:29:10 - */ /** * 自动引入API * */ import AutoImport from 'unplugin-auto-import/vite'; import { ArcoResolver } from 'unplugin-vue-components/resolvers'; -import IconsResolver from 'unplugin-icons/resolver'; import { layoutsResolver } from '../utils'; @@ -21,7 +16,7 @@ export function configAutoImport() { '@vueuse/core', { dayjs: [['default', 'dayjs']], - 'lodash-es': ['cloneDeep', 'omit', 'pick', 'union', 'uniq', 'isNumber', 'uniqBy', 'isEmpty', 'merge'], + 'lodash-es': ['cloneDeep', 'omit', 'pick', 'union', 'uniq', 'isNumber', 'uniqBy', 'isEmpty', 'merge', 'debounce'], '@/hooks': ['useModal'], }, ], @@ -31,9 +26,6 @@ export function configAutoImport() { enable: true, }, }), - IconsResolver({ - enabledCollections: [], - }), layoutsResolver(), ], eslintrc: { diff --git a/config/unplugin/component.ts b/config/unplugin/component.ts index 9840799..57b9dc8 100644 --- a/config/unplugin/component.ts +++ b/config/unplugin/component.ts @@ -5,7 +5,6 @@ import { kebabCase } from 'unplugin-vue-components'; import Components from 'unplugin-vue-components/vite'; import { ArcoResolver } from 'unplugin-vue-components/resolvers'; -import IconsResolver from 'unplugin-icons/resolver'; import { getSep, getPath, setResolve, layoutsResolver } from '../utils'; @@ -20,11 +19,6 @@ export function configComponents() { }, sideEffect: true, }), - IconsResolver({ - prefix: false, - customCollections: ['i'], - enabledCollections: [], - }), layoutsResolver(), { type: 'component', diff --git a/config/unplugin/icons.ts b/config/unplugin/icons.ts index 2afaffa..0c94bf2 100644 --- a/config/unplugin/icons.ts +++ b/config/unplugin/icons.ts @@ -1,14 +1,14 @@ -/** - * 自动引入 svg 图标 - * */ -import Icons from 'unplugin-icons/vite'; -import { FileSystemIconLoader } from 'unplugin-icons/loaders'; +// /** +// * 自动引入 svg 图标 +// * */ +import { resolve } from '../utils'; + +import { createSvgIconsPlugin } from "vite-plugin-svg-icons"; export function configIcons() { - return Icons({ - compiler: 'vue3', - customCollections: { - i: FileSystemIconLoader('./src/assets', (svg) => svg.replace(/^ - + + + + + + diff --git a/src/components/_base/navbar/components/navbar-menu/style.scss b/src/components/_base/navbar/components/navbar-menu/style.scss new file mode 100644 index 0000000..5a15e33 --- /dev/null +++ b/src/components/_base/navbar/components/navbar-menu/style.scss @@ -0,0 +1,45 @@ +.navbar-menu { + display: flex; + align-items: center; + margin-left: 40px; + .menu-item-text { + color: var(--Text-2, #3c4043); + font-family: $font-family-medium; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + :deep(.arco-menu) { + height: 100%; + .arco-menu-inner { + padding: 0 20px; + } + .arco-menu-item { + padding: 0; + position: relative; + &.arco-menu-selected { + .menu-item-text, + .arco-menu-selected-label { + color: #6d4cfe; + } + .arco-menu-selected-label { + background: var(--Brand-Brand-6, #6d4cfe); + height: 4px; + border-radius: 4px; + width: 50%; + position: absolute; + bottom: -8px; + left: 50%; + transform: translateX(-50%); + } + } + } + } + .arco-icon-down { + transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); + } + .arco-dropdown-open .arco-icon-down { + transform: rotate(180deg); + } +} diff --git a/src/components/_base/navbar/components/right-side/index.vue b/src/components/_base/navbar/components/right-side/index.vue new file mode 100644 index 0000000..4f187dd --- /dev/null +++ b/src/components/_base/navbar/components/right-side/index.vue @@ -0,0 +1,196 @@ + + + + + + diff --git a/src/components/_base/navbar/components/task-center-modal/components/export-task/constants.ts b/src/components/_base/navbar/components/task-center-modal/components/export-task/constants.ts new file mode 100644 index 0000000..1134c9a --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/export-task/constants.ts @@ -0,0 +1,38 @@ +export const INITIAL_FORM = { + type: 1, + operator_name: '', + module: '', + sort_column: undefined, + sort_order: undefined, +}; + +export const TABLE_COLUMNS = [ + { + title: '文件名称', + dataIndex: 'name', + width: 180, + }, + { + title: '所属模块', + dataIndex: 'module', + width: 120, + }, + { + title: '状态', + dataIndex: 'status', + width: 100, + }, + { + title: '创建时间', + dataIndex: 'created_at', + width: 180, + sortable: { + sortDirections: ['ascend', 'descend'], + }, + }, + { + title: '操作人员', + dataIndex: 'operator.name', + width: 150, + }, +]; diff --git a/src/components/_base/navbar/components/task-center-modal/components/export-task/delete-task-modal.vue b/src/components/_base/navbar/components/task-center-modal/components/export-task/delete-task-modal.vue new file mode 100644 index 0000000..343f730 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/export-task/delete-task-modal.vue @@ -0,0 +1,62 @@ + + + diff --git a/src/components/_base/navbar/components/task-center-modal/components/export-task/index.vue b/src/components/_base/navbar/components/task-center-modal/components/export-task/index.vue new file mode 100644 index 0000000..3e1a3bf --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/export-task/index.vue @@ -0,0 +1,386 @@ + + + diff --git a/src/components/_base/navbar/components/task-center-modal/components/export-task/style.scss b/src/components/_base/navbar/components/task-center-modal/components/export-task/style.scss new file mode 100644 index 0000000..6fe18d5 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/export-task/style.scss @@ -0,0 +1,86 @@ +.export-task-wrap { + height: 100%; + display: flex; + flex-direction: column; + .tip-row { + border-radius: 2px; + background: #f0edff; + .label { + font-family: $font-family-medium; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + &.normal { + background: #ebf7f2; + .label { + color: #211f24; + } + } + &.abnormal { + background: #ffe7e4; + .label { + color: #211f24; + } + } + .err-btn { + background-color: #f64b31 !important; + color: var(--BG-white, #fff); + font-family: 'PingFang SC'; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 20px; + } + .operation-btn { + padding: 0; + cursor: pointer; + color: var(--Brand-Brand-6, #6d4cfe); + font-family: $font-family-regular; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + &:not(:last-child) { + margin-right: 16px; + } + &.red { + color: #f64b31; + } + } + } + .status-box { + border-radius: 2px; + display: flex; + height: 24px; + padding: 0px 8px; + align-items: center; + width: fit-content; + span { + font-family: $font-family-medium; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + &-0 { + background: var(--Functional-yellow-1, #fff7e5); + span { + color: var(--Functional-yellow-6, #ffae00); + } + } + &-1 { + background: var(--Functional-Green-1, #ebf7f2); + span { + color: var(--Functional-Green-6, #25c883); + } + } + &-2 { + background: var(--Functional-Red-1, #ffe9e7); + span { + color: var(--Functional-Red-6, #f64b31); + } + } + } +} diff --git a/src/components/_base/navbar/components/task-center-modal/components/import-task/constants.ts b/src/components/_base/navbar/components/task-center-modal/components/import-task/constants.ts new file mode 100644 index 0000000..633bb88 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/import-task/constants.ts @@ -0,0 +1,53 @@ +export const INITIAL_FORM = { + type: 0, + operator_name: '', + module: '', + sort_column: undefined, + sort_order: undefined, +}; + +export const TABLE_COLUMNS = [ + { + title: '任务名称', + dataIndex: 'name', + width: 180, + }, + { + title: '所属模块', + dataIndex: 'module', + width: 120, + }, + { + title: '状态', + dataIndex: 'status', + width: 100, + }, + { + title: '共导入', + dataIndex: 'total_number', + width: 100, + }, + { + title: '导入成功', + dataIndex: 'success_number', + width: 100, + }, + { + title: '导入失败', + dataIndex: 'fail_number', + width: 100, + }, + { + title: '导入时间', + dataIndex: 'created_at', + width: 180, + sortable: { + sortDirections: ['ascend', 'descend'], + }, + }, + { + title: '操作人员', + dataIndex: 'operator.name', + width: 150, + }, +]; diff --git a/src/components/_base/navbar/components/task-center-modal/components/import-task/delete-task-modal.vue b/src/components/_base/navbar/components/task-center-modal/components/import-task/delete-task-modal.vue new file mode 100644 index 0000000..63fee1c --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/import-task/delete-task-modal.vue @@ -0,0 +1,61 @@ + + + diff --git a/src/components/_base/navbar/components/task-center-modal/components/import-task/index.vue b/src/components/_base/navbar/components/task-center-modal/components/import-task/index.vue new file mode 100644 index 0000000..05de549 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/import-task/index.vue @@ -0,0 +1,300 @@ + + + diff --git a/src/components/_base/navbar/components/task-center-modal/components/import-task/style.scss b/src/components/_base/navbar/components/task-center-modal/components/import-task/style.scss new file mode 100644 index 0000000..216880a --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/components/import-task/style.scss @@ -0,0 +1,86 @@ +.import-task-wrap { + height: 100%; + display: flex; + flex-direction: column; + .tip-row { + border-radius: 2px; + background: #f0edff; + .label { + font-family: $font-family-medium; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + &.normal { + background: #ebf7f2; + .label { + color: #211f24; + } + } + &.abnormal { + background: #ffe7e4; + .label { + color: #211f24; + } + } + .err-btn { + background-color: #f64b31 !important; + color: var(--BG-white, #fff); + font-family: 'PingFang SC'; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 20px; + } + .operation-btn { + padding: 0; + cursor: pointer; + color: var(--Brand-Brand-6, #6d4cfe); + font-family: $font-family-regular; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + &:not(:last-child) { + margin-right: 16px; + } + &.red { + color: #f64b31; + } + } + } + .status-box { + border-radius: 2px; + display: flex; + height: 24px; + padding: 0px 8px; + align-items: center; + width: fit-content; + span { + font-family: $font-family-medium; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + &-0 { + background: var(--Functional-yellow-1, #fff7e5); + span { + color: var(--Functional-yellow-6, #ffae00); + } + } + &-1 { + background: var(--Functional-Green-1, #ebf7f2); + span { + color: var(--Functional-Green-6, #25c883); + } + } + &-2 { + background: var(--Functional-Red-1, #ffe9e7); + span { + color: var(--Functional-Red-6, #f64b31); + } + } + } +} diff --git a/src/components/_base/navbar/components/task-center-modal/constants.ts b/src/components/_base/navbar/components/task-center-modal/constants.ts new file mode 100644 index 0000000..63ceaa0 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/constants.ts @@ -0,0 +1,34 @@ +export enum enumTaskStatus { + Exporting = 0, // 导出中 + Finished = 1, // 已完成 + Failed = 2, // 导出失败 +} + +export const EXPORT_TASK_STATUS = [ + { + label: '导出中', + value: enumTaskStatus.Exporting, + }, + { + label: '已完成', + value: enumTaskStatus.Finished, + }, + { + label: '导出失败', + value: enumTaskStatus.Failed, + }, +]; +export const IMPORT_TASK_STATUS = [ + { + label: '导入中', + value: enumTaskStatus.Exporting, + }, + { + label: '已完成', + value: enumTaskStatus.Finished, + }, + { + label: '导入失败', + value: enumTaskStatus.Failed, + }, +]; diff --git a/src/components/_base/navbar/components/task-center-modal/index.vue b/src/components/_base/navbar/components/task-center-modal/index.vue new file mode 100644 index 0000000..09815c7 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/index.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/src/components/_base/navbar/components/task-center-modal/style.scss b/src/components/_base/navbar/components/task-center-modal/style.scss new file mode 100644 index 0000000..0485941 --- /dev/null +++ b/src/components/_base/navbar/components/task-center-modal/style.scss @@ -0,0 +1,77 @@ +.task-center-modal { + .arco-modal-header { + border-bottom: none !important; + .arco-modal-title { + color: var(--Text-1, #211f24); + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 24px; + font-family: $font-family-medium; + } + } + .arco-modal-body { + padding: 0 !important; + display: flex; + flex-direction: column; + height: 650px; + .filter-row { + .filter-row-item { + &:not(:last-child) { + margin-right: 24px; + } + .label { + margin-right: 12px; + color: #211f24; + font-family: 'PuHuiTi-Regular'; + font-size: 14px; + font-style: normal; + font-weight: 400; + flex-shrink: 0; + line-height: 22px; /* 157.143% */ + } + :deep(.arco-space-item) { + width: 100%; + } + } + } + .arco-tabs { + .arco-tabs-nav-top { + .arco-tabs-tab { + margin: 0 20px; + .arco-tabs-tab-title { + color: var(--Text-2, #3c4043); + font-family: $font-family-regular; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } + &.arco-tabs-tab-active { + .arco-tabs-tab-title { + color: #6D4CFE; + font-family: $font-family-medium; + } + } + } + } + .arco-tabs-content { + display: none; + } + } + .content { + flex: 1; + padding: 24px 20px; + overflow: hidden; + } + } + + .cts { + color: var(--Text-1, #211f24); + font-family: $font-family-medium; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + } +} diff --git a/src/components/_base/navbar/index.vue b/src/components/_base/navbar/index.vue index 0fc5d65..fd5aeeb 100644 --- a/src/components/_base/navbar/index.vue +++ b/src/components/_base/navbar/index.vue @@ -1,288 +1,34 @@ - - + - -