From be31adc8150e5b21008aa7d6212fc105fc425818 Mon Sep 17 00:00:00 2001 From: pyt <626651354@qq.com> Date: 星期二, 01 七月 2025 15:31:39 +0800 Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory --- laboratory/src/views/reportLibrary/processDevelopment/add.vue | 35 +++++++++++++++++++++++------------ 1 files changed, 23 insertions(+), 12 deletions(-) diff --git a/laboratory/src/views/reportLibrary/processDevelopment/add.vue b/laboratory/src/views/reportLibrary/processDevelopment/add.vue index 26b30f6..716ec66 100644 --- a/laboratory/src/views/reportLibrary/processDevelopment/add.vue +++ b/laboratory/src/views/reportLibrary/processDevelopment/add.vue @@ -81,6 +81,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: { AiEditor, @@ -115,6 +116,9 @@ this.getDetail() } }, + computed: { + ...mapState(["tagList", "isFold"]), + }, methods: { getDetail() { @@ -122,12 +126,14 @@ this.form = res this.tableData = [{ ...res.projectTeam, staffName: res.staffNames }] if (res.feasibilityReportFiles && res.feasibilityReportFiles.length > 0) { - this.fileList = res.feasibilityReportFiles.map(file => ({ - name: file.fileName, - url: getFullUrl(file.fileUrl), - uid: file.id - })) - this.form.feasibilityReportFiles = res.fileList + this.fileList = res.feasibilityReportFiles.map(file => { + return { + name: file.fileName, + url: getFullUrl(file.fileUrl), + uid: file.id + } + }) + this.form.feasibilityReportFiles = res.feasibilityReportFiles } else { this.fileList = [] this.form.feasibilityReportFiles = [] @@ -152,7 +158,6 @@ customUploadRequest({ file, onSuccess: (res) => { - console.log() if (res.code === 200) { const fileObj = { id: new Date().getTime(), @@ -195,7 +200,6 @@ } }, submit() { - console.log(this.$refs.materialEditor.getContent()); if (this.tableData.length == 0) { this.$message.error('请选择项目组') return @@ -219,7 +223,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) } @@ -228,7 +232,7 @@ addData({ ...data }).then(res => { if (res.code === 200) { this.$message.success('发布成功') - this.$router.back() + this.back() } else { this.$message.error(res.message) } @@ -240,6 +244,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 = { @@ -258,7 +269,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) } @@ -267,7 +278,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