comparison client/src/components/importconfiguration/types/Soundingresults.vue @ 3947:5da5de770ec4

sr_upload: negate-z-index checkbox added
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 15 Jul 2019 11:45:59 +0200
parents 95d6112629f5
children 5020128dc5a0
comparison
equal deleted inserted replaced
3946:d668742c8978 3947:5da5de770ec4
103 <span class="text-left text-danger"> 103 <span class="text-left text-danger">
104 <small v-if="!importDate"> 104 <small v-if="!importDate">
105 <translate>Please enter a date</translate> 105 <translate>Please enter a date</translate>
106 </small> 106 </small>
107 </span> 107 </span>
108 </div>
109 <div class="ml-3 text-left d-flex flex-column">
110 <div class="text-left">
111 <small class="text-muted">
112 <translate>Invert z-index</translate>
113 </small>
114 </div>
115 <div class="ml-4 mt-2 text-left">
116 <input
117 id="negatez"
118 type="checkbox"
119 class="form-check-input"
120 v-model="negateZ"
121 />
122 </div>
108 </div> 123 </div>
109 </div> 124 </div>
110 </div> 125 </div>
111 <div class="mt-2"> 126 <div class="mt-2">
112 <div v-if="uploadState" class="input-group px-2"> 127 <div v-if="uploadState" class="input-group px-2">
217 uploadLabel: this.$gettext(this.$options.UPLOADLABEL), 232 uploadLabel: this.$gettext(this.$options.UPLOADLABEL),
218 uploadFile: null, 233 uploadFile: null,
219 disableUpload: false, 234 disableUpload: false,
220 token: null, 235 token: null,
221 messages: [], 236 messages: [],
222 eMailNotification: false 237 eMailNotification: false,
238 negateZ: false
223 }; 239 };
224 }, 240 },
225 methods: { 241 methods: {
226 back() { 242 back() {
227 this.$store.commit("importschedule/setListMode"); 243 this.$store.commit("importschedule/setListMode");
278 .then(response => { 294 .then(response => {
279 if (response.data.meta) { 295 if (response.data.meta) {
280 const { bottleneck, date, epsg } = response.data.meta; 296 const { bottleneck, date, epsg } = response.data.meta;
281 const depthReference = response.data.meta["depth-reference"]; 297 const depthReference = response.data.meta["depth-reference"];
282 const singlebeam = response.data.meta["single-beam"]; 298 const singlebeam = response.data.meta["single-beam"];
299 this.negateZ = response.data.meta["negate-z"];
283 this.bottleneck = this.bottlenecks.find( 300 this.bottleneck = this.bottlenecks.find(
284 bn => bn.properties.objnam === bottleneck 301 bn => bn.properties.objnam === bottleneck
285 ); 302 );
286 this.depthReference = depthReference; 303 this.depthReference = depthReference;
287 this.importDate = new Date(date).toISOString().split("T")[0]; 304 this.importDate = new Date(date).toISOString().split("T")[0];
316 if (this.beamType) 333 if (this.beamType)
317 formData.append( 334 formData.append(
318 "single-beam", 335 "single-beam",
319 this.beamType === this.$options.BEAMTYPES.SINGLEBEAM 336 this.beamType === this.$options.BEAMTYPES.SINGLEBEAM
320 ); 337 );
321 338 formData.append("negate-z", this.negateZ == true);
322 HTTP.post("/imports/sr", formData, { 339 HTTP.post("/imports/sr", formData, {
323 headers: { 340 headers: {
324 "X-Gemma-Auth": localStorage.getItem("token"), 341 "X-Gemma-Auth": localStorage.getItem("token"),
325 "Content-Type": "multipart/form-data" 342 "Content-Type": "multipart/form-data"
326 } 343 }
430 "depth-reference": this.depthReference, 447 "depth-reference": this.depthReference,
431 bottleneck: this.bottleneck.properties.objnam, 448 bottleneck: this.bottleneck.properties.objnam,
432 date: this.importDate, 449 date: this.importDate,
433 "single-beam": 450 "single-beam":
434 this.beamType === this.$options.BEAMTYPES.SINGLEBEAM, 451 this.beamType === this.$options.BEAMTYPES.SINGLEBEAM,
435 epsg: Number(this.projection) 452 epsg: Number(this.projection),
453 "negate-z": this.negateZ == true
436 }) 454 })
437 ) 455 )
438 ); 456 );
439 } 457 }
440 }, 458 },