| | |
| | | </span> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item label=" 日志类型"> |
| | | <a-form-model-item label=" 日志主类型"> |
| | | <a-select v-model="form.blogType" mode="default" placeholder="" |
| | | :getPopupContainer="getCalendarContainer()"> |
| | | <a-select-option value="1"> |
| | |
| | | html |
| | | </a-select-option> |
| | | <a-select-option value="3"> |
| | | video |
| | | 视频 |
| | | </a-select-option> |
| | | <a-select-option value="4"> |
| | | 音频 |
| | | </a-select-option> |
| | | <a-select-option value="5"> |
| | | fast(闪念) |
| | | 图组 |
| | | </a-select-option> |
| | | <a-select-option value="9"> |
| | | taking |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | |
| | | myFileInfoUpload(formData).then((res) => { |
| | | if (res.success) { |
| | | this.$message.success('上传成功') |
| | | |
| | | option.onSuccess(res, option.file) |
| | | // 在上传成功后进度条显示为99 |
| | | progress.percent = 100 |
| | | } else { |
| | | this.$message.error('上传失败:' + res.message) |
| | | } |
| | | }) |
| | | |
| | | let progress = { |
| | | percent: 1 |
| | | } |
| | | let speed = 100 / (option.file.size / 65000) //上传速度 |
| | | const intervalId = setInterval(() => { |
| | | // 控制进度条防止在未上传成功时进度条达到100 |
| | | if (progress.percent < 99 && progress.percent + speed < 100) { |
| | | progress.percent += speed //控制进度条速度 |
| | | option.onProgress(progress) //onProgress接收一个对象{ percent: 进度 }在进度条上显示 |
| | | } else if ((progress.percent < 100)) { |
| | | progress.percent++ |
| | | } else if (progress.percent >= 100) { |
| | | clearInterval(intervalId) |
| | | } |
| | | }, 500) |
| | | |
| | | |
| | | }, |
| | | disabledDate(current) { |
| | | return current < moment().subtract(1, "day"); |