From 42feb0af0ae1d486d0474c76711fdb67c778bcf3 Mon Sep 17 00:00:00 2001 From: 董国庆 <364620639@qq.com> Date: 星期六, 28 六月 2025 10:04:30 +0800 Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory --- culture/src/views/strainReportLibrary/reportLibraryOneTWO/components/approval/index.vue | 28 +++++++++++++++++++++++++--- 1 files changed, 25 insertions(+), 3 deletions(-) diff --git a/culture/src/views/strainReportLibrary/reportLibraryOneTWO/components/approval/index.vue b/culture/src/views/strainReportLibrary/reportLibraryOneTWO/components/approval/index.vue index 441ecc0..a109b94 100644 --- a/culture/src/views/strainReportLibrary/reportLibraryOneTWO/components/approval/index.vue +++ b/culture/src/views/strainReportLibrary/reportLibraryOneTWO/components/approval/index.vue @@ -60,6 +60,20 @@ <div class="header-title" style="width: 100%;"> <div class="header-title-left"> <img src="@/assets/public/headercard.png" /> + <span>附件</span> + </div> + </div> + <el-form-item prop="name" style="margin-top: 38px"> + <el-upload action="#" :file-list="fileList" :http-request="handleUpload" + :before-upload="beforeUpload" :on-preview="handlePreview" :on-remove="handleRemove"> + <el-button size="small" type="primary">点击上传</el-button> + <div slot="tip" class="el-upload__tip">支持任意格式文件上传</div> + </el-upload> + </el-form-item> + + <div class="header-title" style="width: 100%;"> + <div class="header-title-left"> + <img src="@/assets/public/headercard.png" /> <div>菌种实验员操作评定</div> </div> </div> @@ -227,6 +241,7 @@ rule: '' } ], + fileList: [], // 附件列表 tableData: [], rules: {}, status: "2", @@ -235,13 +250,20 @@ }, computed: { dialogTitle() { - return !this.obj.isDetail? "审批" : "详情"; + return !this.obj.isDetail ? "审批" : "详情"; }, totalScore() { return this.assessmentTable.reduce((sum, item) => sum + (item.selectedScore || 0), 0); } }, methods: { + handlePreview(file) { + if (file.url) { + window.open(file.url, '_blank'); + } else { + this.$message.warning('无可预览地址'); + } + }, open() { if (!this.obj.id) { this.$message.error('缺少必要参数'); @@ -257,7 +279,7 @@ }; let arr = data.evaluate.split(',') - + this.fileList = (data.enclosureUrl ? JSON.parse(data.enclosureUrl) : []) this.assessmentTable = this.assessmentTable.map((item, index) => { item.selectedScore = Number(arr[index]) return item @@ -278,7 +300,7 @@ ] }); - if (data.status >=2) { + if (data.status >= 2) { processData.push({ type: data.status >= 2 && data.status != 4 ? "primary" : "danger", mode: "list", -- Gitblit v1.7.1