From 5c33f154e1ba712833d566ba2591c9095a13aad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com> Date: Wed, 20 Mar 2024 11:33:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/addQuestionnaire/index.vue | 18 ++++++++++++++--- src/views/system/question/index.vue | 22 ++++++++++++--------- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/views/system/addQuestionnaire/index.vue b/src/views/system/addQuestionnaire/index.vue index 1427579..549a76f 100644 --- a/src/views/system/addQuestionnaire/index.vue +++ b/src/views/system/addQuestionnaire/index.vue @@ -1033,7 +1033,11 @@ export default { cancelButtonText: '取消', type: 'success' }).then(() => { - this.$router.go(-1); + this.$store.dispatch('tagsView/delView', this.$route).then(({ visitedViews }) => { + this.$router.push({ + path: "/question/question", + }); + }) }).catch(() => { this.$modal.msgSuccess("编辑保存成功"); }); @@ -1045,7 +1049,11 @@ export default { cancelButtonText: '取消', type: 'success' }).then(() => { - this.$router.go(-1); + this.$store.dispatch('tagsView/delView', this.$route).then(({ visitedViews }) => { + this.$router.push({ + path: "/question/question", + }); + }) }).catch(() => { this.$modal.msgSuccess("新增保存成功"); }); @@ -1108,7 +1116,11 @@ export default { }) }, goback() { - this.$router.go(-1); + this.$store.dispatch('tagsView/delView', this.$route).then(({ visitedViews }) => { + this.$router.push({ + path: "/question/question", + }); + }) }, } }; diff --git a/src/views/system/question/index.vue b/src/views/system/question/index.vue index ed52632..654733d 100644 --- a/src/views/system/question/index.vue +++ b/src/views/system/question/index.vue @@ -259,18 +259,22 @@ export default { }, /** 新增按钮操作 */ handleAdd() { - this.$router.push({ - path: "/question/addQuestionnaire", - }); + this.$store.dispatch('tagsView/delView', this.$route).then(({ visitedViews }) => { + this.$router.push({ + path: "/question/addQuestionnaire", + }); + }) }, /** 修改按钮操作 */ handleUpdate(row) { - this.$router.push({ - path: "/question/addQuestionnaire", - query: { - id: row.id, - }, - }); + this.$store.dispatch('tagsView/delView', this.$route).then(({ visitedViews }) => { + this.$router.push({ + path: "/question/addQuestionnaire", + query: { + id: row.id, + }, + }); + }) }, /** 删除按钮操作 */ handleDelete(row) {