From c04bbbbe82d0f1ee4bd01ba2ca9f2b3c0b71425e Mon Sep 17 00:00:00 2001 From: whychdw <49690745@qq.com> Date: 星期三, 26 五月 2021 10:22:37 +0800 Subject: [PATCH] 提交内容 --- src/pages/test/testManager/testing.vue | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/pages/test/testManager/testing.vue b/src/pages/test/testManager/testing.vue index 9a60e0c..2097e5f 100644 --- a/src/pages/test/testManager/testing.vue +++ b/src/pages/test/testManager/testing.vue @@ -43,7 +43,7 @@ <el-button type="primary" size="mini" @click="goTest">杩涘叆璇曢獙</el-button> </div> </test-card> - <test-card no-footer> + <test-card no-footer v-if="stepShow"> <div slot="title" class="page-panel-title"> <span class="title-pillar"></span> 璇曢獙杩涘害 @@ -61,6 +61,8 @@ getExitTest, experimentPoint } from "@/pages/test/js/api"; + import {getItemByValue} from "@/assets/js/tools"; + import {constTestType} from "@/pages/test/js/const"; export default { name: "testManagerTesting", components: { @@ -71,7 +73,8 @@ data() { return { info: {}, - list: [] + list: [], + stepShow: false, } }, methods: { @@ -101,13 +104,21 @@ let rs = res.data; if (rs.code == 1) { this.info = rs.data; - if (this.info.type == "fz") { - this.info.typeName = "璐熻浇璇曢獙" - } else if (this.info.type == "kz") { - this.info.typeName = "绌鸿浇璇曢獙" + let type = this.info.type; + let testInfo = getItemByValue(type, constTestType); + if (testInfo != -1) { + this.info.typeName = testInfo.label; + this.stepShow = testInfo.step; + // 鏄剧ず娴嬭瘯姝ラ + if(this.stepShow) { + this.experimentPoint(rs.data.id); + } + + }else { + this.info.typeName = "鏈煡璇曢獙绫诲瀷"; } - console.log(this.info) - this.experimentPoint(rs.data.id) + + } else { this.dialogVisible = true; } -- Gitblit v1.9.1