update
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
<template #progress="{ row }"> {{ row.progress || 0 }}% </template>
|
||||
<template #approvalStatus="{ row }">
|
||||
<StatusDot
|
||||
class="clcik-approval"
|
||||
:status="
|
||||
getApproveStyleClass(row.approvalStatus || TASK_APPROVE_STATUS_ENUM.NOT_APPROVED)
|
||||
"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
v-model="filterFprmData.userGroupId"
|
||||
class="mw200"
|
||||
clearable
|
||||
@clear="filterFprmData.userGroupId = ''"
|
||||
@change="filterWorkLoadFun('group')"
|
||||
>
|
||||
<el-option
|
||||
@@ -26,7 +27,7 @@
|
||||
multiple
|
||||
clearable
|
||||
class="mw200"
|
||||
@change="filterWorkLoadFun"
|
||||
@change="userChangeFun"
|
||||
@focus="focusUserFun"
|
||||
>
|
||||
<el-option
|
||||
@@ -70,10 +71,10 @@
|
||||
<el-radio value="day">日</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item class="mr0">
|
||||
<el-form-item class="mr0">
|
||||
<el-button type="primary" @click="filterWorkLoadFun">查询</el-button>
|
||||
<el-button type="" @click="clearParamFun">清空</el-button>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
@@ -105,6 +106,7 @@ import { getListUserWorkloadsApi } from '@/api/project/task';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import type { ChineseWorkday } from 'chinese-workday';
|
||||
import DetailDia from '@/views/task/workLoad/detailDia.vue';
|
||||
import { debounce } from 'lodash-es';
|
||||
|
||||
const props = defineProps({
|
||||
// 维度:工作负载以人person为维度, 人力负载以项目project为维度
|
||||
@@ -124,6 +126,7 @@ const props = defineProps({
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
// 是否需要展示汇总行
|
||||
showTotal: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@@ -227,13 +230,6 @@ const getWorkLoadDataFun = async () => {
|
||||
...filterFprmData,
|
||||
...props.filterData,
|
||||
};
|
||||
|
||||
if (!filterFprmData.userGroupId) {
|
||||
param.userGroupId = '';
|
||||
}
|
||||
if (!filterFprmData.userIds.length) {
|
||||
param.userIds = [];
|
||||
}
|
||||
// 根据页面类型去掉没用的参数
|
||||
if (props.dimension === 'project') {
|
||||
delete param.userGroupId;
|
||||
@@ -462,12 +458,12 @@ const filterWorkLoadFun = async (flag?: any) => {
|
||||
await refreshGanttFun();
|
||||
};
|
||||
|
||||
// const clearParamFun = async () => {
|
||||
// await getUserGroupFun();
|
||||
// filterFprmData.beginTime = dayjs().subtract(3, 'month').format('YYYY-MM-DD HH:mm:ss');
|
||||
// filterFprmData.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
// await filterWorkLoadFun();
|
||||
// };
|
||||
const clearParamFun = async () => {
|
||||
await getUserGroupFun();
|
||||
filterFprmData.beginTime = dayjs().subtract(3, 'month').format('YYYY-MM-DD HH:mm:ss');
|
||||
filterFprmData.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
await filterWorkLoadFun();
|
||||
};
|
||||
|
||||
// 计算时间段中的工作日天数
|
||||
// const calculateWorkDay = ([startDate, endDate]: any) => {
|
||||
@@ -737,7 +733,11 @@ const refreshGanttFun = async () => {
|
||||
initGantt();
|
||||
await getWorkLoadDataFun();
|
||||
};
|
||||
|
||||
// 切换用户
|
||||
const userChangeFun = debounce(async () => {
|
||||
await filterWorkLoadFun();
|
||||
}, 500);
|
||||
// 用户下拉框获取焦点
|
||||
const focusUserFun = () => {
|
||||
if (!filterFprmData.userGroupId) {
|
||||
ElMessage.warning('请选择用户组后再选择用户进行筛选!');
|
||||
|
||||
@@ -52,7 +52,7 @@ const columns = [
|
||||
const fieldMapFun = (data: any) => {
|
||||
const list = data.map((item: any) => {
|
||||
return {
|
||||
userName: item.projectName, // 显示项目名称
|
||||
userName: item.projectName, // 显示项目名称--姓名
|
||||
userId: item.projectId, // 项目ID
|
||||
taskNum: item.taskNum, // 任务数量
|
||||
workNum: item.personNum, // 人员数量
|
||||
|
||||
Reference in New Issue
Block a user