Commit 4997ebff authored by rencs's avatar rencs

1.11 upload

parent e7aff3e1
......@@ -57,9 +57,11 @@
<el-upload
class="upload-demo"
:action="BASE_API + '/api/datacenter/bg/gtdata/upload'"
:before-upload="showLoading"
:on-success="handleDataUpSuccess"
:headers="getHeaderWithToken"
:show-file-list="false"
v-loading.fullscreen.lock="fullscreenLoading"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
......@@ -290,6 +292,7 @@ export default {
}
};
return {
fullscreenLoading: false,
BASE_API: process.env.BASE_API,
//1--影像美图 2--专题图 3--遥感成果图
imageTypes: {
......@@ -404,7 +407,11 @@ export default {
});
});
},
showLoading() {
this.fullscreenLoading = true;
},
handleDataUpSuccess(res, file) {
this.fullscreenLoading = false;
this.ruleForm.imageInfoRelationList.push({
url: res.data.path,
price: 0,
......
......@@ -160,9 +160,11 @@
<el-upload
class="upload-demo"
:action="BASE_API + '/api/datacenter/bg/gtdata/upload'"
:before-upload="showLoading"
:on-success="handleDataUpSuccess"
:headers="getHeaderWithToken"
:show-file-list="false"
v-loading.fullscreen.lock="fullscreenLoading"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
......@@ -304,6 +306,7 @@ export default {
currentFirstType: "",
secondTypes: [],
currentSecondType: "",
fullscreenLoading: false,
};
},
watch: {
......@@ -365,7 +368,11 @@ export default {
this.$bus.$emit("hideThreeRoute", true);
},
methods: {
showLoading() {
this.fullscreenLoading = true;
},
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