Mercurial > gemma
annotate client/src/components/fairway/AvailableFairwayDepthDialogue.vue @ 3915:f7f09f32d6e0
hydrological conditions: omit rendering, when container isn't visible
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 11 Jul 2019 13:51:26 +0200 |
parents | 242057dbc8c3 |
children | d6c38a22c71e |
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"> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
165 <translate>Depthlimit 1 (in cm)</translate> |
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" |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
173 /> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
174 </div> |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
175 <div |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
176 v-if="depthLimitVisible" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
177 class="d-flex flex-column w-50 ml-1" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
178 :key="2" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
179 > |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
180 <small for="to" class="my-auto text-muted"> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
181 <translate>Depthlimit 2 ( in cm)</translate> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
182 </small> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
183 <input |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
184 id="depthlimit2" |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
185 v-model.number="depthLimit2" |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
186 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
|
187 type="number" |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
188 min="0" |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
189 /> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
190 </div> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
191 </div> |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
192 <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
|
193 <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
|
194 <small for="from" class="my-auto text-muted"> |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
195 <translate>Widthlimit 1</translate> |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
196 </small> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
197 <input |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
198 id="widthLimit" |
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
199 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
|
200 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
|
201 type="number" |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
202 min="0" |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
203 /> |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
204 </div> |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
205 <div |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
206 v-if="widthLimitVisible" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
207 class="d-flex flex-column w-50 mr-1" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
208 :key="4" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
209 > |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
210 <small for="from" class="my-auto text-muted"> |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
211 <translate>Widthlimit 2</translate> |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
212 </small> |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
213 <input |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
214 id="widthLimit" |
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
215 v-model.number="widthLimit2" |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
216 class="form-control form-control-sm" |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
217 type="number" |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
218 min="0" |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
219 /> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
220 </div> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
221 </div> |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
222 |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
223 <div class="mt-3"> |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
224 <button |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
225 @click="openFairwaydepthDiagram" |
3315
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
226 :disabled="!isComplete" |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
227 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
|
228 > |
3296
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
229 <translate>Available fairway depth</translate> |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
230 </button> |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
231 <button |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
232 @click="openFairwaydepthLNWLDiagram" |
3315
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
233 :disabled="!isComplete" |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
234 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
|
235 > |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
236 <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
|
237 </button> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
238 </div> |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
239 </div> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
240 </div> |
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 </template> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
243 |
3710
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
244 <style lang="sass" scoped> |
3199
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
245 input, |
3710
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
246 select |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
247 font-size: 0.8em |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
248 |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
249 .custom-control |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
250 padding-left: 1.2rem |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
251 .custom-control-label |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
252 &::before, |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
253 &::after |
017827d9bb14
client: available fairway depth dialog: improved type selection
Markus Kottlaender <markus@intevation.de>
parents:
3572
diff
changeset
|
254 left: -1.2rem |
3199
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
255 </style> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
256 |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
257 <script> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
258 /* 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
|
259 * without warranty, see README.md and license for details. |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
260 * |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
261 * SPDX-License-Identifier: AGPL-3.0-or-later |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
262 * License-Filename: LICENSES/AGPL-3.0.txt |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
263 * |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
264 * Copyright (C) 2018 by via donau |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
265 * – Österreichische Wasserstraßen-Gesellschaft mbH |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
266 * Software engineering by Intevation GmbH |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
267 * |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
268 * Author(s): |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
269 * Markus Kottländer <markus.kottlaender@intevation.de> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
270 * Thomas Junk <thomas.junk@intevation.de> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
271 */ |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
272 |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
273 import app from "@/main"; |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
274 import { displayError } from "@/lib/errors"; |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
275 import { mapState, mapGetters } from "vuex"; |
3572
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
276 import { LIMITINGFACTORS } from "@/store/fairwayavailability"; |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
277 |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
278 export default { |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
279 data() { |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
280 return { |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
281 loading: false |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
282 }; |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
283 }, |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
284 computed: { |
3231
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
285 ...mapState("application", [ |
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
286 "showFairwayDepth", |
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
287 "paneSetup", |
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
288 "showProfiles" |
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
289 ]), |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
290 ...mapState("fairwayavailability", [ |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
291 "selectedFairwayAvailabilityFeature", |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
292 "from", |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
293 "to", |
3198
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
294 "frequency", |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
295 "LOS", |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
296 "depthlimit1", |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
297 "depthlimit2", |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
298 "widthlimit1", |
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
299 "widthlimit2" |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
300 ]), |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
301 ...mapState("imports", [ |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
302 "stretches", |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
303 "sections", |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
304 "selectedStretchId", |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
305 "selectedSectionId" |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
306 ]), |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
307 ...mapState("bottlenecks", ["bottlenecksList", "selectedBottleneck"]), |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
308 ...mapGetters("map", ["openLayersMap"]), |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
309 ...mapGetters("bottlenecks", [ |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
310 "orderedBottlenecks", |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
311 "limitingFactorsPerBottleneck" |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
312 ]), |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
313 depthLimitVisible() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
314 if (this.type !== this.$options.BOTTLENECK) return true; |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
315 if ( |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
316 this.selectedEntry && |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
317 this.limitingFactorsPerBottleneck[this.selectedEntry.properties.name] == |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
318 this.$options.LIMITINGFACTORS.DEPTH |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
319 ) |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
320 return true; |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
321 return false; |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
322 }, |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
323 widthLimitVisible() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
324 if (this.type !== this.$options.BOTTLENECK) return true; |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
325 if ( |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
326 this.selectedEntry && |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
327 this.limitingFactorsPerBottleneck[this.selectedEntry.properties.name] == |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
328 this.$options.LIMITINGFACTORS.WIDTH |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
329 ) |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
330 return true; |
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 limitingFactor() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
333 if (this.type !== this.$options.BOTTLENECK) return; |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
334 if (this.selectedEntry) |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
335 return this.limitingFactorsPerBottleneck[ |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
336 this.selectedEntry.properties.name |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
337 ]; |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
338 }, |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
339 isComplete() { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
340 return ( |
3315
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
341 this.from !== null && |
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
342 this.to !== null && |
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
343 this.frequency !== null && |
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
344 this.los !== null && |
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
345 this.selectedFairwayAvailabilityFeature !== null |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
346 ); |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
347 }, |
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
|
348 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
|
349 get() { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
350 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
|
351 }, |
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
|
352 set(type) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
353 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
|
354 } |
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
|
355 }, |
3198
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
356 los: { |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
357 get() { |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
358 return this.LOS; |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
359 }, |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
360 set(value) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
361 this.$store.commit("fairwayavailability/setLOS", value); |
3198
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
362 } |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
363 }, |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
364 fromDate: { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
365 get() { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
366 return this.from; |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
367 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
368 set(value) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
369 this.$store.commit("fairwayavailability/setFrom", value); |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
370 } |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
371 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
372 toDate: { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
373 get() { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
374 return this.to; |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
375 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
376 set(value) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
377 this.$store.commit("fairwayavailability/setTo", value); |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
378 } |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
379 }, |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
380 depthLimit1: { |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
381 get() { |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
382 return this.depthlimit1; |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
383 }, |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
384 set(value) { |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
385 this.$store.commit("fairwayavailability/setDepthlimit1", value); |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
386 } |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
387 }, |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
388 depthLimit2: { |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
389 get() { |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
390 return this.depthlimit2; |
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 set(value) { |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
393 this.$store.commit("fairwayavailability/setDepthlimit2", value); |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
394 } |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
395 }, |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
396 widthLimit1: { |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
397 get() { |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
398 return this.widthlimit1; |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
399 }, |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
400 set(value) { |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
401 this.$store.commit("fairwayavailability/setWidthlimit1", value); |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
402 } |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
403 }, |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
404 widthLimit2: { |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
405 get() { |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
406 return this.widthlimit2; |
3354
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
diff
changeset
|
407 }, |
e12e8bf044a6
available_fairway_dialogue: added 2nd breadthelement
Thomas Junk <thomas.junk@intevation.de>
parents:
3352
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/setWidthlimit2", value); |
3352
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
410 } |
399a2eb496ee
available_fairway_depth_dialogue: adding limit fields. without transmission
Thomas Junk <thomas.junk@intevation.de>
parents:
3325
diff
changeset
|
411 }, |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
412 selectedFrequency: { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
413 get() { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
414 return this.frequency; |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
415 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
416 set(value) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
417 this.$store.commit("fairwayavailability/setFrequency", value); |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
418 } |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
419 }, |
3183
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
420 selectedEntry: { |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
421 get() { |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
422 return this.selectedFairwayAvailabilityFeature; |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
423 }, |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
424 set(feature) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
425 this.$store.commit( |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
426 "fairwayavailability/setSelectedFairwayAvailability", |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
427 feature |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
428 ); |
3183
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
429 } |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
430 }, |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
431 label() { |
3294
5f0c6e931e7f
Available_fairway_depth: label
Thomas Junk <thomas.junk@intevation.de>
parents:
3272
diff
changeset
|
432 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
|
433 }, |
3315
d61b88439c85
client: fairway availability: more appropriate property naming
Markus Kottlaender <markus@intevation.de>
parents:
3314
diff
changeset
|
434 placeholder() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
435 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
|
436 return this.$gettext("Select bottleneck"); |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
437 if (this.type === this.$options.STRETCH) |
3238
94e966ebef35
available_fairway_depth: fix typo
Thomas Junk <thomas.junk@intevation.de>
parents:
3237
diff
changeset
|
438 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
|
439 return this.$gettext("Select section"); |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
440 } |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
441 }, |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
442 watch: { |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
443 selectedBottleneck() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
444 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
|
445 this.setSelectedBottleneck(); |
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
446 }, |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
447 selectedStretchId() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
448 this.type = this.$options.STRETCH; |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
449 this.setSelectedStretch(); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
450 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
451 selectedSectionId() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
452 this.type = this.$options.SECTION; |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
453 this.setSelectedSection(); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
454 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
455 type(type) { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
456 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
|
457 this.openLayersMap() |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
458 .getLayer("BOTTLENECKS") |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
459 .setVisible(true); |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
460 this.setSelectedBottleneck(); |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
461 } else if (type === this.$options.STRETCH && this.selectedStretchId) { |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
462 this.openLayersMap() |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
463 .getLayer("STRETCHES") |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
464 .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
|
465 this.setSelectedStretch(); |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
466 } else if (type === this.$options.SECTION && this.selectedSectionId) { |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
467 this.openLayersMap() |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
468 .getLayer("SECTIONS") |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
469 .setVisible(true); |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
470 this.setSelectedSection(); |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
471 } else { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
472 this.$store.commit( |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
473 "fairwayavailability/setSelectedFairwayAvailability", |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
474 null |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
475 ); |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
476 } |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
477 }, |
3237
86e108358216
available_fairway_depth: bug fix for loading bottlenecks and stretches
Thomas Junk <thomas.junk@intevation.de>
parents:
3236
diff
changeset
|
478 showFairwayDepth() { |
86e108358216
available_fairway_depth: bug fix for loading bottlenecks and stretches
Thomas Junk <thomas.junk@intevation.de>
parents:
3236
diff
changeset
|
479 if (this.showFairwayDepth) { |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
480 this.loading = true; |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
481 Promise.all([ |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
482 this.$store.dispatch("bottlenecks/loadBottlenecks"), |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
483 this.$store.dispatch("bottlenecks/loadBottlenecksList"), |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
484 this.$store.dispatch("imports/loadStretches"), |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
485 this.$store.dispatch("imports/loadSections") |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
486 ]) |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
487 .then(() => { |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
488 if (this.selectedBottleneck) this.setSelectedBottleneck(); |
3309
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
489 }) |
80037790032d
client: fully implemented sections
Markus Kottlaender <markus@intevation.de>
parents:
3296
diff
changeset
|
490 .finally(() => (this.loading = false)); |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
491 } |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
492 } |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
493 }, |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
494 methods: { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
495 openFairwaydepthLNWLDiagram() { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
496 this.loading = true; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
497 this.$store |
3368
70605404f37d
fa_lnwl: prototypical diagram added
Thomas Junk <thomas.junk@intevation.de>
parents:
3354
diff
changeset
|
498 .dispatch("fairwayavailability/loadAvailableFairwayDepthLNWLDiagram", { |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
499 feature: this.selectedFairwayAvailabilityFeature, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
500 from: this.from, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
501 to: this.to, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
502 frequency: this.frequency, |
3463
6f4dad7473d7
afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents:
3438
diff
changeset
|
503 LOS: this.los, |
6f4dad7473d7
afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents:
3438
diff
changeset
|
504 type: this.type, |
6f4dad7473d7
afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents:
3438
diff
changeset
|
505 depthLimit1: this.depthLimit1, |
6f4dad7473d7
afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents:
3438
diff
changeset
|
506 depthLimit2: this.depthLimit2, |
6f4dad7473d7
afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents:
3438
diff
changeset
|
507 widthLimit1: this.widthLimit1, |
6f4dad7473d7
afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents:
3438
diff
changeset
|
508 widthLimit2: this.widthLimit2, |
6f4dad7473d7
afdLNWL: basical usage of classbreaks
Thomas Junk <thomas.junk@intevation.de>
parents:
3438
diff
changeset
|
509 limitingFactor: this.limitingFactor |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
510 }) |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
511 .then(() => { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
512 this.$store.commit( |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
513 "application/paneSetup", |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
514 "AVAILABLEFAIRWAYDEPTHLNWL" |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
515 ); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
516 }) |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
517 .catch(error => { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
518 const { status, data } = error.response; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
519 displayError({ |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
520 title: this.$gettext("Backend Error"), |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
521 message: `${status}: ${data.message || data}` |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
522 }); |
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 .finally(() => { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
525 this.loading = false; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
526 }); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
527 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
528 openFairwaydepthDiagram() { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
529 this.loading = true; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
530 this.$store |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
531 .dispatch("fairwayavailability/loadAvailableFairwayDepth", { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
532 feature: this.selectedFairwayAvailabilityFeature, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
533 from: this.from, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
534 to: this.to, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
535 frequency: this.frequency, |
3407
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
536 LOS: this.los, |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
537 type: this.type, |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
538 depthLimit1: this.depthLimit1, |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
539 depthLimit2: this.depthLimit2, |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
540 widthLimit1: this.widthLimit1, |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
541 widthLimit2: this.widthLimit2, |
7ea54c3b3fd6
afd: breaks for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3398
diff
changeset
|
542 limitingFactor: this.limitingFactor |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
543 }) |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
544 .then(() => { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
545 this.$store.commit("application/paneSetup", "AVAILABLEFAIRWAYDEPTH"); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
546 }) |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
547 .catch(error => { |
3438
df6c2973f791
New parsing of incoming afdcsv
Thomas Junk <thomas.junk@intevation.de>
parents:
3414
diff
changeset
|
548 console.log(error); |
3314
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
549 const { status, data } = error.response; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
550 displayError({ |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
551 title: this.$gettext("Backend Error"), |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
552 message: `${status}: ${data.message || data}` |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
553 }); |
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 .finally(() => { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
556 this.loading = false; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
557 }); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
558 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
559 close() { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
560 this.$store.commit("application/showFairwayDepth", false); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
561 this.$store.commit("application/showFairwayDepthLNWL", false); |
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 entrySelected() { |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
564 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
|
565 this.openLayersMap() |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
566 .getLayer("BOTTLENECKS") |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
567 .setVisible(true); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
568 if (this.showProfiles) { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
569 this.$store.dispatch( |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
570 "bottlenecks/setSelectedBottleneck", |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
571 this.selectedFairwayAvailabilityFeature.properties.name |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
572 ); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
573 } |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
574 } |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
575 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
|
576 this.openLayersMap() |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
577 .getLayer("STRETCHES") |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
578 .setVisible(true); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
579 } |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
580 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
|
581 this.openLayersMap() |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
582 .getLayer("SECTIONS") |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
583 .setVisible(true); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
584 } |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
585 if (this.selectedFairwayAvailabilityFeature) { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
586 this.$store.dispatch("map/moveToFeauture", { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
587 feature: this.selectedFairwayAvailabilityFeature, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
588 zoom: 17, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
589 preventZoomOut: true |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
590 }); |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
591 } |
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 setSelectedBottleneck() { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
594 const bn = this.bottlenecksList.filter( |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
595 x => x.properties.name === this.selectedBottleneck |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
596 )[0]; |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
597 this.$store.commit( |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
598 "fairwayavailability/setSelectedFairwayAvailability", |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
599 bn |
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 }, |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
602 setSelectedStretch() { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
603 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
|
604 this.$store.commit( |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
605 "fairwayavailability/setSelectedFairwayAvailability", |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
606 stretch |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
607 ); |
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 setSelectedSection() { |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
610 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
|
611 this.$store.commit( |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
612 "fairwayavailability/setSelectedFairwayAvailability", |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
613 section |
70676557a66f
client: available fairway depth: cleanup component a bit
Markus Kottlaender <markus@intevation.de>
parents:
3309
diff
changeset
|
614 ); |
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 }, |
3486
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
617 BOTTLENECK: "bottleneck", |
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
618 SECTION: "section", |
1fbb6dc7d362
fairwayavailability: refactor constants
Thomas Junk <thomas.junk@intevation.de>
parents:
3463
diff
changeset
|
619 STRETCH: "stretch", |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
620 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
|
621 FREQUENCIES: { |
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
622 monthly: app.$gettext("monthly"), |
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
623 quarterly: app.$gettext("quarterly"), |
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
624 yearly: app.$gettext("yearly") |
c69c01045498
client: translations: correct some strings marking (AvailableFairwayDepthDialogue)
Fadi Abbud <fadi.abbud@intevation.de>
parents:
3486
diff
changeset
|
625 }, |
3397
3675c60afd4f
afd: breadth->width
Thomas Junk <thomas.junk@intevation.de>
parents:
3368
diff
changeset
|
626 LIMITINGFACTORS: LIMITINGFACTORS |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
627 }; |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
628 </script> |