fix(测试用例&测试计划): 执行评论展示步骤详情
--bug=1044985 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001044985
This commit is contained in:
parent
a52a69a99e
commit
8394a5a5c7
|
@ -21,6 +21,7 @@
|
||||||
:review-comment-list="reviewCommentList"
|
:review-comment-list="reviewCommentList"
|
||||||
:active-comment="activeComment"
|
:active-comment="activeComment"
|
||||||
:permissions="['FUNCTIONAL_CASE:READ+COMMENT']"
|
:permissions="['FUNCTIONAL_CASE:READ+COMMENT']"
|
||||||
|
show-step-detail-trigger
|
||||||
/>
|
/>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<MsComment
|
<MsComment
|
||||||
|
@ -256,4 +257,7 @@
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
height: calc(100% - 130px);
|
height: calc(100% - 130px);
|
||||||
}
|
}
|
||||||
|
:deep(.comment-list-item-name) {
|
||||||
|
max-width: 130px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -112,6 +112,7 @@
|
||||||
:review-comment-list="executeHistoryList"
|
:review-comment-list="executeHistoryList"
|
||||||
active-comment="executiveComment"
|
active-comment="executiveComment"
|
||||||
not-show-review-name
|
not-show-review-name
|
||||||
|
show-step-detail-trigger
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</MsMinderEditor>
|
</MsMinderEditor>
|
||||||
|
@ -483,11 +484,12 @@
|
||||||
const executeHistoryList = ref<ExecuteHistoryItem[]>([]);
|
const executeHistoryList = ref<ExecuteHistoryItem[]>([]);
|
||||||
async function initExecuteHistory(data: MinderJsonNodeData) {
|
async function initExecuteHistory(data: MinderJsonNodeData) {
|
||||||
try {
|
try {
|
||||||
executeHistoryList.value = await executeHistory({
|
const res = await executeHistory({
|
||||||
caseId: data?.caseId,
|
caseId: data?.caseId,
|
||||||
id: data.id,
|
id: data.id,
|
||||||
testPlanId: props.planId,
|
testPlanId: props.planId,
|
||||||
});
|
});
|
||||||
|
executeHistoryList.value = res.map((item) => ({ ...item, stepsText: item.stepsExecResult }));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
@ -825,7 +827,7 @@
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
:deep(.comment-list-item-name) {
|
:deep(.comment-list-item-name) {
|
||||||
max-width: 200px;
|
max-width: 130px;
|
||||||
}
|
}
|
||||||
:deep(.ms-list) {
|
:deep(.ms-list) {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
@ -269,6 +269,7 @@ export interface ExecuteHistoryItem {
|
||||||
createTime: string;
|
createTime: string;
|
||||||
deleted: boolean;
|
deleted: boolean;
|
||||||
caseEditType: string; // 类型是:步骤描述
|
caseEditType: string; // 类型是:步骤描述
|
||||||
|
showResult: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface moduleForm {
|
export interface moduleForm {
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
<template>
|
||||||
|
<a-trigger trigger="click" position="bottom" :popup-translate="[0, 4]">
|
||||||
|
<MsButton type="text" class="!mr-0">
|
||||||
|
{{ t('system.orgTemplate.stepDetail') }}
|
||||||
|
</MsButton>
|
||||||
|
<template #content>
|
||||||
|
<div class="step-detail-trigger-content">
|
||||||
|
<StepDetail :step-list="getStepData()" is-disabled is-preview is-test-plan :is-disabled-test-plan="false" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</a-trigger>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||||
|
import StepDetail from '@/views/case-management/caseManagementFeature/components/addStep.vue';
|
||||||
|
|
||||||
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
stepsText: string;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
function getStepData() {
|
||||||
|
if (props.stepsText) {
|
||||||
|
return JSON.parse(props.stepsText).map((item: any) => {
|
||||||
|
return {
|
||||||
|
id: item.id,
|
||||||
|
step: item.desc,
|
||||||
|
expected: item.result,
|
||||||
|
actualResult: item.actualResult,
|
||||||
|
executeResult: item.executeResult,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.step-detail-trigger-content {
|
||||||
|
padding: 16px;
|
||||||
|
width: 700px;
|
||||||
|
border-radius: var(--border-radius-medium);
|
||||||
|
box-shadow: 0 4px 10px -1px rgb(100 100 102 / 15%);
|
||||||
|
@apply bg-white;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -4,12 +4,22 @@
|
||||||
<div v-for="item of props.reviewCommentList" :key="item.id" class="ms-comment-list-item">
|
<div v-for="item of props.reviewCommentList" :key="item.id" class="ms-comment-list-item">
|
||||||
<MSAvatar :avatar="item.userLogo" />
|
<MSAvatar :avatar="item.userLogo" />
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<div class="flex items-center gap-[8px]">
|
<div class="flex items-center">
|
||||||
<a-tooltip :content="item.userName" :mouse-enter-delay="300">
|
<a-tooltip :content="item.userName" :mouse-enter-delay="300">
|
||||||
<div class="comment-list-item-name one-line-text max-w-[300px] font-medium text-[var(--color-text-1)]">
|
<div class="comment-list-item-name one-line-text max-w-[300px] font-medium text-[var(--color-text-1)]">
|
||||||
{{ item.userName }}
|
{{ item.userName }}
|
||||||
</div>
|
</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
<a-divider
|
||||||
|
v-if="props.showStepDetailTrigger && item.caseEditType == 'STEP' && item.showResult"
|
||||||
|
direction="vertical"
|
||||||
|
margin="8px"
|
||||||
|
></a-divider>
|
||||||
|
<StepDetailTrigger
|
||||||
|
v-if="props.showStepDetailTrigger && item.caseEditType == 'STEP' && item.showResult"
|
||||||
|
:steps-text="item.stepsText"
|
||||||
|
/>
|
||||||
|
<a-divider direction="vertical" margin="8px"></a-divider>
|
||||||
<div v-if="item.status === 'PASS'" class="flex items-center">
|
<div v-if="item.status === 'PASS'" class="flex items-center">
|
||||||
<MsIcon type="icon-icon_succeed_filled" class="mr-[4px] text-[rgb(var(--success-6))]" />
|
<MsIcon type="icon-icon_succeed_filled" class="mr-[4px] text-[rgb(var(--success-6))]" />
|
||||||
{{ t('caseManagement.caseReview.pass') }}
|
{{ t('caseManagement.caseReview.pass') }}
|
||||||
|
@ -87,6 +97,7 @@
|
||||||
import MSAvatar from '@/components/pure/ms-avatar/index.vue';
|
import MSAvatar from '@/components/pure/ms-avatar/index.vue';
|
||||||
import MsEmpty from '@/components/pure/ms-empty/index.vue';
|
import MsEmpty from '@/components/pure/ms-empty/index.vue';
|
||||||
import { CommentItem } from '@/components/business/ms-comment/types';
|
import { CommentItem } from '@/components/business/ms-comment/types';
|
||||||
|
import StepDetailTrigger from '@/views/case-management/caseManagementFeature/components/stepDetailTrigger.vue';
|
||||||
|
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import { characterLimit } from '@/utils';
|
import { characterLimit } from '@/utils';
|
||||||
|
@ -97,6 +108,7 @@
|
||||||
reviewCommentList: any[];
|
reviewCommentList: any[];
|
||||||
activeComment: string;
|
activeComment: string;
|
||||||
notShowReviewName?: boolean;
|
notShowReviewName?: boolean;
|
||||||
|
showStepDetailTrigger?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
v-show="activeComment === 'reviewComment' || activeComment === 'executiveComment'"
|
v-show="activeComment === 'reviewComment' || activeComment === 'executiveComment'"
|
||||||
:review-comment-list="reviewCommentList"
|
:review-comment-list="reviewCommentList"
|
||||||
:active-comment="activeComment"
|
:active-comment="activeComment"
|
||||||
|
show-step-detail-trigger
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -9,31 +9,14 @@
|
||||||
<div class="one-line-text max-w-[300px] font-medium text-[var(--color-text-1)]">{{ item.userName }}</div>
|
<div class="one-line-text max-w-[300px] font-medium text-[var(--color-text-1)]">{{ item.userName }}</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-divider
|
<a-divider
|
||||||
v-if="props.showStepDetailTrigger && item.caseEditType == 'STEP'"
|
v-if="props.showStepDetailTrigger && item.caseEditType == 'STEP' && item.showResult"
|
||||||
direction="vertical"
|
direction="vertical"
|
||||||
margin="8px"
|
margin="8px"
|
||||||
></a-divider>
|
></a-divider>
|
||||||
<a-trigger
|
<StepDetailTrigger
|
||||||
v-if="props.showStepDetailTrigger && item.caseEditType == 'STEP'"
|
v-if="props.showStepDetailTrigger && item.caseEditType == 'STEP' && item.showResult"
|
||||||
trigger="click"
|
:steps-text="item.stepsExecResult"
|
||||||
position="bottom"
|
/>
|
||||||
:popup-translate="[0, 4]"
|
|
||||||
>
|
|
||||||
<MsButton type="text" class="!mr-0">
|
|
||||||
{{ t('system.orgTemplate.stepDetail') }}
|
|
||||||
</MsButton>
|
|
||||||
<template #content>
|
|
||||||
<div class="step-detail-trigger-content">
|
|
||||||
<StepDetail
|
|
||||||
:step-list="getStepData(item.stepsExecResult)"
|
|
||||||
is-disabled
|
|
||||||
is-preview
|
|
||||||
is-test-plan
|
|
||||||
:is-disabled-test-plan="false"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</a-trigger>
|
|
||||||
<a-divider direction="vertical" margin="8px"></a-divider>
|
<a-divider direction="vertical" margin="8px"></a-divider>
|
||||||
<div v-if="item.status === 'SUCCESS'" class="flex items-center">
|
<div v-if="item.status === 'SUCCESS'" class="flex items-center">
|
||||||
<MsIcon type="icon-icon_succeed_filled" class="mr-[4px] text-[rgb(var(--success-6))]" />
|
<MsIcon type="icon-icon_succeed_filled" class="mr-[4px] text-[rgb(var(--success-6))]" />
|
||||||
|
@ -76,13 +59,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
import MsAvatar from '@/components/pure/ms-avatar/index.vue';
|
import MsAvatar from '@/components/pure/ms-avatar/index.vue';
|
||||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
|
||||||
import MsEmpty from '@/components/pure/ms-empty/index.vue';
|
import MsEmpty from '@/components/pure/ms-empty/index.vue';
|
||||||
import StepDetail from '@/views/case-management/caseManagementFeature/components/addStep.vue';
|
import StepDetail from '@/views/case-management/caseManagementFeature/components/addStep.vue';
|
||||||
|
import StepDetailTrigger from '@/views/case-management/caseManagementFeature/components/stepDetailTrigger.vue';
|
||||||
|
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import { characterLimit } from '@/utils';
|
import { characterLimit } from '@/utils';
|
||||||
|
@ -125,11 +107,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.step-detail-trigger-content {
|
|
||||||
padding: 16px;
|
|
||||||
width: 700px;
|
|
||||||
border-radius: var(--border-radius-medium);
|
|
||||||
box-shadow: 0 4px 10px -1px rgb(100 100 102 / 15%);
|
|
||||||
@apply bg-white;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue