Mercurial > gemma
annotate client/src/components/importoverview/BottleneckDetail.vue @ 5629:84d01a536bec 729-node-js-newer-version
Transformed scss and sass styles into css
author | Luisa Beerboom <lbeerboom@intevation.de> |
---|---|
date | Thu, 11 May 2023 13:23:52 +0200 |
parents | 0f258757e73a |
children |
rev | line source |
---|---|
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1 <template> |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
2 <div |
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
3 :class="{ |
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
4 bottleneckdetails: true, |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2732
diff
changeset
|
5 full: !showLogs, |
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2732
diff
changeset
|
6 split: showLogs |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
7 }" |
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
8 > |
2944
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
9 <div v-for="(bottleneck, index) in bottlenecks" :key="index"> |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
10 <div class="d-flex pl-2"> |
2942
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
11 <div |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
12 @click="showBottleneckDetails(index)" |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
13 class="mt-auto mb-auto text-info text-left" |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
14 > |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
15 <UISpinnerButton |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
16 :state="showBottleneckDetail === index" |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
17 :icons="['angle-right', 'angle-down']" |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
18 class="text-info" |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
19 /> |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
20 </div> |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
21 <a @click="moveToBottleneck(index)" href="#"> |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
22 {{ bottleneck.properties.objnam }} |
5580
0f258757e73a
Change objnam in Soundingresults.vue to bottleneck_id. Add comments for places where objnam is okay.
Thomas Junk <thomas.junk@intevation.de>
parents:
4101
diff
changeset
|
23 <!-- objnam for Text is okay--> |
2942
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
24 </a> |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
25 </div> |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
26 |
2944
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
27 <div class="d-flex properties" v-if="showBottleneckDetail === index"> |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
28 <table class="w-100"> |
2942
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
29 <tr |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
30 v-for="(info, index) in Object.keys(bottleneck.properties)" |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
31 :key="index" |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
32 > |
2944
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
33 <td class="pl-4">{{ info }}</td> |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
34 <td> |
2942
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
35 {{ bottleneck.properties[info] }} |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
36 </td> |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
37 </tr> |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
38 </table> |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
39 </div> |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
40 </div> |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
41 </div> |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
42 </template> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
43 |
5629
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
44 <style scoped> |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
45 .bottleneckdetails { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
46 width: 100%; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
47 overflow-y: auto; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
48 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
49 .bottleneckdetails > div { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
50 border-top: dashed 1px #dee2e6; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
51 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
52 .bottleneckdetails > div:first-child { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
53 border-top: none; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
54 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
55 .bottleneckdetails > div .properties { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
56 position: relative; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
57 overflow: hidden; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
58 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
59 .bottleneckdetails > div .properties::after { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
60 content: ""; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
61 position: absolute; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
62 top: 0; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
63 right: -5px; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
64 bottom: 0; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
65 left: -5px; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
66 box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.4); |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
67 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
68 .bottleneckdetails > div .properties tr { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
69 font-size: 0.7rem; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
70 } |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
71 .bottleneckdetails > div .properties tr:nth-child(odd) { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
72 background-color: #f8f9fa; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
73 } |
2882
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
74 |
5629
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
75 .split { |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
76 max-height: 35vh; |
84d01a536bec
Transformed scss and sass styles into css
Luisa Beerboom <lbeerboom@intevation.de>
parents:
5580
diff
changeset
|
77 } |
2882
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
78 </style> |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
79 |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
80 <script> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
81 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
82 * without warranty, see README.md and license for details. |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
83 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
84 * SPDX-License-Identifier: AGPL-3.0-or-later |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
85 * License-Filename: LICENSES/AGPL-3.0.txt |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
86 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
87 * Copyright (C) 2018 by via donau |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
88 * – Österreichische Wasserstraßen-Gesellschaft mbH |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
89 * Software engineering by Intevation GmbH |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
90 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
91 * Author(s): |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
92 * Thomas Junk <thomas.junk@intevation.de> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
93 */ |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
94 |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
95 import { HTTP } from "@/lib/http"; |
2985
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2957
diff
changeset
|
96 import { WFS } from "ol/format"; |
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2957
diff
changeset
|
97 import { or as orFilter, equalTo as equalToFilter } from "ol/format/filter"; |
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2957
diff
changeset
|
98 import { displayError } from "@/lib/errors"; |
3044
c71373594719
client: map: prepared store to hold multiple map objects
Markus Kottlaender <markus@intevation.de>
parents:
3017
diff
changeset
|
99 import { mapState, mapGetters } from "vuex"; |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
100 |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
101 export default { |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
102 data() { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
103 return { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
104 bottlenecks: [], |
2942
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
105 showBottleneckDetail: null |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
106 }; |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
107 }, |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
108 mounted() { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
109 this.loadBottlenecks(); |
4101
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
110 this.reloadBottleneckLayer(); |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
111 }, |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
112 computed: { |
4101
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
113 ...mapState("map", ["openLayersMaps"]), |
2957
b74ebeb2bdc8
client: layers: improved structure of layer configuration
Markus Kottlaender <markus@intevation.de>
parents:
2948
diff
changeset
|
114 ...mapState("imports", ["showLogs", "details"]), |
3044
c71373594719
client: map: prepared store to hold multiple map objects
Markus Kottlaender <markus@intevation.de>
parents:
3017
diff
changeset
|
115 ...mapGetters("map", ["openLayersMap"]) |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
116 }, |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
117 methods: { |
4101
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
118 reloadBottleneckLayer() { |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
119 this.openLayersMaps.forEach(map => { |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
120 map |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
121 .getLayer("BOTTLENECKISOLINE") |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
122 .getSource() |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
123 .refresh(); |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
124 }); |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
125 }, |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
126 loadBottlenecks() { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
127 const generateFilter = () => { |
2685
39a05f8c34e6
import_overview: Refactoring of detailed information.
Thomas Junk <thomas.junk@intevation.de>
parents:
2647
diff
changeset
|
128 const { bottlenecks } = this.details.summary; |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
129 if (bottlenecks.length === 1) |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
130 return equalToFilter("bottleneck_id", bottlenecks[0]); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
131 const orExpressions = bottlenecks.map(x => { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
132 return equalToFilter("bottleneck_id", x); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
133 }); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
134 return orFilter(...orExpressions); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
135 }; |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
136 const filterExpression = generateFilter(); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
137 const bottleneckFeatureCollectionRequest = new WFS().writeGetFeature({ |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
138 srsName: "EPSG:4326", |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
139 featureNS: "gemma", |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
140 featurePrefix: "gemma", |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
141 featureTypes: ["bottlenecks_geoserver"], |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
142 outputFormat: "application/json", |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
143 filter: filterExpression |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
144 }); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
145 HTTP.post( |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
146 "/internal/wfs", |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
147 new XMLSerializer().serializeToString( |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
148 bottleneckFeatureCollectionRequest |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
149 ), |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
150 { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
151 headers: { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
152 "X-Gemma-Auth": localStorage.getItem("token"), |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
153 "Content-type": "text/xml; charset=UTF-8" |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
154 } |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
155 } |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
156 ) |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
157 .then(response => { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
158 this.bottlenecks = response.data.features; |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
159 }) |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
160 .catch(error => { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
161 const { status, data } = error.response; |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
162 displayError({ |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
163 title: this.$gettext("Backend Error"), |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
164 message: `${status}: ${data.message || data}` |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
165 }); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
166 }); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
167 }, |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
168 moveToBottleneck(index) { |
3127
0374197c384f
client: fix openLayersMap getter calls
Markus Kottlaender <markus@intevation.de>
parents:
3054
diff
changeset
|
169 this.openLayersMap() |
0374197c384f
client: fix openLayersMap getter calls
Markus Kottlaender <markus@intevation.de>
parents:
3054
diff
changeset
|
170 .getLayer("BOTTLENECKS") |
0374197c384f
client: fix openLayersMap getter calls
Markus Kottlaender <markus@intevation.de>
parents:
3054
diff
changeset
|
171 .setVisible(true); |
3054
1ef2f4179d30
client: map store: merged/renamed method(s)
Markus Kottlaender <markus@intevation.de>
parents:
3044
diff
changeset
|
172 this.$store.dispatch("map/moveToFeauture", { |
3017
9a408a8b74b8
client: inlined some functions that were used only once
Markus Kottlaender <markus@intevation.de>
parents:
3006
diff
changeset
|
173 feature: this.bottlenecks[index], |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
174 zoom: 17, |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
175 preventZoomOut: true |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
176 }); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
177 }, |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
178 showBottleneckDetails(index) { |
2942
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
179 if (index === this.showBottleneckDetail) { |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
180 this.showBottleneckDetail = null; |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
181 } else { |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
182 this.showBottleneckDetail = index; |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
183 } |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
184 } |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2732
diff
changeset
|
185 } |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
186 }; |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
187 </script> |