File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 79
79
<v-card >
80
80
<div class =" cardContent" >
81
81
<template v-if =" updateStatus == 1 " >
82
- {{ counter }} %
82
+ <h3 >{{ counter }} %</h3 >
83
+ <br >
84
+ {{ updateStatusText }}
83
85
84
86
</template >
85
87
<template v-if =" updateStatus == 2 " >
86
- {{ updateStatusText }}
88
+
87
89
</template >
88
90
<template v-if =" updateStatus == 0 " >
89
91
<v-text-field label =" Seleziona il pacchetto di aggiornamento" @click =' pickFile' v-model =' fileName' prepend-icon =' attach_file' ></v-text-field >
90
92
<input type =" file" style =" display : none " ref =" file" @change =" onFilePicked" >
91
- <v-btn @click =" upload" color =" error" >Conferma</v-btn >
93
+ <v-btn v-if = " this.fileObj " @click =" upload" color =" error" >Conferma</v-btn >
92
94
</template >
93
95
</div >
94
96
</v-card >
@@ -270,17 +272,21 @@ export default {
270
272
headers: { ' Content-Type' : ' multipart/form-data' },
271
273
onUploadProgress : progressEvent => {
272
274
this .counter = Math .floor ((progressEvent .loaded * 100 ) / progressEvent .total );
275
+ if (this .counter == 100 ){
276
+ this .updateStatusText = ' Upload completato. Aggiornamento in corso...'
277
+ }
273
278
}
274
279
}
275
280
this .updateStatus = 1
276
- this .$axios .post (this .CB + ' /uploadFile' , formdata, config).then (result => {
281
+
282
+ this .$axios .post (this .CB + ' /uploadFile' , formdata, config).then (function (result ) {
277
283
this .uploadCompleted = true ;
278
284
this .uploadInProgress = false ;
279
285
console .dir (result .data );
280
- this . updateStatus = 2
286
+
281
287
this .updateStatusText = ' Upload completato. Aggiornamento in corso...'
282
288
283
- })
289
+ }. bind ( this ) )
284
290
285
291
},
286
292
restoreConfig () {
You can’t perform that action at this time.
0 commit comments