errores de merge
This commit is contained in:
@@ -13,41 +13,50 @@
|
||||
</b-field>
|
||||
</div>
|
||||
<div class="column is-3 mb-0">
|
||||
<b-field >
|
||||
<b-field>
|
||||
<b-input
|
||||
placeholder="Correo electrónico"
|
||||
icon="school"
|
||||
rounded
|
||||
v-model="correo"
|
||||
maxlength="9"
|
||||
>
|
||||
>
|
||||
</b-input>
|
||||
</b-field>
|
||||
</div>
|
||||
<div class="buttons section pt-3 pl-5">
|
||||
<b-button type="is-info" @click="obtenerDatos(idStatus)">
|
||||
Buscar
|
||||
</b-button>
|
||||
</div>
|
||||
<b-button type="is-info" @click="obtenerDatos(idStatus)">
|
||||
Buscar
|
||||
</b-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns mb-5">
|
||||
<section class="column is-12">
|
||||
<b-table
|
||||
:data="data"
|
||||
:loading="loading"
|
||||
hoverable
|
||||
striped
|
||||
paginated
|
||||
backend-pagination
|
||||
:total="total"
|
||||
:per-page="perPage"
|
||||
@page-change="onPageChange"
|
||||
:data="data"
|
||||
:loading="loading"
|
||||
hoverable
|
||||
striped
|
||||
paginated
|
||||
backend-pagination
|
||||
:total="total"
|
||||
:per-page="perPage"
|
||||
@page-change="onPageChange"
|
||||
>
|
||||
<b-table-column field="nombre" label="Nombre" v-slot="props" centered>
|
||||
<span @click="verRegistro(props.row.usuario)">{{ props.row.nombre}}</span>
|
||||
<span @click="verRegistro(props.row.usuario)">{{
|
||||
props.row.nombre
|
||||
}}</span>
|
||||
</b-table-column>
|
||||
<b-table-column field="correo" label="Correo electrónico" v-slot="props" centered>
|
||||
<span @click="verRegistro(props.row.usuario)">{{ props.row.usuario}}</span>
|
||||
<b-table-column
|
||||
field="correo"
|
||||
label="Correo electrónico"
|
||||
v-slot="props"
|
||||
centered
|
||||
>
|
||||
<span @click="verRegistro(props.row.usuario)">{{
|
||||
props.row.usuario
|
||||
}}</span>
|
||||
</b-table-column>
|
||||
</b-table>
|
||||
</section>
|
||||
@@ -56,91 +65,94 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import axios from "axios";
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
idUsuario: '',
|
||||
idUsuario: "",
|
||||
data: [],
|
||||
total: '',
|
||||
total: "",
|
||||
loading: false,
|
||||
page: 1,
|
||||
perPage: 25,
|
||||
correo: '',
|
||||
nombre: '',
|
||||
idStatus: 1
|
||||
}
|
||||
correo: "",
|
||||
nombre: "",
|
||||
idStatus: 1,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onPageChange (page) {
|
||||
this.page = page
|
||||
this.obtenerDatos()
|
||||
console.log(this.page)
|
||||
onPageChange(page) {
|
||||
this.page = page;
|
||||
this.obtenerDatos();
|
||||
console.log(this.page);
|
||||
},
|
||||
obtenerDatos (idStatus) {
|
||||
this.loading = true
|
||||
this.data = []
|
||||
axios.get(`${process.env.api}/usuario/responsable?idUsuario=${this.idUsuario}&pagina=${this.page}&nombre=${this.nombre}&correo=${this.correo}`)
|
||||
.then(res => {
|
||||
const servicios = res.data.servicios
|
||||
obtenerDatos(idStatus) {
|
||||
this.loading = true;
|
||||
this.data = [];
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/usuario/responsable?idUsuario=${this.idUsuario}&pagina=${this.page}&nombre=${this.nombre}&correo=${this.correo}`
|
||||
)
|
||||
.then((res) => {
|
||||
const servicios = res.data.servicios;
|
||||
if (servicios.length !== 0) {
|
||||
for (let i = 0; i < servicios.length; i++) {
|
||||
this.data.push({
|
||||
nombre: servicios[i].nombre,
|
||||
usuario: servicios[i].usuario,
|
||||
idUsuario: servicios[i].idUsuario
|
||||
})
|
||||
idUsuario: servicios[i].idUsuario,
|
||||
});
|
||||
}
|
||||
}
|
||||
let currentTotal = servicios.length
|
||||
let contador
|
||||
for (let i = 0; i < (res.data.registros / this.perPage) + 1; i++) {
|
||||
contador = i
|
||||
let currentTotal = servicios.length;
|
||||
let contador;
|
||||
for (let i = 0; i < res.data.registros / this.perPage + 1; i++) {
|
||||
contador = i;
|
||||
}
|
||||
currentTotal = this.perPage * contador
|
||||
this.total = currentTotal
|
||||
this.loading = false
|
||||
currentTotal = this.perPage * contador;
|
||||
this.total = currentTotal;
|
||||
this.loading = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err.response.data.message)
|
||||
this.loading = false
|
||||
})
|
||||
console.log(err.response.data.message);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
insertIdLocal () {
|
||||
this.idUsuario = localStorage.getItem('idUsuario')
|
||||
insertIdLocal() {
|
||||
this.idUsuario = localStorage.getItem("idUsuario");
|
||||
},
|
||||
verRegistro(correoResponsable) {
|
||||
localStorage.setItem("correo", correoResponsable);
|
||||
this.$router.push("./infoResponsable");
|
||||
},
|
||||
verRegistro (correoResponsable) {
|
||||
localStorage.setItem('correo', correoResponsable)
|
||||
this.$router.push('./infoResponsable')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
busquedaNombreResponsable () {
|
||||
return this.responsables.filter(responsables =>
|
||||
busquedaNombreResponsable() {
|
||||
return this.responsables.filter((responsables) =>
|
||||
responsables.nombreResp.includes(this.buscarNombreResponsable)
|
||||
)
|
||||
}
|
||||
);
|
||||
},
|
||||
},
|
||||
async created () {
|
||||
await this.obtenerDatos()
|
||||
this.insertIdLocal()
|
||||
}
|
||||
}
|
||||
async created() {
|
||||
await this.obtenerDatos();
|
||||
this.insertIdLocal();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.b-table{
|
||||
.b-table {
|
||||
cursor: pointer;
|
||||
}
|
||||
.input:focus{
|
||||
border:#1b3d70;
|
||||
.input:focus {
|
||||
border: #1b3d70;
|
||||
box-shadow: 0 0 8px 0 #1b3d70;
|
||||
}
|
||||
.select select:focus{
|
||||
.select select:focus {
|
||||
border-color: #1b3d70;
|
||||
box-shadow: 0 0 8px 0 #1b3d70;
|
||||
}
|
||||
.select:not(.is-multiple):not(.is-loading)::after{
|
||||
.select:not(.is-multiple):not(.is-loading)::after {
|
||||
border-color: #1b3d70;
|
||||
}
|
||||
.pagination-link.is-current {
|
||||
|
||||
Reference in New Issue
Block a user