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/dataManagement/confirmation-sheet/components/add.vue |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/laboratory/src/views/dataManagement/confirmation-sheet/components/add.vue b/laboratory/src/views/dataManagement/confirmation-sheet/components/add.vue
index 4870fb5..a7a53da 100644
--- a/laboratory/src/views/dataManagement/confirmation-sheet/components/add.vue
+++ b/laboratory/src/views/dataManagement/confirmation-sheet/components/add.vue
@@ -63,7 +63,7 @@
 import AddTestItem from './add-test-item.vue'
 import ConfirmDialog from './confirm-dialog.vue'
 import { add, update, getDetail } from '../service'
-
+import { mapState } from "vuex";
 export default {
   name: 'AddConfirmationSheet',
   components: {
@@ -120,6 +120,9 @@
       this.getDetailData(id)
     }
   },
+  computed: {
+    ...mapState(["tagList", "isFold"]),
+  },
   mounted() { },
   methods: {
     setSelectedScheduling(data) {
@@ -133,7 +136,7 @@
         planCode: selectedData.projectName || '', // 所属项目课题方案
         planName: selectedData.experimentCode || '', // 实验编号
         testName: selectedData.experimentName || '', // 实验名称
-        notifyTime: selectedData.experimentDate || '', // 通知时间
+        notifyTime: selectedData.createTime || '', // 通知时间
         startTime: selectedData.experimentStartTime || '', // 实验开始时间
         endTime: selectedData.experimentEndTime || '', // 实验结束时间
         participants: selectedData.participantsName || '', // 参加人员
@@ -184,7 +187,7 @@
             obj.roleId = this.$route.query.roleId
             edit(obj).then(() => {
               this.msgsuccess('保存成功')
-              this.$router.go(-1)
+              this.back()
             })
           } else {
             add(obj).then(() => {
@@ -194,7 +197,7 @@
                 remark: "",
               }
               this.menu = []
-              this.$router.go(-1)
+              this.back()
             })
           }
         }
@@ -370,28 +373,28 @@
             testId: item.testId
           }))
         }
-
-        // 打印提交参数
-        console.log('提交确认单参数:', JSON.stringify(submitData, null, 2))
-
-        // 根据是否有 id 决定调用新增还是更新接口
         if (this.formData.id) {
           submitData.id = this.formData.id
-          console.log('调用更新接口,参数:', JSON.stringify(submitData, null, 2))
           await update(submitData)
           this.$message.success('更新成功')
         } else {
-          console.log('调用新增接口,参数:', JSON.stringify(submitData, null, 2))
           await add(submitData)
           this.$message.success('提交成功')
         }
 
         this.confirmDialogVisible = false // 关闭弹窗
-        this.$router.go(-1)
+        this.back()
       } catch (error) {
         this.$message.error((this.formData.id ? '更新' : '提交') + '失败:' + (error.message || '未知错误'))
       }
     },
+    back() {
+      this.$router.back();
+      this.$store.commit(
+        "SET_TAGLIST",
+        this.tagList.filter((item) => item.path !== this.$route.path)
+      );
+    },
     async handleSaveDraft() {
       try {
         if (!this.selectedScheduling) {

--
Gitblit v1.7.1