diff --git a/censo_front/package-lock.json b/censo_front/package-lock.json index 93bd235..7c9b970 100644 --- a/censo_front/package-lock.json +++ b/censo_front/package-lock.json @@ -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", diff --git a/censo_front/package.json b/censo_front/package.json index dd60102..c004b55 100644 --- a/censo_front/package.json +++ b/censo_front/package.json @@ -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", diff --git a/censo_front/src/components/modalActualizar.vue b/censo_front/src/components/modalActualizar.vue index fc971cf..77a08e8 100644 --- a/censo_front/src/components/modalActualizar.vue +++ b/censo_front/src/components/modalActualizar.vue @@ -1,32 +1,45 @@ \ No newline at end of file diff --git a/censo_front/src/components/nav.vue b/censo_front/src/components/nav.vue index 4cc5098..b6be627 100644 --- a/censo_front/src/components/nav.vue +++ b/censo_front/src/components/nav.vue @@ -47,6 +47,9 @@ +
  • diff --git a/censo_front/src/components/pcsTable.vue b/censo_front/src/components/pcsTable.vue index fc244c7..05aa7a4 100644 --- a/censo_front/src/components/pcsTable.vue +++ b/censo_front/src/components/pcsTable.vue @@ -6,32 +6,47 @@ - + - + + +
    - - +
    + -
    +
    +
    + + + +
    +
    +
    - {{pcCampo}} + + Eliminar + + {{pcCampo.value}}
    - @@ -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; diff --git a/censo_front/src/config/config.js b/censo_front/src/config/config.js index e4f58bb..82459e1 100644 --- a/censo_front/src/config/config.js +++ b/censo_front/src/config/config.js @@ -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" diff --git a/censo_front/src/main.js b/censo_front/src/main.js index e0f1aad..cd65781 100644 --- a/censo_front/src/main.js +++ b/censo_front/src/main.js @@ -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, }); diff --git a/censo_front/src/routes.js b/censo_front/src/routes.js index 74c6d63..e6448df 100644 --- a/censo_front/src/routes.js +++ b/censo_front/src/routes.js @@ -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" } +] diff --git a/censo_front/src/view/addCatalogo.vue b/censo_front/src/view/addCatalogo.vue new file mode 100644 index 0000000..ebb5d6f --- /dev/null +++ b/censo_front/src/view/addCatalogo.vue @@ -0,0 +1,98 @@ + + + + diff --git a/censo_front/src/view/addPcs.vue b/censo_front/src/view/addPcs.vue index 2510d11..6300c42 100644 --- a/censo_front/src/view/addPcs.vue +++ b/censo_front/src/view/addPcs.vue @@ -1,70 +1,99 @@