Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5105553dea | |||
| c63ecf3064 | |||
| d72e18d95a | |||
| e88392e59e | |||
| 6b4725b12f | |||
| af507e3793 | |||
| 1c1b90a262 | |||
| e846974d40 | |||
| 1a96f677cc | |||
| c32cd5532b | |||
| ca7550bf79 |
@@ -0,0 +1,3 @@
|
|||||||
|
> 1%
|
||||||
|
last 2 versions
|
||||||
|
not dead
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
node: true
|
||||||
|
},
|
||||||
|
extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"],
|
||||||
|
parserOptions: {
|
||||||
|
parser: "babel-eslint"
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
|
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
/dist
|
|
||||||
|
|
||||||
|
|
||||||
# local env files
|
# local env files
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
presets: [
|
presets: ["@vue/cli-plugin-babel/preset"]
|
||||||
'@vue/cli-plugin-babel/preset'
|
};
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
.DS_Store
|
|
||||||
node_modules
|
|
||||||
/dist
|
|
||||||
|
|
||||||
|
|
||||||
# local env files
|
|
||||||
.env.local
|
|
||||||
.env.*.local
|
|
||||||
|
|
||||||
# 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,24 +0,0 @@
|
|||||||
# censo_front
|
|
||||||
|
|
||||||
## Project setup
|
|
||||||
```
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
### Compiles and hot-reloads for development
|
|
||||||
```
|
|
||||||
npm run serve
|
|
||||||
```
|
|
||||||
|
|
||||||
### Compiles and minifies for production
|
|
||||||
```
|
|
||||||
npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
### Lints and fixes files
|
|
||||||
```
|
|
||||||
npm run lint
|
|
||||||
```
|
|
||||||
|
|
||||||
### Customize configuration
|
|
||||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
presets: [
|
|
||||||
'@vue/cli-plugin-babel/preset'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,50 +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",
|
|
||||||
"bootstrap": "^4.5.3",
|
|
||||||
"bootstrap-vue": "^2.21.1",
|
|
||||||
"core-js": "^3.6.5",
|
|
||||||
"jquery": "^3.5.1",
|
|
||||||
"popper.js": "^1.16.1",
|
|
||||||
"vue": "^2.6.12",
|
|
||||||
"vue-router": "^3.4.9"
|
|
||||||
},
|
|
||||||
"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,18 +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.0">
|
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
|
||||||
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
|
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<noscript>
|
|
||||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
||||||
</noscript>
|
|
||||||
<div id="app"></div>
|
|
||||||
<!-- built files will be auto injected -->
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="app">
|
|
||||||
<Header />
|
|
||||||
<Navbar />
|
|
||||||
<router-view></router-view>
|
|
||||||
<Footer />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import Footer from './components/footer.vue'
|
|
||||||
import Navbar from './components/nav.vue'
|
|
||||||
|
|
||||||
import Header from './components/header.vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'App',
|
|
||||||
components: {
|
|
||||||
Footer,
|
|
||||||
Header,
|
|
||||||
Navbar
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
#app {
|
|
||||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
text-align: center;
|
|
||||||
color: #2c3e50;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
@@ -1,136 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div class="hello">
|
|
||||||
<h1>{{ msg }}</h1>
|
|
||||||
<p>
|
|
||||||
For a guide and recipes on how to configure / customize this project,<br>
|
|
||||||
check out the
|
|
||||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
|
||||||
</p>
|
|
||||||
<h3>Installed CLI Plugins</h3>
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
|
||||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
|
||||||
</ul>
|
|
||||||
<h3>Essential Links</h3>
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
|
||||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
|
||||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
|
||||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
|
||||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
|
||||||
</ul>
|
|
||||||
<h3>Ecosystem</h3>
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
|
||||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
|
||||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
|
||||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
|
||||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<footer class="container-fluid Azul-puma footer py-3 ">
|
|
||||||
<!-- <div class="container">
|
|
||||||
<div row>
|
|
||||||
<router-link to="/comite">
|
|
||||||
<button type="button" class="col-md-6 col-sm-12 btn boton-footer uno">
|
|
||||||
Comité Editorial
|
|
||||||
</button>
|
|
||||||
</router-link>
|
|
||||||
<router-link to="/lineamientos">
|
|
||||||
<button type="button" class="col-md-6 col-sm-12 btn boton-footer dos">
|
|
||||||
Política Editorial y Lineamentos
|
|
||||||
</button></router-link
|
|
||||||
>
|
|
||||||
<router-link to="/proceso">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="col-md-6 col-sm-12 btn boton-footer tres"
|
|
||||||
>
|
|
||||||
Proceso Editorial y Organismos
|
|
||||||
</button>
|
|
||||||
</router-link>
|
|
||||||
<router-link to="/puntos">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="col-md-6 col-sm-12 btn boton-footer cuatro"
|
|
||||||
>
|
|
||||||
Puntos de Venta
|
|
||||||
</button>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div row>
|
|
||||||
<p class="mb-0 ">Hecho en México, todos los derechos reservados 2020.</p>
|
|
||||||
<p class="my-0 ">
|
|
||||||
Esta página puede ser reproducida con fines no lucrativos, siempre y
|
|
||||||
cuando no se mutile, se cite la fuente
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
completa y su dirección electrónica. De otra forma, requiere permiso
|
|
||||||
previo por escrito de la institución.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'HelloWorld',
|
|
||||||
props: {
|
|
||||||
msg: String
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.boton-footer {
|
|
||||||
background-color: rgb(187, 136, 0);
|
|
||||||
color: white;
|
|
||||||
width: 14rem;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
}
|
|
||||||
.uno,
|
|
||||||
.dos,
|
|
||||||
.tres {
|
|
||||||
margin-right: 1rem;
|
|
||||||
}
|
|
||||||
.btn {
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.Azul-puma {
|
|
||||||
background-color: #1e3c70;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
text-align: center;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
.uno,
|
|
||||||
.tres {
|
|
||||||
margin-right: 4rem;
|
|
||||||
}
|
|
||||||
.dos {
|
|
||||||
margin-right: 0rem;
|
|
||||||
}
|
|
||||||
.footer {
|
|
||||||
font-size: 0.7rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 970px) {
|
|
||||||
.uno,
|
|
||||||
.dos,
|
|
||||||
.tres {
|
|
||||||
margin-right: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
font-size: 0.7rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="row divMaster header cl-12 azulUnam">
|
|
||||||
<div
|
|
||||||
class="logo_unam col-4 offset-1 d-inline-flex my-2 align-items-center"
|
|
||||||
>
|
|
||||||
<a href="https://www.unam.mx/" target="_blank">
|
|
||||||
<img class="sizeImg" src="../assets/Logo-UNAM.png" alt="logo unam" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="logo_acatlan col-4 offset-2 d-inline-flex justify-content-end my-2 align-items-center"
|
|
||||||
>
|
|
||||||
<a href="https://www.acatlan.unam.mx/" target="_blank">
|
|
||||||
<img
|
|
||||||
class="sizeImg"
|
|
||||||
src="../assets/logo-fesa-45.png"
|
|
||||||
alt="logo unam"
|
|
||||||
/>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
<template>
|
|
||||||
<b-modal id="actualizarCampo" centered size="lg" hide-footer title="Actualizar Campo">
|
|
||||||
<b-container fluid>
|
|
||||||
<b-row class="my-1">
|
|
||||||
<b-col >
|
|
||||||
<h1>Actualizar {{campo}}</h1>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
<b-row>
|
|
||||||
<b-col sm="3">
|
|
||||||
<h4>Actual: </h4>
|
|
||||||
</b-col>
|
|
||||||
<b-col sm="9">
|
|
||||||
<h4><strong>{{campo}}</strong></h4>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
<b-row>
|
|
||||||
<b-col sm="3">
|
|
||||||
<label for="changeValue">Actualizar: </label>
|
|
||||||
</b-col>
|
|
||||||
<b-col sm="9">
|
|
||||||
<b-form-input id="changeValue" placeholder="Actualizar campo"></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>
|
|
||||||
</div>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
</b-container>
|
|
||||||
</b-modal>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
campo: String,
|
|
||||||
value: String
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th v-for="item in pcHeaders" v-bind:key="item.nombre" 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}}
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
|
||||||
<b-dropdown-form>
|
|
||||||
<b-form-checkbox v-for="type in item.data" v-bind:key="type" scope="col"><a>{{type.nombre}}</a></b-form-checkbox>
|
|
||||||
</b-dropdown-form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="pc in pcData" v-bind:key="pc.index">
|
|
||||||
<td v-for="(pcCampo,key) in pc" v-bind:key="pcCampo" v-b-modal.actualizarCampo @click="campo=pcCampo ,valueCampo = pcHeaders[key].nombre" >
|
|
||||||
{{pcCampo}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Modal v-bind:campo="campo" v-bind:value="valueCampo" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import Modal from './modalActualizar.vue'
|
|
||||||
export default {
|
|
||||||
name: "home",
|
|
||||||
components: {
|
|
||||||
Modal,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
campo:"",
|
|
||||||
valueCampo:"",
|
|
||||||
pcHeaders: {
|
|
||||||
noInventario: {nombre: "Inventario", data: []},
|
|
||||||
activoFijo: {nombre: "Tipo", data: [{nombre: "compu", value: true}, {nombre: "dos", value: true}]},
|
|
||||||
modelo: {nombre: "Modelo", data: []},
|
|
||||||
marca: {nombre: "Marca", data: []},
|
|
||||||
noSerie: {nombre: "Serie", data: []},
|
|
||||||
procesador: {nombre: "Procesador", data: []},
|
|
||||||
vProcesador: {nombre: "Velocidad de procesador (MHz)", data: []},
|
|
||||||
hdd: {nombre: "ROM (GB)", data: []},
|
|
||||||
memoriasz: {nombre: "RAM (MB)", data: []},
|
|
||||||
memoria: {nombre: "Tipo de memoria", data: []},
|
|
||||||
vMemoria: {nombre: "Velocidad de memoria (MHz)", data: []},
|
|
||||||
graficos:{nombre: "Gráficos", data: []},
|
|
||||||
osname: {nombre: "Sistema operativo", data: []},
|
|
||||||
noResguardo: {nombre: "Resguardo", data: []},
|
|
||||||
uResponsable: {nombre: "Unidad responsable", data: []},
|
|
||||||
nombreResponsable: {nombre: "Responsable", data: []},
|
|
||||||
ubicacion: {nombre: "Ubicación", data: []},
|
|
||||||
uso: {nombre: "Uso", data: []}
|
|
||||||
},
|
|
||||||
pcData: [
|
|
||||||
{ noInventario: "Inventario",
|
|
||||||
activoFijo: "Tipo",
|
|
||||||
modelo: "Modelo",
|
|
||||||
marca: "Marca",
|
|
||||||
noSerie: "Serie",
|
|
||||||
procesador: "Procesador",
|
|
||||||
vProcesador: "Velocidad de procesador (MHz)",
|
|
||||||
hdd: "ROM (GB)",
|
|
||||||
memoriasz: "RAM (MB)",
|
|
||||||
memoria: "Tipo de memoria",
|
|
||||||
vMemoria: "Velocidad de memoria (MHz)",
|
|
||||||
graficos: "Gráficos",
|
|
||||||
osname: "Sistema operativo",
|
|
||||||
noResguardo: "Resguardo",
|
|
||||||
uResponsable: "Unidad responsable",
|
|
||||||
nombreResponsable: "Responsable",
|
|
||||||
ubicacion: "Ubicación",
|
|
||||||
uso: "Uso" },
|
|
||||||
],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import Vue from "vue";
|
|
||||||
import App from "./App.vue";
|
|
||||||
import "bootstrap";
|
|
||||||
import "bootstrap/dist/css/bootstrap.min.css";
|
|
||||||
import VueRouter from "vue-router";
|
|
||||||
import { routes } from "./routes";
|
|
||||||
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
|
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
|
||||||
|
|
||||||
Vue.use(BootstrapVue);
|
|
||||||
Vue.use(IconsPlugin);
|
|
||||||
const router = new VueRouter({
|
|
||||||
routes
|
|
||||||
});
|
|
||||||
|
|
||||||
new Vue({
|
|
||||||
el: "#app",
|
|
||||||
render: h => h(App),
|
|
||||||
router
|
|
||||||
});
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import home from "./view/home.vue";
|
|
||||||
import addPrinter from "./view/addPrinter.vue";
|
|
||||||
import addPcs from "./view/addPcs"
|
|
||||||
export const routes = [
|
|
||||||
{ path: "/", component: home, name: "home" },
|
|
||||||
{ path: "/agregarImpresora", component: addPrinter, name: "addPrinter" },
|
|
||||||
{ path: "/agregarEquipo", component: addPcs, name: "addPcs" }
|
|
||||||
];
|
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="container">
|
|
||||||
<h1>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>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Tipo"></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>
|
|
||||||
</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>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Resguardo"></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>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Responsable"></b-form-input>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Ubicación"></b-form-input>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<b-form-input class="fadeIn second" id="input-small" placeholder="Uso"></b-form-input>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2">
|
|
||||||
<button class="button " >
|
|
||||||
Agregar
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
name: "home",
|
|
||||||
components: {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
typeSelected:"Equipos",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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,95 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="container">
|
|
||||||
<h1>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>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<b-form-input id="input-small" placeholder="Tipo"></b-form-input>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<b-form-input 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>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<b-form-input id="input-small" placeholder="Serie"></b-form-input>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<b-form-input id="input-small" placeholder="Descripcion adicional"></b-form-input>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<b-form-input id="input-small" placeholder="Resguardo"></b-form-input>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<b-form-input id="input-small" placeholder="Unidad responsable"></b-form-input>
|
|
||||||
</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>
|
|
||||||
</div>
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2">
|
|
||||||
<button class="button " >
|
|
||||||
Agregar
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
name: "home",
|
|
||||||
components: {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
typeSelected:"Equipos",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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,80 +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" ></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 />
|
|
||||||
</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",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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>
|
|
||||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
@@ -0,0 +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.531bacc5.css" rel="preload" as="style"><link href="css/chunk-vendors.9e1d7bb4.css" rel="preload" as="style"><link href="js/app.0d5f6afd.js" rel="preload" as="script"><link href="js/chunk-vendors.5bfa42cc.js" rel="preload" as="script"><link href="css/chunk-vendors.9e1d7bb4.css" rel="stylesheet"><link href="css/app.531bacc5.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.5bfa42cc.js"></script><script src="js/app.0d5f6afd.js"></script></body></html>
|
||||||
@@ -8,37 +8,26 @@
|
|||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "^4.5.3",
|
"axios": "^0.21.1",
|
||||||
|
"bootstrap": "^4.6.0",
|
||||||
|
"bootstrap-vue": "^2.21.2",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
|
"jquery": "^3.5.1",
|
||||||
|
"sweetalert2": "^10.13.3",
|
||||||
"vue": "^2.6.11",
|
"vue": "^2.6.11",
|
||||||
"vue-router": "^3.4.9"
|
"vue-router": "^3.5.0",
|
||||||
|
"vuex": "^3.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "~4.5.0",
|
"@vue/cli-plugin-babel": "~4.5.0",
|
||||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||||
"@vue/cli-service": "~4.5.0",
|
"@vue/cli-service": "~4.5.0",
|
||||||
|
"@vue/eslint-config-prettier": "^6.0.0",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"eslint": "^6.7.2",
|
"eslint": "^6.7.2",
|
||||||
|
"eslint-plugin-prettier": "^3.1.3",
|
||||||
"eslint-plugin-vue": "^6.2.2",
|
"eslint-plugin-vue": "^6.2.2",
|
||||||
|
"prettier": "^1.19.1",
|
||||||
"vue-template-compiler": "^2.6.11"
|
"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,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
|||||||
@@ -1,13 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
|
<Header />
|
||||||
|
<Navbar />
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Footer from './components/footer.vue'
|
||||||
|
import Navbar from './components/nav.vue'
|
||||||
|
|
||||||
|
import Header from './components/header.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "App"
|
name: 'App',
|
||||||
};
|
components: {
|
||||||
|
Footer,
|
||||||
|
Header,
|
||||||
|
Navbar
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -17,17 +30,5 @@ export default {
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #2c3e50;
|
color: #2c3e50;
|
||||||
margin-top: 60px;
|
|
||||||
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.row {
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-img-top {
|
|
||||||
height: 18rem;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
|
After Width: | Height: | Size: 6.2 KiB |
@@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
<div class="hello">
|
<div class="hello">
|
||||||
<h1>{{ msg }}</h1>
|
<h1>{{ msg }}</h1>
|
||||||
<p>
|
<p>
|
||||||
@@ -28,6 +29,50 @@
|
|||||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<footer class="container-fluid Azul-puma footer py-3 ">
|
||||||
|
<!-- <div class="container">
|
||||||
|
<div row>
|
||||||
|
<router-link to="/comite">
|
||||||
|
<button type="button" class="col-md-6 col-sm-12 btn boton-footer uno">
|
||||||
|
Comité Editorial
|
||||||
|
</button>
|
||||||
|
</router-link>
|
||||||
|
<router-link to="/lineamientos">
|
||||||
|
<button type="button" class="col-md-6 col-sm-12 btn boton-footer dos">
|
||||||
|
Política Editorial y Lineamentos
|
||||||
|
</button></router-link
|
||||||
|
>
|
||||||
|
<router-link to="/proceso">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="col-md-6 col-sm-12 btn boton-footer tres"
|
||||||
|
>
|
||||||
|
Proceso Editorial y Organismos
|
||||||
|
</button>
|
||||||
|
</router-link>
|
||||||
|
<router-link to="/puntos">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="col-md-6 col-sm-12 btn boton-footer cuatro"
|
||||||
|
>
|
||||||
|
Puntos de Venta
|
||||||
|
</button>
|
||||||
|
</router-link>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
|
<div row>
|
||||||
|
<p class="mb-0 ">Hecho en México, todos los derechos reservados 2020.</p>
|
||||||
|
<p class="my-0 ">
|
||||||
|
Esta página puede ser reproducida con fines no lucrativos, siempre y
|
||||||
|
cuando no se mutile, se cite la fuente
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
completa y su dirección electrónica. De otra forma, requiere permiso
|
||||||
|
previo por escrito de la institución.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -39,20 +84,53 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
h3 {
|
.boton-footer {
|
||||||
margin: 40px 0 0;
|
background-color: rgb(187, 136, 0);
|
||||||
|
color: white;
|
||||||
|
width: 14rem;
|
||||||
|
font-size: 0.8rem;
|
||||||
}
|
}
|
||||||
ul {
|
.uno,
|
||||||
list-style-type: none;
|
.dos,
|
||||||
padding: 0;
|
.tres {
|
||||||
|
margin-right: 1rem;
|
||||||
}
|
}
|
||||||
li {
|
.btn {
|
||||||
display: inline-block;
|
margin-bottom: 1rem;
|
||||||
margin: 0 10px;
|
|
||||||
}
|
}
|
||||||
a {
|
|
||||||
color: #42b983;
|
.Azul-puma {
|
||||||
|
background-color: #1e3c70;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
text-align: center;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.uno,
|
||||||
|
.tres {
|
||||||
|
margin-right: 4rem;
|
||||||
|
}
|
||||||
|
.dos {
|
||||||
|
margin-right: 0rem;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 970px) {
|
||||||
|
.uno,
|
||||||
|
.dos,
|
||||||
|
.tres {
|
||||||
|
margin-right: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -14,30 +14,21 @@
|
|||||||
<a href="https://www.acatlan.unam.mx/" target="_blank">
|
<a href="https://www.acatlan.unam.mx/" target="_blank">
|
||||||
<img
|
<img
|
||||||
class="sizeImg"
|
class="sizeImg"
|
||||||
src="../assets/FES-editoriales.png"
|
src="../assets/logo-fesa-45.png"
|
||||||
alt="logo unam"
|
alt="logo unam"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
|
||||||
class="logo_acatlan_resp col-8 offset-2 d-flex justify-content-center my-2 align-items-center"
|
|
||||||
>
|
|
||||||
<a href="https://www.acatlan.unam.mx/" target="_blank">
|
|
||||||
<img
|
|
||||||
class="sizeImg"
|
|
||||||
src="../assets/FES-editoriales.png"
|
|
||||||
alt="logo unam"
|
|
||||||
/>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.divMaster {
|
.divMaster {
|
||||||
height: 7em;
|
height: 8rem;
|
||||||
margin: 0 auto;
|
margin: 0;
|
||||||
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.azulUnam {
|
.azulUnam {
|
||||||
|
|||||||
@@ -0,0 +1,170 @@
|
|||||||
|
<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;"> {{selectPC}}</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 class="dropdown-container" v-if="opciones.length!=0">
|
||||||
|
|
||||||
|
<div class="dropdown">
|
||||||
|
<button class="btn dropdown-toggle btn btn-outline-primary dropdown-toggle btn-block short" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
{{opcionSeleted != '' ? opcionSeleted.text : campo}}
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu " aria-labelledby="dropdownMenuButton">
|
||||||
|
<div class="containerDrop" v-for="(opcion,index) in opciones" v-bind:key="index" @click="opcionSeleted=opcion">
|
||||||
|
<a class="dropdown-item"><p> {{opcion.text}}</p></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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="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>
|
||||||
|
</b-row>
|
||||||
|
</b-container>
|
||||||
|
</b-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.dropdown-item,.short{
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: pre;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
word-wrap: break-word;
|
||||||
|
text-overflow: inherit;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
.dropdown {
|
||||||
|
position: relative ;
|
||||||
|
display: inline-block;
|
||||||
|
height: auto;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-menu{
|
||||||
|
max-height: 20rem;
|
||||||
|
width: 100%;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<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,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
opcionSeleted: '',
|
||||||
|
campoValue:'',
|
||||||
|
pc: this.campo
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
|
||||||
|
cambiar(){
|
||||||
|
this.opcionSeleted = '';
|
||||||
|
this.campoValue = '';
|
||||||
|
this.pc = this.pcSelected;
|
||||||
|
},
|
||||||
|
async actualizarCampo(){
|
||||||
|
try{
|
||||||
|
if(this.opcionSeleted === "" && this.campoValue === ""){
|
||||||
|
await Swal.fire(
|
||||||
|
'¿Aún no has llenado el campo a editar?',
|
||||||
|
'',
|
||||||
|
'question'
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -47,6 +47,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<router-link to="/agregarCatalogo"><a class="nav-link text-white">Agregar al catalogo</a></router-link>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="d-flex align-items-center mx-4">
|
<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>
|
<i class='fas fa-user-alt' style='font-size:24px;color:white;margin-right:10px'></i>
|
||||||
@@ -0,0 +1,329 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<h3 style="text-align: right; margin-bottom: 1rem;">Totales: {{pcTablesFiltrada.length}} </h3>
|
||||||
|
|
||||||
|
<div class="table-responsive" style="height : 35rem">
|
||||||
|
<table class="table tableFixHead" >
|
||||||
|
<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 >
|
||||||
|
<div v-if="item.data.length != 0">
|
||||||
|
<div>
|
||||||
|
<div class="dropdown">
|
||||||
|
<button role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="align-self: center" class="btn nav-link dropdown-toggle" @click="llenarFiltro( indexHeader)">
|
||||||
|
{{item.nombre}}
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu" aria-labelledby="navbarDropdown" >
|
||||||
|
<form style="padding: 10px">
|
||||||
|
|
||||||
|
<div class="form-check" >
|
||||||
|
<input type="checkbox" :checked="seleccionado(indexHeader)" @click="seleccionarDatos(item,indexHeader)" class="form-check-input" :id="item.nombre">
|
||||||
|
<label class="form-check-label" :for="item.nombre">Seleccionar todos</label>
|
||||||
|
</div>
|
||||||
|
<b-form-checkbox-group
|
||||||
|
:id="item.nombre"
|
||||||
|
v-model="selected"
|
||||||
|
:options="item.data"
|
||||||
|
:name="item.nombre"
|
||||||
|
stacked
|
||||||
|
></b-form-checkbox-group>
|
||||||
|
</form>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<div class="text-center">
|
||||||
|
<b-button center @click="filtrar(indexHeader)">Filtrar</b-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(pc,index) in pcTablesFiltrada" v-bind:key="index">
|
||||||
|
<td>
|
||||||
|
<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" >
|
||||||
|
{{pcCampo.value}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Modal v-bind:campo="campo" v-bind:pcSelected="valueCampo" v-bind:opciones="opciones" v-bind:objectPc="pcSelected" />
|
||||||
|
</div>
|
||||||
|
<div class="row" style="margin-bottom: 3rem;" >
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
|
<b-button v-if="!loadExcel" class="button" @click="descargarExcel()"><a>Descargar</a></b-button>
|
||||||
|
<!-- <button class="button" @click="descargarExcel()" >
|
||||||
|
Descargar Excel
|
||||||
|
</button> -->
|
||||||
|
<div v-else class=" mb-3" style="margin-top: 3rem; ">
|
||||||
|
<b-spinner variant="primary" style="width: 5rem; height: 5rem;" label="Caragndo..."></b-spinner><br/>
|
||||||
|
<strong >Cargando...</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import axios from "axios";
|
||||||
|
import config from "../config/config.js";
|
||||||
|
import Modal from './modalActualizar.vue';
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
export default {
|
||||||
|
name: "home",
|
||||||
|
components: {
|
||||||
|
Modal,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
campoBuscar: String,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
campo:"",
|
||||||
|
valueCampo:{value:''},
|
||||||
|
pcHeaders: {},
|
||||||
|
pcData: [],
|
||||||
|
tableName: "",
|
||||||
|
opciones: [],
|
||||||
|
pcSelected: null,
|
||||||
|
opcionSeletedTable: {value: ''},
|
||||||
|
selected: [],
|
||||||
|
link: null,
|
||||||
|
loadExcel: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async descargarExcel(){
|
||||||
|
this.loadExcel = true;
|
||||||
|
const data = {
|
||||||
|
pcHeaders: this.pcHeaders,
|
||||||
|
table: this.pcTablesFiltrada
|
||||||
|
}
|
||||||
|
await axios.post( `${config.api}/createExcel`, data).then(async()=>{
|
||||||
|
this.loadExcel = false;
|
||||||
|
await Swal.fire(
|
||||||
|
'Se ha creado con exito el archvio',
|
||||||
|
'',
|
||||||
|
'success'
|
||||||
|
).then(()=>{
|
||||||
|
window.location.href = `${config.api}/getExcel`;
|
||||||
|
});
|
||||||
|
}).catch(error=>{
|
||||||
|
console.log(error);
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Sucedio un error al crear el excel',
|
||||||
|
text: `${error}`,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async llenarFiltro(key){
|
||||||
|
for(let index in this.pcData){
|
||||||
|
let pc = this.pcData[index];
|
||||||
|
if(pc.headers[key] && !(this.selected.indexOf(pc.datos[key].value) > -1)){
|
||||||
|
this.selected.push(pc.datos[key].value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
seleccionado(key){
|
||||||
|
for(let index in this.pcData){
|
||||||
|
let pc = this.pcData[index];
|
||||||
|
if(!pc.headers[key] ){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
async seleccionarDatos(datos,key){
|
||||||
|
if(this.seleccionado(key)){
|
||||||
|
this.selected = [];
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.selected = [];
|
||||||
|
for(let index in datos.data){
|
||||||
|
this.selected.push(datos.data[index].value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
async filtrar(key){
|
||||||
|
for(let index in this.pcData){
|
||||||
|
let pc = this.pcData[index];
|
||||||
|
pc.headers[key] = (this.selected.indexOf(pc.datos[key].value) > -1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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 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>
|
||||||
|
.button {
|
||||||
|
background-color: #1b3d70; /* Green */
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
|
height: 4rem;
|
||||||
|
width: 15rem;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
a{
|
||||||
|
font-size: 1.7rem;
|
||||||
|
padding-top: .6rem;
|
||||||
|
}
|
||||||
|
.tableFixHead { overflow-y: auto; height: 100px; }
|
||||||
|
.tableFixHead thead th { position: sticky; top: 0; }
|
||||||
|
table { border-collapse: collapse; width: 100%; }
|
||||||
|
th, td { padding: 8px 16px; }
|
||||||
|
th { background:#eee; }
|
||||||
|
.colorGris{
|
||||||
|
background:#eee;
|
||||||
|
}
|
||||||
|
.dropdown-item,.short{
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: pre;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
word-wrap: break-word;
|
||||||
|
text-overflow: inherit;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
.dropdown {
|
||||||
|
position: relative ;
|
||||||
|
display: inline-block;
|
||||||
|
height: auto;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-menu{
|
||||||
|
max-height: 25rem;
|
||||||
|
width: 20rem;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
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,19 +1,38 @@
|
|||||||
import Vue from 'vue'
|
import Vue from "vue";
|
||||||
import App from './App.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 VueRouter from "vue-router";
|
||||||
import { routes } from "./routes";
|
import { routes } from "./routes";
|
||||||
|
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
|
Vue.use(Vuex)
|
||||||
|
Vue.use(BootstrapVue);
|
||||||
|
Vue.use(IconsPlugin);
|
||||||
const router = new VueRouter({
|
const router = new VueRouter({
|
||||||
routes
|
routes
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const store = new Vuex.Store({
|
||||||
|
state: {
|
||||||
|
campoValue: "",
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
cleanModalActualizar (state, value) {
|
||||||
|
state.campoValue = value;
|
||||||
|
console.log(state, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
render: h => h(App),
|
render: h => h(App),
|
||||||
router
|
router,
|
||||||
|
store: store,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
import home from "./view/home.vue";
|
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 = [
|
export const routes = [
|
||||||
{ path: "/", component: home, name: "form" }
|
{ path: "/", component: home, name: "home" },
|
||||||
];
|
{ path: "/agregarImpresora", component: addPrinter, name: "addPrinter" },
|
||||||
|
{ path: "/agregarEquipo", component: addPcs, name: "addPcs" },
|
||||||
|
{ path: "/agregarCatalogo", component: addCatalogo, name: "addCataogo" }
|
||||||
|
]
|
||||||
|
|||||||
@@ -0,0 +1,148 @@
|
|||||||
|
<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="valueText='', textSelected= 'Tipo de Impresora'" v-bind:active="textSelected=='Tipo de Impresora'">Tipo de Impresora</b-nav-item>
|
||||||
|
<b-nav-item @click="valueText='', textSelected= 'Marca de Impresora'" v-bind:active="textSelected=='Marca de Impresora'">Marca de Impresora</b-nav-item>
|
||||||
|
<b-nav-item @click="valueText='', textSelected= 'Tipo de Uso'" v-bind:active="textSelected== 'Tipo de Uso'">Tipo de Uso </b-nav-item>
|
||||||
|
<b-nav-item @click="valueText='', textSelected= 'Procesador'" v-bind:active="textSelected== 'Procesador'">Procesador</b-nav-item>
|
||||||
|
<b-nav-item @click="valueText='', textSelected= 'Sistema Operativo'" v-bind:active="textSelected== 'Sistema Operativo'">Sistema Operativo</b-nav-item>
|
||||||
|
<b-nav-item @click="valueText='', textSelected= 'Tarjeta Grafica'" v-bind:active="textSelected== 'Tarjeta Grafica'">Tarjeta Grafica</b-nav-item>
|
||||||
|
<b-nav-item @click="valueText='', textSelected= 'Marca de Equipo'" v-bind:active="textSelected== 'Marca de Equipo'">Marca de Equipo</b-nav-item>
|
||||||
|
<b-nav-item @click="valueText='', textSelected= 'Tipo de memoria Ram'" v-bind:active="textSelected== 'Tipo de memoria Ram'">Tipo de memoria Ram</b-nav-item>
|
||||||
|
<b-nav-item @click="valueText='', 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="valueText='', 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" v-bind:placeholder="textSelected" v-model="valueText"></b-form-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4" >
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
|
<button class="button " @click="agregar()">
|
||||||
|
Agregar
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" v-else>
|
||||||
|
<div class="col-md-12" >
|
||||||
|
<b-form-input style="margin: .5rem;" class="fadeIn second" placeholder="Nombre de la Unidad Responsable" v-model="unidadResponsable"></b-form-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12" >
|
||||||
|
<b-form-input style="margin: .5rem;" class="fadeIn second" placeholder="Nombre del Responsable" v-model="nombreResponsable"></b-form-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12" >
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
|
<button class="button " @click="agregar()" >
|
||||||
|
Agregar
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</b-card-body>
|
||||||
|
</b-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import axios from "axios";
|
||||||
|
import config from "../config/config.js";
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
export default {
|
||||||
|
name: "home",
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
textSelected : 'Tipo de Impresora',
|
||||||
|
valueText: '',
|
||||||
|
unidadResponsable: '',
|
||||||
|
nombreResponsable: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async agregar(){
|
||||||
|
if(this.textSelected !== 'Unidad Responsable' ){
|
||||||
|
if(this.valueText === ''){
|
||||||
|
await Swal.fire(
|
||||||
|
`Aun no has agregado el campo`,
|
||||||
|
'',
|
||||||
|
'question'
|
||||||
|
)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(this.unidadResponsable === '' || this.nombreResponsable === '' || this.ubicacion === ''){
|
||||||
|
await Swal.fire(
|
||||||
|
`Aun no has agregado los campos`,
|
||||||
|
'',
|
||||||
|
'question'
|
||||||
|
)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let data = {
|
||||||
|
valueText : this.valueText,
|
||||||
|
unidadResponsable : this.unidadResponsable,
|
||||||
|
nombreResponsable : this.nombreResponsable,
|
||||||
|
textSelected : this.textSelected
|
||||||
|
}
|
||||||
|
|
||||||
|
try{
|
||||||
|
await axios.post( `${config.api}/addCatalogo`, data);
|
||||||
|
await Swal.fire(
|
||||||
|
'Se ha agregado con exito al catalogo',
|
||||||
|
'',
|
||||||
|
'success'
|
||||||
|
);
|
||||||
|
location.reload();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
catch(error){
|
||||||
|
console.log(error);
|
||||||
|
await Swal.fire(
|
||||||
|
'No se pudo agregar al catalogo',
|
||||||
|
`Error en consola ${error}`,
|
||||||
|
'error'
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</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>
|
||||||
@@ -0,0 +1,342 @@
|
|||||||
|
<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;" placeholder="Número de inventario" v-model="noInventario"></b-form-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4" >
|
||||||
|
<b-form-input style="margin: .5rem;" placeholder="Número de resguardo" v-model="noResguardo"></b-form-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4" >
|
||||||
|
<b-form-input style="margin: .5rem;" placeholder="Serie" v-model="serie"></b-form-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6" >
|
||||||
|
<b-form-input style="margin: .5rem;" placeholder="Tamaño de discos" v-model="sizeDiscos"></b-form-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6" >
|
||||||
|
<b-form-input style="margin: .5rem;" placeholder="Número de discos" v-model="numeroDiscos"></b-form-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4" >
|
||||||
|
<b-form-input style="margin: .5rem;" placeholder="Cantidad de memoria RAM" v-model="cantidadMemoriaRam"></b-form-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4" >
|
||||||
|
<b-form-input style="margin: .5rem;" placeholder="Velocidad de memoria Ram" v-model="velocidadMemoriaRam"></b-form-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="dropdown">
|
||||||
|
<button class="btn dropdown-toggle btn btn-outline-primary dropdown-toggle btn-block short" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
{{tipoMemoriaRamSelected != null ? tipoMemoriaRamSelected.nombre : 'Tipo de Memoria Ram'}}
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu " aria-labelledby="dropdownMenuButton">
|
||||||
|
<div class="containerDrop" v-for="tipo in tipoMemoriaRam" v-bind:key="tipo.id" @click="tipoMemoriaRamSelected = tipo">
|
||||||
|
<a class="dropdown-item"><p>{{tipo.nombre}}</p></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4" >
|
||||||
|
<div class="dropdown">
|
||||||
|
<button class="btn dropdown-toggle btn btn-outline-primary dropdown-toggle btn-block short" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
{{tarjetaGraficaSelected != null ? tarjetaGraficaSelected.nombre : 'Tipo de tarjeta grafica'}}
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu " aria-labelledby="dropdownMenuButton">
|
||||||
|
<div class="containerDrop" v-for="tipo in tarjetaGrafica" v-bind:key="tipo.id" @click="tarjetaGraficaSelected = tipo">
|
||||||
|
<a class="dropdown-item"><p>{{tipo.nombre}}</p></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4" >
|
||||||
|
<b-form-input style="margin: .5rem;" placeholder="Cantidad de memoria de la tarjeta grafica" v-model="cantidadMemoriaGrafica"></b-form-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4" >
|
||||||
|
<div class="dropdown">
|
||||||
|
<button class="btn dropdown-toggle btn btn-outline-primary dropdown-toggle btn-block short" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
{{tipoEquipoSelected != null ? tipoEquipoSelected.nombre : 'Tipo de Equipo'}}
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu " aria-labelledby="dropdownMenuButton">
|
||||||
|
<div class="containerDrop" v-for="tipo in tipoEquipo" v-bind:key="tipo.id" @click="tipoEquipoSelected = tipo">
|
||||||
|
<a class="dropdown-item"><p>{{tipo.nombre}}</p></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</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;" placeholder="Versión del sistema operativo" v-model="versionOS"></b-form-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4" >
|
||||||
|
<div class="dropdown">
|
||||||
|
<button class="btn dropdown-toggle btn btn-outline-primary dropdown-toggle btn-block short" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
{{procesadorSelected != null ? procesadorSelected.nombre : 'Procesador'}}
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu " aria-labelledby="dropdownMenuButton">
|
||||||
|
<div class="containerDrop" v-for="tipo in procesador" v-bind:key="tipo.id" @click="procesadorSelected = tipo">
|
||||||
|
<a class="dropdown-item"><p>{{tipo.nombre}}</p></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4" >
|
||||||
|
<b-form-input style="margin: .5rem;" placeholder="Velocidad del procesador GHz" v-model="velocidadProcesadorGHz"></b-form-input>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<b-form-input style="margin: .5rem;" placeholder="Descripción del procesador" v-model="descripcionProcesador"></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;" placeholder="Modelo del equipo" v-model="modeloEquipo"></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" style="margin: .5rem;" >
|
||||||
|
<div class="dropdown">
|
||||||
|
<button class="btn dropdown-toggle btn btn-outline-primary dropdown-toggle btn-block short" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
{{unidadSelected != null ? unidadSelected.unidadResponsable.nombre : 'Unidad Responsable'}}
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu " aria-labelledby="dropdownMenuButton">
|
||||||
|
<div class="containerDrop" v-for="tipo in unidad" v-bind:key="tipo.unidadResponsable.id" @click="unidadSelected = tipo">
|
||||||
|
<a class="dropdown-item"><p>{{tipo.unidadResponsable.nombre}}</p></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12 " style="margin: .5rem;">
|
||||||
|
<div class="dropdown">
|
||||||
|
<button class="btn dropdown-toggle btn btn-outline-primary dropdown-toggle btn-block short" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
{{unidadSelected != null ? unidadSelected.responsable.nombre : 'Nombre del responsable' }}
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu " aria-labelledby="dropdownMenuButton">
|
||||||
|
<div class="containerDrop" v-for="(tipo,index) in unidad" v-bind:key="index" @click="unidadSelected = tipo">
|
||||||
|
<a class="dropdown-item"><p>{{tipo.responsable.nombre}}</p></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12 " >
|
||||||
|
<b-form-input style="margin: .5rem;" placeholder="Ubicación de la Unidad Responsable" v-model="ubicacionUnidad"></b-form-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
|
<button class="button " @click="agregar()">
|
||||||
|
Agregar
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import axios from "axios";
|
||||||
|
import config from "../config/config.js";
|
||||||
|
import Swal from 'sweetalert2';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
|
||||||
|
name: "home",
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
typeSelected:"Equipos",
|
||||||
|
noInventario: "",
|
||||||
|
noResguardo: "",
|
||||||
|
serie: "",
|
||||||
|
cantidadMemoriaRam: "",
|
||||||
|
velocidadMemoriaRam: "",
|
||||||
|
cantidadMemoriaGrafica: "",
|
||||||
|
versionOS:"",
|
||||||
|
velocidadProcesadorGHz: "",
|
||||||
|
descripcionProcesador: "",
|
||||||
|
numeroDiscos: "",
|
||||||
|
sizeDiscos: "",
|
||||||
|
modeloEquipo: "",
|
||||||
|
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,
|
||||||
|
ubicacionUnidad: ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async faltaCampo(campo){
|
||||||
|
await Swal.fire(
|
||||||
|
`Falta el campo de ${campo} por llenar`,
|
||||||
|
'',
|
||||||
|
'warning'
|
||||||
|
)
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
async agregar() {
|
||||||
|
if(this.noInventario === "") return this.faltaCampo("Número de inventario");
|
||||||
|
if(this.noResguardo === "") return this.faltaCampo("Número de resguardo");
|
||||||
|
if(this.serie === "") return this.faltaCampo("Serie");
|
||||||
|
if(this.sizeDiscos === "") return this.faltaCampo("El tamaño de disco");
|
||||||
|
if(this.numeroDiscos === "") return this.faltaCampo("El número de descos");
|
||||||
|
if(this.cantidadMemoriaRam === "") return this.faltaCampo("Cantidad de memoria RAM");
|
||||||
|
if(this.velocidadMemoriaRam === "") return this.faltaCampo("Velocidad de la memoria RAM");
|
||||||
|
if(this.cantidadMemoriaGrafica === "") return this.faltaCampo("Cantidad de la memoria Grafica");
|
||||||
|
if(this.versionOS ==="") return this.faltaCampo("Versión del Sistema Operativo");
|
||||||
|
if(this.velocidadProcesadorGHz === "") return this.faltaCampo("Velocidad de procesador");
|
||||||
|
if(this.descripcionProcesador === "") return this.faltaCampo("Descripción del procesador");
|
||||||
|
if(this.modeloEquipo === "") return this.faltaCampo("Modelo del equipo");
|
||||||
|
if(this.ubicacionUnidad === "") return this.faltaCampo("Ubicación de la Unidad responsable");
|
||||||
|
if(this.tipoEquipoSelected === null) return this.faltaCampo("El tipo de equipo");
|
||||||
|
if(this.tipoMemoriaRamSelected === null) return this.faltaCampo("El tipo de memoria RAM");
|
||||||
|
if(this.tarjetaGraficaSelected === null) return this.faltaCampo("El tipo de tarjeta grafica");
|
||||||
|
if(this.osSelected === null) return this.faltaCampo("El tipo de sistema operativo");
|
||||||
|
if(this.marcaSelected === null) return this.faltaCampo("La marca del equipo");
|
||||||
|
if(this.procesadorSelected === null) return this.faltaCampo("El tipo del procesador");
|
||||||
|
if(this.unidadSelected === null) return this.faltaCampo("La unidad Responsable");
|
||||||
|
const data ={
|
||||||
|
noInventario: this.noInventario,
|
||||||
|
noResguardo: this.noResguardo,
|
||||||
|
serie: this.serie,
|
||||||
|
sizeDiscos: this.sizeDiscos,
|
||||||
|
numeroDiscos: this.numeroDiscos,
|
||||||
|
cantidadMemoriaRam: this.cantidadMemoriaRam,
|
||||||
|
velocidadMemoriaRam: this.velocidadMemoriaRam,
|
||||||
|
cantidadMemoriaGrafica: this.cantidadMemoriaGrafica,
|
||||||
|
versionOS: this.versionOS,
|
||||||
|
velocidadProcesadorGHz: this.velocidadProcesadorGHz,
|
||||||
|
descripcionProcesador: this.descripcionProcesador,
|
||||||
|
modeloEquipo: this.modeloEquipo,
|
||||||
|
idTipoEquipo: this.tipoEquipoSelected,
|
||||||
|
idMemoriaRam: this.tipoMemoriaRamSelected,
|
||||||
|
idTarjetaGrafica: this.tarjetaGraficaSelected,
|
||||||
|
idOs: this.osSelected,
|
||||||
|
idMarcaEquipo: this.marcaSelected,
|
||||||
|
idProcesador: this.procesadorSelected,
|
||||||
|
idUso : this.usoSelected,
|
||||||
|
unidad: this.unidadSelected,
|
||||||
|
ubicacion: this.ubicacionUnidad,
|
||||||
|
}
|
||||||
|
console.log(data);
|
||||||
|
try{
|
||||||
|
await axios.post( `${config.api}/addEquipo`, data );
|
||||||
|
await Swal.fire(
|
||||||
|
'Se agrego con exito el equipo',
|
||||||
|
'',
|
||||||
|
'success'
|
||||||
|
);
|
||||||
|
location.reload();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
catch(error){
|
||||||
|
console.log(error);
|
||||||
|
await Swal.fire(
|
||||||
|
'No se pudo agregar el equipo',
|
||||||
|
`Error en consola ${error}`,
|
||||||
|
'error'
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async beforeCreate() {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-item,.short{
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: pre;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
word-wrap: break-word;
|
||||||
|
text-overflow: inherit;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
.dropdown{
|
||||||
|
position: relative ;
|
||||||
|
display: inline-block;
|
||||||
|
height: auto;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-menu{
|
||||||
|
max-height: 20rem;
|
||||||
|
width: 100%;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
<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,58 +1,77 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="hello">
|
<div>
|
||||||
<Header />
|
<h1 class="mt-5 mb-5">Sistema de Censo</h1>
|
||||||
<h1>{{ msg }}</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>
|
||||||
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
|
||||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
|
||||||
</ul>
|
|
||||||
<h3>Essential Links</h3>
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
|
||||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
|
||||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
|
||||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
|
||||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
|
||||||
</ul>
|
|
||||||
<h3>Ecosystem</h3>
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
|
||||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
|
||||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
|
||||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
|
||||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Header from "./../components/header.vue";
|
|
||||||
export default {
|
|
||||||
name: 'home',
|
|
||||||
components: {
|
|
||||||
Header
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
msg: String
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
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>
|
<style scoped>
|
||||||
h3 {
|
.button {
|
||||||
margin: 40px 0 0;
|
background-color: #1b3d70; /* Green */
|
||||||
}
|
border: none;
|
||||||
ul {
|
color: white;
|
||||||
list-style-type: none;
|
height: 4rem;
|
||||||
padding: 0;
|
width: 15rem;
|
||||||
}
|
text-align: center;
|
||||||
li {
|
text-decoration: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 10px;
|
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;
|
||||||
}
|
}
|
||||||
a {
|
.button:hover {
|
||||||
color: #42b983;
|
background-color: #bb8800;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
module.exports = {
|
||||||
|
publicPath: "./",
|
||||||
|
devServer: {
|
||||||
|
host: 'localhost'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||