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/chemistQa/projectTesting/addDetectionReport.vue | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/laboratory/src/views/chemistQa/projectTesting/addDetectionReport.vue b/laboratory/src/views/chemistQa/projectTesting/addDetectionReport.vue index cbd23d0..fb38599 100644 --- a/laboratory/src/views/chemistQa/projectTesting/addDetectionReport.vue +++ b/laboratory/src/views/chemistQa/projectTesting/addDetectionReport.vue @@ -99,7 +99,7 @@ import chooseProject from '@/components/chooseProject' import { addDetail, getDetailInfo, updateDetail, getDetail } from './service' import { customUploadRequest, getFullUrl } from '@/utils/utils' - +import { mapState } from "vuex"; export default { components: { AiEditor, @@ -142,9 +142,9 @@ this.form.commitPersonId = JSON.parse(sessionStorage.getItem('userInfo')).userId this.form.developDate = new Date().toISOString().split('T')[0]; - this.form.itemId = this.$route.query.itemId - if (this.form.itemId) { - getDetail(this.form.itemId).then(res => { + // this.form.itemId = this.$route.query.itemId + if (this.$route.query.itemId) { + getDetail(this.$route.query.itemId).then(res => { if (res) { let item = { teamName: res.projectTeamVO.teamName, @@ -156,6 +156,7 @@ createBy: res.createBy, createTime: res.createTime } + this.form.itemId = res.teamId this.tableData = [{ ...item }] } }) @@ -166,6 +167,9 @@ this.getDetail() } }, + computed: { + ...mapState(["tagList", "isFold"]), + }, methods: { getDetail() { @@ -220,7 +224,7 @@ console.log('res',res) if (res.code === 200) { this.$message.success('修改成功') - this.$router.back() + this.back() } else { this.$message.error(res.message || '修改失败') } @@ -233,7 +237,7 @@ console.log('res',res) if (res.code === 200) { this.$message.success('发布成功') - this.$router.back() + this.back() } else { this.$message.error(res.message || '发布失败') } @@ -259,7 +263,7 @@ updateDetail({ ...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 || '保存失败') } @@ -271,7 +275,7 @@ addDetail(data).then(res => { if (res.code === 200) { this.$message.success('草稿保存成功') - this.$router.back() + this.back() } else { this.$message.error(res.message || '保存失败') } @@ -281,6 +285,13 @@ } }) }, + back() { + this.$router.back(); + this.$store.commit( + "SET_TAGLIST", + this.tagList.filter((item) => item.path !== this.$route.path) + ); + }, // 上传前校验 beforeUpload(file) { return true; -- Gitblit v1.7.1