Mercurial > gemma
annotate client/src/components/importoverview/ApprovedGaugeMeasurementDetail.vue @ 3787:f86220aa8a72 yworks-svg2pdf
Waterlevel: prefetch images of template and convert to dataURI
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 03 Jul 2019 16:42:38 +0200 |
parents | fd6d62b08af7 |
children | 69166db6ba8a |
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 diffs: 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 > |
3766
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
9 <virtual-list :size="scrollistConfig.size" :remain="scrollistConfig.remain"> |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
10 <Item |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
11 class="d-flex flex-row px-2 border-top" |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
12 v-for="(item, index) in details.summary" |
3767
fd6d62b08af7
review_agm: fixed open diff bug. Only selected diff is opened and stays open
Thomas Junk <thomas.junk@intevation.de>
parents:
3766
diff
changeset
|
13 @openDiff="toggleDiff" |
3766
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
14 :key="index" |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
15 :line="item" |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
16 :index="index" |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
17 :showDiff="showDiff" |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
18 /> |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
19 </virtual-list> |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
20 </div> |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
21 </template> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
22 |
2882
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
23 <style lang="sass" scoped> |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
24 .diffs |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
25 width: 100% |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
26 overflow-y: auto |
2925
ce148a7fb896
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2914
diff
changeset
|
27 > div |
ce148a7fb896
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2914
diff
changeset
|
28 border-top: dashed 1px #dee2e6 |
ce148a7fb896
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2914
diff
changeset
|
29 &:first-child |
ce148a7fb896
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2914
diff
changeset
|
30 border-top: none |
2944
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
31 .compare-table |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
32 position: relative |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
33 overflow: hidden |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
34 &::after |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
35 content: '' |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
36 position: absolute |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
37 top: 0 |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
38 right: -5px |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
39 bottom: 0 |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
40 left: -5px |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
41 box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.4) |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
42 > div |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
43 font-size: 0.7rem |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
44 &:nth-child(odd) |
73f537379203
client: importoverview: improved style
Markus Kottlaender <markus@intevation.de>
parents:
2936
diff
changeset
|
45 background-color: #f8f9fa |
2882
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
46 |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
47 .split |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
48 max-height: 35vh |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
49 |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
50 .full |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
51 max-height: 70vh |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
52 </style> |
6538ee93df72
client: moved style blocks below template blocks
Markus Kottlaender <markus@intevation.de>
parents:
2880
diff
changeset
|
53 |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
54 <script> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
55 /* 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
|
56 * 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
|
57 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
58 * SPDX-License-Identifier: AGPL-3.0-or-later |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
59 * License-Filename: LICENSES/AGPL-3.0.txt |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
60 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
61 * Copyright (C) 2018 by via donau |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
62 * – Österreichische Wasserstraßen-Gesellschaft mbH |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
63 * Software engineering by Intevation GmbH |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
64 * |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
65 * Author(s): |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
66 * Thomas Junk <thomas.junk@intevation.de> |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
67 */ |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
68 import { mapState } from "vuex"; |
3766
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
69 import virtualList from "vue-virtual-scroll-list"; |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
70 |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
71 export default { |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
72 data() { |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
73 return { |
2914
84a40983bb9f
client: importsoverview: improved opening mechanism for additional details
Markus Kottlaender <markus@intevation.de>
parents:
2902
diff
changeset
|
74 showDiff: 0 // open first item by default |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
75 }; |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
76 }, |
3766
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
77 components: { |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
78 "virtual-list": virtualList, |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
79 Item: () => import("./AGMLogItem") |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
80 }, |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
81 computed: { |
3766
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
82 ...mapState("imports", ["showLogs", "details"]), |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
83 scrollistConfig() { |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
84 const smallLayout = { |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
85 size: 10, |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
86 remain: 20 |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
87 }; |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
88 const largeLayout = { |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
89 size: 12, |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
90 remain: 22 |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
91 }; |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
92 if (this.showAdditional) return smallLayout; |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
93 return largeLayout; |
96ee62fb88fd
agm_review: now with virtual scrolling
Thomas Junk <thomas.junk@intevation.de>
parents:
2944
diff
changeset
|
94 } |
2717
5b990f612420
import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2708
diff
changeset
|
95 }, |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
96 methods: { |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
97 toggleDiff(number) { |
3767
fd6d62b08af7
review_agm: fixed open diff bug. Only selected diff is opened and stays open
Thomas Junk <thomas.junk@intevation.de>
parents:
3766
diff
changeset
|
98 console.log(number); |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2732
diff
changeset
|
99 if (this.showDiff !== number) { |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
100 this.showDiff = number; |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
101 } else { |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2732
diff
changeset
|
102 this.showDiff = false; |
2608
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
103 } |
13377f2a5c42
overview2: agm details prototype implemented
Thomas Junk <thomas.junk@intevation.de>
parents:
2602
diff
changeset
|
104 } |
2880
c40540889b53
client: code cleanup, slight style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2732
diff
changeset
|
105 } |
2602
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
106 }; |
5d0e5159190f
overview2: detail components for unified log
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
107 </script> |