comparison client/src/components/importoverview/SoundingResultDetail.vue @ 2685:39a05f8c34e6 import-overview-rework

import_overview: Refactoring of detailed information. When the entry is opened, a request is made to retrieve the detailed information for this entry. It contains the log protocol information as well as the executive summary. This is passed down to child components of the entry.
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 15 Mar 2019 13:42:49 +0100
parents 13377f2a5c42
children 5b990f612420
comparison
equal deleted inserted replaced
2683:4d460b2b439f 2685:39a05f8c34e6
1 <template> 1 <template>
2 <div> 2 <div>
3 <span class="empty"></span> 3 <span class="empty"></span>
4 <a @click="zoomTo()" class="text-info pointer"> 4 <a @click="zoomTo()" class="text-info pointer">
5 {{ entry.summary.bottleneck }} 5 {{ details.summary.bottleneck }}
6 </a> 6 </a>
7 </div> 7 </div>
8 </template> 8 </template>
9 9
10 <script> 10 <script>
21 * Author(s): 21 * Author(s):
22 * Thomas Junk <thomas.junk@intevation.de> 22 * Thomas Junk <thomas.junk@intevation.de>
23 */ 23 */
24 export default { 24 export default {
25 name: "soundingresultdetails", 25 name: "soundingresultdetails",
26 props: ["entry"], 26 props: ["entry", "details"],
27 methods: { 27 methods: {
28 moveMap(coordinates) { 28 moveMap(coordinates) {
29 this.$store.commit("map/moveMap", { 29 this.$store.commit("map/moveMap", {
30 coordinates: coordinates, 30 coordinates: coordinates,
31 zoom: 17, 31 zoom: 17,
32 preventZoomOut: true 32 preventZoomOut: true
33 }); 33 });
34 }, 34 },
35 zoomTo() { 35 zoomTo() {
36 const { lat, lon, bottleneck, date } = this.entry.summary; 36 const { lat, lon, bottleneck, date } = this.details.summary;
37 const coordinates = [lat, lon]; 37 const coordinates = [lat, lon];
38 this.moveMap(coordinates); 38 this.moveMap(coordinates);
39 this.$store 39 this.$store
40 .dispatch("bottlenecks/setSelectedBottleneck", bottleneck) 40 .dispatch("bottlenecks/setSelectedBottleneck", bottleneck)
41 .then(() => { 41 .then(() => {