From 0449db2d4d4d25a49a855d199695788c7d1ca3d2 Mon Sep 17 00:00:00 2001 From: whychdw <49690745@qq.com> Date: 星期三, 26 五月 2021 11:18:12 +0800 Subject: [PATCH] 路由跳转修改 --- src/pages/test/testManager/testing.vue | 12 ++++++++---- src/pages/test/js/const.js | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/pages/test/js/const.js b/src/pages/test/js/const.js index 042a1ac..817b0af 100644 --- a/src/pages/test/js/const.js +++ b/src/pages/test/js/const.js @@ -2,19 +2,19 @@ { label: '绌鸿浇璇曢獙', value: 'kz', - route: '/index/windingTest', + route: '/index/noLoadTest', step: true, // 鏄惁鏈夎瘯楠屾楠� }, { label: '璐熻浇璇曢獙', value: 'fz', - route: '/index/noLoadTest', + route: '/index/loadTest', step: true, // 鏄惁鏈夎瘯楠屾楠� }, { label: '缁曢樆璇曢獙', value: 'rz', - route: '/index/loadTest', + route: '/index/windingTest', step: false, } ]; \ No newline at end of file diff --git a/src/pages/test/testManager/testing.vue b/src/pages/test/testManager/testing.vue index 2097e5f..d64f2b4 100644 --- a/src/pages/test/testManager/testing.vue +++ b/src/pages/test/testManager/testing.vue @@ -75,6 +75,7 @@ info: {}, list: [], stepShow: false, + route: "", } }, methods: { @@ -109,6 +110,7 @@ if (testInfo != -1) { this.info.typeName = testInfo.label; this.stepShow = testInfo.step; + this.route = testInfo.route; // 鏄剧ず娴嬭瘯姝ラ if(this.stepShow) { this.experimentPoint(rs.data.id); @@ -116,6 +118,7 @@ }else { this.info.typeName = "鏈煡璇曢獙绫诲瀷"; + this.route = ""; } @@ -127,11 +130,12 @@ }); }, goTest() { - if (this.info.type == "fz") { - this.$router.push('/index/loadTest'); - } else if (this.info.type == "kz") { - this.$router.push('/index/noLoadTest'); + if(this.route) { + this.$router.push(this.route); + }else { + this.$layer.msg('鏈煡璇曢獙绫诲瀷锛�'); } + } }, computed: {}, -- Gitblit v1.9.1