fix(测试跟踪): 公共用例部分信息显示问题

--bug=1024428 --user=宋昌昌 【测试跟踪】公共用例库-查看用例,显示信息有误 https://www.tapd.cn/55049933/s/1350683
This commit is contained in:
song-cc-rock 2023-03-15 17:40:43 +08:00 committed by jianxing
parent a8bf475116
commit a213eeff50
4 changed files with 20 additions and 5 deletions

View File

@ -27,6 +27,7 @@
ref="versionHistory" ref="versionHistory"
:current-id="currentTestCaseInfo.id" :current-id="currentTestCaseInfo.id"
:is-read="readOnly" :is-read="readOnly"
:is-public-show="isPublicShow"
:current-version-id="form.versionId" :current-version-id="form.versionId"
@confirmOtherInfo="confirmOtherInfo" @confirmOtherInfo="confirmOtherInfo"
:current-project-id="projectId" :current-project-id="projectId"
@ -197,7 +198,7 @@
</div> </div>
</div> </div>
<!-- 检测版本 是否不是最新 --> <!-- 检测版本 是否不是最新 -->
<div class="diff-latest-container" v-if="!editable && versionEnable && !isLastedVersion"> <div class="diff-latest-container" v-if="!editable && versionEnable && !isLastedVersion && !isPublicShow">
<div class="left-view-row"> <div class="left-view-row">
<div class="view-icon"><img src="/assets/module/figma/icon_warning_colorful.svg" alt=""></div> <div class="view-icon"><img src="/assets/module/figma/icon_warning_colorful.svg" alt=""></div>
<div class="view-content">{{$t("case.current_display_history_version")}}</div> <div class="view-content">{{$t("case.current_display_history_version")}}</div>
@ -220,6 +221,7 @@
:is-copy="isCopy" :is-copy="isCopy"
:copy-case-id="caseId" :copy-case-id="caseId"
:label-width="formLabelWidth" :label-width="formLabelWidth"
:is-public-show="isPublicShow"
:case-id="caseId" :case-id="caseId"
:type="!caseId ? 'add' : 'edit'" :type="!caseId ? 'add' : 'edit'"
:comments.sync="comments" :comments.sync="comments"

View File

@ -208,7 +208,7 @@
:type="type" :type="type"
:isCopy="isCopy" :isCopy="isCopy"
:copyCaseId="copyCaseId" :copyCaseId="copyCaseId"
:readOnly="readOnly && editable" :readOnly="(readOnly && editable) || isPublicShow"
:projectId="projectId" :projectId="projectId"
:isClickAttachmentTab="isClickAttachmentTab" :isClickAttachmentTab="isClickAttachmentTab"
:isDelete="!isTestPlan" :isDelete="!isTestPlan"
@ -268,7 +268,8 @@ export default {
projectId: String, projectId: String,
copyCaseId: String, copyCaseId: String,
isCopy: Boolean, isCopy: Boolean,
editableState: Boolean editableState: Boolean,
isPublicShow: Boolean
}, },
methods: { methods: {
getUploadFiles() { getUploadFiles() {

View File

@ -17,6 +17,7 @@
:read-only="readOnly || !editable" :read-only="readOnly || !editable"
:project-id="projectId" :project-id="projectId"
:is-copy="isCopy" :is-copy="isCopy"
:is-public-show="isPublicShow"
:copy-case-id="copyCaseId" :copy-case-id="copyCaseId"
:isClickAttachmentTab="isClickAttachmentTab" :isClickAttachmentTab="isClickAttachmentTab"
:isTestPlan="isTestPlan" :isTestPlan="isTestPlan"
@ -98,7 +99,7 @@
</el-scrollbar> </el-scrollbar>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('case.comment')" name="comment"> <el-tab-pane :label="$t('case.comment')" name="comment" v-if="!isPublicShow">
<span slot="label"> <span slot="label">
{{ $t('case.comment') }} {{ $t('case.comment') }}
<div class="el-step__icon is-text ms-api-col ms-header" v-if="comments && comments.length > 0"> <div class="el-step__icon is-text ms-api-col ms-header" v-if="comments && comments.length > 0">
@ -158,6 +159,7 @@
:copy-case-id="copyCaseId" :copy-case-id="copyCaseId"
:isClickAttachmentTab="isClickAttachmentTab" :isClickAttachmentTab="isClickAttachmentTab"
:isTestPlan="isTestPlan" :isTestPlan="isTestPlan"
:is-public-show="isPublicShow"
:editable="editable" :editable="editable"
:editable-state="editableState" :editable-state="editableState"
:form="form" :form="form"
@ -216,7 +218,8 @@ export default {
"isClickAttachmentTab", "isClickAttachmentTab",
"defaultOpen", "defaultOpen",
"edit", "edit",
"editableState" "editableState",
"isPublicShow"
], ],
data() { data() {
return { return {

View File

@ -1,6 +1,14 @@
<template> <template>
<div class="version-history-box"> <div class="version-history-box">
<span v-if="isPublicShow">
<slot
name="versionLabel"
v-if="versionEnable && currentVersion.id"
></slot>
</span>
<el-popover <el-popover
v-else
:append-to-body="false" :append-to-body="false"
placement="bottom-start" placement="bottom-start"
width="392" width="392"
@ -172,6 +180,7 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
isPublicShow: Boolean
}, },
data() { data() {
return { return {