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);