webpackJsonp([84],{ /***/ "GB2u": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "gZMX": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js var stringify = __webpack_require__("mvHQ"); var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/defineProperty.js var defineProperty = __webpack_require__("bOdI"); var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); // EXTERNAL MODULE: ./src/api/index.js + 5 modules var api = __webpack_require__("gyMJ"); // EXTERNAL MODULE: ./node_modules/xlsx/xlsx.js var xlsx = __webpack_require__("uXZL"); var xlsx_default = /*#__PURE__*/__webpack_require__.n(xlsx); // EXTERNAL MODULE: ./src/utils/util.js var util = __webpack_require__("oFuF"); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/InformationBase.vue // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var InformationBase = ({ inject: ['reload'], name: "warningLog", data: function data() { return { selectoption: [], selectoptionValue: '', BatchUpload: false, dialogImageUrl: "", dialogVisible: false, disabled1: false, documentType: "请选择", cardstatus: [{ value: 1, label: "正常" }, { value: 2, label: "挂失" }, { value: 3, label: "挂失冻结" }, { value: 4, label: "冻结" }, { value: 5, label: "预开户" }, { value: 6, label: "过期" }], editVisiblelist: false, query: { operType: "", operateName: "", operModul: "" }, query1: { operType: "", operateName: "", operModul: "" }, activeName: "first", tableData: [], tableData1: [], multipleSelection: [], multipleSelection1: [], delList: [], editVisible: false, pageTotal: 0, pageTotal1: 0, form: {}, form1: { sex: 1, cardState: 1, name: "", number: "", cardId: "", id: '', card: '', content: '', phone: "", type: '' }, idx: -1, id: -1, uploadkj: false, userlist1: [], userlist1statu: true, userlist2: [], editrow: {}, voucher: { username: "", pzname: "", nfc: "", idcard: "", password: "123456" }, fingerprintId: 0, checkList: "", userInfo: { type: '' } }; }, created: function created() { this.userInfo = JSON.parse(localStorage.getItem('info')); // var tenantId = JSON.parse(localStorage.getItem('tenantId')) // if (tenantId == 400) { // this.$store.commit('defaultsettenantid') // } this.getOperates(); this.selectoption = JSON.parse(localStorage.getItem('selectoption')); this.selectoptionValue = localStorage.getItem('tenantId'); }, methods: { // 人脸图片上传功能 handleRemove: function handleRemove(file) { console.log(file); }, handlePictureCardPreview: function handlePictureCardPreview(file) { this.dialogImageUrl = file.url; this.dialogVisible1 = true; }, handleDownload: function handleDownload(file) { console.log(file); }, selectCheck: function selectCheck(e) { if (e == "左手大拇指") { this.fingerprintId = 0; } else if (e == "左手食指") { this.fingerprintId = 1; } else if (e == "右手大拇指") { this.fingerprintId = 2; } else if (e == "右手食指") { this.fingerprintId = 3; } }, handleEdit: function handleEdit(index, row) { this.form1 = defineProperty_default()({ sex: 1, number: row.number, name: row.name, phone: row.phone, cardId: row.cardId, card: row.card, id: row.id, content: row.content, cardState: row.cardState, userPassword: row.userPassword, userTelephone: row.userTelephone, type: row.type }, "sex", row.sex); this.documentType = ""; this.editrow = row; this.editVisiblelist = true; }, Bytes2Str: function Bytes2Str(arrBytes) { var str = ""; for (var i = 0; i < arrBytes.length; i++) { var tmp; var num = parseInt(arrBytes[i]); if (num < 0) { //此处填坑,当byte因为符合位导致数值为负时候,需要对数据进行处理 tmp = (255 + num + 1).toString(16); } else { tmp = num.toString(16); } if (tmp.length == 1) { tmp = "0" + tmp; } if (i > 0) { str += "" + tmp; } else { str += tmp; } } return str; }, modifyEdit: function modifyEdit() { var _this = this; var documentType = this.documentType; if (documentType == 1) { var fingerprint = localStorage.getItem("fingerprint") || ""; var array = fingerprint.split(","); var num = this.Bytes2Str(array); this.form1.type = 1; this.form1.content = num; } else if (documentType == 2) { this.form1.content = this.voucher.idcard; this.form1.type = 2; } else if (documentType == 3) { this.form1.content = this.voucher.nfc; this.form1.type = 3; } else if (documentType == 4) { this.form1.content = this.voucher.password; this.form1.type = 4; } if (this.form1.name == '' || this.form1.number == '' || this.form1.phone == '') { this.$message.error('请填写信息完整'); } else { var data = { id: this.form1.id, cardId: this.form1.cardId, content: stringify_default()(this.form1) }; Object(api["g" /* httpPost */])(data, this.$api.editMark).then(function (res) { if (res.success) { _this.$message.success("修改成功"); _this.editVisiblelist = false; _this.getOperates(); } }); } }, //添加 handleSearch1: function handleSearch1() { this.form1 = { sex: 1, number: "", name: "", phone: "", cardId: "", cardState: 1 }; this.editVisiblelist = true; }, // 删除操作 handleDelete: function handleDelete(index, row) { var _this2 = this; // 二次确认删除 this.$confirm("确定要删除吗?", "提示", { type: "warning" }).then(function () { var data = { ids: [row.id] }; Object(api["g" /* httpPost */])(data, _this2.$api.deleteMark).then(function (res) { _this2.$message.success("删除成功"); _this2.getOperates(); }); }).catch(function () {}); }, // 删除操作 batchDelete: function batchDelete(row) { var _this3 = this; var ids = []; this.multipleSelection.map(function (li) { ids.push(li.id); }); // 二次确认删除 this.$confirm("确定要删除吗?", "提示", { type: "warning" }).then(function () { var data = { ids: ids }; Object(api["g" /* httpPost */])(data, _this3.$api.deleteMark).then(function (res) { _this3.$message.success("删除成功"); _this3.getOperates(); }); }).catch(function () {}); }, //取消 cancel: function cancel() { this.uploadkj = false; this.userlist2 = []; }, handleSelectionChange1: function handleSelectionChange1(val) { this.multipleSelection1 = val; }, handleSelectionChange: function handleSelectionChange(val) { this.multipleSelection = val; }, //批量上传 batchUpload: function batchUpload() { this.uploadkj = true; }, //批量上传确认 batchUploadfun: function batchUploadfun() { var _this4 = this; var data = { list: this.userlist1 }; Object(api["g" /* httpPost */])(data, this.$api.addMark).then(function (res) { _this4.getOperates(); _this4.uploadkj = false; }); }, time: function time() { var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : +new Date(); var date = new Date(time + 8 * 3600 * 1000); // 增加8小时 return date.toJSON().substr(0, 19).replace("T", " "); }, // 获取信息库 getOperates: function getOperates() { var _this5 = this; var data = { pageNum: 1, pageSize: 10 }; Object(api["d" /* httpGet */])(data, this.$api.getMark).then(function (res) { var array = []; res.data.map(function (li) { var str = JSON.parse(li.content); str.id = li.id; str.cardId = li.cardId; array.push(str); }); _this5.tableData = array; _this5.pageTotal = res.data.length; }); }, // 触发搜索按钮 handleSearch: function handleSearch() { var _this6 = this; var data = { pageNum: 1, pageSize: 10 }; Object(api["d" /* httpGet */])(data, this.$api.getMark).then(function (res) { res.data.list.map(function (li) { li.createTime = _this6.time(+new Date(li.createTime)); }); _this6.tableData = res.data.list; _this6.pageTotal = res.data.total; }); // this.$set(this.query, "pageIndex", 1); }, // 分页导航 handlePageChange: function handlePageChange(val) { var _this7 = this; var data = { pageNum: val, pageSize: 10 }; Object(api["g" /* httpPost */])(data, this.$api.getDeviceResult).then(function (res) { var datalist = util["a" /* default */].zlib_unzip(res.data); datalist.map(function (li) { li.createTime = _this7.time(+new Date(li.createTime)); }); _this7.tableData = datalist; _this7.pageTotal = res.data.total; }); }, btnClick: function btnClick() { document.querySelector(".input-file").click(); }, exportData: function exportData(event) { if (!event.currentTarget.files.length) { return; } var that = this; // 拿取文件对象 var f = event.currentTarget.files[0]; // 用FileReader来读取 var reader = new FileReader(); // 重写FileReader上的readAsBinaryString方法 FileReader.prototype.readAsBinaryString = function (f) { var binary = ""; var wb; // 读取完成的数据 var outdata; // 你需要的数据 var reader = new FileReader(); reader.onload = function (e) { // 读取成Uint8Array,再转换为Unicode编码(Unicode占两个字节) var bytes = new Uint8Array(reader.result); var length = bytes.byteLength; for (var i = 0; i < length; i++) { binary += String.fromCharCode(bytes[i]); } // 接下来就是xlsx了,具体可看api wb = xlsx_default.a.read(binary, { type: "binary" }); outdata = xlsx_default.a.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]); // 自定义方法向父组件传递数据 var arr = [], arr1 = []; outdata.map(function (li, index) { var obj = {}, str = {}; str.pzname = li["名称"]; str.cardId = li["卡号"]; str.userTelephone = li["电话"]; str.content = li["凭证内容"]; str.type = li["凭证类型"]; if (str.sex == "男") { str.sex = 1; } else if (str.sex == "女") { str.sex = 2; } var phone = stringify_default()(str.userTelephone); str.userPassword = phone.substr(phone.length - 6, phone.length - 1); obj.content = stringify_default()(str); arr.push(obj); arr1.push(str); }); // this.tableData=arr that.userlist1statu = false; that.$nextTick(function () { that.userlist1 = arr; that.userlist2 = arr1; that.userlist1statu = true; }); }; reader.readAsArrayBuffer(f); }; reader.readAsBinaryString(f); } } }); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-16379f0b","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/InformationBase.vue var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:"container"},[_c('div',{staticClass:"handle-box"},[_c('selectoption'),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":_vm.batchDelete}},[_vm._v("批量删除")])],1),_vm._v(" "),_c('el-table',{ref:"multipleTable",staticClass:"table",attrs:{"data":_vm.tableData,"border":"","header-cell-class-name":"table-header"},on:{"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"type":"selection","width":"55","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"id","label":"ID","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"pzname","label":"名称","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"cardId","label":"卡号","width":"150","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"userTelephone","label":"电话","width":"150","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"凭证类型","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.type == 0)?_c('span',[_vm._v("人脸")]):_vm._e(),_vm._v(" "),(scope.row.type == 1)?_c('span',[_vm._v("指纹")]):_vm._e(),_vm._v(" "),(scope.row.type == 2)?_c('span',[_vm._v("身份证")]):_vm._e(),_vm._v(" "),(scope.row.type == 3)?_c('span',[_vm._v("NFC")]):_vm._e(),_vm._v(" "),(scope.row.type == 4)?_c('span',[_vm._v("密码")]):_vm._e()]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"操作","width":"200","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-button',{staticClass:"red",attrs:{"type":"text"},on:{"click":function($event){return _vm.handleDelete(scope.$index, scope.row)}}},[_vm._v("删除")])]}}])})],1),_vm._v(" "),_c('div',{staticClass:"pagination"},[_c('el-pagination',{attrs:{"background":"","layout":"total, prev, pager, next","current-page":_vm.query.pageIndex,"page-size":_vm.query.pageSize,"total":_vm.pageTotal},on:{"current-change":_vm.handlePageChange}})],1),_vm._v(" "),_c('el-dialog',{attrs:{"title":"批量上传","visible":_vm.uploadkj,"width":"70%"},on:{"update:visible":function($event){_vm.uploadkj=$event}},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('span',{staticClass:"dialog-footer"},[_c('el-button',{on:{"click":_vm.cancel}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.batchUploadfun}},[_vm._v("确 定")])],1)]},proxy:true}])},[_c('input',{staticClass:"input-file",attrs:{"type":"file","accept":".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"},on:{"change":_vm.exportData}}),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.btnClick}},[_vm._v("导入EXCEL")]),_vm._v(" "),_c('el-form',{ref:"form",attrs:{"model":_vm.form,"label-width":"70px"}}),_vm._v(" "),(_vm.userlist1statu)?_c('el-table',{ref:"multipleTable1",staticClass:"table",attrs:{"data":_vm.userlist2,"border":"","height":"200","header-cell-class-name":"table-header"},on:{"selection-change":_vm.handleSelectionChange1}},[_c('el-table-column',{attrs:{"prop":"card","label":"ID","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"name","label":"名称","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"cardId","label":"卡号","width":"150","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"phone","label":"电话","width":"150","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"性别","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n "+_vm._s(scope.row.sex == 1 ? "男" : "女")+"\n ")]}}],null,false,237350179)})],1):_vm._e()],1),_vm._v(" "),_c('el-dialog',{staticClass:"dialogheight",attrs:{"title":"编辑","visible":_vm.editVisiblelist},on:{"update:visible":function($event){_vm.editVisiblelist=$event}},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('span',{staticClass:"dialog-footer"},[_c('el-button',{on:{"click":function($event){_vm.editVisiblelist = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.modifyEdit}},[_vm._v("修 改")])],1)]},proxy:true}])},[_c('el-form',{ref:"form1",attrs:{"model":_vm.form1,"label-width":"70px"}},[_c('el-form-item',{attrs:{"label":"名称"}},[_c('el-input',{model:{value:(_vm.form1.name),callback:function ($$v) {_vm.$set(_vm.form1, "name", $$v)},expression:"form1.name"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"学号"}},[_c('el-input',{model:{value:(_vm.form1.number),callback:function ($$v) {_vm.$set(_vm.form1, "number", $$v)},expression:"form1.number"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"卡号"}},[_c('el-input',{model:{value:(_vm.form1.card),callback:function ($$v) {_vm.$set(_vm.form1, "card", $$v)},expression:"form1.card"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"电话"}},[_c('el-input',{model:{value:(_vm.form1.phone),callback:function ($$v) {_vm.$set(_vm.form1, "phone", $$v)},expression:"form1.phone"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"类型"}},[_c('el-select',{staticClass:"documentType",attrs:{"placeholder":"请选择"},model:{value:(_vm.documentType),callback:function ($$v) {_vm.documentType=$$v},expression:"documentType"}},[_c('el-option',{attrs:{"label":"人脸","value":"0"}}),_vm._v(" "),_c('el-option',{attrs:{"label":"指纹","value":"1"}}),_vm._v(" "),_c('el-option',{attrs:{"label":"身份证","value":"2"}}),_vm._v(" "),_c('el-option',{attrs:{"label":"NFC","value":"3"}}),_vm._v(" "),_c('el-option',{attrs:{"label":"密码","value":"4"}})],1)],1),_vm._v(" "),(_vm.documentType == 0)?_c('el-form-item',{attrs:{"label":"上传照片"}},[(_vm.documentType == 0)?_c('div',[_c('el-upload',{attrs:{"action":"#","list-type":"picture-card","auto-upload":false,"modal-append-to-body":false},scopedSlots:_vm._u([{key:"file",fn:function(ref){ var file = ref.file; return _c('div',{},[_c('img',{staticClass:"el-upload-list__item-thumbnail",attrs:{"src":file.url,"alt":""}}),_vm._v(" "),_c('span',{staticClass:"el-upload-list__item-actions"},[_c('span',{staticClass:"el-upload-list__item-preview",on:{"click":function($event){return _vm.handlePictureCardPreview(file)}}},[_c('i',{staticClass:"el-icon-zoom-in"})]),_vm._v(" "),(!_vm.disabled1)?_c('span',{staticClass:"el-upload-list__item-delete",on:{"click":function($event){return _vm.handleDownload(file)}}},[_c('i',{staticClass:"el-icon-download"})]):_vm._e(),_vm._v(" "),(!_vm.disabled1)?_c('span',{staticClass:"el-upload-list__item-delete",on:{"click":function($event){return _vm.handleRemove(file)}}},[_c('i',{staticClass:"el-icon-delete"})]):_vm._e()])])}}],null,false,1205945247)},[_c('i',{staticClass:"el-icon-plus",attrs:{"slot":"default"},slot:"default"})]),_vm._v(" "),_c('el-dialog',{attrs:{"visible":_vm.dialogVisible,"modal-append-to-body":false},on:{"update:visible":function($event){_vm.dialogVisible=$event}}},[_c('img',{attrs:{"width":"100%","src":_vm.dialogImageUrl,"alt":""}})])],1):_vm._e()]):_vm._e(),_vm._v(" "),(_vm.documentType == 1)?_c('el-form-item',{attrs:{"label":"指纹"}},[_c('el-radio-group',{on:{"change":_vm.selectCheck},model:{value:(_vm.checkList),callback:function ($$v) {_vm.checkList=$$v},expression:"checkList"}},[_c('el-radio-button',{attrs:{"label":"左手大拇指","value":0}}),_vm._v(" "),_c('el-radio-button',{attrs:{"label":"左手食指","value":1}}),_vm._v(" "),_c('el-radio-button',{attrs:{"label":"右手大拇指","value":2}}),_vm._v(" "),_c('el-radio-button',{attrs:{"label":"右手食指","value":3}})],1),_vm._v(" "),_c('iframe',{staticStyle:{"width":"100%","height":"350px"},attrs:{"src":"static/equipment/mafp_serial/index.html","frameborder":"0","id":"iframeBox"}})],1):_vm._e(),_vm._v(" "),(_vm.documentType == 2)?_c('el-form-item',{attrs:{"label":"身份证"}},[_c('el-input',{model:{value:(_vm.voucher.idcard),callback:function ($$v) {_vm.$set(_vm.voucher, "idcard", $$v)},expression:"voucher.idcard"}})],1):_vm._e(),_vm._v(" "),(_vm.documentType == 3)?_c('el-form-item',{attrs:{"label":"NFC卡号"}},[_c('el-input',{model:{value:(_vm.voucher.nfc),callback:function ($$v) {_vm.$set(_vm.voucher, "nfc", $$v)},expression:"voucher.nfc"}})],1):_vm._e(),_vm._v(" "),(_vm.documentType == 4)?_c('el-form-item',{attrs:{"label":"密码"}},[_c('el-input',{attrs:{"show-password":""},model:{value:(_vm.voucher.password),callback:function ($$v) {_vm.$set(_vm.voucher, "password", $$v)},expression:"voucher.password"}})],1):_vm._e(),_vm._v(" "),_c('el-form-item',{attrs:{"label":"性别","disabled":""}},[_c('el-radio',{attrs:{"label":1},model:{value:(_vm.form1.sex),callback:function ($$v) {_vm.$set(_vm.form1, "sex", $$v)},expression:"form1.sex"}},[_vm._v("男")]),_vm._v(" "),_c('el-radio',{attrs:{"label":2},model:{value:(_vm.form1.sex),callback:function ($$v) {_vm.$set(_vm.form1, "sex", $$v)},expression:"form1.sex"}},[_vm._v("女")])],1)],1)],1)],1)])} var staticRenderFns = [] var esExports = { render: render, staticRenderFns: staticRenderFns } /* harmony default export */ var views_InformationBase = (esExports); // CONCATENATED MODULE: ./src/views/InformationBase.vue function injectStyle (ssrContext) { __webpack_require__("GB2u") } var normalizeComponent = __webpack_require__("VU/8") /* script */ /* template */ /* template functional */ var __vue_template_functional__ = false /* styles */ var __vue_styles__ = injectStyle /* scopeId */ var __vue_scopeId__ = "data-v-16379f0b" /* moduleIdentifier (server only) */ var __vue_module_identifier__ = null var Component = normalizeComponent( InformationBase, views_InformationBase, __vue_template_functional__, __vue_styles__, __vue_scopeId__, __vue_module_identifier__ ) /* harmony default export */ var src_views_InformationBase = __webpack_exports__["default"] = (Component.exports); /***/ }) });