fix(用例管理): 修复用例管理部分_bug

This commit is contained in:
xinxin.wu 2024-03-16 16:58:34 +08:00 committed by 刘瑞斌
parent 13adc882ea
commit e76308113e
9 changed files with 68 additions and 57 deletions

View File

@ -67,9 +67,11 @@
defineProps<{ defineProps<{
stepList: any; stepList: any;
isDisabled?: boolean; isDisabled?: boolean;
isScrollY?: boolean;
}>(), }>(),
{ {
isDisabled: false, isDisabled: false,
isScrollY: true,
} }
); );
@ -149,7 +151,7 @@
const { propsRes, propsEvent, setProps } = useTable(undefined, { const { propsRes, propsEvent, setProps } = useTable(undefined, {
tableKey: TableKeyEnum.CASE_MANAGEMENT_DETAIL_TABLE, tableKey: TableKeyEnum.CASE_MANAGEMENT_DETAIL_TABLE,
columns: templateFieldColumns.value, columns: templateFieldColumns.value,
scroll: { x: '100%', y: 400 }, scroll: { x: '100%', y: props.isScrollY ? 400 : '' },
selectable: false, selectable: false,
noDisable: true, noDisable: true,
size: 'default', size: 'default',

View File

@ -118,40 +118,47 @@
</a-menu> </a-menu>
</div> </div>
<keep-alive> <keep-alive>
<div class="leftContent mt-4 p-[24px]"> <div class="leftContent mt-4 w-full px-[24px]">
<template v-if="activeTab === 'detail'"> <a-scrollbar
<TabDetail :style="{
ref="tabDetailRef" overflow: 'auto',
:form="detailInfo" height: 'calc(100vh - 190px)',
:allow-edit="true" }"
:form-rules="formItem" >
@update-success="updateSuccess" <template v-if="activeTab === 'detail'">
/> <TabDetail
</template> ref="tabDetailRef"
<template v-if="activeTab === 'requirement'"> :form="detailInfo"
<TabDemand :case-id="props.detailId" /> :allow-edit="true"
</template> :form-rules="formItem"
<template v-if="activeTab === 'case'"> @update-success="updateSuccess"
<TabCaseTable :case-id="props.detailId" /> />
</template> </template>
<template v-if="activeTab === 'bug'"> <template v-if="activeTab === 'requirement'">
<TabDefect :case-id="props.detailId" /> <TabDemand :case-id="props.detailId" />
</template> </template>
<template v-if="activeTab === 'dependency'"> <template v-if="activeTab === 'case'">
<TabDependency :case-id="props.detailId" /> <TabCaseTable :case-id="props.detailId" />
</template> </template>
<template v-if="activeTab === 'caseReview'"> <template v-if="activeTab === 'bug'">
<TabCaseReview :case-id="props.detailId" /> <TabDefect :case-id="props.detailId" />
</template> </template>
<template v-if="activeTab === 'testPlan'"> <template v-if="activeTab === 'dependency'">
<TabTestPlan /> <TabDependency :case-id="props.detailId" />
</template> </template>
<template v-if="activeTab === 'comments'"> <template v-if="activeTab === 'caseReview'">
<TabComment ref="commentRef" :case-id="props.detailId" /> <TabCaseReview :case-id="props.detailId" />
</template> </template>
<template v-if="activeTab === 'changeHistory'"> <template v-if="activeTab === 'testPlan'">
<TabChangeHistory :case-id="props.detailId" /> <TabTestPlan />
</template> </template>
<template v-if="activeTab === 'comments'">
<TabComment ref="commentRef" :case-id="props.detailId" />
</template>
<template v-if="activeTab === 'changeHistory'">
<TabChangeHistory :case-id="props.detailId" />
</template>
</a-scrollbar>
</div> </div>
</keep-alive> </keep-alive>
</div> </div>

View File

@ -390,7 +390,7 @@
} = useTable(getLinkedCaseBugList, { } = useTable(getLinkedCaseBugList, {
columns: testPlanColumns, columns: testPlanColumns,
scroll: { x: '100%' }, scroll: { x: '100%' },
heightUsed: 340, heightUsed: 354,
enableDrag: true, enableDrag: true,
}); });

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="flex items-center justify-between"> <div class="mb-4 flex items-center justify-between">
<a-dropdown @select="handleSelect"> <a-dropdown @select="handleSelect">
<a-button v-permission="['FUNCTIONAL_CASE:READ+UPDATE']" type="primary"> <a-button v-permission="['FUNCTIONAL_CASE:READ+UPDATE']" type="primary">
{{ t('caseManagement.featureCase.linkCase') }} {{ t('caseManagement.featureCase.linkCase') }}

View File

@ -1,13 +1,11 @@
<template> <template>
<div class="mb-4 flex items-center justify-between break-words break-all"> <div class="mb-4 flex items-center justify-between break-words break-all">
<div class="font-medium">{{ t('caseManagement.featureCase.commentList') }}</div> <div class="font-medium">{{ t('caseManagement.featureCase.commentList') }}</div>
<div> <a-radio-group v-model="activeComment" type="button">
<a-radio-group v-model="activeComment" type="button"> <a-radio value="caseComment">{{ t('caseManagement.featureCase.caseComment') }}</a-radio>
<a-radio value="caseComment">{{ t('caseManagement.featureCase.caseComment') }}</a-radio> <a-radio value="reviewComment">{{ t('caseManagement.featureCase.reviewComment') }}</a-radio>
<a-radio value="reviewComment">{{ t('caseManagement.featureCase.reviewComment') }}</a-radio> <!-- <a-radio value="executiveComment">{{ t('caseManagement.featureCase.executiveReview') }}</a-radio> -->
<!-- <a-radio value="executiveComment">{{ t('caseManagement.featureCase.executiveReview') }}</a-radio> --> </a-radio-group>
</a-radio-group>
</div>
</div> </div>
<div> <div>
<!-- 用例评论 --> <!-- 用例评论 -->

View File

@ -223,7 +223,9 @@
const platformKeyword = ref<string>(''); const platformKeyword = ref<string>('');
const tableRef = ref();
const initData = async () => { const initData = async () => {
tableRef.value?.initColumn(fullColumns);
setLoadListParams({ keyword: platformKeyword.value, projectId: currentProjectId.value }); setLoadListParams({ keyword: platformKeyword.value, projectId: currentProjectId.value });
loadList(); loadList();
}; };
@ -233,7 +235,6 @@
resetSelector(); resetSelector();
}; };
const tableRef = ref();
const customFields = ref<any[]>([]); const customFields = ref<any[]>([]);
async function initColumn() { async function initColumn() {
fullColumns = [...columns]; fullColumns = [...columns];
@ -262,7 +263,6 @@
const linkDemandDrawer = ref<boolean>(false); const linkDemandDrawer = ref<boolean>(false);
function associatedDemand() { function associatedDemand() {
linkDemandDrawer.value = true; linkDemandDrawer.value = true;
initData();
} }
function getSlotName(record: any, item: MsTableColumnData) { function getSlotName(record: any, item: MsTableColumnData) {
@ -350,11 +350,14 @@
(val) => { (val) => {
if (val) { if (val) {
resetSelector(); resetSelector();
nextTick(() => { nextTick(async () => {
tableRef.value?.initColumn(fullColumns); await tableRef.value?.initColumn(fullColumns);
initData(); initData();
}); });
} }
},
{
immediate: true,
} }
); );

View File

@ -21,14 +21,13 @@
}}</a-button }}</a-button
></span ></span
> >
<div v-if="isEditPreposition" class="px-2"> <MsRichText
<MsRichText v-if="isEditPreposition"
v-model:raw="detailForm.prerequisite" v-model:raw="detailForm.prerequisite"
v-model:filed-ids="prerequisiteFileIds" v-model:filed-ids="prerequisiteFileIds"
:upload-image="handleUploadImage" :upload-image="handleUploadImage"
class="mt-2" class="mt-2"
/> />
</div>
<div <div
v-else v-else
@ -63,7 +62,7 @@
</div> </div>
<!-- 步骤描述 --> <!-- 步骤描述 -->
<div v-if="detailForm.caseEditType === 'STEP'" class="w-full"> <div v-if="detailForm.caseEditType === 'STEP'" class="w-full">
<AddStep v-model:step-list="stepData" :is-disabled="!isEditPreposition" /> <AddStep v-model:step-list="stepData" :is-scroll-y="false" :is-disabled="!isEditPreposition" />
</div> </div>
<!-- 文本描述 --> <!-- 文本描述 -->
<MsRichText <MsRichText

View File

@ -269,4 +269,5 @@ export default {
'caseManagement.featureCase.ModuleOwned': 'Module owned', 'caseManagement.featureCase.ModuleOwned': 'Module owned',
'caseManagement.featureCase.excelImportTip': 'Only xls/xlsx files are supported', 'caseManagement.featureCase.excelImportTip': 'Only xls/xlsx files are supported',
'caseManagement.featureCase.xmindImportTip': 'Only xmind files are supported', 'caseManagement.featureCase.xmindImportTip': 'Only xmind files are supported',
'caseManagement.featureCase.AssociatedSuccess': 'Associated with success',
}; };

View File

@ -265,4 +265,5 @@ export default {
'caseManagement.featureCase.ModuleOwned': '所属模块', 'caseManagement.featureCase.ModuleOwned': '所属模块',
'caseManagement.featureCase.excelImportTip': '仅支持xls/xlsx格式的文件', 'caseManagement.featureCase.excelImportTip': '仅支持xls/xlsx格式的文件',
'caseManagement.featureCase.xmindImportTip': '仅支持xmind格式的文件', 'caseManagement.featureCase.xmindImportTip': '仅支持xmind格式的文件',
'caseManagement.featureCase.AssociatedSuccess': '关联成功',
}; };