Mercurial > gemma
annotate client/src/components/importoverview/BottleneckDetail.vue @ 5408:901b70f9c6bd marking-single-beam
disable cuts or differences if surveytype is 'marking'
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 06 Jul 2021 15:47:44 +0200 |
parents | 7afe411eeb48 |
children | 0f258757e73a |
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 }} |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
23 </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
|
24 </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
|
25 |
2944
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
26 <div class="d-flex properties" v-if="showBottleneckDetail === index"> |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
27 <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
|
28 <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
|
29 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
|
30 :key="index" |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
31 > |
2944
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
32 <td class="pl-4">{{ info }}</td> |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
33 <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
|
34 {{ 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
|
35 </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
|
36 </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
|
37 </table> |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
38 </div> |
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> |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
41 </template> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
42 |
2882
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
43 <style lang="sass" scoped> |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
44 .bottleneckdetails |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
45 width: 100% |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
46 overflow-y: auto |
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
|
47 > 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
|
48 border-top: dashed 1px #dee2e6 |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
49 &:first-child |
30c906733154
client: importsoverview: improved bottleneck details style and fixed bug when toggeling the first item
Markus Kottlaender <markus@intevation.de>
parents:
2935
diff
changeset
|
50 border-top: none |
2944
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
51 .properties |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
52 position: relative |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
53 overflow: hidden |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
54 &::after |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
55 content: '' |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
56 position: absolute |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
57 top: 0 |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
58 right: -5px |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
59 bottom: 0 |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
60 left: -5px |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
61 box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.4) |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
62 tr |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
63 font-size: 0.7rem |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
64 &:nth-child(odd) |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2942
diff
changeset
|
65 background-color: #f8f9fa |
2882
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
66 |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
67 .split |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
68 max-height: 35vh |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
69 </style> |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
70 |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
71 <script> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
72 /* 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
|
73 * 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
|
74 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
75 * SPDX-License-Identifier: AGPL-3.0-or-later |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
76 * License-Filename: LICENSES/AGPL-3.0.txt |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
77 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
78 * Copyright (C) 2018 by via donau |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
79 * – Österreichische Wasserstraßen-Gesellschaft mbH |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
80 * Software engineering by Intevation GmbH |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
81 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
82 * Author(s): |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
83 * Thomas Junk <thomas.junk@intevation.de> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
84 */ |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
85 |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
86 import { HTTP } from "@/lib/http"; |
2985
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2957
diff
changeset
|
87 import { WFS } from "ol/format"; |
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2957
diff
changeset
|
88 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
|
89 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
|
90 import { mapState, mapGetters } from "vuex"; |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
91 |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
92 export default { |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
93 data() { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
94 return { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
95 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
|
96 showBottleneckDetail: null |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
97 }; |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
98 }, |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
99 mounted() { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
100 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
|
101 this.reloadBottleneckLayer(); |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
102 }, |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
103 computed: { |
4101
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
104 ...mapState("map", ["openLayersMaps"]), |
2957
b74ebeb2bdc8
client: layers: improved structure of layer configuration
Markus Kottlaender <markus@intevation.de>
parents:
2948
diff
changeset
|
105 ...mapState("imports", ["showLogs", "details"]), |
3044
c71373594719
client: map: prepared store to hold multiple map objects
Markus Kottlaender <markus@intevation.de>
parents:
3017
diff
changeset
|
106 ...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
|
107 }, |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
108 methods: { |
4101
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
109 reloadBottleneckLayer() { |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
110 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
|
111 map |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
112 .getLayer("BOTTLENECKISOLINE") |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
113 .getSource() |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
114 .refresh(); |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
115 }); |
7afe411eeb48
import review: on opening bottleneckreview details, the bottleneck source is refreshed
Thomas Junk <thomas.junk@intevation.de>
parents:
3127
diff
changeset
|
116 }, |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
117 loadBottlenecks() { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
118 const generateFilter = () => { |
2685
39a05f8c34e6
import_overview: Refactoring of detailed information.
Thomas Junk <thomas.junk@intevation.de>
parents:
2647
diff
changeset
|
119 const { bottlenecks } = this.details.summary; |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
120 if (bottlenecks.length === 1) |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
121 return equalToFilter("bottleneck_id", bottlenecks[0]); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
122 const orExpressions = bottlenecks.map(x => { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
123 return equalToFilter("bottleneck_id", x); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
124 }); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
125 return orFilter(...orExpressions); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
126 }; |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
127 const filterExpression = generateFilter(); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
128 const bottleneckFeatureCollectionRequest = new WFS().writeGetFeature({ |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
129 srsName: "EPSG:4326", |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
130 featureNS: "gemma", |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
131 featurePrefix: "gemma", |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
132 featureTypes: ["bottlenecks_geoserver"], |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
133 outputFormat: "application/json", |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
134 filter: filterExpression |
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 HTTP.post( |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
137 "/internal/wfs", |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
138 new XMLSerializer().serializeToString( |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
139 bottleneckFeatureCollectionRequest |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
140 ), |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
141 { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
142 headers: { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
143 "X-Gemma-Auth": localStorage.getItem("token"), |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
144 "Content-type": "text/xml; charset=UTF-8" |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
145 } |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
146 } |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
147 ) |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
148 .then(response => { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
149 this.bottlenecks = response.data.features; |
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 .catch(error => { |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
152 const { status, data } = error.response; |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
153 displayError({ |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
154 title: this.$gettext("Backend Error"), |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
155 message: `${status}: ${data.message || data}` |
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 }); |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
158 }, |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
159 moveToBottleneck(index) { |
3127
0374197c384f
client: fix openLayersMap getter calls
Markus Kottlaender <markus@intevation.de>
parents:
3054
diff
changeset
|
160 this.openLayersMap() |
0374197c384f
client: fix openLayersMap getter calls
Markus Kottlaender <markus@intevation.de>
parents:
3054
diff
changeset
|
161 .getLayer("BOTTLENECKS") |
0374197c384f
client: fix openLayersMap getter calls
Markus Kottlaender <markus@intevation.de>
parents:
3054
diff
changeset
|
162 .setVisible(true); |
3054
1ef2f4179d30
client: map store: merged/renamed method(s)
Markus Kottlaender <markus@intevation.de>
parents:
3044
diff
changeset
|
163 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
|
164 feature: this.bottlenecks[index], |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
165 zoom: 17, |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
166 preventZoomOut: true |
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 }, |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
169 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
|
170 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
|
171 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
|
172 } 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
|
173 this.showBottleneckDetail = index; |
2647
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
174 } |
c52bf6f994c0
overview2: bottleneckview added
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
175 } |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2732
diff
changeset
|
176 } |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
177 }; |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
178 </script> |