From 2e5cbe31e5945a5748748c56ca3aab7dcb245e69 Mon Sep 17 00:00:00 2001 From: chabai <14799297+dhasjklhdfjkasfbhfasfj@user.noreply.gitee.com> Date: Wed, 13 Aug 2025 14:27:43 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E5=95=86=E5=8A=A1=E6=A8=A1=E5=9D=97=E5=AF=B9=E7=9A=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=88=86=E9=A1=B5=E5=92=8C=E9=A1=B5=E9=9D=A2=E5=B8=83?= =?UTF-8?q?=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bussiness-data/bussiness.vue | 174 +++++++++++++++---------- 1 file changed, 102 insertions(+), 72 deletions(-) diff --git a/src/views/bussiness-data/bussiness.vue b/src/views/bussiness-data/bussiness.vue index dcc7abf..2e6b855 100644 --- a/src/views/bussiness-data/bussiness.vue +++ b/src/views/bussiness-data/bussiness.vue @@ -143,19 +143,22 @@ - - - -
- + +
+
+ 文件列表 ({{ fileList.length }}) +
+
+ +
@@ -336,7 +339,7 @@
-
+
@@ -2629,6 +2634,7 @@ onMounted(() => { background: var(--color-bg-1); min-height: 0; max-height: calc(100vh - 120px); + position: relative; } .file-card { @@ -2640,6 +2646,7 @@ onMounted(() => { position: relative; height: 100%; overflow: hidden; + padding-bottom: 80px; /* 为分页器留出空间 */ } /* 表格容器 */ @@ -2654,7 +2661,7 @@ onMounted(() => { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); margin-bottom: 0; min-height: 300px; - max-height: calc(100vh - 300px); + max-height: calc(100vh - 380px); /* 调整高度为分页器留出空间 */ } /* 表头行样式 */ @@ -3100,14 +3107,65 @@ onMounted(() => { } /* 分页样式 */ -.pagination-container, .file-pagination { - margin-top: 16px; - text-align: right; - padding: 0 16px 16px; -} - -.file-pagination { +.pagination-container { + position: absolute; + bottom: 0; + left: 0; + right: 0; + background: var(--color-bg-1); + padding: 16px 24px; border-top: 1px solid var(--color-border); + display: flex; + justify-content: flex-end; + align-items: center; + z-index: 10; + box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06); + margin-top: 0; + + .arco-pagination { + margin: 0; + + .arco-pagination-item { + border-radius: 6px; + margin: 0 4px; + transition: all 0.2s ease; + + &:hover { + border-color: var(--color-primary); + color: var(--color-primary); + } + + &.arco-pagination-item-active { + background: var(--color-primary); + border-color: var(--color-primary); + color: white; + } + } + + .arco-pagination-prev, + .arco-pagination-next { + border-radius: 6px; + transition: all 0.2s ease; + + &:hover { + border-color: var(--color-primary); + color: var(--color-primary); + } + } + + .arco-pagination-size-changer { + margin-left: 16px; + } + + .arco-pagination-jumper { + margin-left: 16px; + } + + .arco-pagination-total { + color: var(--color-text-2); + font-size: 14px; + } + } } @@ -3530,9 +3588,29 @@ onMounted(() => { 100% { transform: translateX(100%); } } +/* 文件头部容器样式 */ +.file-header-container { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 16px; + padding: 16px 0; +} + +.file-title { + display: flex; + align-items: center; +} + +.file-list-title { + font-size: 16px; + font-weight: 600; + color: var(--color-text-1); + margin: 0; +} + /* 文件搜索样式 */ .file-search-container { - margin: 16px 0; display: flex; align-items: center; gap: 12px; @@ -3601,55 +3679,7 @@ onMounted(() => { border-top-color: var(--color-primary); } -/* 文件分页样式 */ -.file-pagination { - position: sticky; - bottom: 0; - left: 0; - right: 0; - margin-top: 16px; - padding: 16px 0; - display: flex; - justify-content: center; - border-top: 1px solid var(--color-border); - background: var(--color-bg-1); - flex-shrink: 0; - z-index: 10; - - .arco-pagination { - .arco-pagination-total { - color: var(--color-text-2); - font-size: 14px; - } - - .arco-pagination-item { - border-radius: 6px; - transition: all 0.2s ease; - - &:hover { - border-color: var(--color-primary); - color: var(--color-primary); - } - - &.arco-pagination-item-active { - background: var(--color-primary); - border-color: var(--color-primary); - color: white; - } - } - - .arco-pagination-prev, - .arco-pagination-next { - border-radius: 6px; - transition: all 0.2s ease; - - &:hover { - border-color: var(--color-primary); - color: var(--color-primary); - } - } - } -} + /* 树形文件夹结构 */ .folder-tree-container { From 79b8eb340fc5497c9cb21dcb3ac3beeda5d00a9f Mon Sep 17 00:00:00 2001 From: chabai <14799297+dhasjklhdfjkasfbhfasfj@user.noreply.gitee.com> Date: Wed, 13 Aug 2025 14:44:02 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=95=86=E5=8A=A1?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=8F=AF=E4=BB=A5=E8=B0=83=E6=95=B4=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E6=A0=8F=E7=9A=84=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/components.d.ts | 63 +++++++++++ src/views/bussiness-data/bussiness.vue | 142 ++++++++++++++++++++++++- 2 files changed, 203 insertions(+), 2 deletions(-) diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 7fa6b1b..a427ece 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -7,7 +7,70 @@ export {} declare module 'vue' { export interface GlobalComponents { + ApprovalAssistant: typeof import('./../components/ApprovalAssistant/index.vue')['default'] + ApprovalMessageItem: typeof import('./../components/NotificationCenter/ApprovalMessageItem.vue')['default'] + Avatar: typeof import('./../components/Avatar/index.vue')['default'] + Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default'] + CellCopy: typeof import('./../components/CellCopy/index.vue')['default'] + Chart: typeof import('./../components/Chart/index.vue')['default'] + CircularProgress: typeof import('./../components/CircularProgress/index.vue')['default'] + ColumnSetting: typeof import('./../components/GiTable/src/components/ColumnSetting.vue')['default'] + CronForm: typeof import('./../components/GenCron/CronForm/index.vue')['default'] + CronModal: typeof import('./../components/GenCron/CronModal/index.vue')['default'] + DateRangePicker: typeof import('./../components/DateRangePicker/index.vue')['default'] + DayForm: typeof import('./../components/GenCron/CronForm/component/day-form.vue')['default'] + FilePreview: typeof import('./../components/FilePreview/index.vue')['default'] + GiCellAvatar: typeof import('./../components/GiCell/GiCellAvatar.vue')['default'] + GiCellGender: typeof import('./../components/GiCell/GiCellGender.vue')['default'] + GiCellStatus: typeof import('./../components/GiCell/GiCellStatus.vue')['default'] + GiCellTag: typeof import('./../components/GiCell/GiCellTag.vue')['default'] + GiCellTags: typeof import('./../components/GiCell/GiCellTags.vue')['default'] + GiCodeView: typeof import('./../components/GiCodeView/index.vue')['default'] + GiDot: typeof import('./../components/GiDot/index.tsx')['default'] + GiEditTable: typeof import('./../components/GiEditTable/GiEditTable.vue')['default'] + GiFooter: typeof import('./../components/GiFooter/index.vue')['default'] + GiForm: typeof import('./../components/GiForm/src/GiForm.vue')['default'] + GiIconBox: typeof import('./../components/GiIconBox/index.vue')['default'] + GiIconSelector: typeof import('./../components/GiIconSelector/index.vue')['default'] + GiIframe: typeof import('./../components/GiIframe/index.vue')['default'] + GiOption: typeof import('./../components/GiOption/index.vue')['default'] + GiOptionItem: typeof import('./../components/GiOptionItem/index.vue')['default'] + GiPageLayout: typeof import('./../components/GiPageLayout/index.vue')['default'] + GiSpace: typeof import('./../components/GiSpace/index.vue')['default'] + GiSplitButton: typeof import('./../components/GiSplitButton/index.vue')['default'] + GiSplitPane: typeof import('./../components/GiSplitPane/index.vue')['default'] + GiSplitPaneFlexibleBox: typeof import('./../components/GiSplitPane/components/GiSplitPaneFlexibleBox.vue')['default'] + GiSvgIcon: typeof import('./../components/GiSvgIcon/index.vue')['default'] + GiTable: typeof import('./../components/GiTable/src/GiTable.vue')['default'] + GiTag: typeof import('./../components/GiTag/index.tsx')['default'] + GiThemeBtn: typeof import('./../components/GiThemeBtn/index.vue')['default'] + HourForm: typeof import('./../components/GenCron/CronForm/component/hour-form.vue')['default'] + Icon403: typeof import('./../components/icons/Icon403.vue')['default'] + Icon404: typeof import('./../components/icons/Icon404.vue')['default'] + Icon500: typeof import('./../components/icons/Icon500.vue')['default'] + IconBorders: typeof import('./../components/icons/IconBorders.vue')['default'] + IconTableSize: typeof import('./../components/icons/IconTableSize.vue')['default'] + IconTreeAdd: typeof import('./../components/icons/IconTreeAdd.vue')['default'] + IconTreeReduce: typeof import('./../components/icons/IconTreeReduce.vue')['default'] + ImageImport: typeof import('./../components/ImageImport/index.vue')['default'] + ImageImportWizard: typeof import('./../components/ImageImportWizard/index.vue')['default'] + IndustrialImageList: typeof import('./../components/IndustrialImageList/index.vue')['default'] + JsonPretty: typeof import('./../components/JsonPretty/index.vue')['default'] + MinuteForm: typeof import('./../components/GenCron/CronForm/component/minute-form.vue')['default'] + MonthForm: typeof import('./../components/GenCron/CronForm/component/month-form.vue')['default'] + NotificationCenter: typeof import('./../components/NotificationCenter/index.vue')['default'] + ParentView: typeof import('./../components/ParentView/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] + SecondForm: typeof import('./../components/GenCron/CronForm/component/second-form.vue')['default'] + SplitPanel: typeof import('./../components/SplitPanel/index.vue')['default'] + TextCopy: typeof import('./../components/TextCopy/index.vue')['default'] + TurbineGrid: typeof import('./../components/TurbineGrid/index.vue')['default'] + UserSelect: typeof import('./../components/UserSelect/index.vue')['default'] + Verify: typeof import('./../components/Verify/index.vue')['default'] + VerifyPoints: typeof import('./../components/Verify/Verify/VerifyPoints.vue')['default'] + VerifySlide: typeof import('./../components/Verify/Verify/VerifySlide.vue')['default'] + WeekForm: typeof import('./../components/GenCron/CronForm/component/week-form.vue')['default'] + YearForm: typeof import('./../components/GenCron/CronForm/component/year-form.vue')['default'] } } diff --git a/src/views/bussiness-data/bussiness.vue b/src/views/bussiness-data/bussiness.vue index 2e6b855..4c4cb9a 100644 --- a/src/views/bussiness-data/bussiness.vue +++ b/src/views/bussiness-data/bussiness.vue @@ -2,7 +2,7 @@
- + + @@ -2362,6 +2371,86 @@ const fileTypeText = (type) => { // 侧边栏控制 const sidebarCollapsed = ref(false); +// 侧边栏宽度控制 +const sidebarWidth = ref(260); // 默认宽度 +const isResizing = ref(false); +const startX = ref(0); +const startWidth = ref(0); + +// 从localStorage加载保存的宽度 +const loadSavedWidth = () => { + try { + const savedWidth = localStorage.getItem('bussiness-sidebar-width'); + if (savedWidth) { + const width = parseInt(savedWidth); + if (width >= 200 && width <= 500) { + sidebarWidth.value = width; + } + } + } catch (error) { + console.warn('加载侧边栏宽度失败:', error); + } +}; + +// 保存宽度到localStorage +const saveWidth = (width) => { + try { + localStorage.setItem('bussiness-sidebar-width', width.toString()); + } catch (error) { + console.warn('保存侧边栏宽度失败:', error); + } +}; + + + +// 开始拖拽调整大小 +const startResize = (event) => { + event.preventDefault(); + isResizing.value = true; + startX.value = event.type === 'mousedown' ? event.clientX : event.touches[0].clientX; + startWidth.value = sidebarWidth.value; + + // 添加事件监听器 + if (event.type === 'mousedown') { + document.addEventListener('mousemove', handleResize); + document.addEventListener('mouseup', stopResize); + } else { + document.addEventListener('touchmove', handleResize); + document.addEventListener('touchend', stopResize); + } + + // 添加样式 + document.body.classList.add('resizing'); +}; + +// 处理拖拽调整 +const handleResize = (event) => { + if (!isResizing.value) return; + + const currentX = event.type === 'mousemove' ? event.clientX : event.touches[0].clientX; + const deltaX = currentX - startX.value; + const newWidth = Math.max(200, Math.min(500, startWidth.value + deltaX)); + + sidebarWidth.value = newWidth; +}; + +// 停止拖拽调整 +const stopResize = () => { + isResizing.value = false; + + // 移除事件监听器 + document.removeEventListener('mousemove', handleResize); + document.removeEventListener('mouseup', stopResize); + document.removeEventListener('touchmove', handleResize); + document.removeEventListener('touchend', stopResize); + + // 移除样式 + document.body.classList.remove('resizing'); + + // 保存宽度 + saveWidth(sidebarWidth.value); +}; + // 打开新建文件夹对话框 const handleCreateFolder = () => { folderForm.id = ''; @@ -2448,6 +2537,7 @@ watch(uploadDialogVisible, (visible) => { // 初始化加载 onMounted(() => { + loadSavedWidth(); // 加载保存的侧边栏宽度 initData(); }); @@ -3786,4 +3876,52 @@ onMounted(() => { } } } + +/* 拖拽分隔线样式 */ +.sidebar-resizer { + position: absolute; + top: 0; + right: 0; + width: 6px; + height: 100%; + cursor: col-resize; + background: transparent; + transition: background-color 0.2s ease; + z-index: 10; + + &:hover { + background: rgba(var(--color-primary-6), 0.1); + } + + &:active { + background: rgba(var(--color-primary-6), 0.2); + } +} + +.resizer-handle { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 2px; + height: 40px; + background: var(--color-primary); + border-radius: 1px; + opacity: 0.6; + transition: opacity 0.2s ease; +} + +.sidebar-resizer:hover .resizer-handle { + opacity: 1; +} + +/* 拖拽时的全局样式 */ +body.resizing { + cursor: col-resize !important; + user-select: none !important; +} + +body.resizing * { + cursor: col-resize !important; +} From a3aaf7da071e98a82d50f044295052af9ace97fa Mon Sep 17 00:00:00 2001 From: Maple <869445424@qq.com> Date: Wed, 13 Aug 2025 16:21:33 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=E6=96=BD=E5=B7=A5=E7=AB=8B=E9=A1=B9?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/project/type.ts | 10 +- src/types/auto-imports.d.ts | 2 +- src/views/project/index.vue | 392 ++++++++++++++++++++++++++---------- 3 files changed, 295 insertions(+), 109 deletions(-) diff --git a/src/apis/project/type.ts b/src/apis/project/type.ts index 506cb93..5d5f527 100644 --- a/src/apis/project/type.ts +++ b/src/apis/project/type.ts @@ -18,6 +18,8 @@ export interface ProjectResp { projectCategory?: string // 项目类型/服务 projectManagerId?: string // 项目经理ID projectManagerName?: string // 项目经理姓名 + projectOrigin?: string // 项目来源 + projectStaff?: string[] // 施工人员 startDate?: string // 开始日期 endDate?: string // 结束日期 @@ -28,10 +30,10 @@ export interface ProjectResp { coverUrl?: string // 封面URL createDt?: Date updateDt?: Date - + // 为了保持向后兼容,添加一些别名字段 id?: string // projectId的别名 - fieldName?: string // farmName的别名 + fieldName?: string // farmName的别名 fieldLocation?: string // farmAddress的别名 commissionUnit?: string // client的别名 commissionContact?: string // clientContact的别名 @@ -85,7 +87,7 @@ export interface TaskQuery { status?: string } -export interface TaskPageQuery extends TaskQuery, PageQuery {} +export interface TaskPageQuery extends TaskQuery, PageQuery {} // ==================== 人员调度相关类型 ==================== @@ -339,4 +341,4 @@ export interface PageRes { total: number page: number pageSize: number -} \ No newline at end of file +} \ No newline at end of file diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index 369aad4..eab6be6 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -70,6 +70,6 @@ declare global { // for type re-export declare global { // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' import('vue') } diff --git a/src/views/project/index.vue b/src/views/project/index.vue index b523e17..e9a8e4e 100644 --- a/src/views/project/index.vue +++ b/src/views/project/index.vue @@ -2,19 +2,21 @@ 项目管理页面 已完成接口对接: 1. 项目列表查询 (listProject) - 支持分页和条件查询 - 2. 项目新增 (addProject) + 2. 项目新增 (addProject) 3. 项目修改 (updateProject) 4. 项目删除 (deleteProject) 5. 项目导出 (exportProject) 6. 项目导入 (importProject) - + 所有API调用都已添加错误处理和类型安全检查 -->