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