培训资料

master
lion 1 year ago
parent 517385eab3
commit 209f69d759

@ -278,8 +278,22 @@
</Rate> </Rate>
</div> </div>
</div> </div>
</div> </div>
<div>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>附件
</div>
<div class="xy-table-item-content">
<el-upload :action="action" multiple class='upload-demo' :file-list="train_files_list"
ref="pictureUpload" style="width:400px" :auto-upload="true" :data="uploadOther"
:on-success="handlesuccessTrain" :on-remove="handleRemoveTrain">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</div>
</div>
</div>
<div> <div>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
@ -670,10 +684,12 @@
'' ''
} </div>) } </div>)
} }
}], }],
train_files_list:[],
trainForm: { trainForm: {
train_score: '', train_score: '',
train_feedback: '' train_feedback: '',
file_ids:''
}, },
rateValue: '', rateValue: '',
trainLogTable: [{ trainLogTable: [{
@ -714,6 +730,25 @@
label: "培训反馈", label: "培训反馈",
prop: 'train_feedback', prop: 'train_feedback',
align: 'left', align: 'left',
},
{
label: "附件",
prop: 'files',
align: 'left',
customFn: (row) => {
return ( <div> {
row.files && row.files.length > 0 ?
row.files.map(item => {
return ( <div> <a target = '_blank'
href = {
item.url
}> {
item.original_name
} </a></div > )
}) :
''
} </div>)
}
} }
], ],
@ -1147,6 +1182,12 @@
}, },
handlesuccess(response, file, fileList) { handlesuccess(response, file, fileList) {
this.my_uploads_list = fileList this.my_uploads_list = fileList
},
handleRemoveTrain(file, fileList) {
this.train_files_list = fileList
},
handlesuccessTrain(response, file, fileList) {
this.train_files_list = fileList
}, },
submitFeedback() { submitFeedback() {
if (this.type == 'train') { if (this.type == 'train') {
@ -1156,7 +1197,22 @@
message: '请提交培训评价' message: '请提交培训评价'
}) })
return 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({ savetrain({
mission_id: this.id, mission_id: this.id,
...this.trainForm ...this.trainForm

Loading…
Cancel
Save