{"version":3,"sources":["webpack:///./node_modules/vuex-class/lib/bindings.js","webpack:///./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack:///./src/views/VerEncuesta/template.vue?7124","webpack:///./src/views/VerEncuesta/template.vue","webpack:///./src/views/VerEncuesta/component.ts"],"names":["State","createBindingHelper","Getter","Action","bindTo","mapFn","makeDecorator","map","namespace","componentOptions","key","_a","mapObject","undefined","helper","a","b","proto","extractNamespace","type","options","n","length","_defineProperties","target","props","i","descriptor","enumerable","configurable","writable","Object","defineProperty","_createClass","Constructor","protoProps","staticProps","prototype","render","_vm","this","_h","$createElement","_c","_self","attrs","_v","_s","titulo","registros","staticStyle","on","exportarXlsx","headers","ref","encuestaDefEnc","staticRenderFns","script","component","loadEncuestaDef","getEncuestaDef","$props","idencuesta","val","getListaRegistros","encuestaid","id","$refs","lnkxlsx","click","datos","JSON","parse","items","forEach","item","grid_visible","push","text","value","name","listaRegistros","mixins","String"],"mappings":"oPAEWA,EAAQC,EAAoB,WAAY,QACxCC,EAASD,EAAoB,WAAY,QACzCE,EAASF,EAAoB,UAAW,QAC7BA,EAAoB,UAAW,QA0BrD,SAASA,EAAoBG,EAAQC,GACjC,SAASC,EAAcC,EAAKC,GACxB,OAAO,gBAAgB,SAAUC,EAAkBC,GAC1CD,EAAiBL,KAClBK,EAAiBL,GAAU,IAE/B,IAIIO,EAJAC,GAAaD,EAAK,GAAIA,EAAGD,GAAOH,EAAKI,GACzCF,EAAiBL,GAAQM,QAAqBG,IAAdL,EAC1BH,EAAMG,EAAWI,GAAWF,GAC5BL,EAAMO,GAAWF,MAI/B,SAASI,EAAOC,EAAGC,GACf,GAAiB,kBAANA,EAAgB,CACvB,IAAIN,EAAMM,EACNC,EAAQF,EACZ,OAAOT,EAAcI,OAAKG,EAAnBP,CAA8BW,EAAOP,GAEhD,IAAIF,EAAYU,EAAiBF,GAC7BG,EAAOJ,EACX,OAAOT,EAAca,EAAMX,GAE/B,OAAOM,EAEX,SAASI,EAAiBE,GACtB,I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"js/chunk-bfc81d58.9a044d2e.js","sourcesContent":["import { createDecorator } from 'vue-class-component';\nimport { mapState, mapGetters, mapActions, mapMutations } from 'vuex';\nexport var State = createBindingHelper('computed', mapState);\nexport var Getter = createBindingHelper('computed', mapGetters);\nexport var Action = createBindingHelper('methods', mapActions);\nexport var Mutation = createBindingHelper('methods', mapMutations);\nexport function namespace(namespace, helper) {\n function createNamespacedHelper(helper) {\n function namespacedHelper(a, b) {\n if (typeof b === 'string') {\n var key = b;\n var proto = a;\n return helper(key, { namespace: namespace })(proto, key);\n }\n var type = a;\n var options = merge(b || {}, { namespace: namespace });\n return helper(type, options);\n }\n return namespacedHelper;\n }\n if (helper) {\n console.warn('[vuex-class] passing the 2nd argument to `namespace` function is deprecated. pass only namespace string instead.');\n return createNamespacedHelper(helper);\n }\n return {\n State: createNamespacedHelper(State),\n Getter: createNamespacedHelper(Getter),\n Mutation: createNamespacedHelper(Mutation),\n Action: createNamespacedHelper(Action)\n };\n}\nfunction createBindingHelper(bindTo, mapFn) {\n function makeDecorator(map, namespace) {\n return createDecorator(function (componentOptions, key) {\n if (!componentOptions[bindTo]) {\n componentOptions[bindTo] = {};\n }\n var mapObject = (_a = {}, _a[key] = map, _a);\n componentOptions[bindTo][key] = namespace !== undefined\n ? mapFn(namespace, mapObject)[key]\n : mapFn(mapObject)[key];\n var _a;\n });\n }\n function helper(a, b) {\n if (typeof b === 'string') {\n var key = b;\n var proto = a;\n return makeDecorator(key, undefined)(proto, key);\n }\n var namespace = extractNamespace(b);\n var type = a;\n return makeDecorator(type, namespace);\n }\n return helper;\n}\nfunction extractNamespace(options) {\n var n = options && options.namespace;\n if (typeof n !== 'string') {\n return undefined;\n }\n if (n[n.length - 1] !== '/') {\n return n + '/';\n }\n return n;\n}\nfunction merge(a, b) {\n var res = {};\n [a, b].forEach(function (obj) {\n Object.keys(obj).forEach(function (key) {\n res[key] = obj[key];\n });\n });\n return res;\n}\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{attrs:{\"fluid\":\"\"}},[_c('v-card',{attrs:{\"elevation\":\"15\"}},[_c('v-card-title',[_c('div',[_vm._v(\"Registros: \"+_vm._s(_vm.titulo))]),_c('v-spacer'),_c('div',[_vm._v(_vm._s(_vm.registros.length)+\" Registros\")]),_c('span',{staticStyle:{\"width\":\"24px\"}}),_c('v-btn',{attrs:{\"text\":\"\",\"color\":\"primary\"},on:{\"click\":_vm.exportarXlsx}},[_vm._v(\"Exportar a Excel\")])],1),_c('v-card-text',[_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"items\":_vm.registros}})],1)],1),_c('a',{ref:\"lnkxlsx\",staticStyle:{\"display\":\"none\"},attrs:{\"href\":(\"https://ap-backend.agropecstar.com/encuestas/to-xlsx/\" + (this.encuestaDefEnc.id)),\"target\":\"_blank\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./template.vue?vue&type=template&id=3f07bb7f&\"\nvar script = {}\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","import { Component, Vue, Watch } from 'vue-property-decorator';\r\nimport Template from './template.vue';\r\nimport { State, Action, Getter } from 'vuex-class';\r\nimport { EncuestaDefEnc } from '@/store/modules/encuestas/types';\r\n\r\n@Component({\r\n mixins: [Template],\r\n props: { idencuesta: String },\r\n})\r\nexport default class VerEncuesta extends Vue {\r\n\r\n // private prueba: string = '';\r\n @State('loading') private loading!: boolean;\r\n @State('encuestaDefEnc', { namespace: 'encuestasModule' }) private encuestaDefEnc!: EncuestaDefEnc;\r\n @State('errorMessage', { namespace: 'encuestasModule' }) private errorMessage!: string;\r\n\r\n @Getter('listaRegistros', { namespace: 'encuestasModule' }) private listaRegistros!: (encuestaid: number) => any[];\r\n\r\n // tslint:disable-next-line: ban-types\r\n @Action('getEncuestaDef', { namespace: 'encuestasModule' }) private getEncuestaDef!: Function;\r\n\r\n // tslint:disable-next-line: ban-types\r\n @Action('getListaRegistros', { namespace: 'encuestasModule' }) private getListaRegistros!: Function;\r\n\r\n// private campos = [\r\n// { name: 'nombre', text: 'Nombre completo', },\r\n// { name: 'ap_paterno', text: 'Apellido paterno', },\r\n// { name: 'ap_materno', text: 'Apellido materno', },\r\n// { name: 'ayo_egresado', text: 'Año de egresado', },\r\n// { name: 'especialidad', text: 'Especialidad', },\r\n// { name: 'titulado', text: '¿Titulado?', },\r\n// { name: 'grado_estudios', text: 'Grado máximo de estudios', },\r\n// { name: 'estado_radica', text: 'Estado en el que radica', },\r\n// { name: 'municipio_radica', text: 'Municipio en el que radica', },\r\n// { name: 'nac_estado', text: 'Estado de nacimiento', },\r\n// { name: 'nac_municipio', text: 'Municipio de nacimiento', },\r\n// { name: 'nac_poblacion', text: 'Lugar de nacimiento', },\r\n// { name: 'ayos_radica_jal', text: 'Años radicados en Jalisco', },\r\n// { name: 'email', text: 'Dirección de correo electrónico', },\r\n// { name: 'celular', text: 'Celular', },\r\n// { name: 'institucion_empresa_labora', text: 'Institución o empresa en la que labora', },\r\n// { name: 'puesto_labora', text: 'Puesto labora', },\r\n// { name: 'jubilado', text: 'Jubilado', },\r\n// { name: 'jub_institucion_empresa', text: 'Institución o empresa de jubilación', },\r\n// { name: 'jub_puesto', text: 'Puesto al jubilarse', },\r\n// { name: 'actividad_emp_propia', text: 'Desarrolla actividad empresarial propia', },\r\n// { name: 'emp_propia_giro', text: 'Giro de la empresa propia', },\r\n// { name: 'emp_propia_ayos_actividad', text: 'Años en esta actividad empresa propia', },\r\n// { name: 'estatus', text: 'Estatus', },\r\n// { name: 'created_at', text: 'Fecha registro', },\r\n// ];\r\n\r\n protected mounted() {\r\n this.loadEncuestaDef();\r\n }\r\n\r\n protected loadEncuestaDef() {\r\n this.getEncuestaDef(this.$props.idencuesta);\r\n }\r\n\r\n @Watch('encuestaDefEnc')\r\n protected campoencuestaDefEnc(val: any): void {\r\n if (val !== undefined) {\r\n this.getListaRegistros({\r\n encuestaid: val.id,\r\n });\r\n }\r\n }\r\n\r\n protected get titulo(): string {\r\n if (this.encuestaDefEnc !== undefined) {\r\n return this.encuestaDefEnc.titulo;\r\n }\r\n return '';\r\n }\r\n\r\n protected get headers(): any[] {\r\n if (this.encuestaDefEnc !== undefined) {\r\n const datos = JSON.parse((this.encuestaDefEnc as any).datos);\r\n if (datos['campos']) {\r\n const items: any[] = [];\r\n datos['campos'].forEach((item: any) => {\r\n if (item.grid_visible === undefined || item.grid_visible === null || item.grid_visible === true)\r\n items.push({\r\n text: item.text,\r\n value: item.name,\r\n }); \r\n });\r\n return items;\r\n }\r\n }\r\n return [];\r\n }\r\n\r\n protected get registros(): any[] {\r\n if (this.encuestaDefEnc !== undefined) {\r\n return this.listaRegistros(this.encuestaDefEnc.id);\r\n }\r\n return [];\r\n }\r\n \r\n protected exportarXlsx(): void {\r\n // const lnk = `https://ap-backend.agropecstar.com/encuestas/to-xlsx/${this.encuestaDefEnc.id}`;\r\n // this.axios({\r\n // url: lnk,\r\n // method: 'GET',\r\n // responseType: 'blob',\r\n // })\r\n (this.$refs.lnkxlsx as any).click();\r\n }\r\n\r\n}\r\n"],"sourceRoot":""}