@@ -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 (
)
+ }) :
+ ''
+ }
)
+ }
}
],
@@ -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