fix(测试计划): 已归档的测试计划不能修改步骤执行结果

This commit is contained in:
teukkk 2024-05-28 14:05:47 +08:00 committed by Craftsman
parent 94bcdd9b08
commit dd2e1943da
3 changed files with 9 additions and 3 deletions

View File

@ -28,7 +28,10 @@
@blur="blurHandler(record, 'expected')"
/>
</template>
<template #actualResult="{ record }">
<template
v-if="hasAnyPermission(['PROJECT_TEST_PLAN:READ+EXECUTE']) && !props.isDisabledTestPlan"
#actualResult="{ record }"
>
<a-textarea
v-model="record.actualResult"
:max-length="1000"
@ -40,7 +43,7 @@
</template>
<template #lastExecResult="{ record }">
<a-select
v-if="hasAnyPermission(['PROJECT_TEST_PLAN:READ+EXECUTE'])"
v-if="hasAnyPermission(['PROJECT_TEST_PLAN:READ+EXECUTE']) && !props.isDisabledTestPlan"
v-model:model-value="record.executeResult"
:placeholder="t('common.pleaseSelect')"
class="param-input w-full"
@ -101,6 +104,7 @@
isDisabled?: boolean;
isScrollY?: boolean;
isTestPlan?: boolean;
isDisabledTestPlan?: boolean;
}>(),
{
isDisabled: false,

View File

@ -67,6 +67,7 @@
v-model:step-list="stepData"
:is-scroll-y="false"
:is-test-plan="props.isTestPlan"
:is-disabled-test-plan="props.isDisabledTestPlan"
:is-disabled="!isEditPreposition"
/>
</div>
@ -304,6 +305,7 @@
formRules?: FormRuleItem[]; //
formApi?: any;
isTestPlan?: boolean; //
isDisabledTestPlan?: boolean; // -
}>(),
{
allowEdit: true, //

View File

@ -101,7 +101,7 @@
</template>
</MsDescription>
<div v-else-if="activeTab === 'detail'" class="align-content-start flex h-full flex-col">
<CaseTabDetail ref="caseTabDetailRef" is-test-plan :form="caseDetail" />
<CaseTabDetail ref="caseTabDetailRef" is-test-plan :form="caseDetail" :is-disabled-test-plan="!canEdit" />
<!-- 开始执行 -->
<div
v-if="canEdit && hasAnyPermission(['PROJECT_TEST_PLAN:READ+EXECUTE'])"