comparison client/src/components/importoverview/StretchDetails.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 11fd7ee37f10
children 5b990f612420
comparison
equal deleted inserted replaced
2683:4d460b2b439f 2685:39a05f8c34e6
1 <template> 1 <template>
2 <div> 2 <div>
3 <span class="empty">&nbsp;</span> 3 <span class="empty">&nbsp;</span>
4 <a @click="zoomToStretch()" class="text-info pointer">{{ 4 <a @click="zoomToStretch()" class="text-info pointer">{{
5 entry.summary.stretch 5 details.summary.stretch
6 }}</a> 6 }}</a>
7 </div> 7 </div>
8 </template> 8 </template>
9 9
10 <script> 10 <script>
24 import { displayError } from "@/lib/errors.js"; 24 import { displayError } from "@/lib/errors.js";
25 import { LAYERS } from "@/store/map.js"; 25 import { LAYERS } from "@/store/map.js";
26 26
27 export default { 27 export default {
28 name: "stretchdetails", 28 name: "stretchdetails",
29 props: ["entry"], 29 props: ["entry", "details"],
30 methods: { 30 methods: {
31 moveToExtent(feature) { 31 moveToExtent(feature) {
32 this.$store.commit("map/moveToExtent", { 32 this.$store.commit("map/moveToExtent", {
33 feature: feature, 33 feature: feature,
34 zoom: 17, 34 zoom: 17,
35 preventZoomOut: true 35 preventZoomOut: true
36 }); 36 });
37 }, 37 },
38 zoomToStretch() { 38 zoomToStretch() {
39 const name = this.entry.summary.stretch; 39 const name = this.details.summary.stretch;
40 this.$store.commit("map/setLayerVisible", LAYERS.STRETCHES); 40 this.$store.commit("map/setLayerVisible", LAYERS.STRETCHES);
41 this.$store 41 this.$store
42 .dispatch("imports/loadStretch", name) 42 .dispatch("imports/loadStretch", name)
43 .then(response => { 43 .then(response => {
44 if (response.data.features.length < 1) 44 if (response.data.features.length < 1)