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

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

View File

@ -4,7 +4,7 @@
<el-tab-pane v-if="resultEnable" :label="$t('test_track.report.test_result')" name="first"> <el-tab-pane v-if="resultEnable" :label="$t('test_track.report.test_result')" name="first">
<functional-result :function-result="report.functionResult"/> <functional-result :function-result="report.functionResult"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane v-if="issueEnable && (isTemplate || hasPermission('PROJECT_TRACK_ISSUE:READ'))" name="second"> <el-tab-pane v-if="issueEnable && (isTemplate || isShare || hasPermission('PROJECT_TRACK_ISSUE:READ'))" name="second">
<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

@ -22,7 +22,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",
@ -95,8 +95,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) {