Commit dbb93f9c authored by rencs's avatar rencs

Merge branch 'dev_ren' into 'dev'

1.11 uploaderr

See merge request !45
parents 02b26e42 a01bd003
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
:action="BASE_API + '/api/datacenter/bg/gtdata/upload'" :action="BASE_API + '/api/datacenter/bg/gtdata/upload'"
:before-upload="showLoading" :before-upload="showLoading"
:on-success="handleDataUpSuccess" :on-success="handleDataUpSuccess"
:on-error="uploadErr"
:headers="getHeaderWithToken" :headers="getHeaderWithToken"
:show-file-list="false" :show-file-list="false"
v-loading.fullscreen.lock="fullscreenLoading" v-loading.fullscreen.lock="fullscreenLoading"
...@@ -410,6 +411,10 @@ export default { ...@@ -410,6 +411,10 @@ export default {
showLoading() { showLoading() {
this.fullscreenLoading = true; this.fullscreenLoading = true;
}, },
uploadErr() {
this.fullscreenLoading = false;
this.$message.error("上传失败,请重试!");
},
handleDataUpSuccess(res, file) { handleDataUpSuccess(res, file) {
this.fullscreenLoading = false; this.fullscreenLoading = false;
this.ruleForm.imageInfoRelationList.push({ this.ruleForm.imageInfoRelationList.push({
......
...@@ -162,6 +162,7 @@ ...@@ -162,6 +162,7 @@
:action="BASE_API + '/api/datacenter/bg/gtdata/upload'" :action="BASE_API + '/api/datacenter/bg/gtdata/upload'"
:before-upload="showLoading" :before-upload="showLoading"
:on-success="handleDataUpSuccess" :on-success="handleDataUpSuccess"
:on-error="uploadErr"
:headers="getHeaderWithToken" :headers="getHeaderWithToken"
:show-file-list="false" :show-file-list="false"
v-loading.fullscreen.lock="fullscreenLoading" v-loading.fullscreen.lock="fullscreenLoading"
...@@ -371,6 +372,10 @@ export default { ...@@ -371,6 +372,10 @@ export default {
showLoading() { showLoading() {
this.fullscreenLoading = true; this.fullscreenLoading = true;
}, },
uploadErr() {
this.fullscreenLoading = false;
this.$message.error("上传失败,请重试!");
},
handleDataUpSuccess(res, file) { handleDataUpSuccess(res, file) {
this.fullscreenLoading = false; this.fullscreenLoading = false;
this.form.sourceFile = res.data.path; 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