Mercurial > gemma
annotate client/src/components/importoverview/SoundingResultDetail.vue @ 3044:c71373594719
client: map: prepared store to hold multiple map objects
This will be necessary to sync maps, toggle layers per map, etc. Therefore the methods to move the map
(moveToExtent, etc.) became actions instead of mutations.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Sat, 13 Apr 2019 16:02:06 +0200 |
parents | 9a408a8b74b8 |
children | 8c0f2377ff47 |
rev | line source |
---|---|
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1 <template> |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
2 <div> |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
3 <a @click="zoomTo()" class="text-info pointer"> |
2685
39a05f8c34e6
import_overview: Refactoring of detailed information.
Thomas Junk <thomas.junk@intevation.de>
parents:
2608
diff
changeset
|
4 {{ details.summary.bottleneck }} |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
5 </a> |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
6 </div> |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
7 </template> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
8 |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
9 <script> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
10 /* 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
|
11 * 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
|
12 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
13 * SPDX-License-Identifier: AGPL-3.0-or-later |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
14 * License-Filename: LICENSES/AGPL-3.0.txt |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
15 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
16 * Copyright (C) 2018 by via donau |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
17 * – Österreichische Wasserstraßen-Gesellschaft mbH |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
18 * Software engineering by Intevation GmbH |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
19 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
20 * Author(s): |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
21 * Thomas Junk <thomas.junk@intevation.de> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
22 */ |
2732
0ab7985ef008
import_review: fixed flakey display of logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2717
diff
changeset
|
23 import { mapState } from "vuex"; |
0ab7985ef008
import_review: fixed flakey display of logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2717
diff
changeset
|
24 |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
25 export default { |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
26 name: "soundingresultdetails", |
2732
0ab7985ef008
import_review: fixed flakey display of logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2717
diff
changeset
|
27 props: ["entry"], |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2685
diff
changeset
|
28 mounted() { |
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2685
diff
changeset
|
29 this.$store.commit("imports/hideAdditionalInfo"); |
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2685
diff
changeset
|
30 }, |
2732
0ab7985ef008
import_review: fixed flakey display of logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2717
diff
changeset
|
31 computed: { |
0ab7985ef008
import_review: fixed flakey display of logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2717
diff
changeset
|
32 ...mapState("imports", ["showAdditional", "details"]) |
0ab7985ef008
import_review: fixed flakey display of logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2717
diff
changeset
|
33 }, |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
34 methods: { |
3017
9a408a8b74b8
client: inlined some functions that were used only once
Markus Kottlaender <markus@intevation.de>
parents:
2927
diff
changeset
|
35 zoomTo() { |
9a408a8b74b8
client: inlined some functions that were used only once
Markus Kottlaender <markus@intevation.de>
parents:
2927
diff
changeset
|
36 const { lat, lon, bottleneck, date } = this.details.summary; |
3044
c71373594719
client: map: prepared store to hold multiple map objects
Markus Kottlaender <markus@intevation.de>
parents:
3017
diff
changeset
|
37 this.$store.dispatch("map/moveMap", { |
3017
9a408a8b74b8
client: inlined some functions that were used only once
Markus Kottlaender <markus@intevation.de>
parents:
2927
diff
changeset
|
38 coordinates: [lat, lon], |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
39 zoom: 17, |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
40 preventZoomOut: true |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
41 }); |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
42 this.$store |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
43 .dispatch("bottlenecks/setSelectedBottleneck", bottleneck) |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
44 .then(() => { |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
45 this.$store.commit("bottlenecks/setSelectedSurveyByDate", date); |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
46 }); |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
47 } |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
48 } |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
49 }; |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
50 </script> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
51 |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
52 <style></style> |