fix(测试跟踪): 测试计划报告导航栏定位失效

--bug=1021015 --user=陈建星 【测试跟踪】测试计划-报告-点击目录不会到对应页面 https://www.tapd.cn/55049933/s/1326289
This commit is contained in:
chenjianxing 2023-01-11 17:01:21 +08:00 committed by jianxing
parent 01a6d23356
commit 2dd275ea22
2 changed files with 18 additions and 7 deletions

View File

@ -1,6 +1,6 @@
<template>
<ms-container>
<ms-main-container class="report-content">
<ms-main-container class="report-content" :class="isShare || isDb || isTemplate? 'full-screen-container' : 'with-header-container'" id = "planReportContainer">
<el-card v-loading="loading">
<test-plan-report-buttons :is-db="isDb" :plan-id="planId" :is-share="isShare" :report="report"
v-if="!isTemplate && !isShare"/>
@ -190,13 +190,17 @@ export default {
if (!this.isTemplate) {
if (this.isShare) {
getShareTestPlanExtReport(this.shareId, this.planId, this.reportId).then((response) => {
this.runMode = response.data.runMode;
this.resourcePool = response.data.resourcePool;
if (response.data) {
this.runMode = response.data.runMode;
this.resourcePool = response.data.resourcePool;
}
});
} else {
getTestPlanExtReport(this.planId, this.reportId).then((response) => {
this.runMode = response.data.runMode;
this.resourcePool = response.data.resourcePool;
if (response.data) {
this.runMode = response.data.runMode;
this.resourcePool = response.data.resourcePool;
}
});
}
}
@ -336,8 +340,15 @@ export default {
<style scoped>
.with-header-container {
height: calc(100vh - 60px);
}
.full-screen-container {
height: calc(100vh - 10px);
}
.el-card {
/*width: 95% !important;*/
padding: 15px;
}

View File

@ -74,7 +74,7 @@ export default {
watch: {
activeName() {
let target = document.getElementById(this.activeName);
target.parentNode.parentNode.parentNode.scrollTop = target.offsetTop - 100;
document.getElementById('planReportContainer').scrollTop = target.offsetTop - 100;
},
overviewEnable() {
this.setData();