fix(测试跟踪): 测试计划分享功能用例统计无法展示

--bug=1015668 --user=陈建星 【测试跟踪】测试计划-详情中报告统计-分享链接中没有功能用例统计信息 {#_orginal_url#}
This commit is contained in:
chenjianxing 2022-08-04 17:26:59 +08:00 committed by jianxing
parent 32a2c4f506
commit 9e34a7a328
2 changed files with 7 additions and 4 deletions

View File

@ -10,7 +10,7 @@
</template> </template>
<functional-cases :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId" @setSize="setFailureSize"/> <functional-cases :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId" @setSize="setFailureSize"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane v-if="issueEnable && (isTemplate || hasPermission('PROJECT_TRACK_ISSUE:READ'))" name="third"> <el-tab-pane v-if="issueEnable && (isTemplate || isShare || hasPermission('PROJECT_TRACK_ISSUE:READ'))" name="third">
<template v-slot:label> <template v-slot:label>
<tab-pane-count :title="$t('test_track.report.issue_list')" :count="issueSize"/> <tab-pane-count :title="$t('test_track.report.issue_list')" :count="issueSize"/>
</template> </template>

View File

@ -16,7 +16,7 @@
<script> <script>
import MsDrawer from "@/business/components/common/components/MsDrawer"; import MsDrawer from "@/business/components/common/components/MsDrawer";
import {DEFAULT_LANGUAGE, EN_US} from "@/common/js/constants"; import {DEFAULT_LANGUAGE, EN_US, ZH_CN} from "@/common/js/constants";
import {getCurrentUser} from "@/common/js/utils"; import {getCurrentUser} from "@/common/js/utils";
export default { export default {
name: "TestPlanReportNavigationBar", name: "TestPlanReportNavigationBar",
@ -80,8 +80,11 @@ export default {
}, },
computed: { computed: {
navBtnClass() { navBtnClass() {
let lang = getCurrentUser().language; let user = getCurrentUser();
if (!lang) { let lang = ZH_CN;
if (user && user.language) {
lang = user.language;
} else {
lang = localStorage.getItem(DEFAULT_LANGUAGE); lang = localStorage.getItem(DEFAULT_LANGUAGE);
} }
if (lang === EN_US) { if (lang === EN_US) {