Mercurial > gemma
annotate client/src/components/fairway/AvailableFairwayDepthDialogue.vue @ 4412:14de1ea7000b
AFDepths: fix comparison
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 17 Sep 2019 17:05:14 +0200 |
parents | d6c38a22c71e |
children | 72de81520a6d |
rev | line source |
---|---|
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1 <template> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
2 <div |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
3 :class="[ |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
4 'box ui-element rounded bg-white text-nowrap', |
3231
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
5 { expanded: showFairwayDepth } |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
6 ]" |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
7 > |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
8 <div style="width: 18rem"> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
9 <UIBoxHeader icon="chart-line" :title="label" :closeCallback="close" /> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
10 <div class="box-body"> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
11 <UISpinnerOverlay v-if="loading" /> |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
12 <div class="mb-2 d-flex justify-content-between align-items-center"> |
3710
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
13 <div class="custom-control custom-radio custom-control-inline mr-2"> |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
14 <input |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
15 :value="$options.BOTTLENECK" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
16 type="radio" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
17 v-model="type" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
18 id="type-bottleneck" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
19 class="custom-control-input" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
20 /> |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
21 <label |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
22 class="custom-control-label small d-flex align-items-center" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
23 for="type-bottleneck" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
24 > |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
25 <translate>Bottlenecks</translate> |
3710
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
26 </label> |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
27 </div> |
3710
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
28 <div class="custom-control custom-radio custom-control-inline mr-2"> |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
29 <input |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
30 :value="$options.STRETCH" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
31 type="radio" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
32 v-model="type" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
33 id="type-stretch" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
34 class="custom-control-input" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
35 /> |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
36 <label |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
37 class="custom-control-label small d-flex align-items-center" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
38 for="type-stretch" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
39 > |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
40 <translate>Stretches</translate> |
3710
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
41 </label> |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
42 </div> |
3710
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
43 <div class="custom-control custom-radio custom-control-inline"> |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
44 <input |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
45 :value="$options.SECTION" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
46 type="radio" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
47 v-model="type" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
48 id="type-section" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
49 class="custom-control-input" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
50 /> |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
51 <label |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
52 class="custom-control-label small d-flex align-items-center" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
53 for="type-section" |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
54 > |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
55 <translate>Sections</translate> |
3710
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
56 </label> |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
57 </div> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
58 </div> |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
59 <select |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
60 v-if="type === $options.BOTTLENECK" |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
61 @change="entrySelected" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
62 class="form-control font-weight-bold" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
63 v-model="selectedEntry" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
64 > |
3315
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
65 <option :value="null">{{ placeholder }}</option> |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
66 <optgroup |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
67 v-for="(bottlenecksForCountry, cc) in orderedBottlenecks" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
68 :key="cc" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
69 :label="cc" |
3236
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
70 > |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
71 <option |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
72 v-for="bn in bottlenecksForCountry" |
3818
242057dbc8c3
fix bottleneckselection: use id as identifier
Thomas Junk <thomas.junk@intevation.de>
parents:
3710
diff
changeset
|
73 :key="bn.properties.id" |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
74 :value="bn" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
75 > |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
76 {{ bn.properties.name }} |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
77 </option> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
78 </optgroup> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
79 </select> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
80 <select |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
81 v-else-if="type === $options.STRETCH" |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
82 @change="entrySelected" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
83 class="form-control font-weight-bold" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
84 v-model="selectedEntry" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
85 > |
3315
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
86 <option :value="null">{{ placeholder }}</option> |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
87 <option |
3316
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
88 v-for="stretch in stretches" |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
89 :value="stretch" |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
90 :key="stretch.id" |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
91 > |
3316
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
92 {{ stretch.properties.name }} |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
93 </option> |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
94 </select> |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
95 <select |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
96 v-else-if="type === $options.SECTION" |
3316
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
97 @change="entrySelected" |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
98 class="form-control font-weight-bold" |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
99 v-model="selectedEntry" |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
100 > |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
101 <option :value="null">{{ placeholder }}</option> |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
102 <option |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
103 v-for="section in sections" |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
104 :value="section" |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
105 :key="section.id" |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
106 > |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
107 {{ section.properties.name }} |
c7b48272e11e
client: fairway availability: removed unnecessary computed property
Markus Kottlaender <markus@intevation.de>
parents:
3315
diff
changeset
|
108 </option> |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
109 </select> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
110 <div class="d-flex mt-2"> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
111 <div class="d-flex flex-column w-50 mr-1"> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
112 <small class="my-auto text-muted"> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
113 <translate>Type</translate> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
114 </small> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
115 <select |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
116 v-model="selectedFrequency" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
117 class="form-control form-control-sm" |
3236
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
118 > |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
119 <option |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
120 v-for="(option, index) in $options.FREQUENCIES" |
3572
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
121 :value="index" |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
122 :key="index" |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
123 > |
3572
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
124 {{ option }} |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
125 </option> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
126 </select> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
127 </div> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
128 <div class="d-flex flex-column w-50 ml-1"> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
129 <small class="my-auto text-muted"><translate>LOS</translate></small> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
130 <select v-model="los" class="form-control form-control-sm"> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
131 <option value="1">1</option> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
132 <option value="2">2</option> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
133 <option value="3">3</option> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
134 </select> |
3185
505414dfe3e7
available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents:
3184
diff
changeset
|
135 </div> |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
136 </div> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
137 <div class="d-flex mt-2"> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
138 <div class="d-flex flex-column w-50 mr-1"> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
139 <small for="from" class="my-auto text-muted"> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
140 <translate>Date from</translate> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
141 </small> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
142 <input |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
143 id="from" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
144 v-model="fromDate" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
145 class="form-control form-control-sm" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
146 type="date" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
147 /> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
148 </div> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
149 <div class="d-flex flex-column w-50 ml-1"> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
150 <small for="to" class="my-auto text-muted"> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
151 <translate>Date to</translate> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
152 </small> |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
153 <input |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
154 id="to" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
155 v-model="toDate" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
156 class="form-control form-control-sm" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
157 type="date" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
158 /> |
3185
505414dfe3e7
available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents:
3184
diff
changeset
|
159 </div> |
505414dfe3e7
available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents:
3184
diff
changeset
|
160 </div> |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
161 |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
162 <div v-if="depthLimitVisible" class="d-flex mt-2" :key="1"> |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
163 <div class="d-flex flex-column w-50 mr-1"> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
164 <small for="from" class="my-auto text-muted"> |
4409
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
165 <translate>Depthlimit 1 [m]</translate> |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
166 </small> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
167 <input |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
168 id="depthlimit1" |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
169 v-model.number="depthLimit1" |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
170 class="form-control form-control-sm" |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
171 type="number" |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
172 min="0" |
4409
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
173 step="0.1" |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
174 /> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
175 </div> |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
176 <div |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
177 v-if="depthLimitVisible" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
178 class="d-flex flex-column w-50 ml-1" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
179 :key="2" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
180 > |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
181 <small for="to" class="my-auto text-muted"> |
4409
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
182 <translate>Depthlimit 2 [m]</translate> |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
183 </small> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
184 <input |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
185 id="depthlimit2" |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
186 v-model.number="depthLimit2" |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
187 class="form-control form-control-sm" |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
188 type="number" |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
189 min="0" |
4409
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
190 step="0.1" |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
191 /> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
192 </div> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
193 </div> |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
194 <div v-if="widthLimitVisible" class="d-flex mt-2" :key="3"> |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
195 <div class="d-flex flex-column w-50 mr-1"> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
196 <small for="from" class="my-auto text-muted"> |
4409
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
197 <translate>Widthlimit 1 [m]</translate> |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
198 </small> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
199 <input |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
200 id="widthLimit" |
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
201 v-model.number="widthLimit1" |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
202 class="form-control form-control-sm" |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
203 type="number" |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
204 min="0" |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
205 /> |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
206 </div> |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
207 <div |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
208 v-if="widthLimitVisible" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
209 class="d-flex flex-column w-50 mr-1" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
210 :key="4" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
211 > |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
212 <small for="from" class="my-auto text-muted"> |
4409
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
213 <translate>Widthlimit 2 [m]</translate> |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
214 </small> |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
215 <input |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
216 id="widthLimit" |
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
217 v-model.number="widthLimit2" |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
218 class="form-control form-control-sm" |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
219 type="number" |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
220 min="0" |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
221 /> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
222 </div> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
223 </div> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
224 |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
225 <div class="mt-3"> |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
226 <button |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
227 @click="openFairwaydepthDiagram" |
3315
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
228 :disabled="!isComplete" |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
229 class="btn btn-info btn-sm d-block w-100" |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
230 > |
3296
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
231 <translate>Available fairway depth</translate> |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
232 </button> |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
233 <button |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
234 @click="openFairwaydepthLNWLDiagram" |
3315
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
235 :disabled="!isComplete" |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
236 class="btn btn-info btn-sm d-block w-100 mt-2" |
3296
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
237 > |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
238 <translate>Available fairway depth vs LNWL</translate> |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
239 </button> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
240 </div> |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
241 </div> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
242 </div> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
243 </div> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
244 </template> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
245 |
3710
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
246 <style lang="sass" scoped> |
3199
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
247 input, |
3710
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
248 select |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
249 font-size: 0.8em |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
250 |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
251 .custom-control |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
252 padding-left: 1.2rem |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
253 .custom-control-label |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
254 &::before, |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
255 &::after |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
256 left: -1.2rem |
3199
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
257 </style> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
258 |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
259 <script> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
260 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
261 * without warranty, see README.md and license for details. |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
262 * |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
263 * SPDX-License-Identifier: AGPL-3.0-or-later |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
264 * License-Filename: LICENSES/AGPL-3.0.txt |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
265 * |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
266 * Copyright (C) 2018 by via donau |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
267 * – Österreichische Wasserstraßen-Gesellschaft mbH |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
268 * Software engineering by Intevation GmbH |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
269 * |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
270 * Author(s): |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
271 * Markus Kottländer <markus.kottlaender@intevation.de> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
272 * Thomas Junk <thomas.junk@intevation.de> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
273 */ |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
274 |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
275 import app from "@/main"; |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
276 import { displayError } from "@/lib/errors"; |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
277 import { mapState, mapGetters } from "vuex"; |
3572
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
278 import { LIMITINGFACTORS } from "@/store/fairwayavailability"; |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
279 |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
280 export default { |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
281 data() { |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
282 return { |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
283 loading: false |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
284 }; |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
285 }, |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
286 computed: { |
3231
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
287 ...mapState("application", [ |
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
288 "showFairwayDepth", |
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
289 "paneSetup", |
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
290 "showProfiles" |
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
291 ]), |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
292 ...mapState("fairwayavailability", [ |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
293 "selectedFairwayAvailabilityFeature", |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
294 "from", |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
295 "to", |
3198
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
296 "frequency", |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
297 "LOS", |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
298 "depthlimit1", |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
299 "depthlimit2", |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
300 "widthlimit1", |
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
301 "widthlimit2" |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
302 ]), |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
303 ...mapState("imports", [ |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
304 "stretches", |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
305 "sections", |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
306 "selectedStretchId", |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
307 "selectedSectionId" |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
308 ]), |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
309 ...mapState("bottlenecks", ["bottlenecksList", "selectedBottleneck"]), |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
310 ...mapGetters("map", ["openLayersMap"]), |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
311 ...mapGetters("bottlenecks", [ |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
312 "orderedBottlenecks", |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
313 "limitingFactorsPerBottleneck" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
314 ]), |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
315 depthLimitVisible() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
316 if (this.type !== this.$options.BOTTLENECK) return true; |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
317 if ( |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
318 this.selectedEntry && |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
319 this.limitingFactorsPerBottleneck[this.selectedEntry.properties.name] == |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
320 this.$options.LIMITINGFACTORS.DEPTH |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
321 ) |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
322 return true; |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
323 return false; |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
324 }, |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
325 widthLimitVisible() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
326 if (this.type !== this.$options.BOTTLENECK) return true; |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
327 if ( |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
328 this.selectedEntry && |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
329 this.limitingFactorsPerBottleneck[this.selectedEntry.properties.name] == |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
330 this.$options.LIMITINGFACTORS.WIDTH |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
331 ) |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
332 return true; |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
333 }, |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
334 limitingFactor() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
335 if (this.type !== this.$options.BOTTLENECK) return; |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
336 if (this.selectedEntry) |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
337 return this.limitingFactorsPerBottleneck[ |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
338 this.selectedEntry.properties.name |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
339 ]; |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
340 }, |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
341 isComplete() { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
342 return ( |
3315
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
343 this.from !== null && |
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
344 this.to !== null && |
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
345 this.frequency !== null && |
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
346 this.los !== null && |
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
347 this.selectedFairwayAvailabilityFeature !== null |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
348 ); |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
349 }, |
3205
bf571429515f
client: fairway availability: moved component's type property to store to manipulate it from outside
Markus Kottlaender <markus@intevation.de>
parents:
3199
diff
changeset
|
350 type: { |
bf571429515f
client: fairway availability: moved component's type property to store to manipulate it from outside
Markus Kottlaender <markus@intevation.de>
parents:
3199
diff
changeset
|
351 get() { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
352 return this.$store.state.fairwayavailability.type; |
3205
bf571429515f
client: fairway availability: moved component's type property to store to manipulate it from outside
Markus Kottlaender <markus@intevation.de>
parents:
3199
diff
changeset
|
353 }, |
bf571429515f
client: fairway availability: moved component's type property to store to manipulate it from outside
Markus Kottlaender <markus@intevation.de>
parents:
3199
diff
changeset
|
354 set(type) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
355 this.$store.commit("fairwayavailability/type", type); |
3205
bf571429515f
client: fairway availability: moved component's type property to store to manipulate it from outside
Markus Kottlaender <markus@intevation.de>
parents:
3199
diff
changeset
|
356 } |
bf571429515f
client: fairway availability: moved component's type property to store to manipulate it from outside
Markus Kottlaender <markus@intevation.de>
parents:
3199
diff
changeset
|
357 }, |
3198
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
358 los: { |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
359 get() { |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
360 return this.LOS; |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
361 }, |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
362 set(value) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
363 this.$store.commit("fairwayavailability/setLOS", value); |
3198
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
364 } |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
365 }, |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
366 fromDate: { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
367 get() { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
368 return this.from; |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
369 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
370 set(value) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
371 this.$store.commit("fairwayavailability/setFrom", value); |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
372 } |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
373 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
374 toDate: { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
375 get() { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
376 return this.to; |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
377 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
378 set(value) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
379 this.$store.commit("fairwayavailability/setTo", value); |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
380 } |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
381 }, |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
382 depthLimit1: { |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
383 get() { |
4409
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
384 return this.depthlimit1 / 100; |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
385 }, |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
386 set(value) { |
4409
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
387 this.$store.commit( |
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
388 "fairwayavailability/setDepthlimit1", |
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
389 Math.round(value * 100) |
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
390 ); |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
391 } |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
392 }, |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
393 depthLimit2: { |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
394 get() { |
4409
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
395 return this.depthlimit2 / 100; |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
396 }, |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
397 set(value) { |
4409
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
398 this.$store.commit( |
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
399 "fairwayavailability/setDepthlimit2", |
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
400 Math.round(value * 100) |
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
401 ); |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
402 } |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
403 }, |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
404 widthLimit1: { |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
405 get() { |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
406 return this.widthlimit1; |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
407 }, |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
408 set(value) { |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
409 this.$store.commit("fairwayavailability/setWidthlimit1", value); |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
410 } |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
411 }, |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
412 widthLimit2: { |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
413 get() { |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
414 return this.widthlimit2; |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
415 }, |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
416 set(value) { |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
417 this.$store.commit("fairwayavailability/setWidthlimit2", value); |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
418 } |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
419 }, |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
420 selectedFrequency: { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
421 get() { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
422 return this.frequency; |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
423 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
424 set(value) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
425 this.$store.commit("fairwayavailability/setFrequency", value); |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
426 } |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
427 }, |
3183
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
428 selectedEntry: { |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
429 get() { |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
430 return this.selectedFairwayAvailabilityFeature; |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
431 }, |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
432 set(feature) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
433 this.$store.commit( |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
434 "fairwayavailability/setSelectedFairwayAvailability", |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
435 feature |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
436 ); |
3183
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
437 } |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
438 }, |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
439 label() { |
3294
5f0c6e931e7f
Available_fairway_depth: label
Thomas Junk <thomas.junk@intevation.de>
parents:
3272
diff
changeset
|
440 return this.$gettext("Available fairway depth"); |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
441 }, |
3315
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
442 placeholder() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
443 if (this.type === this.$options.BOTTLENECK) |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
444 return this.$gettext("Select bottleneck"); |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
445 if (this.type === this.$options.STRETCH) |
3238
94e966ebef35
available_fairway_depth: fix typo
Thomas Junk <thomas.junk@intevation.de>
parents:
3237
diff
changeset
|
446 return this.$gettext("Select stretch"); |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
447 return this.$gettext("Select section"); |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
448 } |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
449 }, |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
450 watch: { |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
451 selectedBottleneck() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
452 this.type = this.$options.BOTTLENECK; |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
453 this.setSelectedBottleneck(); |
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
454 }, |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
455 selectedStretchId() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
456 this.type = this.$options.STRETCH; |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
457 this.setSelectedStretch(); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
458 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
459 selectedSectionId() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
460 this.type = this.$options.SECTION; |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
461 this.setSelectedSection(); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
462 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
463 type(type) { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
464 if (type === this.$options.BOTTLENECK && this.selectedBottleneck) { |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
465 this.openLayersMap() |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
466 .getLayer("BOTTLENECKS") |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
467 .setVisible(true); |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
468 this.setSelectedBottleneck(); |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
469 } else if (type === this.$options.STRETCH && this.selectedStretchId) { |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
470 this.openLayersMap() |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
471 .getLayer("STRETCHES") |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
472 .setVisible(true); |
3272
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
473 this.setSelectedStretch(); |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
474 } else if (type === this.$options.SECTION && this.selectedSectionId) { |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
475 this.openLayersMap() |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
476 .getLayer("SECTIONS") |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
477 .setVisible(true); |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
478 this.setSelectedSection(); |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
479 } else { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
480 this.$store.commit( |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
481 "fairwayavailability/setSelectedFairwayAvailability", |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
482 null |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
483 ); |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
484 } |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
485 }, |
3237
86e108358216
available_fairway_depth: bug fix for loading bottlenecks and stretches
Thomas Junk <thomas.junk@intevation.de>
parents:
3236
diff
changeset
|
486 showFairwayDepth() { |
86e108358216
available_fairway_depth: bug fix for loading bottlenecks and stretches
Thomas Junk <thomas.junk@intevation.de>
parents:
3236
diff
changeset
|
487 if (this.showFairwayDepth) { |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
488 this.loading = true; |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
489 Promise.all([ |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
490 this.$store.dispatch("bottlenecks/loadBottlenecks"), |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
491 this.$store.dispatch("bottlenecks/loadBottlenecksList"), |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
492 this.$store.dispatch("imports/loadStretches"), |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
493 this.$store.dispatch("imports/loadSections") |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
494 ]) |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
495 .then(() => { |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
496 if (this.selectedBottleneck) this.setSelectedBottleneck(); |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
497 }) |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
498 .finally(() => (this.loading = false)); |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
499 } |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
500 } |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
501 }, |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
502 methods: { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
503 openFairwaydepthLNWLDiagram() { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
504 this.loading = true; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
505 this.$store |
3368
70605404f37d
fa_lnwl: prototypical diagram added
Thomas Junk <thomas.junk@intevation.de>
parents:
3354
diff
changeset
|
506 .dispatch("fairwayavailability/loadAvailableFairwayDepthLNWLDiagram", { |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
507 feature: this.selectedFairwayAvailabilityFeature, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
508 from: this.from, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
509 to: this.to, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
510 frequency: this.frequency, |
3463
6f4dad7473d7
afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents:
3438
diff
changeset
|
511 LOS: this.los, |
6f4dad7473d7
afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents:
3438
diff
changeset
|
512 type: this.type, |
4409
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
513 depthLimit1: this.depthlimit1, |
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
514 depthLimit2: this.depthlimit2, |
3463
6f4dad7473d7
afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents:
3438
diff
changeset
|
515 widthLimit1: this.widthLimit1, |
6f4dad7473d7
afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents:
3438
diff
changeset
|
516 widthLimit2: this.widthLimit2, |
6f4dad7473d7
afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents:
3438
diff
changeset
|
517 limitingFactor: this.limitingFactor |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
518 }) |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
519 .then(() => { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
520 this.$store.commit( |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
521 "application/paneSetup", |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
522 "AVAILABLEFAIRWAYDEPTHLNWL" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
523 ); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
524 }) |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
525 .catch(error => { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
526 const { status, data } = error.response; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
527 displayError({ |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
528 title: this.$gettext("Backend Error"), |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
529 message: `${status}: ${data.message || data}` |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
530 }); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
531 }) |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
532 .finally(() => { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
533 this.loading = false; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
534 }); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
535 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
536 openFairwaydepthDiagram() { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
537 this.loading = true; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
538 this.$store |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
539 .dispatch("fairwayavailability/loadAvailableFairwayDepth", { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
540 feature: this.selectedFairwayAvailabilityFeature, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
541 from: this.from, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
542 to: this.to, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
543 frequency: this.frequency, |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
544 LOS: this.los, |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
545 type: this.type, |
4409
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
546 depthLimit1: this.depthlimit1, |
d6c38a22c71e
client: use meter values for fairwayavailability depth
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3818
diff
changeset
|
547 depthLimit2: this.depthlimit2, |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
548 widthLimit1: this.widthLimit1, |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
549 widthLimit2: this.widthLimit2, |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
550 limitingFactor: this.limitingFactor |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
551 }) |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
552 .then(() => { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
553 this.$store.commit("application/paneSetup", "AVAILABLEFAIRWAYDEPTH"); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
554 }) |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
555 .catch(error => { |
3438
df6c2973f791
New parsing of incoming afdcsv
Thomas Junk <thomas.junk@intevation.de>
parents:
3414
diff
changeset
|
556 console.log(error); |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
557 const { status, data } = error.response; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
558 displayError({ |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
559 title: this.$gettext("Backend Error"), |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
560 message: `${status}: ${data.message || data}` |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
561 }); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
562 }) |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
563 .finally(() => { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
564 this.loading = false; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
565 }); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
566 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
567 close() { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
568 this.$store.commit("application/showFairwayDepth", false); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
569 this.$store.commit("application/showFairwayDepthLNWL", false); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
570 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
571 entrySelected() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
572 if (this.type === this.$options.BOTTLENECK) { |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
573 this.openLayersMap() |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
574 .getLayer("BOTTLENECKS") |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
575 .setVisible(true); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
576 if (this.showProfiles) { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
577 this.$store.dispatch( |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
578 "bottlenecks/setSelectedBottleneck", |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
579 this.selectedFairwayAvailabilityFeature.properties.name |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
580 ); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
581 } |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
582 } |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
583 if (this.type === this.$options.STRETCH) { |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
584 this.openLayersMap() |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
585 .getLayer("STRETCHES") |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
586 .setVisible(true); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
587 } |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
588 if (this.type === this.$options.SECTION) { |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
589 this.openLayersMap() |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
590 .getLayer("SECTIONS") |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
591 .setVisible(true); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
592 } |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
593 if (this.selectedFairwayAvailabilityFeature) { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
594 this.$store.dispatch("map/moveToFeauture", { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
595 feature: this.selectedFairwayAvailabilityFeature, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
596 zoom: 17, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
597 preventZoomOut: true |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
598 }); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
599 } |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
600 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
601 setSelectedBottleneck() { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
602 const bn = this.bottlenecksList.filter( |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
603 x => x.properties.name === this.selectedBottleneck |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
604 )[0]; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
605 this.$store.commit( |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
606 "fairwayavailability/setSelectedFairwayAvailability", |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
607 bn |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
608 ); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
609 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
610 setSelectedStretch() { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
611 const stretch = this.stretches.find(x => x.id === this.selectedStretchId); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
612 this.$store.commit( |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
613 "fairwayavailability/setSelectedFairwayAvailability", |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
614 stretch |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
615 ); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
616 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
617 setSelectedSection() { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
618 const section = this.sections.find(x => x.id === this.selectedSectionId); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
619 this.$store.commit( |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
620 "fairwayavailability/setSelectedFairwayAvailability", |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
621 section |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
622 ); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
623 } |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
624 }, |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
625 BOTTLENECK: "bottleneck", |
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
626 SECTION: "section", |
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
627 STRETCH: "stretch", |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
628 AVAILABLEFAIRWAYDEPTH: app.$gettext("Available Fairway Depth"), |
3572
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
629 FREQUENCIES: { |
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
630 monthly: app.$gettext("monthly"), |
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
631 quarterly: app.$gettext("quarterly"), |
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
632 yearly: app.$gettext("yearly") |
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
633 }, |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
634 LIMITINGFACTORS: LIMITINGFACTORS |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
635 }; |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
636 </script> |