{"version":3,"sources":["webpack:///./src/views/Admin/Galeria.vue?fc67","webpack:///./src/views/Admin/Galeria.vue?f8b4","webpack:///./src/views/Admin/js/Galera.js","webpack:///./src/views/Admin/js/Galera.js?d50c","webpack:///./src/views/Admin/Galeria.vue?d29f"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","_l","id","index","key","on","$event","show","baseImg","urlImagen","idImagen","status","model","value","callback","$$v","$set","expression","_v","eliminarImg","staticStyle","openUploadPdfPopup","uploadPdfPopup","isTemarioPreCharged","_e","onDocChargeChanged","temario","chargedDoc","deleteChargedFile","filesrc","_s","errorFileMsg","sendImagen","showImage","zoomImage","staticRenderFns","$","contieneImagen","imagen","checkBox2","idImg","selectedDoc","errorFileType","contieneDocumento","isCharged","name","file","eventTarget","fileLink","uploadFileCharged","onProgress","readyProgess","fileError","text","style","height","methods","img","vm","objetoDocumento","console","log","JSON","stringify","formData","FormData","append","ajax","url","baseUrl","headers","sessionStorage","getItem","type","dataType","cache","contentType","processData","data","success","rs","showNotify","ObtenerListado","error","xhr","ajaxOptions","thrownError","event","fileType","target","files","selectedFile","uploadFile","read","FileReader","onload","e","result","readAsDataURL","documento","alert","fetch","method","then","json","$vs","notify","title","color","position","imagenes","forEach","item","push","component"],"mappings":"gHAAA,yBAA6d,EAAG,G,yCCAhe,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,UAAU,CAACF,EAAG,MAAM,CAACE,YAAY,kCAAkC,CAACF,EAAG,UAAU,CAACG,MAAM,CAAC,MAAQ,YAAY,CAACH,EAAG,YAAY,CAACG,MAAM,CAAC,MAAQ,SAASP,EAAIQ,GAAIR,EAAU,QAAE,SAASS,EAAGC,GAAO,OAAON,EAAG,MAAM,CAACO,IAAID,GAAO,CAACN,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,MAAM,CAACQ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SAASC,QAASC,IAC3BtH,KAAK4C,OAAO2E,KAAKD,UASvB,UACCtH,KAAKwF,mBC1O6H,I,wBCQhIgC,EAAY,eACd,EACA1H,EACA2C,GACA,EACA,KACA,KACA,MAIa,aAAA+E,E","file":"js/chunk-67136369.1ea3a6b1.js","sourcesContent":["import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Galeria.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Galeria.vue?vue&type=style&index=0&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"vx-row\"},[_c('div',{staticClass:\"vx-col md:w-3/4 w-full mb-base\"},[_c('vx-card',{attrs:{\"title\":\"Galería\"}},[_c('vs-images',{attrs:{\"hover\":'zoom'}},_vm._l((_vm.imagen),function(id,index){return _c('div',{key:index},[_c('div',{staticClass:\"galeria\"},[_c('div',{on:{\"click\":function($event){return _vm.show(_vm.baseImg + id.urlImagen)}}},[_c('vs-image',{staticClass:\"image w-full\",attrs:{\"id\":id.idImagen,\"src\":_vm.baseImg + id.urlImagen}})],1),_c('vs-checkbox',{staticClass:\"w-full\",attrs:{\"id\":id.idImagen,\"color\":\"success\"},on:{\"click\":function($event){return _vm.status(id.idImagen)}},model:{value:(id.estatusImagen),callback:function ($$v) {_vm.$set(id, \"estatusImagen\", $$v)},expression:\"id.estatusImagen\"}},[_vm._v(\"Seleccionar\")]),_c('button',{attrs:{\"id\":\"delete\"},on:{\"click\":function($event){return _vm.eliminarImg(id.idImagen)}}},[_c('vs-icon',{staticStyle:{\"color\":\"#f1f2f6\"},attrs:{\"icon\":\"delete_forever\",\"size\":\"25px\"}})],1)],1)])}),0)],1)],1),_c('div',{staticClass:\"vx-col sm:w-1/4 mb-base mb-2\"},[_c('vx-card',[[_c('vs-button',{staticStyle:{\"font-weight\":\"bold\",\"margin-left\":\"18%\",\"margin-right\":\"18%\",\"font-size\":\"15px\"},attrs:{\"color\":\"success\",\"type\":\"filled\"},on:{\"click\":function($event){return _vm.openUploadPdfPopup()}}},[_c('vs-icon',{staticStyle:{\"vertical-align\":\"midddle\"},attrs:{\"icon\":\"add_photo_alternate\",\"size\":\"20px\"}}),_vm._v(\"\\n Agregar Imagen\\n \")],1)]],2),_c('vs-popup',{attrs:{\"title\":\"Subir Imagen\",\"active\":_vm.uploadPdfPopup},on:{\"update:active\":function($event){_vm.uploadPdfPopup=$event}}},[_c('div',{staticClass:\"vx-row my-base\"},[_c('div',{staticClass:\"vx-col w-full lg:w-1/2 mb-base flex items-center\"},[_c('p',{staticClass:\"text-danger\"},[_vm._v(\"Selecciona la imagen que deseas subir.\")])]),_c('div',{staticClass:\"vx-col w-full lg:w-1/2 mb-base flex items-center\"},[_c('div',[_c('div',{staticClass:\"con-upload\"},[(!_vm.isTemarioPreCharged)?_c('div',{staticClass:\"con-input-upload\"},[_c('input',{attrs:{\"type\":\"file\"},on:{\"change\":function($event){return _vm.onDocChargeChanged($event)}}}),_c('span',{staticClass:\"text-input\"},[_vm._v(\"\\n Selecciona\\n \")])]):_vm._e(),(_vm.temario.chargedDoc.isCharged)?_c('div',{staticClass:\"con-img-upload flex justify-center\"},[_c('span',[_c('div',{staticClass:\"img-upload payment-img-upload-file\"},[_c('button',{staticClass:\"btn-x-file\",on:{\"click\":function($event){return _vm.deleteChargedFile(_vm.temario)}}},[_c('i',{staticClass:\"material-icons notranslate\",attrs:{\"translate\":\"translate\"}},[_vm._v(\"clear\")])]),_c('img',{staticStyle:{\"max-width\":\"100%\",\"height\":\"none\"},attrs:{\"src\":_vm.temario.chargedDoc.filesrc}})])])]):_vm._e()]),(_vm.errorFileType)?_c('span',{staticClass:\"text-danger\"},[_vm._v(_vm._s(_vm.errorFileMsg))]):_vm._e()])])]),_c('div',{staticClass:\"vx-row\"},[_c('div',{staticClass:\"vx-col w-full flex justify-end\"},[_c('vs-button',{on:{\"click\":_vm.sendImagen}},[_vm._v(\"Guardar\")])],1)])]),_c('vs-popup',{attrs:{\"title\":\"Imagen\",\"active\":_vm.showImage},on:{\"update:active\":function($event){_vm.showImage=$event}}},[_c('div',[_c('img',{staticStyle:{\"max-width\":\"100%\",\"height\":\"none\"},attrs:{\"src\":_vm.zoomImage}})])])],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import BASE from '../../../../vue.config.js'\r\nconst $ = require('jquery')\r\nimport 'prismjs'\r\nimport 'prismjs/themes/prism.css'\r\n\r\n\r\nexport default {\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\tcontieneImagen: 0,\r\n\t\t\tuploadPdfPopup: false,\r\n\t\t\tshowImage: false,\r\n\t\t\timagen: [],\r\n\t\t\tcheckBox2: false,\r\n\t\t\tbaseImg: '',\r\n\t\t\tidImg: '',\r\n\t\t\tzoomImage:'',\r\n\r\n\r\n\t\t\t//Parte del estado del documento\r\n\t\t\tselectedDoc: null,\r\n\t\t\terrorFileType: false,\r\n\t\t\tisTemarioPreCharged: false,\r\n\t\t\tcontieneDocumento: 0,\r\n\t\t\t//donde se guarda el documento\r\n\t\t\ttemario: {\r\n\t\t\t\tchargedDoc: {\r\n\r\n\t\t\t\t\tisCharged: false,\r\n\t\t\t\t\tname: '',\r\n\t\t\t\t\tfile: null,\r\n\t\t\t\t\teventTarget: null,\r\n\t\t\t\t\tfileLink: '',\r\n\t\t\t\t\tfilesrc: ''\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// estados del boton\r\n\t\t\tuploadFileCharged: {\r\n\t\t\t\tonProgress: false,\r\n\t\t\t\treadyProgess: false,\r\n\t\t\t\tfileError: null,\r\n\t\t\t\ttext: 'cloud_upload',\r\n\t\t\t\tstyle: {\r\n\t\t\t\t\theight: null\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t},\r\n\tmethods: {\r\n\t\tshow(img){\r\n\t\t\tthis.showImage = true;\r\n\t\t\tthis.zoomImage = img;\r\n\r\n\t\t},\r\n\t\tsendImagen() {\r\n\r\n\t\t\tif (this.temario.chargedDoc.file != null) {\r\n\r\n\t\t\t\tlet vm = this;\r\n\t\t\t\t//if (true) {\r\n\r\n\t\t\t\t\tlet objetoDocumento = {\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconsole.log(JSON.stringify(objetoDocumento));\r\n\t\t\t\t\tconst formData = new FormData();\r\n\t\t\t\t\tformData.append('archivos', this.temario.chargedDoc.file);\r\n\t\t\t\t\tformData.append('Request', JSON.stringify(objetoDocumento));\r\n\t\t\t\t\tconsole.log(JSON.stringify(this.temario.chargedDoc.file));\r\n\r\n\t\t\t\t\t$.ajax({\r\n\t\t\t\t\t\turl: `${BASE.baseUrl}api/GuardarGaleria`,\r\n\t\t\t\t\t\theaders: {\r\n\t\t\t\t\t\t\t'Authorization': sessionStorage.getItem('token'),\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\ttype: 'POST',\r\n\t\t\t\t\t\tdataType: 'json',\r\n\t\t\t\t\t\tcache: false,\r\n\t\t\t\t\t\tcontentType: false,\r\n\t\t\t\t\t\tprocessData: false,\r\n\t\t\t\t\t\tdata: formData,\r\n\t\t\t\t\t\tsuccess: function (rs) {\r\n\t\t\t\t\t\t\tconsole.log(rs)\r\n\t\t\t\t\t\t\tif (rs.status === 200) {\r\n\t\t\t\t\t\t\t\tvm.showNotify(rs.status, null, 'La imagen se subio con exito');\r\n\t\t\t\t\t\t\t\tvm.uploadPdfPopup = false;\r\n\t\t\t\t\t\t\t\tvm.deleteChargedFile(vm.temario);\r\n\t\t\t\t\t\t\t\tvm.ObtenerListado();\r\n\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvm.showNotify(rs.status);\r\n\t\t\t\t\t\t\t\tvm.uploadPdfPopup = false;\r\n\t\t\t\t\t\t\t\tvm.ObtenerListado();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\terror: function (xhr, ajaxOptions, thrownError) {\r\n\t\t\t\t\t\t\tconsole.log('error')\r\n\t\t\t\t\t\t\tconsole.log(xhr.status);\r\n\t\t\t\t\t\t\tconsole.log(thrownError);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t//}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tthis.errorFileMsg = 'Debes cargar una imagen para guardarla'\r\n\t\t\t\tthis.errorFileType = true;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t},\r\n\t\t// upload file methods\r\n\t\tonDocChargeChanged(event) {\r\n\t\t\tthis.errorFileType = false;\r\n\t\t\tlet fileType = event.target.files[0].type\r\n\t\t\tif (fileType == 'image/jpeg' || fileType == 'image/png' || fileType == 'image/jpg') {\r\n\t\t\t\tthis.selectedFile = event.target.files[0]\r\n\r\n\t\t\t\tthis.temario.chargedDoc.isCharged = true;\r\n\t\t\t\tthis.temario.chargedDoc.name = this.selectedFile.name;\r\n\t\t\t\tthis.temario.chargedDoc.file = this.selectedFile;\r\n\t\t\t\tthis.temario.chargedDoc.eventTarget = event.target;\r\n\t\t\t\tthis.temario.chargedDoc.uploadFile = this.uploadFileCharged;\r\n\t\t\t\tvar read = new FileReader();\r\n\t\t\t\tread.onload = (e) => {\r\n\t\t\t\t\tthis.temario.chargedDoc.filesrc = e.target.result;\r\n\t\t\t\t}\r\n\t\t\t\tread.readAsDataURL(this.temario.chargedDoc.file);\r\n\t\t\t\tthis.contieneDocumento = 1;\r\n\r\n\t\t\t\t//Prueba para ver contenido de temario\r\n\t\t\t\tconsole.log(JSON.stringify(this.temario));\r\n\t\t\t} else {\r\n\t\t\t\tthis.errorFileMsg = 'Solo se permiten imagenes'\r\n\t\t\t\tthis.errorFileType = true;\r\n\t\t\t}\r\n\t\t},\r\n\t\tdeleteChargedFile(documento) {\r\n\t\t\tconsole.log(JSON.stringify(documento));\r\n\t\t\tconsole.log('*** deleteChargedFile ***');\r\n\t\t\t// Se borra el archivo cargado\r\n\t\t\tdocumento.chargedDoc.file = null;\r\n\t\t\tdocumento.chargedDoc.isCharged = false;\r\n\t\t\tdocumento.chargedDoc.name = '';\r\n\t\t\tdocumento.chargedDoc.filesrc = null,\r\n\t\t\t\tdocumento.uploadFile = this.uploadFileCharged;\r\n\r\n\t\t\tif (!this.isTemarioPreCharged) {\r\n\t\t\t\t// Como no se pueden borrar los objetos de un Filelist\r\n\t\t\t\t// se convierte el input a 'text' y se regresa a 'file'\r\n\t\t\t\t// de esta manera se borra el archivo que se cargó\r\n\t\t\t\t// el evento onDocChargeChanged ya hace efecto si se borra el archivo cargado\r\n\t\t\t\t// y se vuelve a subir el mismo archivo\r\n\t\t\t\tdocumento.chargedDoc.eventTarget.type = 'text';\r\n\t\t\t\tdocumento.chargedDoc.eventTarget.type = 'file';\r\n\t\t\t}\r\n\t\t\tthis.isTemarioPreCharged = false;\r\n\t\t\tthis.contieneDocumento = 0;\r\n\t\t},\r\n\t\tprueba() {\r\n\t\t\t\r\n\t\t\talert('Prueba');\r\n\t\t},\r\n\t\teliminarImg(idImagen){\r\n\t\t\tthis.idImg = idImagen;\r\n\t\t\tfetch(`${BASE.baseUrl}api/EditarGaleria/${1}/${this.idImg}`, {\r\n\r\n\t\t\t\tmethod: 'GET',\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t'Authorization': sessionStorage.getItem('token'),\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t\t.then(rs => rs.json())\r\n\t\t\t\t.then(rs => {\r\n\t\t\t\t\tif (rs.status == 200) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.ObtenerListado();\r\n\t\t\t\t\t\tthis.$vs.notify({title:'Se elimino correctamente.',color:'success',position:'Top-center'})\r\n\t\t\t\t\t\t//alert(JSON.stringify(this.documentos));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t},\r\n\t\tstatus(idImagen) {\r\n\t\t\tthis.idImg = idImagen;\r\n\t\t\tconsole.log(JSON.stringify(this.idImg));\r\n\r\n\t\t\tfetch(`${BASE.baseUrl}api/EditarGaleria/${0}/${this.idImg}`, {\r\n\r\n\t\t\t\tmethod: 'GET',\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t'Authorization': sessionStorage.getItem('token'),\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t\t.then(rs => rs.json())\r\n\t\t\t\t.then(rs => {\r\n\t\t\t\t\tif (rs.status == 200) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.ObtenerListado();\r\n\t\t\t\t\t\tthis.$vs.notify({title:'Se realizo el cambio correctamente.',color:'success',position:'Top-center'})\r\n\t\t\t\t\t\t//alert(JSON.stringify(this.documentos));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t},\r\n\t\topenUploadPdfPopup() {\r\n\t\t\tthis.uploadPdfPopup = true;\r\n\t\t},\r\n\t\tObtenerListado() {\r\n\t\t\tthis.baseImg = BASE.baseUrl;\r\n\t\t\tfetch(`${BASE.baseUrl}api/ListadoGaleria/${0}`, {\r\n\r\n\t\t\t\tmethod: 'GET',\r\n\t\t\t\theaders: {\r\n\t\t\t\t\t'Authorization': sessionStorage.getItem('token'),\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t\t.then(rs => rs.json())\r\n\t\t\t\t.then(rs => {\r\n\t\t\t\t\tif (rs.status == 200) {\r\n\t\t\t\t\t\tthis.imagen = [];\r\n\r\n\t\t\t\t\t\trs.result.imagenes.forEach((item) => {\r\n\t\t\t\t\t\t\tthis.imagen.push(item);\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t//alert(JSON.stringify(this.documentos));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t},\r\n\r\n\t},\r\n\tmounted() {\r\n\t\tthis.ObtenerListado();\r\n\r\n\t},\r\n}","import mod from \"-!../../../../node_modules/eslint-loader/index.js??ref--12-0!./Galera.js?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/eslint-loader/index.js??ref--12-0!./Galera.js?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Galeria.vue?vue&type=template&id=5fa09d7a&\"\nimport script from \"./js/Galera.js?vue&type=script&lang=js&\"\nexport * from \"./js/Galera.js?vue&type=script&lang=js&\"\nimport style0 from \"./Galeria.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}