Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ad9ce556e5 | |||
| 2233b3d918 | |||
| 7b549a66cd | |||
| da424b4ff3 | |||
| 85656d1559 | |||
| 7383b33989 | |||
| 571f7e14cf | |||
| 99f2de9496 |
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=./src/img/escudo-unam.ico><title>Censo</title><link href=css/app.b3f8550c.css rel=preload as=style><link href=css/chunk-vendors.ab91ceed.css rel=preload as=style><link href=js/app.6b892091.js rel=preload as=script><link href=js/chunk-vendors.f0af08be.js rel=preload as=script><link href=css/chunk-vendors.ab91ceed.css rel=stylesheet><link href=css/app.b3f8550c.css rel=stylesheet></head><body><div id=app></div><script src=/dist/build.js></script><script src=js/chunk-vendors.f0af08be.js></script><script src=js/app.6b892091.js></script></body></html>
|
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=./src/img/escudo-unam.ico><title>Censo</title><link href=css/app.cfbc4946.css rel=preload as=style><link href=css/chunk-vendors.ab91ceed.css rel=preload as=style><link href=js/app.fc975bee.js rel=preload as=script><link href=js/chunk-vendors.6d6b9537.js rel=preload as=script><link href=css/chunk-vendors.ab91ceed.css rel=stylesheet><link href=css/app.cfbc4946.css rel=stylesheet></head><body><div id=app></div><script src=/dist/build.js></script><script src=js/chunk-vendors.6d6b9537.js></script><script src=js/app.fc975bee.js></script></body></html>
|
||||||
Vendored
-2
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
+2
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
Generated
+6
-7
@@ -1787,13 +1787,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ansi-styles": {
|
"ansi-styles": {
|
||||||
"version": "4.2.1",
|
"version": "4.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||||
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/color-name": "^1.1.1",
|
|
||||||
"color-convert": "^2.0.1"
|
"color-convert": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1983,9 +1982,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vue-loader-v16": {
|
"vue-loader-v16": {
|
||||||
"version": "npm:vue-loader@16.0.0-beta.8",
|
"version": "npm:vue-loader@16.0.0-rc.1",
|
||||||
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0-beta.8.tgz",
|
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0-rc.1.tgz",
|
||||||
"integrity": "sha512-oouKUQWWHbSihqSD7mhymGPX1OQ4hedzAHyvm8RdyHh6m3oIvoRF+NM45i/bhNOlo8jCnuJhaSUf/6oDjv978g==",
|
"integrity": "sha512-yR+BS90EOXTNieasf8ce9J3TFCpm2DGqoqdbtiwQ33hon3FyIznLX7sKavAq1VmfBnOeV6It0Htg4aniv8ph1g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
const config = {
|
const config = {
|
||||||
//api: 'https://venus.acatlan.unam.mx/censo-pruebas/',
|
api: 'https://venus.acatlan.unam.mx/censo-pruebas/',
|
||||||
// api: 'https://venus.acatlan.unam.mx/censo_orion',
|
//api: 'https://venus.acatlan.unam.mx/censo_orion',
|
||||||
api: 'http://localhost:3000',
|
//api: 'http://localhost:3000',
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = config
|
module.exports = config
|
||||||
|
|||||||
+3
-1
@@ -12,7 +12,8 @@ import {
|
|||||||
faKey,
|
faKey,
|
||||||
faExclamationCircle,
|
faExclamationCircle,
|
||||||
faEnvelope,
|
faEnvelope,
|
||||||
faHome
|
faHome,
|
||||||
|
faSearch
|
||||||
} from '@fortawesome/free-solid-svg-icons'
|
} from '@fortawesome/free-solid-svg-icons'
|
||||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||||
|
|
||||||
@@ -25,6 +26,7 @@ library.add(faExclamationCircle)
|
|||||||
library.add(faKey)
|
library.add(faKey)
|
||||||
library.add(faEnvelope)
|
library.add(faEnvelope)
|
||||||
library.add(faHome)
|
library.add(faHome)
|
||||||
|
library.add(faSearch)
|
||||||
|
|
||||||
Vue.component('font-awesome-icon', FontAwesomeIcon)
|
Vue.component('font-awesome-icon', FontAwesomeIcon)
|
||||||
|
|
||||||
|
|||||||
+233
-48
@@ -16,36 +16,88 @@
|
|||||||
<span v-if="pcView">Ver impresoras</span>
|
<span v-if="pcView">Ver impresoras</span>
|
||||||
<span v-else>Ver computadoras</span>
|
<span v-else>Ver computadoras</span>
|
||||||
</button>
|
</button>
|
||||||
|
<div class="my-3">Se observan {{ datosmios.length }} registros de un total de {{ respuesta.length }}</div>
|
||||||
<div class="row m-0 mt-3 mb-4">
|
<div class="row m-0 mt-1 mb-4">
|
||||||
<div class="row">
|
<div class="row d-flex flex-wrap">
|
||||||
<div class="col">
|
<div class="input-group pl-3 col-12 col-md-4">
|
||||||
<input
|
<div class="input-group-prepend">
|
||||||
type="text"
|
<span class="input-group-text" id="basic-addon1">
|
||||||
id="Inventario"
|
<font-awesome-icon icon="search" class="user-icon-input" />
|
||||||
v-on:keyup="extraeInventario()"
|
</span>
|
||||||
class="form-control input-login-form shadow-none"
|
</div>
|
||||||
placeholder="Número de inventario"
|
<input
|
||||||
/> <!-- https://www.tutorialesprogramacionya.com/vueya/detalleconcepto.php?punto=7&codigo=7&inicio=0 -->
|
type="text"
|
||||||
|
id="Inventario"
|
||||||
|
v-on:keyup="extraeInventario()"
|
||||||
|
class="form-control input-login-form shadow-none"
|
||||||
|
placeholder="Número de inventario ó de serie"
|
||||||
|
/> <!-- https://www.tutorialesprogramacionya.com/vueya/detalleconcepto.php?punto=7&codigo=7&inicio=0 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
|
||||||
<select
|
<div class="d-flex flex-wrap my-1">
|
||||||
name="tipo"
|
<div class="col-md-2 col-12 mt-3" v-show="pcView">
|
||||||
id="tipo"
|
<select
|
||||||
@change="buscaValor()"
|
name="tipo"
|
||||||
class="form-control select-login-form shadow-none"
|
id="tipo"
|
||||||
>
|
@change="buscaValor()"
|
||||||
<!-- <option value="0" selected>Todos</option>
|
class="form-control select-login-form shadow-none">
|
||||||
<option v-for="opcion in tipo" :value="opcion.activoFijo">{{opcion.activoFijo}}</option> -->
|
<option value="Todos" selected>Tipo</option>
|
||||||
|
<option v-for="opcion1 in tipo" :key="opcion1.idActivoFijo" :value='opcion1.activoFijo'>{{opcion1.activoFijo}}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 col-12 mt-3" v-show="!pcView">
|
||||||
|
<select
|
||||||
|
name="tipo"
|
||||||
|
id="tipo"
|
||||||
|
@change="buscaValor()"
|
||||||
|
class="form-control select-login-form shadow-none">
|
||||||
|
<option value="Todos" selected>Tipo</option>
|
||||||
|
<option v-for="opcion in tipoPrinters" :key="opcion.tipo" :value='opcion.tipo'>{{opcion.tipo}}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 col-12 mt-3">
|
||||||
|
<select name="Ubica" id="Ubica"
|
||||||
|
@change="buscaUbica()"
|
||||||
|
class="form-control select-login-form shadow-none">
|
||||||
|
<option value="Todos" selected>Ubicación</option>
|
||||||
|
<option v-for="opcion in Ubica" :key="opcion.ubicacion" :value='opcion.ubicacion'>{{opcion.ubicacion}}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 col-12 mt-3" v-show="pcView">
|
||||||
|
<select name="Procesador" id="Procesador"
|
||||||
|
@change="buscaProcesador()"
|
||||||
|
class="form-control select-login-form shadow-none">
|
||||||
|
<option value="Todos" selected>Procesador</option>
|
||||||
|
<option v-for="opcion in procesa" :key="opcion.procesa" :value='opcion.procesa'>{{opcion.procesa}}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 col-12 mt-3" v-show="pcView">
|
||||||
|
<select name="SisOper" id="SisOper"
|
||||||
|
@change="buscaSisOper()"
|
||||||
|
class="form-control select-login-form shadow-none">
|
||||||
|
<option value="Todos" selected>Sistema Operativo</option>
|
||||||
|
<option v-for="opcion in os" :key="opcion.osname" :value='opcion.osname'>{{opcion.osname}}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-2 col-12 mt-3">
|
||||||
|
<select name="Uso" id="Uso"
|
||||||
|
@change="buscaUso()"
|
||||||
|
class="form-control select-login-form shadow-none">
|
||||||
|
<option value="Todos" selected>Uso</option>
|
||||||
|
<option v-for="opcion in uso" :key="opcion.uso" :value='opcion.uso'>{{opcion.uso}}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<option value="Todos" selected>Todos</option>
|
|
||||||
<option v-show="pcView" v-for="opcion in tipo" :key="opcion.idActivoFijo" :value='opcion.activoFijo'>{{opcion.activoFijo}}</option>
|
|
||||||
<option v-show="!pcView" v-for="opcion in tipoPrinters" :key="opcion.tipo" :value='opcion.tipo'>{{opcion.tipo}}</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="pcView" class="table-responsive table-fixed text-nowrap justify-content-md-center"
|
<div v-if="pcView" class="table-responsive table-fixed text-nowrap justify-content-md-center"
|
||||||
style="max-height: 350px;">
|
style="max-height: 350px;">
|
||||||
<table :class="['table', 'table-sm', 'text-center', { 'table-hover': admin(), 't-hov': admin() }]" style="font-size:14px">
|
<table :class="['table', 'table-sm', 'text-center', { 'table-hover': admin(), 't-hov': admin() }]" style="font-size:14px">
|
||||||
@@ -61,10 +113,8 @@
|
|||||||
<!-- <tbody class="overflow-auto thov" v-for="item in respuesta" :key="item.noInventario">
|
<!-- <tbody class="overflow-auto thov" v-for="item in respuesta" :key="item.noInventario">
|
||||||
<tr @click="watchRow(item.noInventario)"
|
<tr @click="watchRow(item.noInventario)"
|
||||||
v-if="(seleccionado == item.activoFijo || seleccionado == '0') -->
|
v-if="(seleccionado == item.activoFijo || seleccionado == '0') -->
|
||||||
<tbody class="overflow-auto thov" v-for="item in respuesta" :key="item.noInventario">
|
<tbody class="overflow-auto thov" v-for="item in datosmios" :key="item.noInventario">
|
||||||
<tr @click="watchRow(item.noInventario)"
|
<tr @click="watchRow(item.noInventario)" >
|
||||||
v-if="(seleccionado == item.activoFijo || seleccionado == 'Todos')
|
|
||||||
&& item.noInventario.indexOf(miNoInventario) != -1">
|
|
||||||
<!-- https://developer.mozilla.org/es/docs/Learn/JavaScript/First_steps/Useful_string_methods -->
|
<!-- https://developer.mozilla.org/es/docs/Learn/JavaScript/First_steps/Useful_string_methods -->
|
||||||
<td class="text-primary">{{ item.noInventario }}</td>
|
<td class="text-primary">{{ item.noInventario }}</td>
|
||||||
<td>{{ item.activoFijo }}</td>
|
<td>{{ item.activoFijo }}</td>
|
||||||
@@ -107,10 +157,9 @@
|
|||||||
<!-- <tbody v-for="item in respuesta" :key="item.noInventario">
|
<!-- <tbody v-for="item in respuesta" :key="item.noInventario">
|
||||||
<tr @click="watchRow(item.noInventario)" v-if="seleccionado == item.tipo || seleccionado == '0'"> -->
|
<tr @click="watchRow(item.noInventario)" v-if="seleccionado == item.tipo || seleccionado == '0'"> -->
|
||||||
|
|
||||||
<tbody v-for="item in respuesta" :key="item.noInventario">
|
<tbody v-for="item in datosmios" :key="item.noInventario">
|
||||||
<tr @click="watchRow(item.noInventario)"
|
<tr @click="watchRow(item.noInventario)"
|
||||||
v-if="(seleccionado == item.tipo || seleccionado == 'Todos')
|
>
|
||||||
&& item.noInventario.indexOf(miNoInventario) != -1">
|
|
||||||
<!-- https://developer.mozilla.org/es/docs/Learn/JavaScript/First_steps/Useful_string_methods -->
|
<!-- https://developer.mozilla.org/es/docs/Learn/JavaScript/First_steps/Useful_string_methods -->
|
||||||
<td class="text-primary">{{ item.noInventario }}</td>
|
<td class="text-primary">{{ item.noInventario }}</td>
|
||||||
<td>{{ item.tipo }}</td>
|
<td>{{ item.tipo }}</td>
|
||||||
@@ -218,8 +267,16 @@ export default {
|
|||||||
respuesta: [],
|
respuesta: [],
|
||||||
datosmios: [],
|
datosmios: [],
|
||||||
tipo: [],
|
tipo: [],
|
||||||
|
Ubica: [],
|
||||||
|
uso: [],
|
||||||
|
procesa: [],
|
||||||
|
os: [],
|
||||||
tipoPrinters: [],
|
tipoPrinters: [],
|
||||||
seleccionado: String,
|
seleccionado: String,
|
||||||
|
seleccionadoUbica: String,
|
||||||
|
seleccionadoUso: String,
|
||||||
|
seleccionadoProcesador: String,
|
||||||
|
seleccionadoOS: String,
|
||||||
miNoInventario: String,
|
miNoInventario: String,
|
||||||
file: null
|
file: null
|
||||||
}
|
}
|
||||||
@@ -228,14 +285,24 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.getComputers();
|
this.getComputers();
|
||||||
this.traetipo();
|
this.traetipo();
|
||||||
|
this.traeUbica();
|
||||||
|
this.traeUso();
|
||||||
|
this.traeProcesador();
|
||||||
|
this.traeOS();
|
||||||
this.seleccionado = "Todos";
|
this.seleccionado = "Todos";
|
||||||
|
this.seleccionadoUbica = "Todos";
|
||||||
|
this.seleccionadoUso = "Todos";
|
||||||
|
this.seleccionadoProcesador = "Todos";
|
||||||
|
this.seleccionadoOS = "Todos";
|
||||||
this.miNoInventario = "";
|
this.miNoInventario = "";
|
||||||
|
this.contador = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
async getComputers() {
|
async getComputers() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.respuesta = [];
|
this.respuesta = [];
|
||||||
|
this.datosmios = [];
|
||||||
const localToken = window.localStorage.token;
|
const localToken = window.localStorage.token;
|
||||||
axios.get(`${ config.api }/api/computers`, {
|
axios.get(`${ config.api }/api/computers`, {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -252,10 +319,26 @@ export default {
|
|||||||
this.$bvModal.show('session');
|
this.$bvModal.show('session');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
axios.get(`${ config.api }/api/computers`, {
|
||||||
|
headers: {
|
||||||
|
token: localToken
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
this.datosmios = res.data.equipo;
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
if(error.response.status === 409) {
|
||||||
|
localStorage.clear();
|
||||||
|
this.$bvModal.show('session');
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
async getPrinters() {
|
async getPrinters() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.respuesta = [];
|
this.respuesta = [];
|
||||||
|
this.datosmios = [];
|
||||||
const localToken = window.localStorage.token;
|
const localToken = window.localStorage.token;
|
||||||
axios.get(`${ config.api }/api/printers`, {
|
axios.get(`${ config.api }/api/printers`, {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -273,6 +356,22 @@ export default {
|
|||||||
this.$bvModal.show('session');
|
this.$bvModal.show('session');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
axios.get(`${ config.api }/api/printers`, {
|
||||||
|
headers: {
|
||||||
|
token: localToken
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
this.datosmios = res.data.printers;
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.log(error.response);
|
||||||
|
if(error.response.status === 409) {
|
||||||
|
localStorage.clear();
|
||||||
|
this.$bvModal.show('session');
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
watchRow(noInventario) {
|
watchRow(noInventario) {
|
||||||
localStorage.setItem('noInventario', noInventario);
|
localStorage.setItem('noInventario', noInventario);
|
||||||
@@ -291,6 +390,46 @@ export default {
|
|||||||
.then(res => this.tipo = res.data.tipo)
|
.then(res => this.tipo = res.data.tipo)
|
||||||
.catch(err => console.log(err));
|
.catch(err => console.log(err));
|
||||||
},
|
},
|
||||||
|
async traeUbica(){
|
||||||
|
const localToken = window.localStorage.token;
|
||||||
|
axios.get(`${ config.api }/api/ubica`, {
|
||||||
|
headers: {
|
||||||
|
token: localToken
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(res => this.Ubica = res.data.ubica)
|
||||||
|
.catch(err => console.log(err));
|
||||||
|
},
|
||||||
|
async traeUso(){
|
||||||
|
const localToken = window.localStorage.token;
|
||||||
|
axios.get(`${ config.api }/api/uso`, {
|
||||||
|
headers: {
|
||||||
|
token: localToken
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(res => this.uso = res.data.uso)
|
||||||
|
.catch(err => console.log(err));
|
||||||
|
},
|
||||||
|
async traeOS(){
|
||||||
|
const localToken = window.localStorage.token;
|
||||||
|
axios.get(`${ config.api }/api/sisoper`, {
|
||||||
|
headers: {
|
||||||
|
token: localToken
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(res => this.os = res.data.sisoper)
|
||||||
|
.catch(err => console.log(err));
|
||||||
|
},
|
||||||
|
async traeProcesador(){
|
||||||
|
const localToken = window.localStorage.token;
|
||||||
|
axios.get(`${ config.api }/api/procesador`, {
|
||||||
|
headers: {
|
||||||
|
token: localToken
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(res => this.procesa = res.data.procesador)
|
||||||
|
.catch(err => console.log(err));
|
||||||
|
},
|
||||||
async traetipoImpresora(){
|
async traetipoImpresora(){
|
||||||
const localToken = window.localStorage.token;
|
const localToken = window.localStorage.token;
|
||||||
axios.get(`${ config.api }/api/tipoPrinters`, {
|
axios.get(`${ config.api }/api/tipoPrinters`, {
|
||||||
@@ -307,26 +446,64 @@ export default {
|
|||||||
// },
|
// },
|
||||||
changeView() {
|
changeView() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
this.contador = 0;
|
||||||
|
this.seleccionado = "Todos";
|
||||||
|
this.seleccionadoUbica = "Todos";
|
||||||
|
this.seleccionadoUso = "Todos";
|
||||||
|
this.seleccionadoProcesador = "Todos";
|
||||||
|
this.seleccionadoOS = "Todos";
|
||||||
|
this.miNoInventario = "";
|
||||||
|
this.tipo=[];
|
||||||
|
this.tipoPrinters=[];
|
||||||
|
this.Ubica=[];
|
||||||
|
this.uso=[];
|
||||||
|
this.procesa=[];
|
||||||
|
this.os=[];
|
||||||
if (this.pcView) {
|
if (this.pcView) {
|
||||||
this.pcView = !this.pcView;
|
this.pcView = !this.pcView;
|
||||||
this.getPrinters();
|
this.getPrinters();
|
||||||
this.traetipoImpresora();
|
this.traetipoImpresora();
|
||||||
this.seleccionado = "Todos";
|
this.traeUso();
|
||||||
this.miNoInventario = "";
|
this.traeUbica();
|
||||||
this.tipo=[' '];
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.pcView = !this.pcView;
|
this.pcView = !this.pcView;
|
||||||
this.getComputers();
|
this.getComputers();
|
||||||
this.traetipo();
|
this.traetipo();
|
||||||
this.seleccionado = "Todos";
|
this.traeUbica();
|
||||||
this.miNoInventario = "";
|
this.traeUso();
|
||||||
|
this.traeProcesador();
|
||||||
|
this.traeOS();
|
||||||
}
|
}
|
||||||
|
this.generaMisDatos();
|
||||||
},
|
},
|
||||||
admin() {
|
admin() {
|
||||||
return JSON.parse(window.localStorage.isAdmin);
|
return JSON.parse(window.localStorage.isAdmin);
|
||||||
},
|
},
|
||||||
|
generaMisDatos(){
|
||||||
|
this.datosmios = [];
|
||||||
|
if(this.pcView){
|
||||||
|
for (let i = 0, j = 0; i < this.respuesta.length; i++){
|
||||||
|
if ((this.seleccionado == "Todos" || this.seleccionado == this.respuesta[i].activoFijo)
|
||||||
|
&& (this.seleccionadoUbica == this.respuesta[i].ubicacion || this.seleccionadoUbica == 'Todos')
|
||||||
|
&& (this.seleccionadoUso == this.respuesta[i].uso || this.seleccionadoUso == 'Todos')
|
||||||
|
&& (this.seleccionadoOS == this.respuesta[i].osname || this.seleccionadoOS == 'Todos')
|
||||||
|
&& (this.seleccionadoProcesador == this.respuesta[i].procesador || this.seleccionadoProcesador == 'Todos')
|
||||||
|
&& ((this.respuesta[i].noInventario.indexOf(this.miNoInventario) != -1) || (this.respuesta[i].noSerie.indexOf(this.miNoInventario) != -1))){
|
||||||
|
this.datosmios[j++] = this.respuesta[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let i = 0, j = 0; i < this.respuesta.length; i++){
|
||||||
|
if ((this.seleccionado == "Todos" || this.seleccionado == this.respuesta[i].tipo)
|
||||||
|
&& (this.seleccionadoUbica == this.respuesta[i].ubicacion || this.seleccionadoUbica == 'Todos')
|
||||||
|
&& (this.seleccionadoUso == this.respuesta[i].uso || this.seleccionadoUso == 'Todos')
|
||||||
|
&& ((this.respuesta[i].noInventario.indexOf(this.miNoInventario) != -1) || (this.respuesta[i].noSerie.indexOf(this.miNoInventario) != -1))){
|
||||||
|
this.datosmios[j++] = this.respuesta[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
onDescarga(datos){
|
onDescarga(datos){
|
||||||
var miDato;
|
var miDato;
|
||||||
const fecha = new Date();
|
const fecha = new Date();
|
||||||
@@ -359,19 +536,9 @@ export default {
|
|||||||
}
|
}
|
||||||
nomArch += seg;
|
nomArch += seg;
|
||||||
if (this.pcView){
|
if (this.pcView){
|
||||||
for (let i = 0, j = 0; i < datos.length; i++){
|
|
||||||
if (this.seleccionado == "Todos" || this.seleccionado == datos[i].activoFijo){
|
|
||||||
this.datosmios[j++] = datos[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
nomArch = "Computadoras" + nomArch;
|
nomArch = "Computadoras" + nomArch;
|
||||||
miDato = MiXLSX.utils.json_to_sheet([],{ header : this.pcHeads});
|
miDato = MiXLSX.utils.json_to_sheet([],{ header : this.pcHeads});
|
||||||
} else {
|
} else {
|
||||||
for (let i = 0, j = 0; i < datos.length; i++){
|
|
||||||
if (this.seleccionado == "Todos" || this.seleccionado == datos[i].tipo){
|
|
||||||
this.datosmios[j++] = datos[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
miDato = MiXLSX.utils.json_to_sheet([],{header : this.printerHeads}); // https://docs.sheetjs.com
|
miDato = MiXLSX.utils.json_to_sheet([],{header : this.printerHeads}); // https://docs.sheetjs.com
|
||||||
nomArch = "Impresoras" + nomArch;
|
nomArch = "Impresoras" + nomArch;
|
||||||
}
|
}
|
||||||
@@ -385,9 +552,27 @@ export default {
|
|||||||
},
|
},
|
||||||
buscaValor(){
|
buscaValor(){
|
||||||
this.seleccionado = document.getElementById("tipo").value;
|
this.seleccionado = document.getElementById("tipo").value;
|
||||||
|
this.generaMisDatos();
|
||||||
|
},
|
||||||
|
buscaUbica(){
|
||||||
|
this.seleccionadoUbica = document.getElementById("Ubica").value;
|
||||||
|
this.generaMisDatos();
|
||||||
},
|
},
|
||||||
extraeInventario(){
|
extraeInventario(){
|
||||||
this.miNoInventario = document.getElementById("Inventario").value;
|
this.miNoInventario = document.getElementById("Inventario").value;
|
||||||
|
this.generaMisDatos();
|
||||||
|
},
|
||||||
|
buscaUso(){
|
||||||
|
this.seleccionadoUso = document.getElementById("Uso").value;
|
||||||
|
this.generaMisDatos();
|
||||||
|
},
|
||||||
|
buscaProcesador(){
|
||||||
|
this.seleccionadoProcesador = document.getElementById("Procesador").value;
|
||||||
|
this.generaMisDatos();
|
||||||
|
},
|
||||||
|
buscaSisOper(){
|
||||||
|
this.seleccionadoOS = document.getElementById("SisOper").value;
|
||||||
|
this.generaMisDatos();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user