-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraficasView.vue
87 lines (83 loc) · 1.81 KB
/
GraficasView.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<script lang="ts" setup>
import { ref } from 'vue'
import GraficaHijo from '../components/GraficasHijos.vue'
let gap: number = 0
const urlGraficas: string =
import.meta.env.VITE_APP_ROOT_API + '/graficas'
let graficasF = ref<any>([
{
url: urlGraficas + `?gap=${gap}&type=sesion`,
type: 'sesion'
},
{
url: urlGraficas + `?gap=${gap}&type=lecesc`,
type: 'lecesc'
},
{
url: urlGraficas + `?gap=${gap}&type=secuencial`,
type: 'secuencial'
}
])
function updateCharts() {
graficasF.value = [
{
url: urlGraficas + `?gap=${gap}&type=sesion`,
type: 'sesion'
},
{
url: urlGraficas + `?gap=${gap}&type=lecesc`,
type: 'lecesc'
},
{
url: urlGraficas + `?gap=${gap}&type=secuencial`,
type: 'secuencial'
}
]
}
async function backGap() {
if (gap == 168) {
} else {
gap += 1
updateCharts()
}
}
async function forwardGap() {
if (gap == 0) {
} else {
gap -= 1
updateCharts()
}
}
</script>
<template>
<v-container fluid>
<v-row justify="center" no-gutters>
<v-col cols="auto" class="mx-auto" v-for="item in graficasF">
<GraficaHijo :url="item.url" :type="item.type"/>
</v-col>
</v-row>
<v-row justify="center">
<v-col cols="auto">
<v-btn
@click="backGap"
class="mr-7 mt-4"
color="blue-grey-darken-2"
elevation="5"
size="x-large"
><v-icon>mdi-arrow-left-bold</v-icon></v-btn
>
</v-col>
<v-col cols="auto">
<v-btn
@click="forwardGap"
class="ml-7 mt-4"
color="blue-grey-darken-2"
elevation="5"
size="x-large"
><v-icon>mdi-arrow-right-bold</v-icon></v-btn
>
</v-col>
</v-row>
</v-container>
</template>
<style scoped></style>