webpackJsonp([48],{ /***/ "AxG5": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "vWK8": /***/ (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: ./src/api/index.js + 5 modules var api = __webpack_require__("gyMJ"); // EXTERNAL MODULE: ./src/utils/index.js var utils = __webpack_require__("0xDb"); // EXTERNAL MODULE: ./node_modules/moment/moment.js var moment = __webpack_require__("PJh5"); var moment_default = /*#__PURE__*/__webpack_require__.n(moment); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/warningLog.vue // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var warningLog = ({ // inject: ['reload'], name: "warningLog", data: function data() { return { // selectoption:[], // selectoptionValue:'', query: { operType: "", operateName: "", operModul: "", pageSize: 10, pageNum: 1, startTime: '', endTime: '' }, query1: { operType: "", operateName: "", operModul: "" }, activeName: "first", tableData: [], tableData1: [], multipleSelection: [], delList: [], editVisible: false, pageTotal: 0, pageTotal1: 0, form: {}, idx: -1, id: -1, AboutDevice: [], userInfo: { type: '' }, alertTypeList: [] }; }, beforeCreate: function beforeCreate() {}, created: function created() { this.alertTypeList = this.$MANUFACTURER.alertType.lockLog; this.userInfo = JSON.parse(localStorage.getItem('info')); if (this.$route.params.alertType) { this.query.alertType = this.$route.params.alertType; } this.getAboutDevice(); }, mounted: function mounted() {}, methods: { selectTenantId: function selectTenantId(e) { localStorage.setItem('tenantId', e); this.reload(); }, restFun: function restFun() { var _this = this; this.query = { operType: "", operateName: "", operModul: "", pageSize: 10, pageNum: 1, startTime: '', endTime: '' }; var q = { alertType: this.query.alertType, deviceNum: this.query.deviceName, startTime: moment_default()(this.query.startTime).format("YYYY-MM-DD HH:mm:ss"), endTime: moment_default()(this.query.endTime).format("YYYY-MM-DD HH:mm:ss"), deviceType: 1 }; var data = { pageNum: 1, pageSize: this.query.pageSize, q: this.searchParaProcess(q), orderBy: "alert_time desc" }; Object(api["d" /* httpGet */])(data, this.$api.getLockAlert).then(function (res) { var AboutDevice = _this.AboutDevice; res.data.list.map(function (li) { li.createAt = _this.time(+new Date(li.createAt)); li.alertTime = _this.time(+new Date(li.alertTime * 1000)); var resultArr = AboutDevice.filter(function (_item) { return _item.deviceNum == li.deviceNum; })[0]; if (resultArr) { li.roomId = resultArr.id; li.roomName = resultArr.roomName; } li['alertTypeDesc'] = ''; var alertTypeDesc = _this.alertTypeList.filter(function (item) { return item.code == li.alertType; })[0]; if (alertTypeDesc) { li['alertTypeDesc'] = alertTypeDesc.desc; } }); // this.$store.commit('increment', 1) _this.tableData = res.data.list; _this.pageTotal = res.data.total; }); }, // 查询和房间相关的设备 getAboutDevice: function getAboutDevice() { var _this2 = this; var data = { pageNum: 0, pageSize: 0, q: stringify_default()({ lockType: 1 }) }; Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) { _this2.AboutDevice = res.data.list; _this2.getOperates(); }); }, 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 _this3 = this; var data = { pageNum: 1, pageSize: this.query.pageSize, orderBy: "alert_time desc", q: stringify_default()({ deviceType: 1, alertType: this.query.alertType }) // orderType:"desc" }; console.log(data); Object(api["d" /* httpGet */])(data, this.$api.getLockAlert).then(function (res) { var AboutDevice = _this3.AboutDevice; res.data.list.map(function (li) { li.createAt = _this3.time(+new Date(li.createAt)); li.alertTime = _this3.time(+new Date(li.alertTime * 1000)); var resultArr = AboutDevice.filter(function (_item) { return _item.deviceNum == li.deviceNum; })[0]; if (resultArr) { li.roomId = resultArr.id; li.roomName = resultArr.roomName; } li['alertTypeDesc'] = ''; var alertTypeDesc = _this3.alertTypeList.filter(function (item) { return item.code == li.alertType; })[0]; if (alertTypeDesc) { li['alertTypeDesc'] = alertTypeDesc.desc; } }); _this3.tableData = res.data.list; _this3.pageTotal = res.data.total; }); }, //门锁报警同步刷新 getlockAlert: function getlockAlert() { Object(api["d" /* httpGet */])("", this.$api.getLockAlert1).then(function (res) {}); }, searchParaProcess: function searchParaProcess(obj) { var myObj = obj; for (var i in myObj) { if (myObj[i] == '' || myObj[i] == null || myObj[i] == undefined || myObj[i] == 'Invalid date') { delete myObj[i]; } } return stringify_default()(myObj); }, // 触发搜索按钮 handleSearch: function handleSearch() { var _this4 = this; // this.getlockAlert() this.query.pageNum = 1; var q = { alertType: this.query.alertType, deviceNum: this.query.deviceName, startTime: moment_default()(this.query.startTime).format("YYYY-MM-DD HH:mm:ss"), endTime: moment_default()(this.query.endTime).format("YYYY-MM-DD HH:mm:ss"), deviceType: 1 }; console.log(q); var data = { pageNum: this.query.pageNum, pageSize: this.query.pageSize, q: this.searchParaProcess(q), orderBy: "alert_time desc" }; Object(api["d" /* httpGet */])(data, this.$api.getLockAlert).then(function (res) { var AboutDevice = _this4.AboutDevice; res.data.list.map(function (li) { li.createAt = _this4.time(+new Date(li.createAt)); li.alertTime = _this4.time(+new Date(li.alertTime * 1000)); var resultArr = AboutDevice.filter(function (_item) { return _item.deviceNum == li.deviceNum; })[0]; if (resultArr) { li.roomId = resultArr.id; li.roomName = resultArr.roomName; } li['alertTypeDesc'] = ''; var alertTypeDesc = _this4.alertTypeList.filter(function (item) { return item.code == li.alertType; })[0]; if (alertTypeDesc) { li['alertTypeDesc'] = alertTypeDesc.desc; } }); // this.$store.commit('increment', 1) _this4.tableData = res.data.list; _this4.pageTotal = res.data.total; }); // this.$set(this.query, "pageIndex", 1); }, getSearchList: function getSearchList() { var _this5 = this; var q = { alertType: this.query.alertType, deviceNum: this.query.deviceName, startTime: moment_default()(this.query.startTime).format("YYYY-MM-DD HH:mm:ss"), endTime: moment_default()(this.query.endTime).format("YYYY-MM-DD HH:mm:ss"), deviceType: 1 }; var data = { pageNum: this.query.pageNum, pageSize: this.query.pageSize, q: this.searchParaProcess(q), orderBy: "alert_time desc" }; Object(api["d" /* httpGet */])(data, this.$api.getLockAlert).then(function (res) { var AboutDevice = _this5.AboutDevice; res.data.list.map(function (li) { li.createAt = _this5.time(+new Date(li.createAt)); li.alertTime = _this5.time(+new Date(li.alertTime * 1000)); var resultArr = AboutDevice.filter(function (_item) { return _item.deviceNum == li.deviceNum; })[0]; if (resultArr) { li.roomId = resultArr.id; li.roomName = resultArr.roomName; } li['alertTypeDesc'] = ''; var alertTypeDesc = _this5.alertTypeList.filter(function (item) { return item.code == li.alertType; })[0]; if (alertTypeDesc) { li['alertTypeDesc'] = alertTypeDesc.desc; } }); _this5.tableData = res.data.list; _this5.pageTotal = res.data.total; }); }, // 分页导航 handlePageChange: function handlePageChange(val) { this.query.pageNum = val; this.getSearchList(); }, handleSizeChange: function handleSizeChange(val) { this.query.pageNum = 1; this.query.pageSize = val; this.getSearchList(); } } }); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-802dfa0a","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/warningLog.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-date-picker',{staticClass:"handle-input mr10",attrs:{"size":"small","type":"datetime","clearable":"","placeholder":"选择开始日期时间","default-time":"00:00:00"},model:{value:(_vm.query.startTime),callback:function ($$v) {_vm.$set(_vm.query, "startTime", $$v)},expression:"query.startTime"}}),_vm._v(" "),_c('el-date-picker',{staticClass:"handle-input mr10",attrs:{"size":"small","type":"datetime","clearable":"","placeholder":"选择结束日期时间","default-time":"00:00:00"},model:{value:(_vm.query.endTime),callback:function ($$v) {_vm.$set(_vm.query, "endTime", $$v)},expression:"query.endTime"}}),_vm._v(" "),_c('el-input',{staticClass:"handle-input mr10",attrs:{"size":"small","placeholder":"设备号","clearable":true},model:{value:(_vm.query.deviceName),callback:function ($$v) {_vm.$set(_vm.query, "deviceName", $$v)},expression:"query.deviceName"}}),_vm._v(" "),_c('el-select',{staticClass:"handle-select mr10",attrs:{"size":"small","clearable":true,"placeholder":"报警类型"},model:{value:(_vm.query.alertType),callback:function ($$v) {_vm.$set(_vm.query, "alertType", $$v)},expression:"query.alertType"}},_vm._l((_vm.alertTypeList),function(item){return _c('el-option',{key:item.code,attrs:{"label":item.desc,"value":item.code}})}),1),_vm._v(" "),_c('el-button',{staticStyle:{"background":"#FA8E00","border":"none"},attrs:{"type":"primary","size":"small","icon":"el-icon-search"},on:{"click":_vm.handleSearch}},[_vm._v("搜索")]),_vm._v(" "),_c('el-button',{staticStyle:{"background":"#FA8E00","border":"none"},attrs:{"type":"primary","size":"small","icon":"el-icon-search"},on:{"click":_vm.restFun}},[_vm._v("重置")])],1),_vm._v(" "),_c('el-table',{ref:"multipleTable",staticClass:"table",attrs:{"data":_vm.tableData,"border":"","header-cell-class-name":"table-header","height":"650"}},[_c('el-table-column',{attrs:{"label":"序号","type":"index","width":"80"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n "+_vm._s(_vm.pageTotal - ((_vm.query.pageNum-1)*_vm.query.pageSize) - scope.$index)+"\n ")]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"deviceNum","label":"设备号"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"roomName","label":"房间名称"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"alertTime","label":"报警时间"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"报警类型"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('span',[_vm._v(_vm._s(scope.row.alertTypeDesc))])]}}])})],1),_vm._v(" "),_c('div',{staticClass:"pagination"},[_c('el-pagination',{attrs:{"background":"","layout":"total, sizes, prev, pager, next, jumper","current-page":_vm.query.pageNum,"page-size":_vm.query.pageSize,"total":_vm.pageTotal},on:{"current-change":_vm.handlePageChange,"size-change":_vm.handleSizeChange}})],1)],1)])} var staticRenderFns = [] var esExports = { render: render, staticRenderFns: staticRenderFns } /* harmony default export */ var views_warningLog = (esExports); // CONCATENATED MODULE: ./src/views/warningLog.vue function injectStyle (ssrContext) { __webpack_require__("AxG5") } 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-802dfa0a" /* moduleIdentifier (server only) */ var __vue_module_identifier__ = null var Component = normalizeComponent( warningLog, views_warningLog, __vue_template_functional__, __vue_styles__, __vue_scopeId__, __vue_module_identifier__ ) /* harmony default export */ var src_views_warningLog = __webpack_exports__["default"] = (Component.exports); /***/ }) });