fix(测试跟踪): 公共用例显示信息有误

--bug=1024428 --user=宋昌昌 【测试跟踪】公共用例库-查看用例,显示信息有误 https://www.tapd.cn/55049933/s/1351406
This commit is contained in:
song-cc-rock 2023-03-16 14:37:00 +08:00 committed by jianxing
parent cc06e1a758
commit c1010441cb
5 changed files with 33 additions and 29 deletions

View File

@ -59,6 +59,7 @@ export default {
default: false,
},
apiUrl: String,
isPublicShow: Boolean
},
watch: {
"comment.description": {
@ -83,6 +84,9 @@ export default {
return name.substring(0, 2).toUpperCase();
},
openEdit() {
if (this.isPublicShow) {
return;
}
if (getCurrentUser().id !== this.comment.author) {
this.$warning(this.$t("test_track.comment.cannot_edit"), false);
return;
@ -97,6 +101,9 @@ export default {
this.editComment(description);
},
deleteComment() {
if (this.isPublicShow) {
return;
}
if (getCurrentUser().id !== this.comment.author) {
this.$warning(this.$t("test_track.comment.cannot_delete"), false);
return;

View File

@ -11,6 +11,7 @@
api-url="/test/case"
@refresh="getComments"
:readOnly="readOnly"
:is-public-show="isPublicShow"
></case-comment-view-item>
</div>
</div>
@ -25,6 +26,7 @@ export default {
type: Boolean,
default: false,
},
isPublicShow: Boolean
},
components: {
CaseCommentViewItem,

View File

@ -99,7 +99,7 @@
</el-scrollbar>
</div>
</el-tab-pane>
<el-tab-pane :label="$t('case.comment')" name="comment" v-if="!isPublicShow">
<el-tab-pane :label="$t('case.comment')" name="comment">
<span slot="label">
{{ $t('case.comment') }}
<div class="el-step__icon is-text ms-api-col ms-header" v-if="comments && comments.length > 0">
@ -113,6 +113,7 @@
<el-scrollbar>
<div class="content-container">
<case-comment-viewer
:is-public-show="isPublicShow"
@getComments="getComments"
:comments="comments"
ref="commentRef"
@ -138,7 +139,7 @@
</div>
</el-tab-pane>
</el-tabs>
<div class="comment-common">
<div class="comment-common" v-if="!isPublicShow">
<case-comment-component
:case-id="caseId"
:read-only="readOnly"

View File

@ -10,28 +10,11 @@
:screen-height="null"
@refresh="getTableData"
>
<ms-table-column
min-width="200px"
width="200px"
v-if="relationshipType === 'POST'"
:label="$t('commons.relationship.type')"
>
<template>
<div class="pos-label">
{{ $t("commons.relationship.current_case") }}
</div>
<div class="pos-type pos-left-margin">
{{ $t("commons.relationship.after_finish") }}
</div>
</template>
</ms-table-column>
<ms-table-column
prop="targetCustomNum"
v-if="isCustomNum"
:label="$t('commons.id')"
sortable
min-width="100px"
width="100px"
/>
@ -40,7 +23,6 @@
v-else
:label="$t('commons.id')"
sortable
min-width="100px"
width="100px"
/>
@ -48,8 +30,7 @@
prop="targetName"
:label="$t('case.case_name')"
sortable
min-width="256px"
width="256px"
width="200px"
/>
<ms-table-column
@ -57,7 +38,6 @@
prop="versionId"
:label="$t('commons.version')"
sortable
min-width="100px"
width="100px"
>
<template v-slot:default="scope">
@ -68,13 +48,12 @@
<ms-table-column
prop="creator"
:label="$t('commons.create_user')"
min-width="120"
width="100"
>
</ms-table-column>
<ms-table-column
prop="status"
min-width="100px"
width="100px"
:label="$t('api_test.definition.api_case_status')"
>
@ -82,9 +61,9 @@
<status-table-item :value="$t(statusMap.get(row.status))" />
</template>
</ms-table-column>
<ms-table-column
width="200px"
min-width="200px"
width="150px"
v-if="relationshipType === 'PRE'"
:label="$t('commons.relationship.type')"
>
@ -99,6 +78,21 @@
</ms-table-column>
</ms-table>
<ms-table-column
width="150px"
v-if="relationshipType === 'POST'"
:label="$t('commons.relationship.type')"
>
<template>
<div class="pos-label">
{{ $t("commons.relationship.current_case") }}
</div>
<div class="pos-type pos-left-margin">
{{ $t("commons.relationship.after_finish") }}
</div>
</template>
</ms-table-column>
<relationship-functional-relevance
:case-id="caseId"
:version-enable="versionEnable"

View File

@ -22,7 +22,7 @@
</el-col>
<el-col :span="12" :offset="1">
<el-form-item :label="$t('commons.tag')" :label-width="formLabelWidth" prop="tag">
<ms-input-tag :currentScenario="form" ref="tag" size="-" v-if="isStepTableAlive"/>
<ms-input-tag :currentScenario="form" ref="tag" v-if="isStepTableAlive"/>
</el-form-item>
</el-col>
</el-row>
@ -125,7 +125,7 @@
import TestPlanStatusButton from "../../plan/common/TestPlanStatusButton";
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
import {listenGoBack, removeGoBackListener} from "metersphere-frontend/src/utils"
import MsInputTag from "metersphere-frontend/src/components/MsInputTag";
import MsInputTag from "metersphere-frontend/src/components/new-ui/MsInputTag";
import i18n from "@/i18n";
import {getMaintainer} from "@/api/project";
import {saveOrUpdateTestCaseReview} from "@/api/test-review";