contruido para pruebas
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
|
||||
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
-1
@@ -1 +0,0 @@
|
||||
.boton-footer[data-v-02dfa168]{background-color:#b80;color:#fff;width:14rem;font-size:.8rem}.dos[data-v-02dfa168],.tres[data-v-02dfa168],.uno[data-v-02dfa168]{margin-right:1rem}.btn[data-v-02dfa168]{margin-bottom:1rem}.Azul-puma[data-v-02dfa168]{background-color:#1e3c70}.footer[data-v-02dfa168]{text-align:center;color:#fff}@media (max-width:768px){.tres[data-v-02dfa168],.uno[data-v-02dfa168]{margin-right:4rem}.dos[data-v-02dfa168]{margin-right:0}.footer[data-v-02dfa168]{font-size:.7rem}}@media (max-width:970px){.dos[data-v-02dfa168],.tres[data-v-02dfa168],.uno[data-v-02dfa168]{margin-right:.5rem}.footer[data-v-02dfa168]{font-size:.7rem}}[data-v-30e9b756]{margin:0;padding:0}.divMaster[data-v-30e9b756]{height:auto;margin:0 auto}nav[data-v-30e9b756]{padding:0}.azulUnam[data-v-30e9b756]{background-color:#1e3c70}.doradoUnam[data-v-30e9b756],.dropdown-item[data-v-30e9b756]:hover{background-color:#b80}.dropdown-itemBusqueda[data-v-30e9b756]:hover{background-color:#1e3c70;color:#fff}.nav-link[data-v-30e9b756]:focus{background-color:#1e3c70;border-radius:1rem}.nav-link[data-v-30e9b756]:hover{background-color:#1e3c70;color:#fff;border-radius:.2rem}.nav-link[data-v-30e9b756]{transition:.3s;font-size:20px}.dropdown-item[data-v-30e9b756]{padding:.3rem 1rem}.dropdown[data-v-30e9b756]{position:relative;display:inline-block;height:auto}.dropdown-content[data-v-30e9b756]{position:absolute;background-color:#f9f9f9;min-width:160px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);top:.8rem;left:-10rem;display:block}.navbar-dark[data-v-30e9b756],.navbar-toggler[data-v-30e9b756]{font-size:1rem;border:none}@media (max-width:450px){.buscador[data-v-30e9b756],.menuText[data-v-30e9b756]{display:block!important}.dropdown-menu[data-v-30e9b756]{width:80vw!important}}.divMaster{height:8rem;margin:0;width:auto}.azulUnam{background-color:#1e3c70}.sizeImg{height:5rem}.logo_acatlan_resp{display:none!important}@media (max-width:450px){.logo_acatlan,.logo_unam{display:none!important}.logo_acatlan_resp{display:block!important}.logo_acatlan_resp a img{height:5rem}}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50}a[data-v-993d7938]{font-size:14px;margin-bottom:6px;font-weight:400}.button[data-v-6e1c8750]{background-color:#1b3d70;border:none;color:#fff;height:4rem;width:15rem;text-align:center;text-decoration:none;display:inline-block;font-size:1.5rem;border-radius:1rem;transition-duration:.4s;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);margin-left:2rem;margin-right:2rem;margin-bottom:2rem;margin-top:2rem}.button[data-v-6e1c8750]:hover{background-color:#b80;color:#fff}.button[data-v-4f1ed9c0]{background-color:#1b3d70;border:none;color:#fff;height:4rem;width:15rem;text-align:center;text-decoration:none;display:inline-block;font-size:1.5rem;border-radius:1rem;transition-duration:.4s;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);margin-left:2rem;margin-right:2rem;margin-bottom:2rem;margin-top:2rem}.button[data-v-4f1ed9c0]:hover{background-color:#b80;color:#fff}.button[data-v-231605bd]{background-color:#1b3d70;border:none;color:#fff;height:4rem;width:15rem;text-align:center;text-decoration:none;display:inline-block;font-size:1.5rem;border-radius:1rem;transition-duration:.4s;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);margin-left:2rem;margin-right:2rem;margin-bottom:2rem;margin-top:2rem}.button[data-v-231605bd]:hover{background-color:#b80;color:#fff}.button[data-v-0e9e5529]{background-color:#1b3d70;border:none;color:#fff;height:2.5rem;width:14rem;text-align:center;text-decoration:none;display:inline-block;font-size:1rem;border-radius:.3rem;transition-duration:.4s;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);margin-top:.3rem}.button[data-v-0e9e5529]:hover{background-color:#b80;color:#fff}
|
||||
File diff suppressed because one or more lines are too long
Vendored
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB |
Vendored
-1
@@ -1 +0,0 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><script src="https://kit.fontawesome.com/a076d05399.js"></script><title>censo_front</title><link href="/css/app.d992cb34.css" rel="preload" as="style"><link href="/css/chunk-vendors.c5b0137c.css" rel="preload" as="style"><link href="/js/app.1d211a45.js" rel="preload" as="script"><link href="/js/chunk-vendors.b9231152.js" rel="preload" as="script"><link href="/css/chunk-vendors.c5b0137c.css" rel="stylesheet"><link href="/css/app.d992cb34.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but censo_front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.b9231152.js"></script><script src="/js/app.1d211a45.js"></script></body></html>
|
||||
Vendored
-2
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
-96
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Generated
-12038
File diff suppressed because it is too large
Load Diff
@@ -1,53 +0,0 @@
|
||||
{
|
||||
"name": "censo_front",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
||||
"@fortawesome/vue-fontawesome": "^2.0.2",
|
||||
"axios": "^0.21.1",
|
||||
"bootstrap": "^4.5.3",
|
||||
"bootstrap-vue": "^2.21.1",
|
||||
"core-js": "^3.6.5",
|
||||
"jquery": "^3.5.1",
|
||||
"popper.js": "^1.16.1",
|
||||
"sweetalert2": "^10.13.3",
|
||||
"vue": "^2.6.12",
|
||||
"vue-router": "^3.4.9",
|
||||
"vuex": "^3.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "babel-eslint"
|
||||
},
|
||||
"rules": {}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
]
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
<template>
|
||||
<b-modal id="actualizarCampo" centered size="lg" hide-footer title="Actualizar Campo" style="height: auto;">
|
||||
<b-container fluid>
|
||||
<b-row class="my-1">
|
||||
<b-col >
|
||||
<h2 style="text-align: center; margin-bottom: 1.5rem;"> {{campo}}</h2>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row style="margin-bottom: 1rem;">
|
||||
<b-col sm="3">
|
||||
<h4>Actual: </h4>
|
||||
</b-col>
|
||||
<b-col sm="9">
|
||||
<h4><strong>{{pcSelected.value}}</strong></h4>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row style="margin-bottom: 1rem;">
|
||||
<b-col sm="3">
|
||||
<label style=" padding-top:1rem;">Actualizar: </label>
|
||||
</b-col>
|
||||
<b-col sm="9">
|
||||
<div v-if="opciones.length!=0">
|
||||
<b-dropdown
|
||||
split
|
||||
block
|
||||
split-variant="outline-primary"
|
||||
variant="primary"
|
||||
v-bind:text="opcionSeleted != '' ? opcionSeleted.nombre : campo"
|
||||
class="m-2"
|
||||
style="margin: 0"
|
||||
>
|
||||
<b-dropdown-item v-for="(opcion,index) in opciones" v-bind:key="index" @click="opcionSeleted=opcion">{{opcion.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
<b-form-input v-else class="m-2" placeholder="Actualizar campo" style="margin: 0"></b-form-input>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row>
|
||||
<b-col>
|
||||
<div style="margin-top: 2rem;">
|
||||
<b-button variant="outline-success" class="float-right" style="width: 30%; " @click="actualizarLibro()">Actualizar</b-button>
|
||||
<b-button @click="$bvModal.hide('actualizarCampo')" variant="outline-danger" class="btn float-left" style="width: 30%; ">Cancelar</b-button>
|
||||
</div>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-container>
|
||||
</b-modal>
|
||||
</template>
|
||||
<script>
|
||||
import Swal from 'sweetalert2';
|
||||
export default {
|
||||
props: {
|
||||
campo: String,
|
||||
pcSelected: Object,
|
||||
opciones: Array,
|
||||
objectPc: Object,
|
||||
opcionSeletedTable: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
opcionSeleted: this.opcionSeletedTable.value,
|
||||
campoValue:''
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async actualizarLibro(){
|
||||
try{
|
||||
if(this.opcionSeleted === "" && this.campoValue === ""){
|
||||
await Swal.fire(
|
||||
'¿Aún no has llenado el campo a editar?',
|
||||
'',
|
||||
'question'
|
||||
);
|
||||
return;
|
||||
}
|
||||
if( this.pcSelected.keyTable !== 'noInventario' && this.pcSelected.keyTable !== 'noResguardo' && this.pcSelected.keyTable !== 'idUnidadResponsable'){
|
||||
let valueCampo = '';
|
||||
if(this.opciones.length!=0){
|
||||
valueCampo = this.opcionSeleted.nombre;
|
||||
}
|
||||
else{
|
||||
valueCampo = this.campoValue;
|
||||
}
|
||||
const data ={
|
||||
keyTable : this.pcSelected.keyTable,
|
||||
idEquipo : this.objectPc.idEquipo,
|
||||
value: valueCampo
|
||||
}
|
||||
console.log(data);
|
||||
}
|
||||
}
|
||||
catch(error){
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -1,160 +0,0 @@
|
||||
<template>
|
||||
<div class="divMaster doradoUnam row d-flex justify-content-center">
|
||||
<div class="col-10 offset-1">
|
||||
<nav class="navbar navbar-expand-sm navbar-dark ">
|
||||
<button
|
||||
class="navbar-toggler col-5"
|
||||
type="button"
|
||||
data-toggle="collapse"
|
||||
data-target="#navbarTogglerDemo02"
|
||||
aria-controls="navbarTogglerDemo02"
|
||||
aria-expanded="false"
|
||||
aria-label="Toggle navigation"
|
||||
>
|
||||
<span class="navbar-toggler-icon blanco d-flex"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse " id="navbarTogglerDemo02">
|
||||
<ul
|
||||
class="navbar-nav mr-auto w-100 d-flex align-items-center justify-content-between mt-0 mt-lg-0"
|
||||
>
|
||||
<li class="nav-item">
|
||||
<router-link to="/"><a class="nav-link text-white">Inicio</a></router-link>
|
||||
</li>
|
||||
<li class="nav-item ">
|
||||
<div class="dropdown">
|
||||
<a
|
||||
class="btn nav-link dropdown-toggle text-white"
|
||||
role="button"
|
||||
id="dropdownMenuLink"
|
||||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
>
|
||||
Alta
|
||||
</a>
|
||||
|
||||
<div
|
||||
class="dropdown-menu azulUnam"
|
||||
aria-labelledby="navbarDropdown"
|
||||
>
|
||||
<router-link to="/agregarEquipo">
|
||||
<a class="dropdown-item text-white" >Alta de equipo</a>
|
||||
</router-link>
|
||||
<router-link to="/agregarImpresora">
|
||||
<a class="dropdown-item text-white" >Alta de impresora</a>
|
||||
</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<router-link to="/agregarCatalogo"><a class="nav-link text-white">Agregar al catalogo</a></router-link>
|
||||
</li>
|
||||
<li>
|
||||
<div class="d-flex align-items-center mx-4">
|
||||
<i class='fas fa-user-alt' style='font-size:24px;color:white;margin-right:10px'></i>
|
||||
<span class="text-white my-auto" v-text="nombre">
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isExist: true,
|
||||
libros: [],
|
||||
nombre: "sas"
|
||||
};
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.divMaster {
|
||||
/* max-width: 1280px; */
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
}
|
||||
nav {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.azulUnam {
|
||||
background-color: #1e3c70;
|
||||
}
|
||||
|
||||
.doradoUnam,.dropdown-item:hover {
|
||||
background-color: #bb8800;
|
||||
}
|
||||
|
||||
.dropdown-itemBusqueda:hover {
|
||||
background-color: #1e3c70;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-link:focus {
|
||||
background-color: #1e3c70;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.nav-link:hover {
|
||||
background-color: #1e3c70;
|
||||
color: white;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
transition: 0.3s;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.dropdown-item {
|
||||
padding: 0.3rem 1rem;
|
||||
}
|
||||
|
||||
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
position: absolute;
|
||||
background-color: #f9f9f9;
|
||||
min-width: 160px;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
||||
top: 0.8rem;
|
||||
left: -10rem;
|
||||
display: block;
|
||||
}
|
||||
.navbar-dark, .navbar-toggler {
|
||||
font-size: 1rem;
|
||||
border: none;
|
||||
}
|
||||
|
||||
@media (max-width: 450px) {
|
||||
.menuText,
|
||||
.buscador {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
width: 80vw !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,135 +0,0 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h3 style="text-align: right; margin-bottom: 1rem;">Totales: {{pcTablesFiltrada.length}} </h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th >
|
||||
<div class="flex-container">
|
||||
<button style="align-self: center" class="btn nav-link " type="button" aria-haspopup="true" aria-expanded="false">
|
||||
Eliminar
|
||||
</button>
|
||||
</div>
|
||||
</th>
|
||||
<th v-for="(item,indexHeader) in pcHeaders" v-bind:key="indexHeader" scope="col" >
|
||||
<div class="flex-container">
|
||||
<div >
|
||||
<button style="align-self: center" v-if="item.data.length != 0" class="btn nav-link dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{item.nombre}}
|
||||
</button>
|
||||
<button style="align-self: center; width: 14rem;" v-else class="btn nav-link " type="button" aria-haspopup="true" aria-expanded="false">
|
||||
{{item.nombre}}
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton" style="padding:10px;">
|
||||
<b-dropdown-form >
|
||||
<div class="checkBox" v-for="(type,index) in item.data" v-bind:key="index" ><b-form-checkbox @change="filtrar(indexHeader, type.nombre)" v-model="type.value" ><a>{{type.nombre}}</a></b-form-checkbox></div>
|
||||
</b-dropdown-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(pc,index) in pcTablesFiltrada" v-bind:key="index">
|
||||
<td>
|
||||
<b-button variant="outline-danger">Eliminar</b-button>
|
||||
</td>
|
||||
<td v-for="(pcCampo,key) in pc.datos" v-bind:key="key" v-b-modal.actualizarCampo @click="pcSelected=pc.objectPc ,valueCampo=pcCampo , campo = pcHeaders[key].nombre, opciones = pcHeaders[key].data, opcionSeletedTable = {pcCampo, value:''}" >
|
||||
{{pcCampo.value}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<Modal v-bind:campo="campo" v-bind:pcSelected="valueCampo" v-bind:opciones="opciones" v-bind:objectPc="pcSelected" v-bind:opcionSeletedTable="opcionSeletedTable" />
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import config from "../config/config.js";
|
||||
import Modal from './modalActualizar.vue'
|
||||
export default {
|
||||
name: "home",
|
||||
components: {
|
||||
Modal,
|
||||
},
|
||||
props: {
|
||||
campoBuscar: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
campo:"",
|
||||
valueCampo:{value:''},
|
||||
pcHeaders: {},
|
||||
pcData: [],
|
||||
tableName: "",
|
||||
opciones: [],
|
||||
pcSelected: null,
|
||||
opcionSeletedTable: {value: ''}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async filtrar(key, dato){
|
||||
for(let index in this.pcData){
|
||||
let pc = this.pcData[index];
|
||||
if(typeof pc.headers[key] !== 'undefined' && typeof pc.datos[key] !== 'undefined' && pc.datos[key] === dato)
|
||||
pc.headers[key] = !pc.headers[key];
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
try {
|
||||
let computadoras = await axios.get(`${config.api}/getHeadersComputadoras`);
|
||||
this.pcHeaders = computadoras.data.data;
|
||||
}
|
||||
catch(error){
|
||||
console.log(error);
|
||||
}
|
||||
try {
|
||||
let computadoras = await axios.get(`${config.api}/getComputadoras`);
|
||||
this.pcData = computadoras.data.data;
|
||||
}
|
||||
catch(error){
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
pcTablesFiltrada: function()
|
||||
{
|
||||
return this.pcData.filter( (item)=>{
|
||||
let header = true;
|
||||
for(let campo in item.headers){
|
||||
if(!item.headers[campo]){
|
||||
header = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!header)
|
||||
return false;
|
||||
let searchInventario = (item.datos.numeroInventario.value).includes(this.campoBuscar) ;
|
||||
let searchResguardo = (item.datos.numeroResguardo.value).includes(this.campoBuscar) ;
|
||||
let searchSerie = (item.datos.serie.value).includes(this.campoBuscar) ;
|
||||
if(searchInventario || searchResguardo || searchSerie)
|
||||
return true;
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
a{
|
||||
font-size: 14px;
|
||||
margin-bottom: 6px;
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
@@ -1,15 +0,0 @@
|
||||
const config = {
|
||||
//ngrok
|
||||
//api: "https://f8d86328e778.ngrok.io"
|
||||
|
||||
//Local
|
||||
//api: "http://localhost:3000"
|
||||
|
||||
//Pruebas
|
||||
api: "https://venus.acatlan.unam.mx/censo_orion"
|
||||
|
||||
//Produccion
|
||||
//api: "https://venus.acatlan.unam.mx/portal_editorial"
|
||||
};
|
||||
module.exports = config;
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
import Vue from "vue";
|
||||
import App from "./App.vue";
|
||||
import "bootstrap";
|
||||
import "bootstrap/dist/css/bootstrap.min.css";
|
||||
import Vuex from 'vuex';
|
||||
import VueRouter from "vue-router";
|
||||
import { routes } from "./routes";
|
||||
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
Vue.use(VueRouter);
|
||||
Vue.use(Vuex)
|
||||
Vue.use(BootstrapVue);
|
||||
Vue.use(IconsPlugin);
|
||||
const router = new VueRouter({
|
||||
routes
|
||||
});
|
||||
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
campoValue: "",
|
||||
},
|
||||
mutations: {
|
||||
cleanModalActualizar (state, value) {
|
||||
state.campoValue = value;
|
||||
console.log(state, value);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
render: h => h(App),
|
||||
router,
|
||||
store: store,
|
||||
});
|
||||
@@ -1,10 +0,0 @@
|
||||
import home from "./view/home.vue";
|
||||
import addPrinter from "./view/addPrinter.vue";
|
||||
import addPcs from "./view/addPcs"
|
||||
import addCatalogo from "./view/addCatalogo"
|
||||
export const routes = [
|
||||
{ path: "/", component: home, name: "home" },
|
||||
{ path: "/agregarImpresora", component: addPrinter, name: "addPrinter" },
|
||||
{ path: "/agregarEquipo", component: addPcs, name: "addPcs" },
|
||||
{ path: "/agregarCatalogo", component: addCatalogo, name: "addCataogo" }
|
||||
]
|
||||
@@ -1,98 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1 class="mt-5 mb-5">Agregar al Catalogo</h1>
|
||||
<div class="container">
|
||||
<b-card title="Card Title" no-body style="margin-bottom: 4rem;">
|
||||
<b-card-header header-tag="nav">
|
||||
<b-nav card-header tabs>
|
||||
<b-nav-item @click="textSelected= 'Tipo de Impresora'" v-bind:active="textSelected=='Tipo de Impresora'">Tipo de Impresora</b-nav-item>
|
||||
<b-nav-item @click="textSelected= 'Marca de Impresora'" v-bind:active="textSelected=='Marca de Impresora'">Marca de Impresora</b-nav-item>
|
||||
<b-nav-item @click="textSelected= 'Tipo de Uso'" v-bind:active="textSelected== 'Tipo de Uso'">Tipo de Uso </b-nav-item>
|
||||
<b-nav-item @click="textSelected= 'Procesador'" v-bind:active="textSelected== 'Procesador'">Procesador</b-nav-item>
|
||||
<b-nav-item @click="textSelected= 'Marca '" v-bind:active="textSelected== 'Sistema Operativo'">Sistema Operativo</b-nav-item>
|
||||
<b-nav-item @click="textSelected= 'Tarjeta Grafica'" v-bind:active="textSelected== 'Tarjeta Grafica'">Tarjeta Grafica</b-nav-item>
|
||||
<b-nav-item @click="textSelected= 'Tipo de memoride Equipo'" v-bind:active="textSelected== 'Marca de Equipo'">Marca de Equipo</b-nav-item>
|
||||
<b-nav-item @click="textSelected= 'Sistema Operativoa Ram'" v-bind:active="textSelected== 'Tipo de memoria Ram'">Tipo de memoria Ram</b-nav-item>
|
||||
<b-nav-item @click="textSelected= 'Tipo de Equipo de Computo'" v-bind:active="textSelected== 'Tipo de Equipo de Computo'">Tipo de Equipo de Computo</b-nav-item>
|
||||
<b-nav-item @click="textSelected= 'Unidad Responsable'" v-bind:active="textSelected== 'Unidad Responsable'">Unidad Responsable</b-nav-item>
|
||||
</b-nav>
|
||||
</b-card-header>
|
||||
<b-card-body class="text-center">
|
||||
<div class="container">
|
||||
<div class="row" v-if="textSelected!='Unidad Responsable'">
|
||||
<div class="col-md-8" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" v-bind:placeholder="textSelected"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<div class="pure-u-1 pure-u-md-1-2">
|
||||
<button class="button " >
|
||||
Agregar
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-else>
|
||||
<div class="col-md-12" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Nombre de la Unidad Responsable"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-12" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Nombre del Responsable"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-12" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Ubicación fisica"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-12" >
|
||||
<div class="pure-u-1 pure-u-md-1-2">
|
||||
<button class="button " >
|
||||
Agregar
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</b-card-body>
|
||||
</b-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
name: "home",
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
textSelected : 'Tipo de Impresora'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.button {
|
||||
background-color: #1b3d70; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
height: 2.5rem;
|
||||
width: 14rem;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 1rem;
|
||||
border-radius: .3rem;
|
||||
-webkit-transition-duration: 0.4s; /* Safari */
|
||||
transition-duration: 0.4s;
|
||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
margin-top: .3rem;
|
||||
|
||||
}
|
||||
.button:hover {
|
||||
background-color: #bb8800;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
@@ -1,183 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<h1 style="margin: 2rem">Agregar Equipo</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-4" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Número de inventario"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Número de resguardo"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Serie"></b-form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Cantidad de memoria RAM"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Velocidad de memoria Ram"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<b-dropdown v-bind:text="tipoMemoriaRamSelected != null ? tipoMemoriaRamSelected.nombre : 'Tipo de Memoria Ram'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in tipoMemoriaRam" v-bind:key="tipo.id" @click="tipoMemoriaRamSelected = tipo">{{tipo.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" >
|
||||
<b-dropdown v-bind:text="tarjetaGraficaSelected != null ? tarjetaGraficaSelected.nombre : 'Tipo de tarjeta grafica'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in tarjetaGrafica" v-bind:key="tipo.id" @click="tarjetaGraficaSelected = tipo">{{tipo.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Tamaño de la tarjeta grafica"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<b-dropdown v-bind:text="tipoEquipoSelected != null ? tipoEquipoSelected.nombre : 'Tipo de Equipo'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in tipoEquipo" v-bind:key="tipo.id" @click="tipoEquipoSelected = tipo">{{tipo.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" >
|
||||
<b-dropdown v-bind:text="osSelected != null ? osSelected.nombre : 'Sistema operativo'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in os" v-bind:key="tipo.id" @click="osSelected = tipo">{{tipo.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Versión"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<b-dropdown v-bind:text="procesadorSelected != null ? procesadorSelected.nombre : 'Procesador'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in procesador" v-bind:key="tipo.id" @click="procesadorSelected = tipo">{{tipo.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Velocidad del procesador GHz"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Descripción del procesador"></b-form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" >
|
||||
<b-dropdown v-bind:text="marcaSelected != null ? marcaSelected.nombre : 'Marca'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in marca" v-bind:key="tipo.id" @click="marcaSelected = tipo">{{tipo.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Modelo"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<b-dropdown v-bind:text="usoSelected != null ? usoSelected.nombre : 'Uso'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in uso" v-bind:key="tipo.id" @click="usoSelected = tipo">{{tipo.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" >
|
||||
<b-dropdown v-bind:text="unidadSelected != null ? unidadSelected.unidadResponsable.nombre : 'Unidad Responsable'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in unidad" v-bind:key="tipo.unidadResponsable.id" @click="unidadSelected = tipo">{{tipo.unidadResponsable.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
<div class="col-md-12 " >
|
||||
<b-dropdown v-bind:text="unidadSelected != null ? unidadSelected.responsable.nombre : 'Nombre del responsable'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in unidad" v-bind:key="tipo.responsable.id" @click="unidadSelected = tipo">{{tipo.responsable.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
<div class="col-md-12 " >
|
||||
<b-dropdown v-bind:text="unidadSelected != null ? unidadSelected.ubicacion.nombre : 'Ubicación'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in unidad" v-bind:key="tipo.ubicacion.id" @click="unidadSelected = tipo">{{tipo.ubicacion.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2">
|
||||
<button class="button " >
|
||||
Agregar
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import config from "../config/config.js";
|
||||
|
||||
export default {
|
||||
|
||||
name: "home",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeSelected:"Equipos",
|
||||
tipoEquipo : null,
|
||||
tipoEquipoSelected: null,
|
||||
tipoMemoriaRam : null,
|
||||
tipoMemoriaRamSelected: null,
|
||||
tarjetaGrafica : null,
|
||||
tarjetaGraficaSelected: null,
|
||||
os : null,
|
||||
osSelected: null,
|
||||
marca : null,
|
||||
marcaSelected: null,
|
||||
procesador : null,
|
||||
procesadorSelected: null,
|
||||
unidad: null,
|
||||
unidadSelected: null,
|
||||
uso: null,
|
||||
usoSelected : null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
async created() {
|
||||
try {
|
||||
let catalogo = await axios.get(`${config.api}/getCatalgoEquipo`);
|
||||
this.tipoEquipo= catalogo.data.catalogos.tipoEquipo;
|
||||
this.tipoMemoriaRam= catalogo.data.catalogos.tipoMemoriaRam;
|
||||
this.tarjetaGrafica= catalogo.data.catalogos.tarjetaGrafica;
|
||||
this.os= catalogo.data.catalogos.os;
|
||||
this.marca= catalogo.data.catalogos.marca;
|
||||
this.procesador= catalogo.data.catalogos.procesador;
|
||||
this.unidad= catalogo.data.catalogos.unidad;
|
||||
this.uso = catalogo.data.catalogos.uso;
|
||||
}
|
||||
catch(error){
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.button {
|
||||
background-color: #1b3d70; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
height: 4rem;
|
||||
width: 15rem;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 1.5rem;
|
||||
border-radius: 1rem;
|
||||
-webkit-transition-duration: 0.4s; /* Safari */
|
||||
transition-duration: 0.4s;
|
||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
margin-left: 2rem;
|
||||
margin-right: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
.button:hover {
|
||||
background-color: #bb8800;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
@@ -1,131 +0,0 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<h1 style="margin: 2rem">Agregar impresora</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-4" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Número de inventario"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Número de resguardo"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
<b-form-input style="margin: .5rem;" class="fadeIn second" id="input-small" placeholder="Serie"></b-form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<b-form-input style="margin: .5rem;" id="input-small" placeholder="Serie"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<b-form-input style="margin: .5rem;" id="input-small" placeholder="Modelo"></b-form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" >
|
||||
<b-dropdown v-bind:text="tipoImpresora != null ? tipoImpresoraSelected.nombre : 'Tipo de Impresora'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in tipoImpresora" v-bind:key="tipo.id" @click="tipoImpresoraSelected = tipo">{{tipo.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
<div class="col-md-4 " >
|
||||
<b-dropdown v-bind:text="marcaImpresoraSelected != null ? marcaImpresora.nombre : 'Marca de impresora'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in marcaImpresora" v-bind:key="tipo.id" @click="marcaImpresoraSelected = tipo">{{tipo.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
<div class="col-md-4 " >
|
||||
<b-dropdown v-bind:text="usoSelected != null ? uso.nombre : 'Tipo de Uso'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in uso" v-bind:key="tipo.id" @click="usoSelected = tipo">{{tipo.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" >
|
||||
<b-dropdown v-bind:text="unidadSelected != null ? unidadSelected.unidadResponsable.nombre : 'Unidad Responsable'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in unidad" v-bind:key="tipo.unidadResponsable.id" @click="unidadSelected = tipo">{{tipo.unidadResponsable.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
<div class="col-md-12 " >
|
||||
<b-dropdown v-bind:text="unidadSelected != null ? unidadSelected.responsable.nombre : 'Nombre del responsable'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in unidad" v-bind:key="tipo.responsable.id" @click="unidadSelected = tipo">{{tipo.responsable.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
<div class="col-md-12 " >
|
||||
<b-dropdown v-bind:text="unidadSelected != null ? unidadSelected.ubicacion.nombre : 'Ubicación'" block variant="outline-primary" class="m-2">
|
||||
<b-dropdown-item v-for="tipo in unidad" v-bind:key="tipo.ubicacion.id" @click="unidadSelected = tipo">{{tipo.ubicacion.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2">
|
||||
<button class="button " >
|
||||
Agregar
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import config from "../config/config.js";
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
name: "home",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeSelected:"Equipos",
|
||||
marcaImpresora : null,
|
||||
marcaImpresoraSelected: null,
|
||||
tipoImpresora: null,
|
||||
tipoImpresoraSelected: null,
|
||||
unidad: null,
|
||||
unidadSelected: null,
|
||||
uso: null,
|
||||
usoSelected: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
async created() {
|
||||
try {
|
||||
let catalogo = await axios.get(`${config.api}/getCatalgoEquipo`);
|
||||
this.marcaImpresora = catalogo.data.catalogos.marcaImpresora;
|
||||
this.tipoImpresora = catalogo.data.catalogos.tipoImpresora;
|
||||
this.unidad= catalogo.data.catalogos.unidad;
|
||||
this.uso = catalogo.data.catalogos.uso;
|
||||
}
|
||||
catch(error){
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
.button {
|
||||
background-color: #1b3d70; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
height: 4rem;
|
||||
width: 15rem;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 1.5rem;
|
||||
border-radius: 1rem;
|
||||
-webkit-transition-duration: 0.4s; /* Safari */
|
||||
transition-duration: 0.4s;
|
||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
margin-left: 2rem;
|
||||
margin-right: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
.button:hover {
|
||||
background-color: #bb8800;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
@@ -1,81 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1 class="mt-5 mb-5">Sistema de Censo</h1>
|
||||
<div class="container">
|
||||
<div class="row mb-5">
|
||||
<div class="col-sm">
|
||||
<b-input-group size="sm" class="mb-2">
|
||||
<b-input-group-prepend is-text>
|
||||
<b-icon icon="search"></b-icon>
|
||||
</b-input-group-prepend>
|
||||
<b-form-input type="search" placeholder="Buscar por número de inventario, númerio de resguardo o serie" v-model="campoBuscar" ></b-form-input>
|
||||
</b-input-group>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<button type="button" class="btn btn-outline-primary float-right" @click="typeSelected=='Equipos' ? typeSelected='Impresoras': typeSelected='Equipos'">{{typeSelected}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container" v-if="typeSelected =='Equipos'">
|
||||
<PcTable v-bind:campoBuscar="campoBuscar" />
|
||||
</div>
|
||||
<div class="container" v-else>
|
||||
<PrinterTable />
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2">
|
||||
<button class="button " >
|
||||
Descargar Excel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import PcTable from './../components/pcsTable.vue'
|
||||
import PrinterTable from './../components/printersTable.vue'
|
||||
|
||||
export default {
|
||||
|
||||
name: "home",
|
||||
components: {
|
||||
PcTable,
|
||||
PrinterTable,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeSelected:"Equipos",
|
||||
campoBuscar: ""
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.button {
|
||||
background-color: #1b3d70; /* Green */
|
||||
border: none;
|
||||
color: white;
|
||||
height: 4rem;
|
||||
width: 15rem;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 1.5rem;
|
||||
border-radius: 1rem;
|
||||
-webkit-transition-duration: 0.4s; /* Safari */
|
||||
transition-duration: 0.4s;
|
||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
margin-left: 2rem;
|
||||
margin-right: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
.button:hover {
|
||||
background-color: #bb8800;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.boton-footer[data-v-02dfa168]{background-color:#b80;color:#fff;width:14rem;font-size:.8rem}.dos[data-v-02dfa168],.tres[data-v-02dfa168],.uno[data-v-02dfa168]{margin-right:1rem}.btn[data-v-02dfa168]{margin-bottom:1rem}.Azul-puma[data-v-02dfa168]{background-color:#1e3c70}.footer[data-v-02dfa168]{text-align:center;color:#fff}@media (max-width:768px){.tres[data-v-02dfa168],.uno[data-v-02dfa168]{margin-right:4rem}.dos[data-v-02dfa168]{margin-right:0}.footer[data-v-02dfa168]{font-size:.7rem}}@media (max-width:970px){.dos[data-v-02dfa168],.tres[data-v-02dfa168],.uno[data-v-02dfa168]{margin-right:.5rem}.footer[data-v-02dfa168]{font-size:.7rem}}[data-v-30e9b756]{margin:0;padding:0}.divMaster[data-v-30e9b756]{height:auto;margin:0 auto}nav[data-v-30e9b756]{padding:0}.azulUnam[data-v-30e9b756]{background-color:#1e3c70}.doradoUnam[data-v-30e9b756],.dropdown-item[data-v-30e9b756]:hover{background-color:#b80}.dropdown-itemBusqueda[data-v-30e9b756]:hover{background-color:#1e3c70;color:#fff}.nav-link[data-v-30e9b756]:focus{background-color:#1e3c70;border-radius:1rem}.nav-link[data-v-30e9b756]:hover{background-color:#1e3c70;color:#fff;border-radius:.2rem}.nav-link[data-v-30e9b756]{transition:.3s;font-size:20px}.dropdown-item[data-v-30e9b756]{padding:.3rem 1rem}.dropdown[data-v-30e9b756]{position:relative;display:inline-block;height:auto}.dropdown-content[data-v-30e9b756]{position:absolute;background-color:#f9f9f9;min-width:160px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);top:.8rem;left:-10rem;display:block}.navbar-dark[data-v-30e9b756],.navbar-toggler[data-v-30e9b756]{font-size:1rem;border:none}@media (max-width:450px){.buscador[data-v-30e9b756],.menuText[data-v-30e9b756]{display:block!important}.dropdown-menu[data-v-30e9b756]{width:80vw!important}}.divMaster{height:8rem;margin:0;width:auto}.azulUnam{background-color:#1e3c70}.sizeImg{height:5rem}.logo_acatlan_resp{display:none!important}@media (max-width:450px){.logo_acatlan,.logo_unam{display:none!important}.logo_acatlan_resp{display:block!important}.logo_acatlan_resp a img{height:5rem}}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50}a[data-v-993d7938]{font-size:14px;margin-bottom:6px;font-weight:400}.button[data-v-6e1c8750]{background-color:#1b3d70;border:none;color:#fff;height:4rem;width:15rem;text-align:center;text-decoration:none;display:inline-block;font-size:1.5rem;border-radius:1rem;transition-duration:.4s;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);margin-left:2rem;margin-right:2rem;margin-bottom:2rem;margin-top:2rem}.button[data-v-6e1c8750]:hover{background-color:#b80;color:#fff}.button[data-v-4f1ed9c0]{background-color:#1b3d70;border:none;color:#fff;height:4rem;width:15rem;text-align:center;text-decoration:none;display:inline-block;font-size:1.5rem;border-radius:1rem;transition-duration:.4s;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);margin-left:2rem;margin-right:2rem;margin-bottom:2rem;margin-top:2rem}.button[data-v-4f1ed9c0]:hover{background-color:#b80;color:#fff}.button[data-v-231605bd]{background-color:#1b3d70;border:none;color:#fff;height:4rem;width:15rem;text-align:center;text-decoration:none;display:inline-block;font-size:1.5rem;border-radius:1rem;transition-duration:.4s;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);margin-left:2rem;margin-right:2rem;margin-bottom:2rem;margin-top:2rem}.button[data-v-231605bd]:hover{background-color:#b80;color:#fff}.button[data-v-0e9e5529]{background-color:#1b3d70;border:none;color:#fff;height:2.5rem;width:14rem;text-align:center;text-decoration:none;display:inline-block;font-size:1rem;border-radius:.3rem;transition-duration:.4s;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);margin-top:.3rem}.button[data-v-0e9e5529]:hover{background-color:#b80;color:#fff}
|
||||
.boton-footer[data-v-02dfa168]{background-color:#b80;color:#fff;width:14rem;font-size:.8rem}.dos[data-v-02dfa168],.tres[data-v-02dfa168],.uno[data-v-02dfa168]{margin-right:1rem}.btn[data-v-02dfa168]{margin-bottom:1rem}.Azul-puma[data-v-02dfa168]{background-color:#1e3c70}.footer[data-v-02dfa168]{text-align:center;color:#fff}@media (max-width:768px){.tres[data-v-02dfa168],.uno[data-v-02dfa168]{margin-right:4rem}.dos[data-v-02dfa168]{margin-right:0}.footer[data-v-02dfa168]{font-size:.7rem}}@media (max-width:970px){.dos[data-v-02dfa168],.tres[data-v-02dfa168],.uno[data-v-02dfa168]{margin-right:.5rem}.footer[data-v-02dfa168]{font-size:.7rem}}[data-v-30e9b756]{margin:0;padding:0}.divMaster[data-v-30e9b756]{height:auto;margin:0 auto}nav[data-v-30e9b756]{padding:0}.azulUnam[data-v-30e9b756]{background-color:#1e3c70}.doradoUnam[data-v-30e9b756],.dropdown-item[data-v-30e9b756]:hover{background-color:#b80}.dropdown-itemBusqueda[data-v-30e9b756]:hover{background-color:#1e3c70;color:#fff}.nav-link[data-v-30e9b756]:focus{background-color:#1e3c70;border-radius:1rem}.nav-link[data-v-30e9b756]:hover{background-color:#1e3c70;color:#fff;border-radius:.2rem}.nav-link[data-v-30e9b756]{transition:.3s;font-size:20px}.dropdown-item[data-v-30e9b756]{padding:.3rem 1rem}.dropdown[data-v-30e9b756]{position:relative;display:inline-block;height:auto}.dropdown-content[data-v-30e9b756]{position:absolute;background-color:#f9f9f9;min-width:160px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);top:.8rem;left:-10rem;display:block}.navbar-dark[data-v-30e9b756],.navbar-toggler[data-v-30e9b756]{font-size:1rem;border:none}@media (max-width:450px){.buscador[data-v-30e9b756],.menuText[data-v-30e9b756]{display:block!important}.dropdown-menu[data-v-30e9b756]{width:80vw!important}}.divMaster{height:8rem;margin:0;width:auto}.azulUnam{background-color:#1e3c70}.sizeImg{height:5rem}.logo_acatlan_resp{display:none!important}@media (max-width:450px){.logo_acatlan,.logo_unam{display:none!important}.logo_acatlan_resp{display:block!important}.logo_acatlan_resp a img{height:5rem}}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50}a[data-v-eacb7b7a]{font-size:14px;margin-bottom:6px;font-weight:400}.button[data-v-6e1c8750]{background-color:#1b3d70;border:none;color:#fff;height:4rem;width:15rem;text-align:center;text-decoration:none;display:inline-block;font-size:1.5rem;border-radius:1rem;transition-duration:.4s;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);margin-left:2rem;margin-right:2rem;margin-bottom:2rem;margin-top:2rem}.button[data-v-6e1c8750]:hover{background-color:#b80;color:#fff}.button[data-v-4f1ed9c0]{background-color:#1b3d70;border:none;color:#fff;height:4rem;width:15rem;text-align:center;text-decoration:none;display:inline-block;font-size:1.5rem;border-radius:1rem;transition-duration:.4s;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);margin-left:2rem;margin-right:2rem;margin-bottom:2rem;margin-top:2rem}.button[data-v-4f1ed9c0]:hover{background-color:#b80;color:#fff}.button[data-v-231605bd]{background-color:#1b3d70;border:none;color:#fff;height:4rem;width:15rem;text-align:center;text-decoration:none;display:inline-block;font-size:1.5rem;border-radius:1rem;transition-duration:.4s;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);margin-left:2rem;margin-right:2rem;margin-bottom:2rem;margin-top:2rem}.button[data-v-231605bd]:hover{background-color:#b80;color:#fff}.button[data-v-0e9e5529]{background-color:#1b3d70;border:none;color:#fff;height:2.5rem;width:14rem;text-align:center;text-decoration:none;display:inline-block;font-size:1rem;border-radius:.3rem;transition-duration:.4s;box-shadow:0 8px 16px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19);margin-top:.3rem}.button[data-v-0e9e5529]:hover{background-color:#b80;color:#fff}
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>censo_front</title><link href="/css/app.d992cb34.css" rel="preload" as="style"><link href="/css/chunk-vendors.9e1d7bb4.css" rel="preload" as="style"><link href="/js/app.50314dd8.js" rel="preload" as="script"><link href="/js/chunk-vendors.33f96220.js" rel="preload" as="script"><link href="/css/chunk-vendors.9e1d7bb4.css" rel="stylesheet"><link href="/css/app.d992cb34.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but censo_front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.33f96220.js"></script><script src="/js/app.50314dd8.js"></script></body></html>
|
||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>censo_front</title><link href="/css/app.46afbad4.css" rel="preload" as="style"><link href="/css/chunk-vendors.9e1d7bb4.css" rel="preload" as="style"><link href="/js/app.f2c8b2c8.js" rel="preload" as="script"><link href="/js/chunk-vendors.33f96220.js" rel="preload" as="script"><link href="/css/chunk-vendors.9e1d7bb4.css" rel="stylesheet"><link href="/css/app.46afbad4.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but censo_front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.33f96220.js"></script><script src="/js/app.f2c8b2c8.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
@@ -3,7 +3,7 @@
|
||||
<b-container fluid>
|
||||
<b-row class="my-1">
|
||||
<b-col >
|
||||
<h2 style="text-align: center; margin-bottom: 1.5rem;"> {{campo}}</h2>
|
||||
<h2 style="text-align: center; margin-bottom: 1.5rem;"> {{selectPC}}</h2>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row style="margin-bottom: 1rem;">
|
||||
@@ -32,13 +32,13 @@
|
||||
<b-dropdown-item v-for="(opcion,index) in opciones" v-bind:key="index" @click="opcionSeleted=opcion">{{opcion.nombre}}</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
</div>
|
||||
<b-form-input v-else class="m-2" placeholder="Actualizar campo" style="margin: 0"></b-form-input>
|
||||
<b-form-input v-else v-model="campoValue" class="m-2" placeholder="Actualizar campo" style="margin: 0"></b-form-input>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row>
|
||||
<b-col>
|
||||
<div style="margin-top: 2rem;">
|
||||
<b-button variant="outline-success" class="float-right" style="width: 30%; " @click="actualizarLibro()">Actualizar</b-button>
|
||||
<b-button variant="outline-success" class="float-right" style="width: 30%; " @click="actualizarCampo()">Actualizar</b-button>
|
||||
<b-button @click="$bvModal.hide('actualizarCampo')" variant="outline-danger" class="btn float-left" style="width: 30%; ">Cancelar</b-button>
|
||||
</div>
|
||||
</b-col>
|
||||
@@ -48,22 +48,30 @@
|
||||
</template>
|
||||
<script>
|
||||
import Swal from 'sweetalert2';
|
||||
import axios from "axios";
|
||||
import config from "../config/config.js";
|
||||
export default {
|
||||
props: {
|
||||
campo: String,
|
||||
pcSelected: Object,
|
||||
opciones: Array,
|
||||
objectPc: Object,
|
||||
opcionSeletedTable: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
opcionSeleted: this.opcionSeletedTable.value,
|
||||
campoValue:''
|
||||
opcionSeleted: '',
|
||||
campoValue:'',
|
||||
pc: this.campo
|
||||
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async actualizarLibro(){
|
||||
cambiar(){
|
||||
this.opcionSeleted = '';
|
||||
this.campoValue = '';
|
||||
this.pc = this.pcSelected;
|
||||
},
|
||||
async actualizarCampo(){
|
||||
try{
|
||||
if(this.opcionSeleted === "" && this.campoValue === ""){
|
||||
await Swal.fire(
|
||||
@@ -73,26 +81,61 @@ export default {
|
||||
);
|
||||
return;
|
||||
}
|
||||
if( this.pcSelected.keyTable !== 'noInventario' && this.pcSelected.keyTable !== 'noResguardo' && this.pcSelected.keyTable !== 'idUnidadResponsable'){
|
||||
let valueCampo = '';
|
||||
if(this.opciones.length!=0){
|
||||
valueCampo = this.opcionSeleted.nombre;
|
||||
}
|
||||
else{
|
||||
valueCampo = this.campoValue;
|
||||
}
|
||||
const data ={
|
||||
keyTable : this.pcSelected.keyTable,
|
||||
idEquipo : this.objectPc.idEquipo,
|
||||
value: valueCampo
|
||||
}
|
||||
console.log(data);
|
||||
}
|
||||
|
||||
|
||||
let data = {};
|
||||
let valueCampo = '';
|
||||
if(this.opciones.length!=0){
|
||||
valueCampo = this.opcionSeleted.id;
|
||||
}
|
||||
else{
|
||||
valueCampo = this.campoValue;
|
||||
}
|
||||
data ={
|
||||
keyTable : this.pcSelected.keyTable,
|
||||
idEquipo : this.objectPc.idEquipo,
|
||||
idInventario: this.objectPc.idInventario,
|
||||
value: valueCampo,
|
||||
equipo: false
|
||||
}
|
||||
if( this.pcSelected.keyTable !== 'noInventario' && this.pcSelected.keyTable !== 'noResguardo' && this.pcSelected.keyTable !== 'idUnidadResponsable'){
|
||||
data.equipo = true;
|
||||
}
|
||||
try{
|
||||
await axios.post( `${config.api}/editarCampoEquipo`, data );
|
||||
await Swal.fire(
|
||||
'Se actualizo con exito el campo',
|
||||
'',
|
||||
'success'
|
||||
);
|
||||
location.reload();
|
||||
return;
|
||||
}
|
||||
catch(error){
|
||||
console.log(error);
|
||||
await Swal.fire(
|
||||
'No se pudo actualizar el campo',
|
||||
`Error en consola ${error}`,
|
||||
'error'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch(error){
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
selectPC : function(){
|
||||
if(this.pcSelected !== this.pc ){
|
||||
this.cambiar();
|
||||
}
|
||||
return this.campo;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,25 +35,26 @@
|
||||
<tbody>
|
||||
<tr v-for="(pc,index) in pcTablesFiltrada" v-bind:key="index">
|
||||
<td>
|
||||
<b-button variant="outline-danger">Eliminar</b-button>
|
||||
<b-button variant="outline-danger" @click="eliminar(pc.objectPc)">Eliminar</b-button>
|
||||
</td>
|
||||
<td v-for="(pcCampo,key) in pc.datos" v-bind:key="key" v-b-modal.actualizarCampo @click="pcSelected=pc.objectPc ,valueCampo=pcCampo , campo = pcHeaders[key].nombre, opciones = pcHeaders[key].data, opcionSeletedTable = {pcCampo, value:''}" >
|
||||
<td v-for="(pcCampo,key) in pc.datos" v-bind:key="key" v-b-modal.actualizarCampo @click="pcSelected=pc.objectPc ,valueCampo=pcCampo , campo = pcHeaders[key].nombre, opciones = pcHeaders[key].data" >
|
||||
{{pcCampo.value}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<Modal v-bind:campo="campo" v-bind:pcSelected="valueCampo" v-bind:opciones="opciones" v-bind:objectPc="pcSelected" v-bind:opcionSeletedTable="opcionSeletedTable" />
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<Modal v-bind:campo="campo" v-bind:pcSelected="valueCampo" v-bind:opciones="opciones" v-bind:objectPc="pcSelected" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import config from "../config/config.js";
|
||||
import Modal from './modalActualizar.vue'
|
||||
import Modal from './modalActualizar.vue';
|
||||
import Swal from 'sweetalert2';
|
||||
export default {
|
||||
name: "home",
|
||||
components: {
|
||||
@@ -75,6 +76,50 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async eliminar(pcData){
|
||||
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-outline-success',
|
||||
cancelButton: 'btn btn-outline-danger'
|
||||
},
|
||||
buttonsStyling: false
|
||||
})
|
||||
swalWithBootstrapButtons.fire({
|
||||
title: '¿Estás seguro de que quieres eliminar el Equipo?',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Si, eliminar',
|
||||
cancelButtonText: 'No, cancelar',
|
||||
reverseButtons: true
|
||||
}).then(async (result) => {
|
||||
if (result.isConfirmed) {
|
||||
const data = {
|
||||
idEquipo : pcData.idEquipo,
|
||||
idInventario: pcData.idInventario
|
||||
}
|
||||
try{
|
||||
await axios.post( `${config.api}/eliminarEquipo`, data);
|
||||
await Swal.fire(
|
||||
'Se ha eliminado con exito el Equipo',
|
||||
'',
|
||||
'success'
|
||||
);
|
||||
location.reload();
|
||||
return;
|
||||
}
|
||||
catch(error){
|
||||
console.log(error);
|
||||
await Swal.fire(
|
||||
'No se pudo eliminar el Equipo',
|
||||
`Error en consola ${error}`,
|
||||
'error'
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async filtrar(key, dato){
|
||||
for(let index in this.pcData){
|
||||
let pc = this.pcData[index];
|
||||
|
||||
Reference in New Issue
Block a user