From 209f69d7592f105763e5adde5f847e51faa30582 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Tue, 25 Jun 2024 17:05:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/task/list/components/checkUnit.vue | 64 ++++++++++++++++++-- 1 file changed, 60 insertions(+), 4 deletions(-) diff --git a/src/views/task/list/components/checkUnit.vue b/src/views/task/list/components/checkUnit.vue index a218462..50543cb 100644 --- a/src/views/task/list/components/checkUnit.vue +++ b/src/views/task/list/components/checkUnit.vue @@ -278,8 +278,22 @@ - + +
+
+
+ 附件: +
+
+ + 点击上传 + +
+
+
@@ -670,10 +684,12 @@ '' }
) } - }], + }], + train_files_list:[], trainForm: { train_score: '', - train_feedback: '' + train_feedback: '', + file_ids:'' }, rateValue: '', trainLogTable: [{ @@ -714,6 +730,25 @@ label: "培训反馈", prop: 'train_feedback', align: 'left', + }, + { + label: "附件", + prop: 'files', + align: 'left', + customFn: (row) => { + return (
{ + row.files && row.files.length > 0 ? + row.files.map(item => { + return (
{ + item.original_name + }
) + }) : + '' + }
) + } } ], @@ -1147,6 +1182,12 @@ }, handlesuccess(response, file, fileList) { this.my_uploads_list = fileList + }, + handleRemoveTrain(file, fileList) { + this.train_files_list = fileList + }, + handlesuccessTrain(response, file, fileList) { + this.train_files_list = fileList }, submitFeedback() { if (this.type == 'train') { @@ -1156,7 +1197,22 @@ message: '请提交培训评价' }) return - } + } + let _files = [] + if (this.train_files_list.length > 0) { + for (var h of this.train_files_list) { + if (h.response) { + _files.push(h.response.id) + } else { + _files.push(h.id) + } + } + this.trainForm.file_ids = _files + } else { + this.trainForm.file_ids = [] + } + console.log("this.trainForm",this.trainForm) + // return savetrain({ mission_id: this.id, ...this.trainForm