From dae39dea7e2874ebe2f17438949255ce8331ecef Mon Sep 17 00:00:00 2001 From: 董国庆 <364620639@qq.com> Date: 星期四, 26 六月 2025 19:30:45 +0800 Subject: [PATCH] 修改权限 --- laboratory/src/views/reportLibrary/verificationRelease/add.vue | 33 ++++++++++++++++++++++----------- 1 files changed, 22 insertions(+), 11 deletions(-) diff --git a/laboratory/src/views/reportLibrary/verificationRelease/add.vue b/laboratory/src/views/reportLibrary/verificationRelease/add.vue index 7ec8069..098cb22 100644 --- a/laboratory/src/views/reportLibrary/verificationRelease/add.vue +++ b/laboratory/src/views/reportLibrary/verificationRelease/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() { @@ -123,11 +127,13 @@ 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.fileList = res.feasibilityReportFiles.map(file => { + return { + name: file.fileName, + url: getFullUrl(file.fileUrl), + uid: file.id + } + }) this.form.feasibilityReportFiles = res.fileList } else { this.fileList = [] @@ -154,7 +160,6 @@ customUploadRequest({ file, onSuccess: (res) => { - console.log() if (res.code === 200) { const fileObj = { id: new Date().getTime(), @@ -197,7 +202,6 @@ } }, submit() { - console.log(this.$refs.materialEditor.getContent()); if (this.tableData.length == 0) { this.$message.error('请选择项目组') return @@ -221,7 +225,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) } @@ -230,7 +234,7 @@ addData({ ...data }).then(res => { if (res.code === 200) { this.$message.success('发布成功') - this.$router.back() + this.back() } else { this.$message.error(res.message) } @@ -242,6 +246,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 = { @@ -260,7 +271,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) } @@ -269,7 +280,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