Mercurial > gemma
annotate client/src/components/fairway/AvailableFairwayDepthDialogue.vue @ 3319:9dc7d803e51f
availableFairwayDepth: rename variable
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 20 May 2019 09:39:45 +0200 |
parents | fa7dc3f31ef3 |
children | 1473e9e7cd0c |
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" /> |
3199
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
12 <div |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
13 class="mb-3 d-flex flex-row justify-content-between align-items-center" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
14 > |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
15 <div> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
16 <input :value="$options.BOTTLENECKS" type="radio" v-model="type" /> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
17 <small class="ml-1 text-muted"> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
18 <translate>Bottlenecks</translate> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
19 </small> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
20 </div> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
21 <div> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
22 <input :value="$options.STRETCHES" type="radio" v-model="type" /> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
23 <small class="ml-1 text-muted"> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
24 <translate>Stretches</translate> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
25 </small> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
26 </div> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
27 <div> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
28 <input :value="$options.SECTIONS" type="radio" v-model="type" /> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
29 <small class="ml-1 text-muted"> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
30 <translate>Sections</translate> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
31 </small> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
32 </div> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
33 </div> |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
34 <div class="d-flex flex-column"> |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
35 <select |
3236
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
36 :key="1" |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
37 v-if="type === $options.BOTTLENECKS" |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
38 @change="entrySelected" |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
39 class="form-control form-control-sm font-weight-bold" |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
40 v-model="selectedEntry" |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
41 > |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
42 <option :value="null">{{ empty }}</option> |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
43 <optgroup |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
44 v-for="(bottlenecksForCountry, cc) in orderedBottlenecks" |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
45 :key="cc" |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
46 :label="cc" |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
47 > |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
48 <option |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
49 v-for="bn in bottlenecksForCountry" |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
50 :key="bn.properties.name" |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
51 :value="bn" |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
52 > |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
53 {{ bn.properties.name }} |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
54 </option> |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
55 </optgroup> |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
56 </select> |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
57 <select |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
58 :key="2" |
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
59 v-else |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
60 @change="entrySelected" |
3199
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
61 class="form-control form-control-sm font-weight-bold" |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
62 v-model="selectedEntry" |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
63 > |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
64 <option :value="null">{{ empty }}</option> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
65 <option |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
66 v-for="(entry, index) in entries" |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
67 :value="entry" |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
68 :key="index" |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
69 >{{ entry.properties.name }}</option |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
70 > |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
71 </select> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
72 </div> |
3185
505414dfe3e7
available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents:
3184
diff
changeset
|
73 <div class="d-flex flex-column mt-3"> |
3199
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
74 <div class="d-flex flex-row w-100"> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
75 <div class="d-flex flex-column mb-3 w-50 mr-1"> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
76 <small class="my-auto text-muted" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
77 ><translate>Type</translate></small |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
78 > |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
79 <select |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
80 v-model="selectedFrequency" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
81 class="form-control form-control-sm" |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
82 > |
3199
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
83 <option |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
84 v-for="(option, index) in $options.FREQUENCIES" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
85 :value="option" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
86 :key="index" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
87 ><translate>{{ option }}</translate></option |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
88 > |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
89 </select> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
90 </div> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
91 <div class="d-flex flex-column mb-3 w-50 ml-1"> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
92 <small class="my-auto text-muted" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
93 ><translate>LOS</translate></small |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
94 > |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
95 <select v-model="los" class="form-control form-control-sm"> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
96 <option value="1">1</option> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
97 <option value="2">2</option> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
98 <option value="3">3</option> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
99 </select> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
100 </div> |
3185
505414dfe3e7
available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents:
3184
diff
changeset
|
101 </div> |
3199
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
102 <div class="d-flex flex-row w-100"> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
103 <div class="d-flex flex-column w-50 mr-1"> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
104 <small for="from" class="my-auto text-muted" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
105 ><translate>Date from</translate></small |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
106 ><input |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
107 id="from" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
108 v-model="fromDate" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
109 class="form-control form-control-sm" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
110 type="date" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
111 /> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
112 </div> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
113 <div class="d-flex flex-column w-50 ml-1"> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
114 <small for="to" class="my-auto text-muted" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
115 ><translate>Date to</translate></small |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
116 ><input |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
117 id="to" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
118 v-model="toDate" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
119 class="form-control form-control-sm" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
120 type="date" |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
121 /> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
122 </div> |
3185
505414dfe3e7
available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents:
3184
diff
changeset
|
123 </div> |
505414dfe3e7
available_fairway_depth: move statistic dialog to store
Thomas Junk <thomas.junk@intevation.de>
parents:
3184
diff
changeset
|
124 </div> |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
125 <div class="mt-3"> |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
126 <button |
3178
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3175
diff
changeset
|
127 @click="openFairwaydepth" |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
128 :disabled="isComplete" |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
129 class="btn btn-info btn-sm w-100" |
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
130 > |
3296
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
131 <translate>Available fairway depth</translate> |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
132 </button> |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
133 </div> |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
134 <div class="mt-3"> |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
135 <button |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
136 @click="openFairwaydepthLNWL" |
3319
9dc7d803e51f
availableFairwayDepth: rename variable
Thomas Junk <thomas.junk@intevation.de>
parents:
3296
diff
changeset
|
137 :disabled="isInComplete" |
3296
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
138 class="btn btn-info btn-sm w-100" |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
139 > |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
140 <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
|
141 </button> |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
142 </div> |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
143 </div> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
144 </div> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
145 </div> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
146 </template> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
147 |
3199
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
148 <style lang="scss" scoped> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
149 input, |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
150 select { |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
151 font-size: 0.8em; |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
152 } |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
153 </style> |
25a26f666ee8
statistics: layout
Thomas Junk <thomas.junk@intevation.de>
parents:
3198
diff
changeset
|
154 |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
155 <script> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
156 /* 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
|
157 * without warranty, see README.md and license for details. |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
158 * |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
159 * SPDX-License-Identifier: AGPL-3.0-or-later |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
160 * License-Filename: LICENSES/AGPL-3.0.txt |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
161 * |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
162 * Copyright (C) 2018 by via donau |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
163 * – Österreichische Wasserstraßen-Gesellschaft mbH |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
164 * Software engineering by Intevation GmbH |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
165 * |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
166 * Author(s): |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
167 * Markus Kottländer <markus.kottlaender@intevation.de> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
168 * Thomas Junk <thomas.junk@intevation.de> |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
169 */ |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
170 |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
171 import app from "@/main"; |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
172 import { displayError } from "@/lib/errors"; |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
173 import { mapState, mapGetters } from "vuex"; |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
174 |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
175 export default { |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
176 data() { |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
177 return { |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
178 loading: false |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
179 }; |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
180 }, |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
181 methods: { |
3296
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
182 openFairwaydepthLNWL() { |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
183 this.loading = true; |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
184 this.$store |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
185 .dispatch("fairwayavailability/loadAvailableFairwayDepth", { |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
186 feature: this.selectedFairwayAvailabilityFeature, |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
187 from: this.from, |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
188 to: this.to, |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
189 frequency: this.frequency, |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
190 LOS: this.los |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
191 }) |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
192 .then(() => { |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
193 this.$store.commit( |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
194 "application/paneSetup", |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
195 "AVAILABLEFAIRWAYDEPTHLNWL" |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
196 ); |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
197 }) |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
198 .catch(error => { |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
199 console.log(error); |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
200 const { status, data } = error.response; |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
201 displayError({ |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
202 title: this.$gettext("Backend Error"), |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
203 message: `${status}: ${data.message || data}` |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
204 }); |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
205 }) |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
206 .finally(() => { |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
207 this.loading = false; |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
208 }); |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
209 }, |
3178
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3175
diff
changeset
|
210 openFairwaydepth() { |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
211 this.loading = true; |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
212 this.$store |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
213 .dispatch("fairwayavailability/loadAvailableFairwayDepth", { |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
214 feature: this.selectedFairwayAvailabilityFeature, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
215 from: this.from, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
216 to: this.to, |
3198
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
217 frequency: this.frequency, |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
218 LOS: this.los |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
219 }) |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
220 .then(() => { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
221 this.$store.commit("application/paneSetup", "AVAILABLEFAIRWAYDEPTH"); |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
222 }) |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
223 .catch(error => { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
224 console.log(error); |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
225 const { status, data } = error.response; |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
226 displayError({ |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
227 title: this.$gettext("Backend Error"), |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
228 message: `${status}: ${data.message || data}` |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
229 }); |
3272
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
230 }) |
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
231 .finally(() => { |
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
232 this.loading = false; |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
233 }); |
3178
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3175
diff
changeset
|
234 }, |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
235 close() { |
3231
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
236 this.$store.commit("application/showFairwayDepth", false); |
3296
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3294
diff
changeset
|
237 this.$store.commit("application/showFairwayDepthLNWL", false); |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
238 }, |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
239 entrySelected() { |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
240 if (this.type === this.$options.BOTTLENECKS) { |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
241 this.openLayersMap() |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
242 .getLayer("BOTTLENECKS") |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
243 .setVisible(true); |
3178
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3175
diff
changeset
|
244 if (this.showProfiles) { |
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3175
diff
changeset
|
245 this.$store.dispatch( |
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3175
diff
changeset
|
246 "bottlenecks/setSelectedBottleneck", |
3183
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
247 this.selectedFairwayAvailabilityFeature.properties.name |
3178
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3175
diff
changeset
|
248 ); |
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3175
diff
changeset
|
249 } |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
250 } |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
251 if (this.type === this.$options.STRETCHES) { |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
252 this.openLayersMap() |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
253 .getLayer("STRETCHES") |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
254 .setVisible(true); |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
255 } |
3183
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
256 if (this.selectedFairwayAvailabilityFeature) { |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
257 this.$store.dispatch("map/moveToFeauture", { |
3183
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
258 feature: this.selectedFairwayAvailabilityFeature, |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
259 zoom: 17, |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
260 preventZoomOut: true |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
261 }); |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
262 } |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
263 }, |
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
264 setSelectedBottleneck() { |
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
265 const bn = this.bottlenecksList.filter( |
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
266 x => x.properties.name === this.selectedBottleneck |
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
267 )[0]; |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
268 this.$store.commit( |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
269 "fairwayavailability/setSelectedFairwayAvailability", |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
270 bn |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
271 ); |
3272
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
272 }, |
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
273 setSelectedStretch() { |
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
274 const stretch = this.stretches.find(x => x.id === this.selectedStretchId); |
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
275 this.$store.commit( |
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
276 "fairwayavailability/setSelectedFairwayAvailability", |
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
277 stretch |
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
278 ); |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
279 } |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
280 }, |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
281 computed: { |
3231
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
282 ...mapState("application", [ |
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
283 "showFairwayDepth", |
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
284 "paneSetup", |
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
285 "showProfiles" |
2dab20bed284
show_statistics: refac to fairwayavailability
Thomas Junk <thomas.junk@intevation.de>
parents:
3214
diff
changeset
|
286 ]), |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
287 ...mapState("fairwayavailability", [ |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
288 "selectedFairwayAvailabilityFeature", |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
289 "from", |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
290 "to", |
3198
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
291 "frequency", |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
292 "LOS" |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
293 ]), |
3272
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
294 ...mapState("imports", ["stretches", "selectedStretchId"]), |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
295 ...mapState("bottlenecks", ["bottlenecksList", "selectedBottleneck"]), |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
296 ...mapGetters("map", ["openLayersMap"]), |
3236
5914d615f703
available_fairway_depth: use the store luke
Thomas Junk <thomas.junk@intevation.de>
parents:
3233
diff
changeset
|
297 ...mapGetters("bottlenecks", ["orderedBottlenecks"]), |
3319
9dc7d803e51f
availableFairwayDepth: rename variable
Thomas Junk <thomas.junk@intevation.de>
parents:
3296
diff
changeset
|
298 isInComplete() { |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
299 return ( |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
300 this.from == null || |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
301 this.to == null || |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
302 this.frequency == null || |
3214
861329d535b2
statistics: guarg for los
Thomas Junk <thomas.junk@intevation.de>
parents:
3207
diff
changeset
|
303 this.los == null || |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
304 this.selectedFairwayAvailabilityFeature == null |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
305 ); |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
306 }, |
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
|
307 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
|
308 get() { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
309 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
|
310 }, |
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
|
311 set(type) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
312 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
|
313 } |
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
|
314 }, |
3198
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
315 los: { |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
316 get() { |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
317 return this.LOS; |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
318 }, |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
319 set(value) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
320 this.$store.commit("fairwayavailability/setLOS", value); |
3198
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
321 } |
b0328646e34f
statistics: include los selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3191
diff
changeset
|
322 }, |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
323 fromDate: { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
324 get() { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
325 return this.from; |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
326 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
327 set(value) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
328 this.$store.commit("fairwayavailability/setFrom", value); |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
329 } |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
330 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
331 toDate: { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
332 get() { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
333 return this.to; |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
334 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
335 set(value) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
336 this.$store.commit("fairwayavailability/setTo", value); |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
337 } |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
338 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
339 selectedFrequency: { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
340 get() { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
341 return this.frequency; |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
342 }, |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
343 set(value) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
344 this.$store.commit("fairwayavailability/setFrequency", value); |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
345 } |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
346 }, |
3183
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
347 selectedEntry: { |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
348 get() { |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
349 return this.selectedFairwayAvailabilityFeature; |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
350 }, |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
351 set(feature) { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
352 this.$store.commit( |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
353 "fairwayavailability/setSelectedFairwayAvailability", |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
354 feature |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
355 ); |
3183
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
356 } |
f64cc98746a1
statistics: put selected feature in fairwaystore
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
357 }, |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
358 entries() { |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
359 if (this.type === this.$options.BOTTLENECKS) return this.bottlenecksList; |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
360 if (this.type === this.$options.STRETCHES) return this.stretches; |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
361 return []; |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
362 }, |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
363 label() { |
3294
5f0c6e931e7f
Available_fairway_depth: label
Thomas Junk <thomas.junk@intevation.de>
parents:
3272
diff
changeset
|
364 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
|
365 }, |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
366 empty() { |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
367 if (this.type === this.$options.BOTTLENECKS) |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
368 return this.$gettext("Select bottleneck"); |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
369 if (this.type === this.$options.STRETCHES) |
3238
94e966ebef35
available_fairway_depth: fix typo
Thomas Junk <thomas.junk@intevation.de>
parents:
3237
diff
changeset
|
370 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
|
371 return this.$gettext("Select section"); |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
372 } |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
373 }, |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
374 watch: { |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
375 selectedBottleneck() { |
3174
aeb9d6fc640a
statistics: sprinkled more fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3173
diff
changeset
|
376 this.type = this.$options.BOTTLENECKS; |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
377 this.setSelectedBottleneck(); |
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
378 }, |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
379 type() { |
3175
296392d4539c
client: statistics dialog: fix resetting selectedEntry
Markus Kottlaender <markus@intevation.de>
parents:
3174
diff
changeset
|
380 if (this.type === this.$options.BOTTLENECKS && this.selectedBottleneck) { |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
381 this.setSelectedBottleneck(); |
3272
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
382 } else if ( |
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
383 this.type === this.$options.STRETCHES && |
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
384 this.selectedStretchId |
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
385 ) { |
a9d047ccf408
client: fairway availability: set stretch in dialog when selecting stretch from map/list
Markus Kottlaender <markus@intevation.de>
parents:
3238
diff
changeset
|
386 this.setSelectedStretch(); |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
387 } else { |
3207
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
388 this.$store.commit( |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
389 "fairwayavailability/setSelectedFairwayAvailability", |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
390 null |
ba7bc3740fb3
client: renamed store modules to better reflect their context
Markus Kottlaender <markus@intevation.de>
parents:
3205
diff
changeset
|
391 ); |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
392 } |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
393 this.openLayersMap() |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
394 .getLayer("STRETCHES") |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
395 .setVisible(true); |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
396 }, |
3237
86e108358216
available_fairway_depth: bug fix for loading bottlenecks and stretches
Thomas Junk <thomas.junk@intevation.de>
parents:
3236
diff
changeset
|
397 showFairwayDepth() { |
86e108358216
available_fairway_depth: bug fix for loading bottlenecks and stretches
Thomas Junk <thomas.junk@intevation.de>
parents:
3236
diff
changeset
|
398 if (this.showFairwayDepth) { |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
399 this.loading = true; |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
400 this.$store.dispatch("bottlenecks/loadBottlenecksList").then(() => { |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
401 this.$store.dispatch("imports/loadStretches").then(() => { |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
402 this.loading = false; |
3173
1287b031424c
statistics: sprinkled fairy dust on to bottleneck selection
Thomas Junk <thomas.junk@intevation.de>
parents:
3172
diff
changeset
|
403 if (this.selectedBottleneck) this.setSelectedBottleneck(); |
3172
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
404 }); |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
405 }); |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
406 } |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
407 } |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
408 }, |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
409 BOTTLENECKS: "bottlenecks", |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
410 SECTIONS: "sections", |
975efa874acf
statistic: choice between bottlenecks and stretches implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
3159
diff
changeset
|
411 STRETCHES: "stretches", |
3191
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
412 AVAILABLEFAIRWAYDEPTH: app.$gettext("Available Fairway Depth"), |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
413 FREQUENCIES: { |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
414 MONTHLY: "monthly", |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
415 QUARTERLY: "quarterly", |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
416 YEARLY: "yearly" |
c0cd5dfec153
statistics: persist fields to vuex
Thomas Junk <thomas.junk@intevation.de>
parents:
3185
diff
changeset
|
417 } |
3159
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
418 }; |
4f4905b57fcf
toolbar: added statistics dialog component
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
419 </script> |