From b72d612f6a5a79bc6526b0dc90abdb43ea0eafa8 Mon Sep 17 00:00:00 2001 From: wzl <1720360649@qq.com> Date: Thu, 15 Aug 2024 21:32:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=83=E7=90=86=E5=BB=BA=E6=A8=A1=E9=97=AE?= =?UTF-8?q?=E5=8D=B7=E8=B0=83=E6=95=B4=E4=B8=BA=E5=BF=83=E7=90=86=E9=87=8F?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/psychological-modeling/index.vue | 13 +++++++- src/views/psychological-scale/index.vue | 37 +++++++++++++++------- 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/src/views/psychological-modeling/index.vue b/src/views/psychological-modeling/index.vue index 57dd666..42ab929 100644 --- a/src/views/psychological-modeling/index.vue +++ b/src/views/psychological-modeling/index.vue @@ -185,7 +185,18 @@ export default { } }, toQuestion() { - this.$router.replace(`/PsychologicalQuestionnaire?uid=${this.uid}`); + // this.$router.replace(`/PsychologicalQuestionnaire?uid=${this.uid}`); + + // 2024.08.15 问卷填写变更为心理量表 + this.$router.replace({ + name: 'PsychologicalScale', + query: { + uid: this.uid, + accessToken: this.$store.getters.ssjlToken, + showLeftArrow: this.showLeftArrow, + isModel: true, + }, + }) }, api(url, config, token) { let baseUrl = diff --git a/src/views/psychological-scale/index.vue b/src/views/psychological-scale/index.vue index b10198f..7702bbb 100644 --- a/src/views/psychological-scale/index.vue +++ b/src/views/psychological-scale/index.vue @@ -124,7 +124,8 @@ export default { select: [], isError: null, //是否是答题错误 fromSsjl: this.$store.getters.fromSsjl, - showLeftArrow:false, + showLeftArrow: false, + isModel: false, } }, mounted() { @@ -151,6 +152,11 @@ export default { this.fromUrl = params.fromUrl console.log('fromUrl', this.fromUrl) + // 是否从建模页过来 + if (params.isModel) { + this.isModel = true + } + //初始化 this.init() } else { @@ -262,16 +268,25 @@ export default { this.$toast('问卷提交成功', 3000) this.isError = false setTimeout(() => { - // 2023.09.25 使用此返回方法可能会导致页面返回异常,故使用路由跳转到指定页面 - this.$router.replace({ - name: 'PsychologicalScaleDetail', - query: { - id: re.response.Id, - uid: this.uid, - accessToken: this.$store.getters.ssjlToken, - showLeftArrow:this.showLeftArrow, - }, - }) + if (this.isModel) { + // 建模页跳转过来的要回建模页 + this.$router.replace({ + name: 'PsychologicalModeling', + query: { + uid: this.uid, + }, + }) + } else { + this.$router.replace({ + name: 'PsychologicalScaleDetail', + query: { + id: re.response.Id, + uid: this.uid, + accessToken: this.$store.getters.ssjlToken, + showLeftArrow: this.showLeftArrow, + }, + }) + } }, 3000) } else { //this.$toast(re.msg);