comparison client/src/components/importconfiguration/types/Soundingresults.vue @ 3714:73589ed481f5

import_soundingresults: send 'beam-type: multi-|single-beam'
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 20 Jun 2019 13:06:45 +0200
parents 9eab897f66b6
children e1972355fcfb
comparison
equal deleted inserted replaced
3713:ac168fcf210e 3714:73589ed481f5
311 if (this.importDate) 311 if (this.importDate)
312 formData.append("date", this.importDate.split("T")[0]); 312 formData.append("date", this.importDate.split("T")[0]);
313 if (this.depthReference) 313 if (this.depthReference)
314 formData.append("depth-reference", this.depthReference); 314 formData.append("depth-reference", this.depthReference);
315 if (this.projection) formData.append("epsg", this.projection); 315 if (this.projection) formData.append("epsg", this.projection);
316 if (this.beamType) 316 if (this.beamType) formData.append("beam-type", this.beamType);
317 formData.append(
318 "single-beam",
319 this.beamType === this.$options.BEAMTYPES.SINGLEBEAM
320 );
321 317
322 HTTP.post("/imports/sr", formData, { 318 HTTP.post("/imports/sr", formData, {
323 headers: { 319 headers: {
324 "X-Gemma-Auth": localStorage.getItem("token"), 320 "X-Gemma-Auth": localStorage.getItem("token"),
325 "Content-Type": "multipart/form-data" 321 "Content-Type": "multipart/form-data"
428 encodeURIComponent( 424 encodeURIComponent(
429 JSON.stringify({ 425 JSON.stringify({
430 "depth-reference": this.depthReference, 426 "depth-reference": this.depthReference,
431 bottleneck: this.bottleneck.properties.objnam, 427 bottleneck: this.bottleneck.properties.objnam,
432 date: this.importDate, 428 date: this.importDate,
433 "single-beam": 429 "beam-type": this.beamType,
434 this.beamType === this.$options.BEAMTYPES.SINGLEBEAM,
435 projection: this.projection 430 projection: this.projection
436 }) 431 })
437 ) 432 )
438 ); 433 );
439 } 434 }
449 } 444 }
450 return []; 445 return [];
451 } 446 }
452 }, 447 },
453 BEAMTYPES: { 448 BEAMTYPES: {
454 MULTIBEAM: "multibeam", 449 MULTIBEAM: "multi-beam",
455 SINGLEBEAM: "singlebeam" 450 SINGLEBEAM: "single-beam"
456 }, 451 },
457 UPLOADLABEL: "choose a .zip or .txt file", 452 UPLOADLABEL: "choose a .zip or .txt file",
458 on: "on", 453 on: "on",
459 off: "off" 454 off: "off"
460 }; 455 };