From 330acd5d0a0a14c26f611467258bc9c450c68149 Mon Sep 17 00:00:00 2001 From: dongzhihuan Date: Wed, 25 Mar 2026 15:41:48 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=B4=9F=E8=BD=BD=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=80=89=E6=8B=A9=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/task/workLoad/index.vue | 47 +++++++++++++++++++++++------ src/views/task/workerLoad/index.vue | 21 ++++++------- 2 files changed, 48 insertions(+), 20 deletions(-) diff --git a/src/views/task/workLoad/index.vue b/src/views/task/workLoad/index.vue index 00601cdf..3e15ae9a 100644 --- a/src/views/task/workLoad/index.vue +++ b/src/views/task/workLoad/index.vue @@ -26,7 +26,7 @@ multiple clearable class="mw200" - @change="userChangeFun" + @change="filterChangeFun" @focus="focusUserFun" > - + + + + + +
-
{{ workLevalList[index] + '个任务' }}
-
{{ personLevelList[index] + '个任务' }}
+ +
{{ workLevalList[index as number] + '个任务' }}
+
{{ personLevelList[index as number] + '个任务' }}
@@ -104,6 +125,7 @@ import { getListUserWorkloadsApi } from '@/api/project/task'; import { ElMessage } from 'element-plus'; import DetailDia from '@/views/task/workLoad/detailDia.vue'; import { debounce } from 'lodash-es'; +import ProjectSelect from '@/components/common/projectSelect/index.vue'; const props = defineProps({ // 维度:工作负载以人person为维度, 人力负载以项目project为维度 @@ -145,13 +167,15 @@ dayjs.extend(isoWeek); const Gantt: any = gantt; const ganttEvents = ref([]); -// const colorList: string[] = ['#ffffff', '#d9ecff', '#c6e2ff', '#a1cefc', '#79bbff', '#409eff']; // 格子颜色 -const colorList: string[] = [ +const colorList = ref([ 'rgb(179, 225, 157)', 'rgb(160, 207, 255)', 'rgb(248, 227, 197)', 'rgb(250, 182, 182)', -]; // 格子颜色 +]); +// const colorChange = () => { +// initGantt(); +// }; const workLevalList: string[] = ['1~2', '3', '4', '≥5']; const personLevelList: string[] = ['1~4', '5~9', '10~14', '≥15']; @@ -161,6 +185,7 @@ const visible = ref(false); const filterFprmData = reactive({ userGroupId: '', + projectIdList: '', userIds: [], beginTime: '', endTime: '', @@ -244,6 +269,7 @@ const getWorkLoadDataFun = async () => { } } else { delete param.projectIdList; + // param.projectIdList = param.projectIdList ? param.projectIdList.split(',') : []; } const res: any = await props.api(param); if (res && res.code === 200) { @@ -506,7 +532,7 @@ const initGantt = () => { } const taskCount = tasks?.length || 0; const colorIndex = getColorIndex(taskCount); - const backgroundColor = colorIndex >= 0 ? colorList[colorIndex] : ''; + const backgroundColor = colorIndex >= 0 ? colorList.value[colorIndex] : ''; return `
{ await getWorkLoadDataFun(); }; // 切换用户 -const userChangeFun = debounce(async () => { +const filterChangeFun = debounce(async () => { await filterWorkLoadFun(); }, 500); // 用户下拉框获取焦点 @@ -688,6 +714,9 @@ onBeforeUnmount(() => { height: 100%; display: flex; flex-direction: column; + .select-width { + width: 200px; + } .page-filter-box { width: 100%; display: flex; diff --git a/src/views/task/workerLoad/index.vue b/src/views/task/workerLoad/index.vue index 0ace3ea8..ed0a604e 100644 --- a/src/views/task/workerLoad/index.vue +++ b/src/views/task/workerLoad/index.vue @@ -2,13 +2,12 @@
-