Mercurial > gemma
view 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 |
line wrap: on
line source
<template> <div> <span class="empty"></span> <a @click="zoomTo()" class="text-info pointer"> {{ details.summary.bottleneck }} </a> </div> </template> <script> /* This is Free Software under GNU Affero General Public License v >= 3.0 * without warranty, see README.md and license for details. * * SPDX-License-Identifier: AGPL-3.0-or-later * License-Filename: LICENSES/AGPL-3.0.txt * * Copyright (C) 2018 by via donau * – Österreichische Wasserstraßen-Gesellschaft mbH * Software engineering by Intevation GmbH * * Author(s): * Thomas Junk <thomas.junk@intevation.de> */ export default { name: "soundingresultdetails", props: ["entry", "details"], methods: { moveMap(coordinates) { this.$store.commit("map/moveMap", { coordinates: coordinates, zoom: 17, preventZoomOut: true }); }, zoomTo() { const { lat, lon, bottleneck, date } = this.details.summary; const coordinates = [lat, lon]; this.moveMap(coordinates); this.$store .dispatch("bottlenecks/setSelectedBottleneck", bottleneck) .then(() => { this.$store.commit("bottlenecks/setSelectedSurveyByDate", date); }); } } }; </script> <style></style>