webpackJsonp([86],{
|
|
|
|
/***/ "A+Ph":
|
|
/***/ (function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "Z4lN":
|
|
/***/ (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");
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/log/airDetectionSensorLog.vue
|
|
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
|
|
|
|
/* harmony default export */ var airDetectionSensorLog = ({
|
|
name: "warningLog",
|
|
data: function data() {
|
|
return {
|
|
query: {
|
|
operType: "",
|
|
operateName: "",
|
|
operModul: ""
|
|
},
|
|
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: []
|
|
};
|
|
},
|
|
|
|
props: ['deviceNum'],
|
|
beforeCreate: function beforeCreate() {},
|
|
created: function created() {
|
|
this.alertTypeList = this.$MANUFACTURER.alertType.airDetectionSensorLog;
|
|
this.userInfo = JSON.parse(localStorage.getItem('info'));
|
|
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: ""
|
|
};
|
|
var q = {};
|
|
if (this.deviceNum != '') {
|
|
q = {
|
|
alertType: this.query.alertType,
|
|
deviceNum: this.deviceNum,
|
|
deviceType: 10
|
|
};
|
|
} else {
|
|
q = {
|
|
alertType: this.query.alertType,
|
|
deviceNum: this.query.deviceName,
|
|
deviceType: 10
|
|
};
|
|
}
|
|
var data = {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
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;
|
|
}
|
|
if (typeof li.content == 'undefined') {
|
|
li['content'] = '';
|
|
}
|
|
});
|
|
_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: 10
|
|
})
|
|
};
|
|
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 q = {};
|
|
if (this.deviceNum != '') {
|
|
q = {
|
|
deviceNum: this.deviceNum,
|
|
deviceType: 10
|
|
};
|
|
} else {
|
|
q = {
|
|
deviceNum: this.query.deviceName,
|
|
deviceType: 10
|
|
};
|
|
}
|
|
var data = {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
orderBy: "alert_time desc",
|
|
q: stringify_default()(q)
|
|
// orderType:"desc"
|
|
};
|
|
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;
|
|
}
|
|
if (typeof li.content == 'undefined') {
|
|
li['content'] = '';
|
|
}
|
|
});
|
|
_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;
|
|
if (obj.alertType == "" || obj.alertType == "0") {
|
|
if (obj.deviceNum == "") {
|
|
myObj = {
|
|
deviceType: obj.deviceType };
|
|
} else {
|
|
myObj = {
|
|
deviceNum: obj.deviceNum,
|
|
deviceType: obj.deviceType
|
|
};
|
|
}
|
|
} else {
|
|
if (obj.deviceNum == "") {
|
|
myObj = {
|
|
alertType: obj.alertType,
|
|
deviceType: obj.deviceType
|
|
};
|
|
} else {
|
|
myObj = {
|
|
alertType: obj.alertType,
|
|
deviceNum: obj.deviceNum,
|
|
deviceType: obj.deviceType
|
|
};
|
|
}
|
|
}
|
|
return stringify_default()(myObj);
|
|
},
|
|
|
|
|
|
// 触发搜索按钮
|
|
handleSearch: function handleSearch() {
|
|
var _this4 = this;
|
|
|
|
this.getlockAlert();
|
|
var q = {};
|
|
if (this.deviceNum != '') {
|
|
q = {
|
|
alertType: this.query.alertType,
|
|
deviceNum: this.deviceNum,
|
|
deviceType: 10
|
|
};
|
|
} else {
|
|
q = {
|
|
alertType: this.query.alertType,
|
|
deviceNum: this.query.deviceName,
|
|
deviceType: 10
|
|
};
|
|
}
|
|
var data = {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
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;
|
|
}
|
|
if (typeof li.content == 'undefined') {
|
|
li['content'] = '';
|
|
}
|
|
});
|
|
_this4.$store.commit('increment', 1);
|
|
_this4.tableData = res.data.list;
|
|
_this4.pageTotal = res.data.total;
|
|
});
|
|
// this.$set(this.query, "pageIndex", 1);
|
|
},
|
|
|
|
// 分页导航
|
|
handlePageChange: function handlePageChange(val) {
|
|
var _this5 = this;
|
|
|
|
this.$store.commit('increment', val);
|
|
var q = {};
|
|
if (this.deviceNum != '') {
|
|
q = {
|
|
alertType: this.query.alertType,
|
|
deviceNum: this.deviceNum,
|
|
deviceType: 10
|
|
};
|
|
} else {
|
|
q = {
|
|
alertType: this.query.alertType,
|
|
deviceNum: this.query.deviceName,
|
|
deviceType: 10
|
|
};
|
|
}
|
|
|
|
var data = {
|
|
pageNum: val,
|
|
pageSize: 10,
|
|
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;
|
|
}
|
|
if (typeof li.content == 'undefined') {
|
|
li['content'] = '';
|
|
}
|
|
});
|
|
_this5.tableData = res.data.list;
|
|
_this5.pageTotal = res.data.total;
|
|
});
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-0ddddc6c","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/log/airDetectionSensorLog.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-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',{attrs:{"type":"primary","size":"small","icon":"el-icon-search"},on:{"click":_vm.handleSearch}},[_vm._v("搜索")]),_vm._v(" "),_c('el-button',{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"}},[_c('el-table-column',{attrs:{"prop":"id","label":"ID"}}),_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":"content","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, prev, pager, next","current-page":_vm.$store.state.currentPage,"page-size":10,"total":_vm.pageTotal},on:{"current-change":_vm.handlePageChange}})],1)],1)])}
|
|
var staticRenderFns = []
|
|
var esExports = { render: render, staticRenderFns: staticRenderFns }
|
|
/* harmony default export */ var log_airDetectionSensorLog = (esExports);
|
|
// CONCATENATED MODULE: ./src/views/log/airDetectionSensorLog.vue
|
|
function injectStyle (ssrContext) {
|
|
__webpack_require__("A+Ph")
|
|
}
|
|
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-0ddddc6c"
|
|
/* moduleIdentifier (server only) */
|
|
var __vue_module_identifier__ = null
|
|
var Component = normalizeComponent(
|
|
airDetectionSensorLog,
|
|
log_airDetectionSensorLog,
|
|
__vue_template_functional__,
|
|
__vue_styles__,
|
|
__vue_scopeId__,
|
|
__vue_module_identifier__
|
|
)
|
|
|
|
/* harmony default export */ var views_log_airDetectionSensorLog = __webpack_exports__["default"] = (Component.exports);
|
|
|
|
|
|
/***/ })
|
|
|
|
});
|