fix(测试计划): 修复测试计划关联全选条件限制&关联按钮限制

This commit is contained in:
xinxin.wu 2024-07-17 18:28:52 +08:00 committed by Craftsman
parent f48145b1a0
commit 2829182ba3
2 changed files with 2 additions and 12 deletions

View File

@ -338,12 +338,7 @@
<a-button type="secondary" :disabled="props.confirmLoading" class="mr-[12px]" @click="cancel">
{{ t('common.cancel') }}
</a-button>
<a-button
:loading="props.confirmLoading"
type="primary"
:disabled="!isDisabledSaveButton"
@click="handleConfirm"
>
<a-button :loading="props.confirmLoading" type="primary" :disabled="!totalCount" @click="handleConfirm">
{{ t('ms.case.associate.associate') }}
</a-button>
</slot>
@ -472,11 +467,6 @@
}
);
//
const isDisabledSaveButton = computed(() => {
return Object.values(selectedModulesMaps.value).some((module) => module.selectAll || module.selectIds.size > 0);
});
const selectedKeys = computed({
get: () => [activeFolder.value],
set: (val) => val,

View File

@ -138,7 +138,7 @@ export default function useTreeSelection(selectedModuleProps: SelectedModuleProp
const isAllCheckedModuleProps = val.all;
if (isAllCheckedModuleProps) {
if (totalCount.value === isAllCheckedModuleProps.count) {
if (totalCount.value === isAllCheckedModuleProps.count && isAllCheckedModuleProps.selectAll) {
isCheckedAll.value = true;
} else {
isCheckedAll.value = false;