comparison client/src/components/importschedule/Importscheduledetail.vue @ 1996:fda5c78fb7d3 importschedulerefac

moved components
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 24 Jan 2019 13:43:36 +0100
parents 29f02d0043a9
children 74c03fec0a91
comparison
equal deleted inserted replaced
1992:29f02d0043a9 1996:fda5c78fb7d3
70 </div> 70 </div>
71 </div> 71 </div>
72 72
73 <Availablefairwaydepth 73 <Availablefairwaydepth
74 v-if="import_ == $options.IMPORTTYPES.FAIRWAYAVAILABILITY" 74 v-if="import_ == $options.IMPORTTYPES.FAIRWAYAVAILABILITY"
75 @urlChanged="setUrl"
76 :url="url"
75 ></Availablefairwaydepth> 77 ></Availablefairwaydepth>
76 <Bottleneck 78 <Bottleneck
77 v-if="import_ == $options.IMPORTTYPES.BOTTLENECK" 79 v-if="import_ == $options.IMPORTTYPES.BOTTLENECK"
80 @urlChanged="setUrl"
81 :url="url"
78 ></Bottleneck> 82 ></Bottleneck>
79 <Distancemarksvirtual 83 <Distancemarksvirtual
80 v-if="import_ == $options.IMPORTTYPES.DISTANCEMARKSVIRTUAL" 84 v-if="import_ == $options.IMPORTTYPES.DISTANCEMARKSVIRTUAL"
85 @urlChanged="setUrl"
86 @usernameChanged="setUsername"
87 @passwordChanged="setPassword"
88 :url="url"
89 :username="username"
90 :password="password"
81 ></Distancemarksvirtual> 91 ></Distancemarksvirtual>
82 <Faiwaydimensions 92 <Faiwaydimensions
83 v-if="import_ == $options.IMPORTTYPES.FAIRWAYDIMENSION" 93 v-if="import_ == $options.IMPORTTYPES.FAIRWAYDIMENSION"
94 @urlChanged="setUrl"
95 @featureTypeChanged="setFeatureType"
96 @sortByChanged="setSortBy"
97 @LOSChanged="setLOS"
98 @depthChanged="setDepth"
99 @minWidthChanged="setMinWidth"
100 @maxWidthChanged="setMaxWidth"
101 @sourceOrganizationChanged="setSourceOrganization"
102 :url="url"
103 :featureType="featureType"
104 :sortBy="sortBy"
105 :LOS="LOS"
106 :minWidth="minWidth"
107 :maxWidth="maxWidth"
108 :sourceOrganization="sourceOrganization"
109 :depth="depth"
84 ></Faiwaydimensions> 110 ></Faiwaydimensions>
85 <Gaugemeasurement 111 <Gaugemeasurement
86 v-if="import_ == $options.IMPORTTYPES.GAUGEMEASUREMENT" 112 v-if="import_ == $options.IMPORTTYPES.GAUGEMEASUREMENT"
113 @urlChanged="setUrl"
114 :url="url"
87 ></Gaugemeasurement> 115 ></Gaugemeasurement>
88 <Waterwayarea 116 <Waterwayarea
89 v-if="import_ == $options.IMPORTTYPES.WATERWAYAREA" 117 v-if="import_ == $options.IMPORTTYPES.WATERWAYAREA"
118 @urlChanged="setUrl"
119 @featureTypeChanged="setFeatureType"
120 @sortByChanged="setSortBy"
121 :url="url"
122 :featureType="featureType"
123 :sortBy="sortBy"
90 ></Waterwayarea> 124 ></Waterwayarea>
91 <Waterwaygauges 125 <Waterwaygauges
92 v-if="import_ == $options.IMPORTTYPES.WATERWAYGAUGES" 126 v-if="import_ == $options.IMPORTTYPES.WATERWAYGAUGES"
127 @urlChanged="setUrl"
128 @usernameChanged="setUsername"
129 @passwordChanged="setPassword"
130 :url="url"
131 :username="username"
132 :password="password"
93 ></Waterwaygauges> 133 ></Waterwaygauges>
94 <Waterwayaxis 134 <Waterwayaxis
95 v-if="import_ == $options.IMPORTTYPES.WATERWAYAXIS" 135 v-if="import_ == $options.IMPORTTYPES.WATERWAYAXIS"
136 @urlChanged="setUrl"
137 @featureTypeChanged="setFeatureType"
138 @sortByChanged="setSortBy"
139 :url="url"
140 :featureType="featureType"
141 :sortBy="sortBy"
96 ></Waterwayaxis> 142 ></Waterwayaxis>
97 143
98 <div class="d-flex flex-row"> 144 <div class="d-flex flex-row">
99 <div class="flex-column mt-3 mr-4"> 145 <div class="flex-column mt-3 mr-4">
100 <div class="flex-row text-left"> 146 <div class="flex-row text-left">
342 import app from "@/main.js"; 388 import app from "@/main.js";
343 389
344 export default { 390 export default {
345 name: "importscheduledetail", 391 name: "importscheduledetail",
346 components: { 392 components: {
347 Availablefairwaydepth: () => import("./Availablefairwaydepth"), 393 Availablefairwaydepth: () =>
348 Bottleneck: () => import("./Bottleneck"), 394 import("@/components/importschedule/importtypes/Availablefairwaydepth"),
349 Distancemarksvirtual: () => import("./Distancemarksvirtual"), 395 Bottleneck: () =>
350 Faiwaydimensions: () => import("./Fairwaydimensions"), 396 import("@/components/importschedule/importtypes/Bottleneck"),
351 Gaugemeasurement: () => import("./Gaugemeasurement"), 397 Distancemarksvirtual: () =>
352 Waterwayarea: () => import("./Waterwayarea"), 398 import("@/components/importschedule/importtypes/Distancemarksvirtual"),
353 Waterwaygauges: () => import("./Waterwaygauges"), 399 Faiwaydimensions: () =>
354 Waterwayaxis: () => import("./Waterwayaxis") 400 import("@/components/importschedule/importtypes/Fairwaydimensions"),
401 Gaugemeasurement: () =>
402 import("@/components/importschedule/importtypes/Gaugemeasurement"),
403 Waterwayarea: () =>
404 import("@/components/importschedule/importtypes/Waterwayarea"),
405 Waterwaygauges: () =>
406 import("@/components/importschedule/importtypes/Waterwaygauges"),
407 Waterwayaxis: () =>
408 import("@/components/importschedule/importtypes/Waterwayaxis")
355 }, 409 },
356 data() { 410 data() {
357 return { 411 return {
358 passwordVisible: false, 412 passwordVisible: false,
359 ...initializeCurrentSchedule() 413 ...initializeCurrentSchedule()
431 } 485 }
432 } 486 }
433 }, 487 },
434 computed: { 488 computed: {
435 ...mapState("imports", ["importScheduleDetailVisible", "currentSchedule"]), 489 ...mapState("imports", ["importScheduleDetailVisible", "currentSchedule"]),
436 showPassword() {
437 if (this.passwordVisible) return "text";
438 return "password";
439 },
440 dialogLabel() { 490 dialogLabel() {
441 if (this.id) return this.$gettext("Import") + " " + this.id; 491 if (this.id) return this.$gettext("Import") + " " + this.id;
442 return this.$gettext("New Import"); 492 return this.$gettext("New Import");
443 } 493 }
444 }, 494 },
445 methods: { 495 methods: {
496 setUrl(value) {
497 this.url = value;
498 },
499 setFeatureType(value) {
500 this.featureType = value;
501 },
502 setSortBy(value) {
503 this.sortBy = value;
504 },
505 setUsername(value) {
506 this.username = value;
507 },
508 setPassword(value) {
509 this.password = value;
510 },
511 setLOS(value) {
512 this.LOS = value;
513 },
514 setMinWidth(value) {
515 this.minWidth = value;
516 },
517 setMaxWidth(value) {
518 this.maxWidth = value;
519 },
520 setDepth(value) {
521 this.depth = value;
522 },
523 setSourceOrganization(value) {
524 this.sourceOrganization = value;
525 },
446 calcCronString() { 526 calcCronString() {
447 let getValue = value => { 527 let getValue = value => {
448 return this[value] ? this[value] : "*"; 528 return this[value] ? this[value] : "*";
449 }; 529 };
450 if (this.cronMode === "15minutes") return "0 */15 * * * *"; 530 if (this.cronMode === "15minutes") return "0 */15 * * * *";