diff --git a/src/views/modules/pallet/index.vue b/src/views/modules/pallet/index.vue
index 761e0be..78896ba 100644
--- a/src/views/modules/pallet/index.vue
+++ b/src/views/modules/pallet/index.vue
@@ -22,6 +22,7 @@ export default {
dataList:[],
queryLoading:false,
total:0,
+ exportLoading:false,
palletList:[],
batchVisible:false,
batchParams:{
@@ -201,7 +202,12 @@ export default {
this.$message.warning('Pallet Label data does not exist')
return
}
- exportPallet({}).then(response => {
+ let params = {
+ site:this.$store.state.user.site,
+ createBy:this.$store.state.user.name,
+ }
+ this.exportLoading = true;
+ exportPallet(params).then(response => {
const blob = new Blob([response.data], { type: response.headers['content-type'] });
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
@@ -214,6 +220,9 @@ export default {
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
+ this.exportLoading = false;
+ }).catch((error)=>{
+ this.exportLoading = false;
})
},
handleQuery(){
@@ -310,7 +319,14 @@ export default {
if (newVal === true){
setTimeout(()=>{
this.saveLoading = false
- },3000)
+ },30000)
+ }
+ },
+ exportLoading(newVal,oldVal){
+ if (newVal === true){
+ setTimeout(()=>{
+ this.exportLoading = false
+ },30000)
}
}
},
@@ -331,7 +347,7 @@ export default {
Batch Processing
Clear All Data
- Export
+ Export