@christianriedl/media 1.0.187 → 1.0.189
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iBooks.d.ts +5 -1
- package/package.json +1 -1
- package/src/components/BookPlace.vue +20 -7
- package/src/views/BooksPlacePage.vue +45 -28
package/dist/iBooks.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export interface IFullBook {
|
|
|
34
34
|
}
|
|
35
35
|
export interface IBookPlace {
|
|
36
36
|
id: number;
|
|
37
|
-
|
|
37
|
+
vorzimmer: boolean;
|
|
38
38
|
regalVonLinks: number;
|
|
39
39
|
fachVonOben: number;
|
|
40
40
|
rechts: boolean;
|
|
@@ -42,10 +42,14 @@ export interface IBookPlace {
|
|
|
42
42
|
breite: number;
|
|
43
43
|
buchstaben: string;
|
|
44
44
|
buchstaben2: string;
|
|
45
|
+
zweitBuchstaben: string;
|
|
46
|
+
zweitBuchstaben2: string;
|
|
45
47
|
}
|
|
46
48
|
export interface IPlace {
|
|
47
49
|
vorne: string;
|
|
50
|
+
vorne2: string;
|
|
48
51
|
hinten: string;
|
|
52
|
+
hinten2: string;
|
|
49
53
|
color: string;
|
|
50
54
|
}
|
|
51
55
|
export interface IBooksService {
|
package/package.json
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { StyleValue } from 'vue';
|
|
2
3
|
import { IPlace } from '@christianriedl/media';
|
|
3
4
|
const props = defineProps<{ place: IPlace, height: number }>();
|
|
4
5
|
const place: IPlace = props.place;
|
|
5
|
-
const heightStyle: StyleValue = { height: height + "px" }
|
|
6
|
+
const heightStyle: StyleValue = { height: props.height + "px" };
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
9
|
<template>
|
|
9
|
-
<v-row dense :class="[place.color,
|
|
10
|
+
<v-row dense :class="[place.color,'place']" :style="heightStyle" >
|
|
10
11
|
<v-col cols="12" >
|
|
11
|
-
<p
|
|
12
|
+
<p class="vorne">{{place.vorne}}</p>
|
|
12
13
|
</v-col>
|
|
13
14
|
<v-col cols="12" >
|
|
14
|
-
<p
|
|
15
|
+
<p class="vorne">{{place.vorne2}}</p>
|
|
16
|
+
</v-col>
|
|
17
|
+
<v-col cols="12" >
|
|
18
|
+
<p class="hinten">{{place.hinten}}</p>
|
|
19
|
+
</v-col>
|
|
20
|
+
<v-col cols="12" >
|
|
21
|
+
<p class="hinten">{{place.hinten2}}</p>
|
|
15
22
|
</v-col>
|
|
16
23
|
</v-row>
|
|
17
24
|
<v-divider></v-divider>
|
|
@@ -19,12 +26,18 @@
|
|
|
19
26
|
|
|
20
27
|
<style scoped>
|
|
21
28
|
.place {
|
|
22
|
-
border-style: solid
|
|
29
|
+
border-style: solid;
|
|
30
|
+
border-color: black;
|
|
31
|
+
border-width: medium;
|
|
23
32
|
}
|
|
24
33
|
.vorne {
|
|
25
|
-
|
|
34
|
+
font-size: medium;
|
|
35
|
+
font-family: monospace;
|
|
36
|
+
background-color: white;
|
|
26
37
|
}
|
|
27
38
|
.hinten {
|
|
28
|
-
|
|
39
|
+
font-size: medium;
|
|
40
|
+
font-family: monospace;
|
|
41
|
+
background-color: lightgrey;
|
|
29
42
|
}
|
|
30
43
|
</style>
|
|
@@ -11,17 +11,18 @@
|
|
|
11
11
|
faecher: IPlace[];
|
|
12
12
|
faecher2: IPlace[];
|
|
13
13
|
}
|
|
14
|
-
const regale: Regal[] = []:
|
|
15
14
|
const regalColor = "bg-brown-lighten-3";
|
|
16
15
|
const doorColor = "bg-brown-darken-1";
|
|
17
16
|
const glassColor = "bg-blue-grey-lighten-1";
|
|
18
|
-
const placeHeight = ref(
|
|
17
|
+
const placeHeight = ref(100);
|
|
18
|
+
const regale = reactive<Regal[]>(initPlaces());
|
|
19
19
|
|
|
20
20
|
start();
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
function initPlaces (): Regal[] {
|
|
23
|
+
const initRegale: Regal[] = [];
|
|
23
24
|
for (let i = 0; i < 10; i++) {
|
|
24
|
-
|
|
25
|
+
let regal: Regal = { faecher: [], faecher2: [] };
|
|
25
26
|
for (let j = 0; j < 6; j++) {
|
|
26
27
|
const fach: IPlace = { vorne: "", hinten: "", color: regalColor };
|
|
27
28
|
if (i < 8) {
|
|
@@ -42,71 +43,87 @@
|
|
|
42
43
|
}
|
|
43
44
|
regal.faecher2.push(fach2);
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
+
initRegale.push(regal);
|
|
46
47
|
}
|
|
48
|
+
return initRegale;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async function start() {
|
|
47
52
|
const places = await booksService.getBookPlaces();
|
|
48
53
|
for (let i = 0; i < places.length; i++) {
|
|
49
54
|
const place = places[i];
|
|
50
55
|
let regal: Regal;
|
|
51
|
-
if (place.
|
|
56
|
+
if (place.vorzimmer) {
|
|
52
57
|
regal = regale[8 + place.regalVonLinks - 1];
|
|
53
58
|
}
|
|
54
59
|
else {
|
|
55
|
-
regal = regale [(place.regalVonLinks - 1) * 2 + place.rechts ? 1 : 0];
|
|
60
|
+
regal = regale [(place.regalVonLinks - 1) * 2 + (place.rechts ? 1 : 0)];
|
|
56
61
|
}
|
|
57
|
-
|
|
58
|
-
if (place.hinten)
|
|
62
|
+
let fach = regal.faecher[place.fachVonOben - 1];
|
|
63
|
+
if (place.hinten) {
|
|
59
64
|
fach.hinten = place.buchstaben;
|
|
60
|
-
|
|
65
|
+
fach.hinten2 = place.zweitBuchstaben;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
61
68
|
fach.vorne = place.buchstaben;
|
|
62
|
-
|
|
63
|
-
|
|
69
|
+
fach.vorne2 = place.zweitBuchstaben;
|
|
70
|
+
}
|
|
71
|
+
fach = regal.faecher2[place.fachVonOben - 1];
|
|
72
|
+
if (place.hinten) {
|
|
64
73
|
fach.hinten = place.buchstaben2;
|
|
65
|
-
|
|
74
|
+
fach.hinten2 = place.zweitBuchstaben2;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
66
77
|
fach.vorne = place.buchstaben2;
|
|
78
|
+
fach.vorne2 = place.zweitBuchstaben2;
|
|
79
|
+
}
|
|
67
80
|
}
|
|
68
81
|
}
|
|
69
82
|
</script>
|
|
70
83
|
|
|
71
84
|
<template>
|
|
72
85
|
<v-container fluid class="bg-office" >
|
|
73
|
-
<
|
|
86
|
+
<h1>SOLL</h1>
|
|
74
87
|
<v-row dense>
|
|
75
88
|
<v-col cols="9">
|
|
76
|
-
|
|
89
|
+
<h2>WOHNZIMMER</h2>
|
|
77
90
|
</v-col>
|
|
78
91
|
<v-col cols="3">
|
|
79
|
-
|
|
80
|
-
|
|
92
|
+
<h2>VORZIMMER</h2>
|
|
93
|
+
</v-col>
|
|
81
94
|
</v-row>
|
|
82
95
|
<v-row dense>
|
|
83
96
|
<v-col v-for="n in 8" cols="1">
|
|
84
97
|
<book-place v-for="m in 6" :place="regale[n-1].faecher[m-1]" :height="placeHeight" ></book-place>
|
|
85
98
|
</v-col>
|
|
99
|
+
<v-col cols="1"></v-col>
|
|
86
100
|
<v-col cols="1">
|
|
101
|
+
<book-place v-for="m in 6" :place="regale[8].faecher[m-1]" :height="placeHeight" ></book-place>
|
|
102
|
+
</v-col>
|
|
103
|
+
<v-col cols="2" class="pl-2">
|
|
104
|
+
<book-place v-for="m in 6" :place="regale[9].faecher[m-1]" :height="placeHeight" ></book-place>
|
|
87
105
|
</v-col>
|
|
88
|
-
<v-col v-for="n in 2" cols="1">
|
|
89
|
-
<book-place v-for="m in 6" :place="regale[n-1 + 8].faecher[m-1]" :height="placeHeight" ></book-place>
|
|
90
|
-
<v-col>
|
|
91
106
|
</v-row>
|
|
92
|
-
<
|
|
107
|
+
<h1>IST</h1>
|
|
93
108
|
<v-row dense>
|
|
94
109
|
<v-col cols="9">
|
|
95
|
-
|
|
110
|
+
<h2>WOHNZIMMER</h2>
|
|
96
111
|
</v-col>
|
|
97
112
|
<v-col cols="3">
|
|
98
|
-
|
|
99
|
-
|
|
113
|
+
<h2>VORZIMMER</h2>
|
|
114
|
+
</v-col>
|
|
100
115
|
</v-row>
|
|
101
116
|
<v-row dense>
|
|
102
117
|
<v-col v-for="n in 8" cols="1">
|
|
103
|
-
<book-place v-for="m in 6" :place="regale[n-1].
|
|
118
|
+
<book-place v-for="m in 6" :place="regale[n-1].faecher2[m-1]" :height="placeHeight" ></book-place>
|
|
104
119
|
</v-col>
|
|
120
|
+
<v-col cols="1"></v-col>
|
|
105
121
|
<v-col cols="1">
|
|
122
|
+
<book-place v-for="m in 6" :place="regale[8].faecher2[m-1]" :height="placeHeight" ></book-place>
|
|
123
|
+
</v-col>
|
|
124
|
+
<v-col cols="2" class="pl-2">
|
|
125
|
+
<book-place v-for="m in 6" :place="regale[9].faecher2[m-1]" :height="placeHeight" ></book-place>
|
|
106
126
|
</v-col>
|
|
107
|
-
<v-col v-for="n in 2" cols="1">
|
|
108
|
-
<book-place v-for="m in 6" :place="regale[n-1 + 8].faecher2[m-1]" :height="placeHeight" ></book-place>
|
|
109
|
-
<v-col>
|
|
110
127
|
</v-row>
|
|
111
128
|
</v-container>
|
|
112
129
|
</template>
|