fix: 测试计划报告导出html目录功能无效

This commit is contained in:
chenjianxing 2021-09-01 19:17:21 +08:00 committed by jianxing
parent b295fd6c26
commit 6e6d83681c
4 changed files with 11 additions and 4 deletions

View File

@ -4,7 +4,7 @@
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "export NODE_OPTIONS=--max_old_space_size=4096 && vue-cli-service build",
"build": "vue-cli-service build",
"build-win": "SET NODE_OPTIONS=--max_old_space_size=4096 && vue-cli-service build",
"lint": "vue-cli-service lint"
},

View File

@ -11,7 +11,7 @@
<test-plan-load-report v-if="loadEnable" :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
</el-card>
</el-main>
<test-plan-report-navigation-bar/>
<test-plan-report-navigation-bar :is-template="isTemplate"/>
</div>
</template>

View File

@ -19,6 +19,9 @@ import MsDrawer from "@/business/components/common/components/MsDrawer";
export default {
name: "TestPlanReportNavigationBar",
components: {MsDrawer},
props: {
isTemplate: Boolean,
},
data() {
return {
asideHidden: true,
@ -50,10 +53,14 @@ export default {
watch: {
activeName() {
let url = new URL(window.location.href);
if (this.isTemplate) {
window.location.href = window.location.href.split('#')[0] + '#' + this.activeName;
} else {
window.location.href = url.origin + '#' + this.activeName;
}
}
}
}
</script>
<style scoped>

View File

@ -20,7 +20,7 @@ export default {
/*color: white;*/
color: #783887;
height: 20px;
border: 0px;
border: 0px !important;
/*border-radius: 42%;*/
/*margin-left: 4px;*/
}