|
|
@ -32,6 +32,7 @@ |
|
|
|
<el-form-item label="上传" prop="source"> |
|
|
|
<el-form-item label="上传" prop="source"> |
|
|
|
<el-upload |
|
|
|
<el-upload |
|
|
|
:accept="acceptExt" |
|
|
|
:accept="acceptExt" |
|
|
|
|
|
|
|
:before-upload="handleUploadChange" |
|
|
|
:on-remove="handleRemove" |
|
|
|
:on-remove="handleRemove" |
|
|
|
:on-error="uploadError" |
|
|
|
:on-error="uploadError" |
|
|
|
:on-success="uploadSuccess" |
|
|
|
:on-success="uploadSuccess" |
|
|
@ -170,6 +171,7 @@ export default { |
|
|
|
questionType: ['','单选题','多选题','判断题','简答题','填空题'], |
|
|
|
questionType: ['','单选题','多选题','判断题','简答题','填空题'], |
|
|
|
fillList: [''], |
|
|
|
fillList: [''], |
|
|
|
uploadList: [], |
|
|
|
uploadList: [], |
|
|
|
|
|
|
|
uploading: false |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
@ -310,7 +312,7 @@ export default { |
|
|
|
this.topicForm[`option${this.options[i]}`] = n |
|
|
|
this.topicForm[`option${this.options[i]}`] = n |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(this.uploading) return this.$message.warning('视频正在上传,请稍等') |
|
|
|
this.topicForm.userId = this.userId |
|
|
|
this.topicForm.userId = this.userId |
|
|
|
if(this.topicForm.id) { |
|
|
|
if(this.topicForm.id) { |
|
|
|
this.$post(this.api.updateQuestions,this.topicForm).then(res => { |
|
|
|
this.$post(this.api.updateQuestions,this.topicForm).then(res => { |
|
|
@ -407,6 +409,9 @@ export default { |
|
|
|
beforeRemove(file, fileList) { |
|
|
|
beforeRemove(file, fileList) { |
|
|
|
return this.$confirm(`确定移除 ${file.name}?`); |
|
|
|
return this.$confirm(`确定移除 ${file.name}?`); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
handleUploadChange(){ |
|
|
|
|
|
|
|
this.uploading = true |
|
|
|
|
|
|
|
}, |
|
|
|
handleRemove(file, fileList) { |
|
|
|
handleRemove(file, fileList) { |
|
|
|
this.uploadList = fileList |
|
|
|
this.uploadList = fileList |
|
|
|
}, |
|
|
|
}, |
|
|
|