agregar a pruebas
This commit is contained in:
Generated
+10
@@ -10242,6 +10242,11 @@
|
||||
"util.promisify": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"sweetalert2": {
|
||||
"version": "10.13.3",
|
||||
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-10.13.3.tgz",
|
||||
"integrity": "sha512-kSvTkXvc59+vPf9CfZ/wc/uvFkccxoOMLK1aUibN0mXU4hbYg/NylBTlmfvuUjJQ5SWL3X6s8w7AG5croH8U1w=="
|
||||
},
|
||||
"table": {
|
||||
"version": "5.4.6",
|
||||
"resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
|
||||
@@ -11166,6 +11171,11 @@
|
||||
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
|
||||
"dev": true
|
||||
},
|
||||
"vuex": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.0.tgz",
|
||||
"integrity": "sha512-W74OO2vCJPs9/YjNjW8lLbj+jzT24waTo2KShI8jLvJW8OaIkgb3wuAMA7D+ZiUxDOx3ubwSZTaJBip9G8a3aQ=="
|
||||
},
|
||||
"watchpack": {
|
||||
"version": "1.7.5",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz",
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
"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"
|
||||
"vue-router": "^3.4.9",
|
||||
"vuex": "^3.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
|
||||
@@ -1,32 +1,45 @@
|
||||
<template>
|
||||
<b-modal id="actualizarCampo" centered size="lg" hide-footer title="Actualizar Campo">
|
||||
<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 >
|
||||
<h1>Actualizar {{campo}}</h1>
|
||||
<h2 style="text-align: center; margin-bottom: 1.5rem;"> {{campo}}</h2>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row>
|
||||
<b-row style="margin-bottom: 1rem;">
|
||||
<b-col sm="3">
|
||||
<h4>Actual: </h4>
|
||||
</b-col>
|
||||
<b-col sm="9">
|
||||
<h4><strong>{{campo}}</strong></h4>
|
||||
<h4><strong>{{pcSelected.value}}</strong></h4>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row>
|
||||
<b-row style="margin-bottom: 1rem;">
|
||||
<b-col sm="3">
|
||||
<label for="changeValue">Actualizar: </label>
|
||||
<label style=" padding-top:1rem;">Actualizar: </label>
|
||||
</b-col>
|
||||
<b-col sm="9">
|
||||
<b-form-input id="changeValue" placeholder="Actualizar campo"></b-form-input>
|
||||
<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 class="btn btn-outline-success float-right" @click="enviarFicha()" style="width: 30%; ">Enviar</b-button>
|
||||
<b-button @click="$bvModal.hide('fichaDeposito')" variant="outline-danger" class="btn float-left" style="width: 30%; ">Cancelar</b-button>
|
||||
<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>
|
||||
@@ -34,10 +47,56 @@
|
||||
</b-modal>
|
||||
</template>
|
||||
<script>
|
||||
import Swal from 'sweetalert2';
|
||||
export default {
|
||||
props: {
|
||||
campo: String,
|
||||
value: String
|
||||
}
|
||||
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>
|
||||
@@ -47,6 +47,9 @@
|
||||
</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>
|
||||
|
||||
@@ -6,32 +6,47 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th v-for="(item,indexHeader) in pcHeaders" v-bind:key="indexHeader" scope="col">
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="btn nav-link dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{item.nombre}}
|
||||
<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 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>
|
||||
</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 v-for="(pcCampo,key) in pc.datos" v-bind:key="key" v-b-modal.actualizarCampo @click="campo=pcCampo ,valueCampo = pcHeaders[key].nombre" >
|
||||
{{pcCampo}}
|
||||
<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>
|
||||
<Modal v-bind:campo="campo" v-bind:value="valueCampo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -50,9 +65,13 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
campo:"",
|
||||
valueCampo:"",
|
||||
valueCampo:{value:''},
|
||||
pcHeaders: {},
|
||||
pcData: [],
|
||||
tableName: "",
|
||||
opciones: [],
|
||||
pcSelected: null,
|
||||
opcionSeletedTable: {value: ''}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -62,7 +81,7 @@ export default {
|
||||
if(typeof pc.headers[key] !== 'undefined' && typeof pc.datos[key] !== 'undefined' && pc.datos[key] === dato)
|
||||
pc.headers[key] = !pc.headers[key];
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
try {
|
||||
@@ -93,9 +112,9 @@ export default {
|
||||
}
|
||||
if(!header)
|
||||
return false;
|
||||
let searchInventario = (item.datos.numeroInventario).includes(this.campoBuscar) ;
|
||||
let searchResguardo = (item.datos.numeroResguardo).includes(this.campoBuscar) ;
|
||||
let searchSerie = (item.datos.serie).includes(this.campoBuscar) ;
|
||||
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;
|
||||
|
||||
@@ -3,10 +3,10 @@ const config = {
|
||||
//api: "https://f8d86328e778.ngrok.io"
|
||||
|
||||
//Local
|
||||
api: "http://localhost:3000"
|
||||
//api: "http://localhost:3000"
|
||||
|
||||
//Pruebas
|
||||
//api: "https://venus.acatlan.unam.mx/portal"
|
||||
api: "https://venus.acatlan.unam.mx/censo_orion"
|
||||
|
||||
//Produccion
|
||||
//api: "https://venus.acatlan.unam.mx/portal_editorial"
|
||||
|
||||
+17
-2
@@ -2,6 +2,7 @@ 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'
|
||||
@@ -9,15 +10,29 @@ 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
|
||||
router,
|
||||
store: store,
|
||||
});
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
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: "/agregarEquipo", component: addPcs, name: "addPcs" },
|
||||
{ path: "/agregarCatalogo", component: addCatalogo, name: "addCataogo" }
|
||||
]
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
<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>
|
||||
+117
-53
@@ -1,70 +1,99 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<h1>Agregar Equipo</h1>
|
||||
<h1 style="margin: 2rem">Agregar Equipo</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Número de inventario"></b-form-input>
|
||||
<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 class="fadeIn second" id="input-small" placeholder="Tipo"></b-form-input>
|
||||
<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 class="fadeIn second" id="input-small" placeholder="Modelo"></b-form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Marca"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Serie"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Procesador"></b-form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Velocidad de procesador (MHz)"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<b-form-input class="fadeIn second" id="input-small" placeholder="ROM (GB)"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<b-form-input class="fadeIn second" id="input-small" placeholder="RAM (MB)"></b-form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Tipo de memoria"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Velocidad de memoria (MHz)"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Gráficos"></b-form-input>
|
||||
<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 class="fadeIn second" id="input-small" placeholder="Sistema operativo"></b-form-input>
|
||||
<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 class="fadeIn second" id="input-small" placeholder="Resguardo"></b-form-input>
|
||||
<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-form-input class="fadeIn second" id="input-small" placeholder="Unidad responsable"></b-form-input>
|
||||
<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-form-input class="fadeIn second" id="input-small" placeholder="Responsable"></b-form-input>
|
||||
<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 class="fadeIn second" id="input-small" placeholder="Ubicación"></b-form-input>
|
||||
<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-form-input class="fadeIn second" id="input-small" placeholder="Uso"></b-form-input>
|
||||
<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">
|
||||
@@ -76,6 +105,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import config from "../config/config.js";
|
||||
|
||||
export default {
|
||||
|
||||
@@ -85,11 +116,44 @@ export default {
|
||||
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>
|
||||
|
||||
@@ -1,45 +1,57 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<h1>Agregar impresora</h1>
|
||||
<h1 style="margin: 2rem">Agregar impresora</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<b-form-input id="input-small" placeholder="Número de inventario"></b-form-input>
|
||||
<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 id="input-small" placeholder="Tipo"></b-form-input>
|
||||
<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 id="input-small" placeholder="Modelo"></b-form-input>
|
||||
<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-form-input id="input-small" placeholder="Marca"></b-form-input>
|
||||
<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-form-input id="input-small" placeholder="Serie"></b-form-input>
|
||||
<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-form-input id="input-small" placeholder="Descripcion adicional"></b-form-input>
|
||||
<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-4">
|
||||
<b-form-input id="input-small" placeholder="Resguardo"></b-form-input>
|
||||
<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-4">
|
||||
<b-form-input id="input-small" placeholder="Unidad responsable"></b-form-input>
|
||||
<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-4">
|
||||
<b-form-input id="input-small" placeholder="Nombre del responsable"></b-form-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<b-form-input id="input-small" placeholder="Ubicación"></b-form-input>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<b-form-input id="input-small" placeholder="Uso"></b-form-input>
|
||||
<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">
|
||||
@@ -51,6 +63,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import config from "../config/config.js";
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
@@ -60,11 +75,32 @@ export default {
|
||||
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>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<b-input-group-prepend is-text>
|
||||
<b-icon icon="search"></b-icon>
|
||||
</b-input-group-prepend>
|
||||
<b-form-input type="search" placeholder="Buscar" v-model="campoBuscar" ></b-form-input>
|
||||
<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">
|
||||
|
||||
Reference in New Issue
Block a user