Commit bcb66369 authored by rencs's avatar rencs

Merge branch 'dev_ren' into 'master'

1.11 uploaderr

See merge request !44
parents ac342a81 a01bd003
......@@ -59,6 +59,7 @@
:action="BASE_API + '/api/datacenter/bg/gtdata/upload'"
:before-upload="showLoading"
:on-success="handleDataUpSuccess"
:on-error="uploadErr"
:headers="getHeaderWithToken"
:show-file-list="false"
v-loading.fullscreen.lock="fullscreenLoading"
......@@ -410,6 +411,10 @@ export default {
showLoading() {
this.fullscreenLoading = true;
},
uploadErr() {
this.fullscreenLoading = false;
this.$message.error("上传失败,请重试!");
},
handleDataUpSuccess(res, file) {
this.fullscreenLoading = false;
this.ruleForm.imageInfoRelationList.push({
......
......@@ -162,6 +162,7 @@
:action="BASE_API + '/api/datacenter/bg/gtdata/upload'"
:before-upload="showLoading"
:on-success="handleDataUpSuccess"
:on-error="uploadErr"
:headers="getHeaderWithToken"
:show-file-list="false"
v-loading.fullscreen.lock="fullscreenLoading"
......@@ -371,6 +372,10 @@ export default {
showLoading() {
this.fullscreenLoading = true;
},
uploadErr() {
this.fullscreenLoading = false;
this.$message.error("上传失败,请重试!");
},
handleDataUpSuccess(res, file) {
this.fullscreenLoading = false;
this.form.sourceFile = res.data.path;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment