dist
This commit is contained in:
@@ -1,10 +1,58 @@
|
||||
<template lang="pug">
|
||||
section
|
||||
span resumen
|
||||
|
||||
table.table.is-fullwidth.is-hoverable.is-narrow
|
||||
thead
|
||||
tr
|
||||
th Equipo
|
||||
th Tipo
|
||||
th Hora inicio
|
||||
th Hora maximo
|
||||
th Usuario
|
||||
tbody
|
||||
tr(v-for="p in prestamo")
|
||||
td {{p.detalles[0].equipo.id}}
|
||||
td {{p.equipo}}
|
||||
td {{fecha(p.fh_in)}}
|
||||
td {{maxFecha(p.fh_in)}}
|
||||
td {{p.idUsuario}}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from '../../api'
|
||||
const axios = require('axios')
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
prestamo: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fecha: function(date){
|
||||
let dt = new Date(date)
|
||||
console.log(dt)
|
||||
return `${dt.getMonth()+1}-${dt.getDate()} ${dt.getHours()}:${dt.getMinutes()} `
|
||||
},
|
||||
maxFecha: function(date){
|
||||
let dt = new Date(date)
|
||||
console.log(dt)
|
||||
return `${dt.getMonth()+1}-${dt.getDate()} ${dt.getHours()+2}:${dt.getMinutes()+15} `
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
axios.get(api.url + '/prestamo', {
|
||||
headers: {
|
||||
'token': window.localStorage.pcpumaT
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
console.log(response)
|
||||
this.prestamo = response.data.data
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user