From 3dcaaaaa356205a0ec2937a6db647e4578939f30 Mon Sep 17 00:00:00 2001 From: yuliang_guo Date: Fri, 30 Jan 2026 18:12:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=88=90=E9=95=BF=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E5=B2=97=E4=BD=8D=E5=85=A8?= =?UTF-8?q?=E9=80=89=E6=8C=89=E9=92=AE=EF=BC=8C=E8=B0=83=E6=95=B4=E4=B8=8B?= =?UTF-8?q?=E6=96=B9=E5=8C=BA=E5=9F=9F=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/manager/growth-path-management.vue | 81 ++++++++++++++----- 1 file changed, 63 insertions(+), 18 deletions(-) diff --git a/frontend/src/views/manager/growth-path-management.vue b/frontend/src/views/manager/growth-path-management.vue index c7c1fee..675720d 100644 --- a/frontend/src/views/manager/growth-path-management.vue +++ b/frontend/src/views/manager/growth-path-management.vue @@ -150,22 +150,33 @@ - - - +
+ + + + + {{ isAllPositionsSelected ? '取消全选' : '全选' }} + +
@@ -529,6 +540,11 @@ const totalDuration = computed(() => { }, 0) }) +const isAllPositionsSelected = computed(() => { + if (!editingPath.value?.position_ids || positions.value.length === 0) return false + return editingPath.value.position_ids.length === positions.value.length +}) + // ========== 方法 ========== /** @@ -820,6 +836,20 @@ const getStageNodes = (stageName: string) => { return editingPath.value?.nodes?.filter(n => n.stage_name === stageName) || [] } +/** + * 全选/取消全选岗位 + */ +const handleSelectAllPositions = () => { + if (!editingPath.value) return + const allIds = positions.value.map(p => p.id) + // 如果当前已全选,则取消全选 + if (editingPath.value.position_ids?.length === allIds.length) { + editingPath.value.position_ids = [] + } else { + editingPath.value.position_ids = [...allIds] + } +} + /** * 添加课程 */ @@ -1056,6 +1086,21 @@ onMounted(() => { :deep(.el-form-item) { margin-bottom: 0; } + + .position-select-wrapper { + display: flex; + align-items: center; + gap: 8px; + + .el-select { + flex: 1; + } + + .select-all-btn { + white-space: nowrap; + flex-shrink: 0; + } + } } .stages-section { @@ -1131,10 +1176,10 @@ onMounted(() => { // 下方区域 .editor-bottom { - flex: 1; + flex: 2; display: flex; gap: 16px; - min-height: 0; + min-height: 400px; // 左侧课程库 1/3 .course-library-panel {