fix(任务中心): bugFix

This commit is contained in:
baiqi 2024-10-29 18:50:02 +08:00 committed by Craftsman
parent 0070de70bc
commit 8803147b1e
4 changed files with 30 additions and 12 deletions

View File

@ -93,7 +93,7 @@
</template>
</a-popover>
</li>
<li v-permission="['PROJECT_CASE_TASK_CENTER:READ', 'PROJECT_SCHEDULE_TASK_CENTER:READ']">
<li v-if="hasAnyPermission(['PROJECT_CASE_TASK_CENTER:READ', 'PROJECT_SCHEDULE_TASK_CENTER:READ'])">
<a-tooltip :content="t('settings.navbar.task')">
<a-button type="secondary" @click="goTaskCenter">
<template #icon>

View File

@ -408,7 +408,7 @@
org: getOrganizationExecuteTaskDetailList,
}[props.type];
const { propsRes, propsEvent, loadList, setLoadListParams, getTableQueryParams, resetSelector } = useTable(
const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable(
currentExecuteTaskDetailList,
{
tableKey: TableKeyEnum.TASK_CENTER_CASE_TASK_DETAIL,
@ -499,6 +499,13 @@
org: organizationBatchStopTaskDetail,
}[props.type];
const conditionParams = computed(() => {
return {
keyword: keyword.value,
filter: propsRes.value.filter,
};
});
function stopTask(record?: TaskCenterTaskDetailItem, isBatch?: boolean, params?: BatchActionQueryParams) {
let title = t('ms.taskCenter.stopTaskTitle', { name: characterLimit(record?.taskName) });
if (isBatch) {
@ -512,9 +519,6 @@
content: t('ms.taskCenter.stopTimeTaskTip'),
okText: t('common.stopConfirm'),
cancelText: t('common.cancel'),
okButtonProps: {
status: 'danger',
},
maskClosable: false,
onBeforeOk: async () => {
try {
@ -523,7 +527,7 @@
selectIds: params?.selectedIds || [],
selectAll: !!params?.selectAll,
excludeIds: params?.excludeIds || [],
...getTableQueryParams(),
...conditionParams.value,
});
} else {
await currentStopTask(record?.id || '');

View File

@ -483,7 +483,7 @@
},
],
};
const { propsRes, propsEvent, loadList, setLoadListParams, getTableQueryParams, resetSelector } = useTable(
const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable(
currentExecuteTaskList,
{
tableKey: TableKeyEnum.TASK_CENTER_CASE_TASK,
@ -573,6 +573,13 @@
org: organizationBatchDeleteTask,
}[props.type];
const conditionParams = computed(() => {
return {
keyword: keyword.value,
filter: propsRes.value.filter,
};
});
/**
* 删除任务
*/
@ -600,7 +607,7 @@
selectIds: params?.selectedIds || [],
selectAll: !!params?.selectAll,
excludeIds: params?.excludeIds || [],
...getTableQueryParams(),
...conditionParams.value,
});
} else {
await currentDeleteTask(record?.id || '');
@ -653,7 +660,7 @@
selectIds: params?.selectedIds || [],
selectAll: !!params?.selectAll,
excludeIds: params?.excludeIds || [],
...getTableQueryParams(),
...conditionParams.value,
});
} else {
await currentStopTask(record?.id || '');

View File

@ -369,7 +369,7 @@
project: getProjectScheduleList,
}[props.type];
const { propsRes, propsEvent, loadList, setLoadListParams, getTableQueryParams, resetSelector } = useTable(
const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable(
currentScheduleList,
{
tableKey: TableKeyEnum.TASK_CENTER_SYSTEM_TASK,
@ -431,6 +431,13 @@
});
}
const conditionParams = computed(() => {
return {
keyword: keyword.value,
filter: propsRes.value.filter,
};
});
const currentBatchOpenSchedule = {
system: systemBatchOpenTask,
org: organizationBatchOpenTask,
@ -443,7 +450,7 @@
selectIds: params?.selectedIds || [],
selectAll: !!params?.selectAll,
excludeIds: params?.excludeIds || [],
...getTableQueryParams(),
...conditionParams.value,
});
Message.success(t('ms.taskCenter.openTaskSuccess'));
resetSelector();
@ -468,7 +475,7 @@
selectIds: params?.selectedIds || [],
selectAll: !!params?.selectAll,
excludeIds: params?.excludeIds || [],
...getTableQueryParams(),
...conditionParams.value,
});
Message.success(t('ms.taskCenter.closeTaskSuccess'));
resetSelector();