From 718a13554dbb2f99e27adeb7b95edfc3096dacc5 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期四, 26 六月 2025 14:24:27 +0800
Subject: [PATCH] 删除打印和路由返回

---
 laboratory/src/views/reportLibrary/feasibilityReport/add.vue |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/laboratory/src/views/reportLibrary/feasibilityReport/add.vue b/laboratory/src/views/reportLibrary/feasibilityReport/add.vue
index a624d54..96c17c5 100644
--- a/laboratory/src/views/reportLibrary/feasibilityReport/add.vue
+++ b/laboratory/src/views/reportLibrary/feasibilityReport/add.vue
@@ -80,6 +80,7 @@
 import chooseProject from '@/components/chooseProject'
 import { addData, getDetail, editData } from './service'
 import { customUploadRequest, getFullUrl } from '@/utils/utils'
+import { mapState } from "vuex";
 
 export default {
     components: {
@@ -115,6 +116,9 @@
             this.getDetail()
         }
     },
+    computed: {
+    ...mapState(["tagList", "isFold"]),
+  },
 
     methods: {
         getDetail() {
@@ -217,7 +221,7 @@
                         editData({ ...data, id: this.$route.query.id }).then(res => {
                             if (res.code === 200) {
                                 this.$message.success('修改成功')
-                                this.$router.back()
+                                this.back()
                             } else {
                                 this.$message.error(res.message)
                             }
@@ -226,7 +230,7 @@
                         addData({ ...data }).then(res => {
                             if (res.code === 200) {
                                 this.$message.success('发布成功')
-                                this.$router.back()
+                                this.back()
                             } else {
                                 this.$message.error(res.message)
                             }
@@ -237,6 +241,13 @@
                 }
             })
         },
+        back() {
+      this.$router.back();
+      this.$store.commit(
+        "SET_TAGLIST",
+        this.tagList.filter((item) => item.path !== this.$route.path)
+      );
+    },
         save() {
             this.$refs.form.validate((valid) => {
                 let data = {
@@ -255,7 +266,7 @@
                         editData({ ...data, id: this.$route.query.id }).then(res => {
                             if (res.code === 200) {
                                 this.$message.success('修改成功')
-                                this.$router.back()
+                                this.back()
                             } else {
                                 this.$message.error(res.message)
                             }
@@ -264,7 +275,7 @@
                         addData({ ...data }).then(res => {
                             if (res.code === 200) {
                                 this.$message.success('发布成功')
-                                this.$router.back()
+                                this.back()
                             } else {
                                 this.$message.error(res.message)
                             }

--
Gitblit v1.7.1