webpackJsonp([43],{ /***/ "04Yk": /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ "NqiF": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/typeof.js var helpers_typeof = __webpack_require__("pFYg"); var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof); // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/promise.js var promise = __webpack_require__("//Fk"); var promise_default = /*#__PURE__*/__webpack_require__.n(promise); // 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/components/zTree1.vue + 2 modules var zTree1 = __webpack_require__("6Ljo"); // EXTERNAL MODULE: ./src/components/deviceLi.vue + 2 modules var deviceLi = __webpack_require__("4qFG"); // EXTERNAL MODULE: ./src/components/UnlockRecord.vue + 2 modules var UnlockRecord = __webpack_require__("YBqH"); // EXTERNAL MODULE: ./src/components/DeviceFeedbackLog.vue + 2 modules var DeviceFeedbackLog = __webpack_require__("5skf"); // EXTERNAL MODULE: ./src/components/warningLog.vue + 2 modules var warningLog = __webpack_require__("+K0N"); // EXTERNAL MODULE: ./src/components/voucherCom.vue + 2 modules var voucherCom = __webpack_require__("JoDB"); // EXTERNAL MODULE: ./src/utils/index.js var utils = __webpack_require__("0xDb"); // 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"); // EXTERNAL MODULE: ./src/utils/equipment.js var equipment = __webpack_require__("ObZk"); // EXTERNAL MODULE: ./node_modules/moment/moment.js var moment = __webpack_require__("PJh5"); var moment_default = /*#__PURE__*/__webpack_require__.n(moment); // EXTERNAL MODULE: ./src/api/allFun.js var allFun = __webpack_require__("mprh"); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/aNormEquip.vue // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var aNormEquip = ({ inject: ['reload'], name: "doorLock", data: function data() { return { contentSearchShow: false, myLine_option_one: { title: { text: "信号曲线", x: "0", y: "20", color: "#333" }, tooltip: { trigger: "axis" }, legend: { orient: "horizontal", x: "right", y: "top", data: ["门锁近期信号曲线"] }, dataZoom: [{ type: 'inside', //内置滑动,随鼠标滚轮展示 xAxisIndex: [0], start: 0, //初始化时,滑动条宽度开始标度 end: 100 //初始化时,滑动条宽度结束标度 }], grid: { top: "16%", left: "0%", right: "0%", bottom: "0%", containLabel: true }, xAxis: { name: "时间", type: "category", data: [] }, yAxis: {}, series: [{ name: "门锁信号", type: "line", smooth: true, data: [], itemStyle: { normal: { color: "#FFAE00", lineStyle: { color: "#397FFF" } } }, areaStyle: { normal: { color: { type: "linear", //设置线性渐变 x: 0, y: 0, x2: 0, y2: 1, colorStops: [{ offset: 0, color: "rgba(57,127,255,.1)" // 0% 处的颜色 }, { offset: 1, color: "#fff" // 100% 处的颜色 }], globalCoord: false // 缺省为 false } } } }] }, myLine_option_three: { title: { text: "信号曲线", x: "0", y: "20", color: "#333" }, tooltip: { trigger: "axis" }, legend: { orient: "horizontal", x: "right", y: "top", data: ["门锁近期信号曲线"] }, dataZoom: [{ type: 'inside', //内置滑动,随鼠标滚轮展示 xAxisIndex: [0], start: 0, //初始化时,滑动条宽度开始标度 end: 100 //初始化时,滑动条宽度结束标度 }], grid: { top: "16%", left: "0%", right: "0%", bottom: "0%", containLabel: true }, xAxis: { name: "时间", type: "category", data: [] }, yAxis: {}, series: [{ name: "门锁信号", type: "line", smooth: true, data: [], itemStyle: { normal: { color: "#FFAE00", lineStyle: { color: "#397FFF" } } }, areaStyle: { normal: { color: { type: "linear", //设置线性渐变 x: 0, y: 0, x2: 0, y2: 1, colorStops: [{ offset: 0, color: "rgba(57,127,255,.1)" // 0% 处的颜色 }, { offset: 1, color: "#fff" // 100% 处的颜色 }], globalCoord: false // 缺省为 false } } } }] }, myLine_option: { title: { text: "电量曲线", x: "0", y: "20" }, tooltip: { trigger: "axis" }, legend: { orient: "horizontal", x: "right", y: "top", data: ["门锁近期电量曲线"] }, dataZoom: [{ type: 'inside', //内置滑动,随鼠标滚轮展示 xAxisIndex: [0], start: 0, //初始化时,滑动条宽度开始标度 end: 100 //初始化时,滑动条宽度结束标度 }], grid: { top: "16%", left: "0%", right: "0%", bottom: "0%", containLabel: true }, xAxis: { name: "时间", type: "category", data: [] }, yAxis: {}, series: [{ name: "门锁电量", type: "line", smooth: true, data: [], itemStyle: { normal: { color: "#FFAE00", lineStyle: { color: "#397FFF" } } }, areaStyle: { /*normal: { origin: 'start', color: 'rgba(57,127,255,.1)', opacity: 1 },*/ normal: { color: { type: "linear", //设置线性渐变 x: 0, y: 0, x2: 0, y2: 1, colorStops: [{ offset: 0, color: "rgba(57,127,255,.1)" // 0% 处的颜色 }, { offset: 1, color: "#fff" // 100% 处的颜色 }], globalCoord: false // 缺省为 false } } } }] }, pickerOptions: { shortcuts: [{ text: '今天', onClick: function onClick(picker) { var end = new Date(); picker.$emit('pick', [moment_default()().startOf('day').format("YYYY-MM-DD 00:00:00"), end]); } }, { text: '最近一周', onClick: function onClick(picker) { var end = new Date(); var start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); picker.$emit('pick', [start, end]); } }, { text: '本月', onClick: function onClick(picker) { var end = new Date(); picker.$emit('pick', [moment_default()().startOf('month').format("YYYY-MM-DD 00:00:00"), end]); } }, { text: '今年至今', onClick: function onClick(picker) { var end = new Date(); var start = new Date(new Date().getFullYear(), 0); picker.$emit('pick', [start, end]); } }, { text: '最近六个月', onClick: function onClick(picker) { var end = new Date(); var start = new Date(); start.setMonth(start.getMonth() - 6); picker.$emit('pick', [start, end]); } }] }, dateTime: [moment_default()().startOf('month').format("YYYY-MM-DD 00:00:00"), moment_default()().format("YYYY-MM-DD HH:mm:ss")], dateTimeOne: [moment_default()().startOf('month').format("YYYY-MM-DD 00:00:00"), moment_default()().format("YYYY-MM-DD HH:mm:ss")], endDate: moment_default()().format("YYYY-MM-DD HH:mm:ss"), startDate: moment_default()().startOf('month').format("YYYY-MM-DD 00:00:00"), endDateOne: moment_default()().format("YYYY-MM-DD HH:mm:ss"), startDateOne: moment_default()().startOf('month').format("YYYY-MM-DD 00:00:00"), searchRoom: '', deviceImg: __webpack_require__("Dvxw"), selectoption: [], selectoptionValue: '', senddeviceNum: '', sendDevice: { deviceNum: '' }, sendroomId: '', commpontentStatus: true, Emergence: { EmerPhone: '', password: '', device: '', name: '' }, defaultProps: { children: "children", label: "name" }, options: [], drawer: false, value1: false, value2: 0, marks: { 0: "关", 50: "中", 100: "高" }, switchtext: "关", activeName: "0", formInline: {}, platlist: [{ label: "电信", value: 1 }, { label: "移动", value: 2 }, { label: "联通", value: 3 }], manufacturerList: [], setting: { edit: { enable: true, drag: { isMove: true }, showRemoveBtn: false, showRenameBtn: false }, check: { enable: false }, data: { simpleData: { enable: true, pIdKey: "pid" } }, view: { showIcon: true, addHoverDom: this.addHoverDom, removeHoverDom: this.removeHoverDom } }, zNodes: [], bromm: {}, query: { address: "", name: "", pageIndex: 1, pageSize: 20, options: [] }, search: { lastDays: "3", offlineDays: "3" }, tableData: [], multipleSelection: [], delList: [], editVisible: false, roomVisible: false, pageTotal: 0, sumpageTotal: 0, currentPage4: 1, form: { lockerId: '', manufacturer: "", platformId: '', imei: '', deviceNum: '', authKey: '', validateCode: '', lockerSuperAdminId: '', customerCode: '', type: '' }, manufacturer: '', idx: -1, id: -1, abnormal: 0, online: 0, treedata: [], unonline: 0, Unlocking: false, Unlockingrow: {}, lockingform: { password: "" }, activeiconfont: true, info: [], uploadkj: false, userlist1statu: true, userlist2: [], multipleSelection1: [], batchAccess: "", getEmergenceStatus: false, getEmergenceNum: '', checkNodeId: '', pageSize: 10, pageNum: 1, sendStatus: true, userInfo: { type: '' }, checkNodeId1: '', accessPlatform: {} }; }, components: { zTree: zTree1["a" /* default */], deviceLi: deviceLi["a" /* default */], UnlockRecord: UnlockRecord["a" /* default */], warningLog: warningLog["a" /* default */], DeviceFeedbackLog: DeviceFeedbackLog["a" /* default */], voucherCom: voucherCom["a" /* default */] }, beforeCreate: function beforeCreate() { // var tenantId = JSON.parse(localStorage.getItem('tenantId')) // if (tenantId == 400) { // this.$store.commit('defaultsettenantid') // } }, created: function created() { this.manufacturerList = this.$MANUFACTURER.MANUFACTURER.lock; this.accessPlatform = this.$MANUFACTURER.accessPlatform; this.userInfo = JSON.parse(localStorage.getItem('info')); }, mounted: function mounted() { this.getdevice(); this.getalllist(); this.$store.commit("increment", 1); this.getcard(); this.getallTree(); document.addEventListener('keydown', this.keyDown); }, methods: { // 电量图表初始化 initChart: function initChart() { var myLine = this.$echarts.init(document.getElementById("myLine")); myLine.setOption(this.myLine_option); }, initChartOne: function initChartOne() { var myLine = this.$echarts.init(document.getElementById("myLineOne")); myLine.setOption(this.myLine_option_one); }, initChartThree: function initChartThree() { var myLine = this.$echarts.init(document.getElementById("myLineThree")); myLine.setOption(this.myLine_option_three); }, getElectricity: function getElectricity(e) { this.endDate = moment_default()(this.dateTime[1]).format("YYYY-MM-DD HH:mm:ss"); this.startDate = moment_default()(this.dateTime[0]).format("YYYY-MM-DD HH:mm:ss"); this.quantityFun(); }, getSignal: function getSignal(e) { this.endDateOne = moment_default()(this.dateTimeOne[1]).format("YYYY-MM-DD HH:mm:ss"); this.startDateOne = moment_default()(this.dateTimeOne[0]).format("YYYY-MM-DD HH:mm:ss"); this.quantityFunOne(); }, // 电量图表显示 quantityFun: function quantityFun() { var _this2 = this; var endDate = this.endDate; var startDate = this.startDate; var data = { code: "logHeartbeat/batteryList", data: { pageNum: 1, pageSize: 100000, para: { deviceNum: this.senddeviceNum, startDate: startDate, endDate: endDate } } }; Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) { if (res.success) { var optiondata = [], seriesdata = []; res.data.list.map(function (li, index) { li.createAt = moment_default()(li.createAt).format("YYYY-MM-DD HH:mm:ss"); }); var array = _this2.factorial(res.data.list, 0); array.map(function (li) { optiondata.push(li.createAt); seriesdata.push(li.battery); }); _this2.myLine_option.xAxis.data = optiondata; _this2.myLine_option.series[0].data = seriesdata; _this2.$nextTick(function () { _this2.initChart(); }); } else { _this2.$message.error("数据错误"); } }); }, factorial: function factorial(time, index) { if (time.length - 1 > index) { var date = new Date(time[index + 1].createAt).getTime(); var date1 = new Date(time[index].createAt).getTime(); // console.log(parseInt(date),index,parseInt(date1),(parseInt(date)-parseInt(date1))) if (parseInt(date) - parseInt(date1) > 8640000) { return this.factorial(time, index + 1); } else { time.splice(index, 1); return this.factorial(time, index); } } else { return time; } }, // 信号图表显示 quantityFunOne: function quantityFunOne() { var _this3 = this; var endDate = this.endDateOne; var startDate = this.startDateOne; var data = { code: "logHeartbeat/rssiList", data: { pageNum: 1, pageSize: 100000, para: { deviceNum: this.senddeviceNum, startDate: startDate, endDate: endDate } } }; Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) { if (res.success) { var optiondata = [], seriesdata = []; res.data.list.map(function (li, index) { li.createAt = moment_default()(li.createAt).format("YYYY-MM-DD HH:mm:ss"); }); var array = _this3.factorial(res.data.list, 0); array.map(function (li) { optiondata.push(li.createAt); seriesdata.push(li.rssi); }); _this3.myLine_option_one.xAxis.data = optiondata; _this3.myLine_option_one.series[0].data = seriesdata; _this3.$nextTick(function () { _this3.initChartOne(); }); } else { _this3.$message.error("数据错误"); } }); }, getTimeDate: function getTimeDate(n) { var currentDate = new Date(); var preDate = new Date(currentDate.getTime() + n * 24 * 3600 * 1000); var year = currentDate.getFullYear(); var mon = currentDate.getMonth() + 1; var day = currentDate.getDay(); var s = year + '-' + (mon < 10 ? '0' + mon : mon) + '-' + (day < 10 ? '0' + day : day); return s; }, // 信号图表显示 quantityFunThree: function quantityFunThree() { var _this4 = this; var data = { code: "lockOnlineBattery/selectOnline", data: { deviceNum: this.senddeviceNum } }; Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) { if (res.success) { var optiondata = [], seriesdata = []; for (var i = 0; i < res.data.length; i++) { var date = _this4.getTimeDate(i); optiondata.push(date); seriesdata.push(res.data.online[i]); } _this4.myLine_option_one.xAxis.data = optiondata; _this4.myLine_option_one.series[0].data = seriesdata; _this4.$nextTick(function () { _this4.initChartThree(); }); } else { _this4.$message.error("数据错误"); } }); }, keyDown: function keyDown(e) { //如果是回车则执行登录方法 if (e.keyCode == 13) { if (this.$route.name == 'doorLock') { this.handleSearch(); } } }, // 解冻 thawMethods: function thawMethods(index, row) { var _this5 = this; this.$confirm("是否解冻该门锁?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(function () { allFun["a" /* default */].freeManageMethods(0, row, function (callback) { if (callback.code == 200) { _this5.$message.success("解冻指令下发成功"); } else { _this5.$message.error("解冻失败"); } }); }); }, // 冻结门锁 frozenMethods: function frozenMethods(index, row) { var _this6 = this; allFun["a" /* default */].freeManageMethods(1, row, function (callback) { if (callback.code == 200) { _this6.$message.success("冻结指令下发成功"); } else { _this6.$message.error("冻结失败"); } }); }, InputFun: function InputFun(e, name) { if (name == 'startBattery' || name == 'endBattery') { if (Number(e) < 0) { e = 0; } if (Number(e) > 100) { e = 100; } } this.search[name] = e; }, selectTenantId: function selectTenantId(e) { localStorage.setItem('tenantId', e); this.reload(); }, // 重置初始化 resetInitialization: function resetInitialization(row, callback) { var _this7 = this; if (row.manufactureId == 201) { var data3 = { code: "zg/deleteAllUsers", data: { lockerId: row.deviceNum, imei: row.imei, order: 6501 } }; Object(api["g" /* httpPost */])(data3, this.$api.sendCommand).then(function (res) { if (res.success) { _this7.$message.success("重置成功"); callback(true); } else { callback(false); } }); } else if (row.manufactureId == 101) { var data2 = { code: "isp/restoreSetting", data: { order: 6501, imei: row.imei, deviceNum: row.deviceNum, managerTelephone: "18270949468", managerPassword: "202108" } }; Object(api["g" /* httpPost */])(data2, this.$api.sendCommand).then(function (res2) { if (res2.success) { _this7.$message.success("重置成功"); var str = { deviceNum: row.deviceNum, imei: row.imei, order: 6101 }; Object(api["g" /* httpPost */])(str, _this7.$api.getDeviceRegisterManager).then(function (res1) { var str1 = { imei: row.imei, //row.imsi, deviceNum: row.deviceNum, //row.deviceNum, operateMode: 7, is: true, order: 6207, passwordStartTime: "20210813010101", passwordEndTime: "20680813010101" }; Object(api["g" /* httpPost */])(str1, _this7.$api.getDeviceOperateUserInfo).then(function (res2) {}); var str2 = { imei: row.imei, //row.imsi, deviceNum: row.deviceNum, //row.deviceNum, operateMode: 4, is: true, order: 6204, passwordStartTime: "20210813010101", passwordEndTime: "20680813010101" }; Object(api["g" /* httpPost */])(str2, _this7.$api.getDeviceOperateUserInfo).then(function (res3) { if (res3.success) { _this7.$message.success("初始化成功"); callback(true); } }); }); } else { _this7.$message.error(res2.msg); callback(false); } }); } }, getPersonCallback: function getPersonCallback(person, alllist, callback) { var personlist = []; person.map(function (li) { var obj = { person: li, data: alllist.filter(function (item) { if (item.deviceNum && item.cardId == li.card) { return item; } }) }; personlist.push(obj); }); callback(personlist); }, // 数据同步 dataSynchronization: function dataSynchronization(index, row) { var _this8 = this; console.log(row); this.$confirm("是否确认数据同步?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(function () { _this8.orderDeviceData(row); }); }, // 获取指定锁所有非703凭证数据 orderDeviceData: function orderDeviceData(row) { var _this9 = this; var _this = this; if (row.roomId) { var data1 = { pageNum: 0, pageSize: 0, q: { id: row.roomId } }; Object(api["d" /* httpGet */])(data1, this.$api.getSiteTenant).then(function (res) { if (res.success) { var person = res.data.list; var data = { imei: row.imei }; Object(api["d" /* httpGet */])(data, _this9.$api.orderDeviceData).then(function (res1) { if (res1.success) { var alllist = res1.data; _this9.getPersonCallback(person, alllist, function (callback) { var personlist = callback; _this.resetInitialization(row, function (callback) { if (row.manufactureId == 101) { personlist.map(function (lt) { var endTime = new Date(lt.person.endTime).getTime(); var startTime = new Date(lt.person.startTime).getTime(); var passwordEndTime = moment_default()(endTime).format("YYYYMMDDHHmmss"); var passwordStartTime = moment_default()(startTime).format("YYYYMMDDHHmmss"); var userTelephone = JSON.parse(lt.person.info).userTelephone; var userPassword = JSON.parse(lt.person.info).userPassword; var data = { deviceNum: row.deviceNum, imei: row.imei, userTelephone: userTelephone, userPassword: userPassword, password: userPassword, operateMode: 26, order: 6226, passwordStartTime: passwordStartTime, passwordEndTime: passwordEndTime, cardName: lt.person.name, roomName: row.roomName }; equipment["a" /* default */].LDAddUser(data.deviceNum, data.imei, data.userTelephone, data.userPassword, data.password, passwordStartTime, passwordEndTime, data.operateMode, data.order, data.cardName, data.roomName, false, function (callback) { lt.data.map(function (ll) { util["a" /* default */].putCarfidAdd(row, ll); }); }); }); } else if (row.manufactureId == 201) { personlist.map(function (lt) { var endTime = new Date(lt.person.endTime).getTime(); var startTime = new Date(lt.person.startTime).getTime(); var passwordEndTime = moment_default()(endTime).format("YYYYMMDDHHmmss"); var passwordStartTime = moment_default()(startTime).format("YYYYMMDDHHmmss"); var userTelephone = JSON.parse(lt.person.info).userTelephone; var userPassword = JSON.parse(lt.person.info).userPassword; var data = { lockerId: row.deviceNum, imei: row.imei, lockerUserId: userPassword, keyId: userPassword, role: 0, action: 1, order: 6226, cardName: lt.person.name, roomName: row.roomName }; equipment["a" /* default */].addUserToLock(data.lockerId, data.imei, data.lockerUserId, data.role, data.action, data.order, data.cardName, data.roomName, function (callback) { if (callback.success) { lt.data.map(function (ll) { util["a" /* default */].putCarfidzgAdd(row, ll); }); } }); }); } }); }); } else { _this9.$message.error(res1.msg); } }); } else { _this9.$message.error(res.msg); } }); } else { this.$message.error("暂无数据"); } }, // 从paas同步能对应得上的有效凭证 syncCommands: function syncCommands() { Object(api["d" /* httpGet */])('', this.$api.syncCommands).then(function (res) {}); }, // 同步刷新 refreshFun: function refreshFun() { Object(api["d" /* httpGet */])("", this.$api.lockDeviceInfoList).then(function (res) {}); }, // 选择房源 checkNode: function checkNode(e) { this.checkNodeId = e; var options = this.options; var arr = this.getId(options, e[e.length - 1]); console.log(arr); var listarr = [arr[0]]; var obj = this.getNodeId(listarr); this.checkNodeId = obj; }, checkNodeOne: function checkNodeOne(e) { this.checkNodeId1 = e[e.length - 1]; this.checkRoomDevice(e[e.length - 1]); }, checkRoomDevice: function checkRoomDevice(id) { var _this10 = this; var q = { roomIds: [id], lockType: 1 }; var data = { q: stringify_default()(q), pageNum: 1, pageSize: this.pageSize }; Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) { if (res.data.list.length > 0) { _this10.$message.error("该房间已绑定锁,请重新选择"); _this10.checkNodeId1 = ''; } }); }, getParentId: function getParentId(list, id) { for (var i in list) { if (list[i].id == id) { return [list[i]]; } if (list[i].children) { var node = this.getParentId(list[i].children, id); if (node !== undefined) { return node.concat(list[i]); } } } }, getId: function getId(list, id) { for (var i in list) { if (list[i].id == id) { return [list[i]]; } if (list[i].children) { var node = this.getParentId(list[i].children, id); if (node !== undefined) { return node; } } } }, getNodeId: function getNodeId(list) { var newNodeId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; for (var i in list) { newNodeId.push(list[i].id); if (list[i].children) { this.getNodeId(list[i].children, newNodeId); } } return newNodeId; }, getallTree: function getallTree() { var _this11 = this; var data = {}; Object(api["d" /* httpGet */])(data, this.$api.getTree).then(function (res) { var userlist = []; var temp = {}, arr = []; res.data.forEach(function (item, index) { if (!temp[item.id]) { arr.push(item); temp[item.id] = true; } }); arr.map(function (li) { if (li.expand) { if (JSON.parse(li.expand).type == "0") { userlist.push(li); } } }); var list = res.data.sort(function (pre, cur) { return pre.id - cur.id; }); var arrdata = Object(utils["o" /* uniqueArray1 */])(list, "id"); _this11.options = Object(utils["p" /* ztreeToElementTree */])(arrdata, {}); }); }, // 获取门卡概况 getcard: function getcard() { var _this12 = this; allFun["a" /* default */].getAnalysis("", 1, function (callback) { _this12.sumpageTotal = callback.total; _this12.online = callback.onlineTotal; _this12.unonline = callback.offlineTotal; _this12.abnormal = callback.abnormalTotal; }); }, // 发送离线密码 sendEmergence: function sendEmergence() { var _this13 = this; var re = /^1\d{10}$/; if (re.test(this.Emergence.EmerPhone)) { var data = { code: this.Emergence.password, phone: this.Emergence.EmerPhone, device: this.Emergence.device, name: this.Emergence.name }; Object(api["g" /* httpPost */])(data, this.$api.sendEmergence).then(function (res) { if (res.success) { _this13.$message.success('发送成功'); } else { _this13.$message.error('发送失败'); } }); this.getEmergenceStatus = false; } else { this.$message.error('请填写正确手机号'); } }, handleCheckChange: function handleCheckChange(data, checked, node) { if (checked) { this.treedata = data; } else { if (this.checkedId == data.id) { this.$refs.tree.setCheckedKeys([data.id]); } } }, // 临时密码 getEmergence: function getEmergence(index, row) { var _this14 = this; var data = { code: "zg/getEmergence", data: { lockerId: row.deviceNum } }; Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) { if (res.success) { _this14.$message.success("获取成功"); _this14.Emergence.password = res.data.data; _this14.Emergence.device = row.deviceNum; _this14.Emergence.name = row.roomName; _this14.getEmergenceStatus = true; } else { _this14.$message.error("获取失败"); } }); }, // input视图刷新 changesr: function changesr(e) { this.$forceUpdate(); }, handleSelectionChange1: function handleSelectionChange1(val) { this.multipleSelection1 = val; }, BatchAdd: function BatchAdd() { this.uploadkj = true; }, //批量添加确认 batchUploadfun: function batchUploadfun() { var _this15 = this; if (this.batchAccess == "") { this.$message.error("请选择运营商"); } else if (this.multipleSelection1.length == 0) { this.$message.error("请勾选要批量添加的设备"); } else { this.multipleSelection1.map(function (li, index) { var str = { deviceNum: li.deviceNum, imei: li.imei, imsi: li.imei, //row.imsi, order: 5101, platformId: _this15.batchAccess, enterpriseId: _this15.userInfo.enterpriseId, manufactureId: _this15.manufacturer }; allFun["a" /* default */].RegisterDevice(str, function (callback) { if (callback.success) { _this15.$message.success("添加成功"); _this15.editVisible = false; _this15.getdevice(); } else { _this15.$message.error(callback.message); } }); }); } }, //音量设置 stepFun: function stepFun(val) { var _this16 = this; var operate = "00"; if (val == 0) { operate = "00"; } else if (val == 50) { operate = "01"; } else if (val == 100) { operate = "02"; } var data = { code: "isp/volumnSetting", data: { imei: this.formInline.imei, operate: operate } }; Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res2) { if (res2.data.success) { _this16.$message.success("设置成功"); } else { _this16.$message.error(res.msg); } }); }, // 常开设置 switchFun: function switchFun(e) { var _this17 = this; var data = {}; if (e) { this.switchtext = "开"; data = { code: "isp/alwaysOpenSetting", data: { imei: this.formInline.imei, operate: 1 } }; } else { this.switchtext = "关"; data = { code: "isp/alwaysOpenSetting", data: { imei: this.formInline.imei, operate: 0 } }; } Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res2) { if (res2.data.success) { _this17.$message.success("设置成功"); } else { _this17.$message.error(res.msg); } }); }, // 关闭侧边栏 handleClose: function handleClose() { this.drawer = false; }, // tabs标签页切换 handleClick: function handleClick(tab, event) { this.commpontentStatus = true; }, //查看门锁详情 detailsFun: function detailsFun(index, row) { this.drawer = true; this.formInline = row; this.sendStatus = false; this.$nextTick(function () { this.sendroomId = row.deviceNum; this.senddeviceNum = row.deviceNum; this.sendDevice = row; this.sendStatus = true; this.quantityFun(); this.quantityFunOne(); // this.quantityFunThree() }); }, Reset1: function Reset1(index, row) { var data2 = { code: "isp/restoreSetting", data: { order: 6501, imei: row.imei, deviceNum: row.deviceNum, managerTelephone: "18270949468", managerPassword: "202108" } }; Object(api["g" /* httpPost */])(data2, this.$api.sendCommand).then(function (res2) { // if (res2.data.success) { // this.$message.success("重置成功"); // } else { // this.$message.error(res.msg); // } }); }, // 重置门锁 Reset: function Reset(index, row) { var _this18 = this; this.$confirm("是否确认重置门锁?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then(function () { if (row.manufactureId == 201) { var data3 = { code: "zg/deleteAllUsers", data: { lockerId: row.deviceNum, imei: row.imei, order: 6501, cardName: _this18.userInfo.username, roomName: row.roomName } }; Object(api["g" /* httpPost */])(data3, _this18.$api.sendCommand).then(function (res) { if (res.success) { _this18.$message.success("重置成功"); var q = { id: row.roomId }; var tenant = { q: stringify_default()(q) }; Object(api["d" /* httpGet */])(tenant, _this18.$api.getSiteTenant).then(function (res) { promise_default.a.all(res.data.list.map(function (element) { return new promise_default.a(function (resolve, reject) { resolve(element.card); }); })).then(function (allId) { allId.map(function (li) { var str = [{ siteId: row.roomId, cardId: li }]; Object(api["g" /* httpPost */])(str, _this18.$api.unbindCard).then(function (res) {}); }); }); }); } else { _this18.$message.success(res.msg); } }); } else if (row.manufactureId == 101) { var data2 = { code: "isp/restoreSetting", data: { order: 6501, imei: row.imei, deviceNum: row.deviceNum, managerTelephone: "18270949468", managerPassword: "202108", cardName: _this18.userInfo.username, roomName: row.roomName } }; Object(api["g" /* httpPost */])(data2, _this18.$api.sendCommand).then(function (res2) { if (res2.success) { _this18.$message.success("重置成功"); var q = { id: row.roomId }; var tenant = { q: stringify_default()(q) }; Object(api["d" /* httpGet */])(tenant, _this18.$api.getSiteTenant).then(function (res) { promise_default.a.all(res.data.list.map(function (element) { return new promise_default.a(function (resolve, reject) { resolve(element.card); }); })).then(function (allId) { allId.map(function (li) { var str = [{ siteId: row.roomId, cardId: li }]; Object(api["g" /* httpPost */])(str, _this18.$api.unbindCard).then(function (res) {}); }); }); }); } else { _this18.$message.error(res2.msg); } }); } }); }, activeiconfun: function activeiconfun(t) { this.activeiconfont = t; }, // 查询设备电量和信号 getresult: function getresult() { var data = {}; }, // 输入远程开锁密码确认 Unlockingsave: function Unlockingsave() {}, // 远程开锁 RemoteUnlocking: function RemoteUnlocking(index, row) { var _this19 = this; var str2 = { imei: row.imei, roomId: row.roomId, openLockType: 2, is: true }; Object(api["g" /* httpPost */])(str2, this.$api.openLock).then(function (res3) { if (res3.success) { _this19.$message.success("开锁成功!"); _this19.Unlocking = false; } else { _this19.$message.error("开锁失败!"); } }); }, // 批量初始化 batchInit: function batchInit() { var _this20 = this; if (this.multipleSelection.length == 0) { this.$message.error("请选择初始化设备"); return; } this.$confirm("确定要批量初始化吗?", "提示", { type: "warning" }).then(function () { _this20.multipleSelection.map(function (row) { if (row.manufactureId == 101) { var str = { deviceNum: row.deviceNum, imei: row.imei, order: 6101 }; Object(api["g" /* httpPost */])(str, _this20.$api.getDeviceRegisterManager).then(function (res1) { if (res1.data.success) { var str1 = { imei: row.imei, //row.imsi, deviceNum: row.deviceNum, //row.deviceNum, operateMode: 7, is: true, order: 6207, pass: false, passwordStartTime: "20210813010101", passwordEndTime: "20680813010101" }; Object(api["g" /* httpPost */])(str1, _this20.$api.getDeviceOperateUserInfo).then(function (res2) {}); var str2 = { imei: row.imei, //row.imsi, deviceNum: row.deviceNum, //row.deviceNum, operateMode: 4, is: true, order: 6204, pass: false, passwordStartTime: "20210813010101", passwordEndTime: "20680813010101" }; Object(api["g" /* httpPost */])(str2, _this20.$api.getDeviceOperateUserInfo).then(function (res3) { if (res3.success) { _this20.$message.success("初始化成功"); } }); } else { _this20.$message.error(res1.data.msg); } }); } }); }); }, // 重置添加管理员 AddAdministrator: function AddAdministrator(index, row) { var _this21 = this; this.$confirm("确定要初始化吗?", "提示", { type: "warning" }).then(function () { var str = { deviceNum: row.deviceNum, imei: row.imei, order: 6101 }; Object(api["g" /* httpPost */])(str, _this21.$api.getDeviceRegisterManager).then(function (res1) { if (res1.data.success) { var str1 = { imei: row.imei, //row.imsi, deviceNum: row.deviceNum, //row.deviceNum, operateMode: 7, is: true, order: 6207, pass: false, passwordStartTime: "20210813010101", passwordEndTime: "20680813010101" }; Object(api["g" /* httpPost */])(str1, _this21.$api.getDeviceOperateUserInfo).then(function (res2) {}); var str2 = { imei: row.imei, //row.imsi, deviceNum: row.deviceNum, //row.deviceNum, operateMode: 4, is: true, order: 6204, pass: false, passwordStartTime: "20210813010101", passwordEndTime: "20680813010101" }; Object(api["g" /* httpPost */])(str2, _this21.$api.getDeviceOperateUserInfo).then(function (res3) { if (res3.success) { _this21.$message.success("初始化成功"); } }); } else { _this21.$message.error(res1.data.msg); } }); }); }, // 添加设备 initialization: function initialization() { var _this22 = this; if (this.checkNodeId1 == '') { this.$message.error("请选择房间"); } else { if (this.form.manufacturer == 101) { if (this.form.deviceNum == "" || this.form.v == "" || this.form.platformId == "") { this.$message.error("请填写完整信息"); } else { var data = {}; var data = { deviceNum: this.form.deviceNum, imei: this.form.imei, imsi: this.form.imei, //row.imsi, order: 5101, enterpriseId: this.userInfo.enterpriseId, platformId: this.form.platformId, manufactureId: this.form.manufacturer }; allFun["a" /* default */].RegisterDevice(data, function (callback) { if (callback.data.success && callback.success) { var data = [{ siteId: _this22.checkNodeId1, deviceId: callback.data.id }]; Object(api["g" /* httpPost */])(data, _this22.$api.bindDeviceSite).then(function (res) { if (res.success) { _this22.$message.success("绑定成功"); _this22.editVisible = false; _this22.getdevice(); } }).catch(function (error) { _this22.$message.error("\u7ED1\u5B9A\u5931\u8D25"); }); _this22.$message.success(res.data.msg); _this22.editVisible = false; _this22.getdevice(); } else { _this22.$message.error(callback.data.msg); } }); } } else if (this.form.manufacturer == 201) { var data = { lockerId: this.form.lockerId, imei: this.form.imei, customerCode: this.form.customerCode, lockerSuperAdminId: this.form.lockerSuperAdminId, authKey: this.form.authKey, type: this.form.type, manufactureId: this.form.manufacturer, enterpriseId: this.userInfo.enterpriseId, order: 5101 }; allFun["a" /* default */].RegisterDevice(data, function (callback) { if (callback.data.success && callback.success) { var data = [{ siteId: _this22.checkNodeId1, deviceId: callback.data.id }]; Object(api["g" /* httpPost */])(data, _this22.$api.bindDeviceSite).then(function (res) { if (res.success) { _this22.$message.success("绑定成功"); _this22.editVisible = falsethis.editVisible = false; _this22.getdevice(); } }).catch(function (error) { _this22.$message.error("\u7ED1\u5B9A\u5931\u8D25"); }); _this22.$message.success("添加成功"); _this22.editVisible = false; _this22.getdevice(); } else { _this22.$message.error(callback.data.msg); } }); } else if (this.form.manufacturer == 701) { var data = { deviceNum: this.form.deviceNum, validateCode: this.form.validateCode, manufactureId: this.form.manufacturer, enterpriseId: this.userInfo.enterpriseId }; allFun["a" /* default */].RegisterDevice(data, function (callback) { if (callback.data.success && callback.success) { var data = [{ siteId: _this22.checkNodeId1, deviceId: callback.data.id }]; Object(api["g" /* httpPost */])(data, _this22.$api.bindDeviceSite).then(function (res) { if (res.success) { _this22.$message.success("绑定成功"); _this22.editVisible = false; _this22.getdevice(); } }).catch(function (error) { _this22.$message.error("\u7ED1\u5B9A\u5931\u8D25"); }); _this22.$message.success("添加成功"); _this22.editVisible = false; _this22.getdevice(); } else { _this22.$message.error(callback.data.msg); } }); } } }, // 选择绑定房间 onClick: function onClick(evt, treeId, treeNode) { // 点击事件 this.treedata = treeNode; }, // 获取绑定所有房间 getalllist: function getalllist() { var _this23 = this; var data = {}; Object(api["d" /* httpGet */])(data, this.$api.getTree).then(function (res) { var array = Object(utils["n" /* uniqueArray */])(res.data, "id"); _this23.zNodes = Object(utils["p" /* ztreeToElementTree */])(array, {}); }); }, // 获取设备 getdevice: function getdevice() { var _this24 = this; var data = { code: "lockOnlineBattery/checkOffLine", data: { isAppBind: 1, lastDays: this.search.lastDays, offlineDays: this.search.offlineDays } }; Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) { if (res.code == 200) { res.data.deviceNum.map(function (li) { var accessPlatform = _this24.accessPlatform.show.filter(function (item) { return item.code == li.accessPlatform; })[0]; if (accessPlatform) { li['accessPlatformText'] = accessPlatform.desc; } else { li['accessPlatformText'] = ''; } li.createAt = moment_default()(li.createAt).format("YYYY-MM-DD HH:mm:ss"); if (li.lastReportAt) { li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss"); } else { li['lastReportAt'] = ''; } }); var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id"); _this24.pageTotal = res.data.length; _this24.tableData = newArr; } else { _this24.tableData = []; _this24.pageTotal = 0; } }); }, timestampToTime: function timestampToTime(cjsj) { var date = new Date(cjsj); //时间戳为10位需*1000,时间戳为13位的话不需乘1000 var Y = date.getFullYear() + "-"; var M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1) + "-"; var D = date.getDate() + " "; var h = date.getHours() + ":"; var m = date.getMinutes() + ":"; var s = date.getSeconds(); return Y + M + D + h + m + s; }, handleChange: function handleChange(value) { console.log(value); }, restSearch: function restSearch() { this.search = { lastDays: "", offlineDays: "" }; this.handleSearch(); }, // 触发搜索按钮 handleSearch: function handleSearch() { var _this25 = this; var data = { code: "lockOnlineBattery/checkOffLine", data: { isAppBind: 1, lastDays: this.search.lastDays, offlineDays: this.search.offlineDays } }; Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) { if (res.code == 200) { res.data.list.map(function (li) { var accessPlatform = _this25.accessPlatform.show.filter(function (item) { return item.code == li.accessPlatform; })[0]; if (accessPlatform) { li['accessPlatformText'] = accessPlatform.desc; } else { li['accessPlatformText'] = ''; } li.createAt = moment_default()(li.createAt).format("YYYY-MM-DD HH:mm:ss"); if (li.lastReportAt) { li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss"); } else { li['lastReportAt'] = ''; } }); var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id"); _this25.pageTotal = res.data.length; _this25.tableData = newArr; } else { _this25.tableData = []; _this25.pageTotal = 0; } }); }, // 删除操作 handleDelete: function handleDelete(index) { var _this26 = this; // 二次确认删除 this.$confirm("确定要删除吗?", "提示", { type: "warning" }).then(function () { _this26.$message.success("删除成功"); _this26.tableData.splice(index, 1); }).catch(function () {}); }, // 多选操作 handleSelectionChange: function handleSelectionChange(val) { this.multipleSelection = val; }, delAllSelection: function delAllSelection() { var length = this.multipleSelection.length; var str = ""; this.delList = this.delList.concat(this.multipleSelection); for (var i = 0; i < length; i++) { str += this.multipleSelection[i].name + " "; } this.$message.error("\u5220\u9664\u4E86" + str); this.multipleSelection = []; }, // 删除设备 deleteLock: function deleteLock(index, row) { var _this27 = this; this.$confirm("确定要删除吗?", "提示", { type: "warning" }).then(function () { // if (row.manufactureId == 101) { if (row.roomId) { var q = { id: row.roomId }; var tenant = { q: stringify_default()(q) }; Object(api["d" /* httpGet */])(tenant, _this27.$api.getSiteTenant).then(function (res) { promise_default.a.all(res.data.list.map(function (element) { return new promise_default.a(function (resolve, reject) { resolve(element.card); }); })).then(function (allId) { var str = []; allId.map(function (li) { var obj = { siteId: row.roomId, cardId: li }; str.push(obj); }); if (str.length > 0) { Object(api["g" /* httpPost */])(str, _this27.$api.unbindCard).then(function (res) {}); } var data1 = [{ siteId: row.roomId, deviceId: row.id }]; Object(api["g" /* httpPost */])(data1, _this27.$api.unbindDeviceSite).then(function (res) { if (res.success) { _this27.$message.success("解绑成功"); var data = { deviceNum: row.deviceNum, imei: row.imei, order: 5102 }; allFun["a" /* default */].DeleteDevic(data, row.manufactureId, function (callback) { if (callback.success) { _this27.getdevice(); _this27.$message.success('删除成功'); } else { _this27.getdevice(); _this27.$message.error(callback.msg); } }); } else { _this27.getdevice(); _this27.$message.error("\u89E3\u7ED1\u5931\u8D25"); } }); }); }); } else { var data = { deviceNum: row.deviceNum, imei: row.imei, order: 5102 }; allFun["a" /* default */].DeleteDevic(data, row.manufactureId, function (callback) { if (callback.success) { _this27.$message.success("删除成功"); _this27.getdevice(); } else { _this27.getdevice(); _this27.$message.error(callback.msg); } }); } }).catch(function (err) { _this27.getdevice(); _this27.$message.error(err.msg); }); }, // 绑定房间 bindRoom: function bindRoom(index, row) { this.bromm = row; this.roomVisible = true; this.$refs.tree.setCheckedKeys([]); }, // 确定绑定 bindsave: function bindsave() { var _this28 = this; var treedata = this.treedata; this.roomVisible = false; var data = [{ siteId: treedata.id, deviceId: this.bromm.id }]; Object(api["g" /* httpPost */])(data, this.$api.bindDeviceSite).then(function (res) { if (res.success) { _this28.$message.success("绑定成功"); _this28.getdevice(); } }).catch(function (error) { _this28.$message.error("\u7ED1\u5B9A\u5931\u8D25"); }); }, unbindsave: function unbindsave(index, row) { var _this29 = this; var data = [{ siteId: row.roomId, deviceId: row.id }]; var q = { id: row.roomId }; var tenant = { q: stringify_default()(q) }; // 二次确认解绑 this.$confirm("确定要解绑吗?", "提示", { type: "warning" }).then(function () { // this.Reset(index, row) Object(api["d" /* httpGet */])(tenant, _this29.$api.getSiteTenant).then(function (res) { promise_default.a.all(res.data.list.map(function (element) { return new promise_default.a(function (resolve, reject) { resolve(element.card); }); })).then(function (allId) { allId.map(function (li) { var str = [{ siteId: row.roomId, cardId: li }]; Object(api["g" /* httpPost */])(str, _this29.$api.unbindCard).then(function (res) {}); }); Object(api["g" /* httpPost */])(data, _this29.$api.unbindDeviceSite).then(function (res) { if (res.success) { _this29.$message.success("解绑成功"); _this29.getdevice(); } else { _this29.$message.error("\u89E3\u7ED1\u5931\u8D25"); } }); }); }); }).catch(function () {}); }, addequipment: function addequipment() { this.form.customerCode = this.$store.state.customerCode; this.editVisible = true; }, // 编辑操作 handleEdit: function handleEdit(index, row) { this.idx = index; this.form = row; this.editVisible = true; }, // 保存编辑 saveEdit: function saveEdit() { this.editVisible = false; }, handleSizeChange: function handleSizeChange(val) { console.log("\u6BCF\u9875 " + val + " \u6761"); this.$router.replace({ path: this.$route.path, query: { page: this.$route.query.page ? this.$route.query.page : 1, pageSize: val } }); this.pageSize = val; this.getlistNum(0, val); }, getlistNum: function getlistNum(val, size) { var _this30 = this; var deviceNum = this.search.deviceNum.replace(/\s*/g, ""); var imei = this.search.imei.replace(/\s*/g, ""); var q = { deviceNum: deviceNum, imei: imei, isOnline: this.search.isOnline, roomName: this.search.roomname, roomIds: this.checkNodeId, startBattery: this.search.startBattery, endBattery: this.search.endBattery, lockType: 1, unBind: this.search.unBind, firmwareVersion: this.search.firmwareVersion, isUsed: this.search.isUsed, iccid: this.search.iccid, rssiStart: this.search.rssiStart, rssiEnd: this.search.rssiEnd, createStart: this.search.createStart, createEnd: this.search.createEnd }; var qObject = util["a" /* default */].validObject(q); var data = { q: stringify_default()(qObject), pageNum: val, pageSize: size }; Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) { res.data.list.map(function (li) { var accessPlatform = _this30.accessPlatform.show.filter(function (item) { return item.code == li.accessPlatform; })[0]; if (accessPlatform) { li['accessPlatformText'] = accessPlatform.desc; } else { li['accessPlatformText'] = ''; } li.createAt = moment_default()(li.createAt).format("YYYY-MM-DD HH:mm:ss"); if (li.lastReportAt) { li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss"); } else { li['lastReportAt'] = ''; } }); var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id"); _this30.tableData = newArr; _this30.pageTotal = res.data.total; }); }, // 分页导航 handlePageChange: function handlePageChange(val) { var _this31 = this; // this.$router.replace({ // path: this.$route.path, // query: { // page: this.$route.query.page ? this.$route.query.page : 1, // pageSize: val, // }, // }); this.pageNum = val; this.$store.commit("increment", val); var q = { deviceNum: this.search.deviceNum, imei: this.search.imei, isOnline: this.search.isOnline, roomName: this.search.roomname, roomIds: this.checkNodeId, startBattery: this.search.startBattery, endBattery: this.search.endBattery, lockType: 1, unBind: this.search.unBind, firmwareVersion: this.search.firmwareVersion, isUsed: this.search.isUsed, iccid: this.search.iccid, rssiStart: this.search.rssiStart, rssiEnd: this.search.rssiEnd, createStart: this.search.createStart, createEnd: this.search.createEnd }; var qObject = util["a" /* default */].validObject(q); var data = { q: stringify_default()(qObject), pageNum: val, pageSize: this.pageSize }; Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) { res.data.list.map(function (li) { var accessPlatform = _this31.accessPlatform.show.filter(function (item) { return item.code == li.accessPlatform; })[0]; if (accessPlatform) { li['accessPlatformText'] = accessPlatform.desc; } else { li['accessPlatformText'] = ''; } li.createAt = moment_default()(li.createAt).format("YYYY-MM-DD HH:mm:ss"); if (li.createAt) {} if (li.lastReportAt) { li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss"); } else { li['lastReportAt'] = ''; } }); var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id"); _this31.tableData = newArr; _this31.pageTotal = res.data.total; }); }, btnClick: function btnClick() { document.querySelector(".input-file").click(); }, exportBtn: function exportBtn() { this.exportExcel(); }, exportExcel: function exportExcel() { var sheet1data = [['设备号', 'mac地址', 'sn', 'imei', 'app绑定号', '生产写入号']]; var sheet1 = xlsx_default.a.utils.json_to_sheet(sheet1data, { skipHeader: true }); // 创建一个新的空的workbook var wb = xlsx_default.a.utils.book_new(); xlsx_default.a.utils.book_append_sheet(wb, sheet1, '设备导入模板'); // XLSX.utils.book_append_sheet(wb, sheet2, '行政部') // XLSX.utils.book_append_sheet(wb, sheet3, '前端部') var workbookBlob = this.workbook2blob(wb); this.openDownloadDialog(workbookBlob, '设备导入模板.xlsx'); }, // 下载模板 workbook2blob: function workbook2blob(workbook) { // 生成excel的配置项 var wopts = { // 要生成的文件类型 bookType: 'xlsx', // // 是否生成Shared String Table,官方解释是,如果开启生成速度会下降,但在低版本IOS设备上有更好的兼容性 bookSST: false, type: 'binary' }; var wbout = xlsx_default.a.write(workbook, wopts); // 将字符串转ArrayBuffer function s2ab(s) { var buf = new ArrayBuffer(s.length); var view = new Uint8Array(buf); for (var i = 0; i !== s.length; ++i) { view[i] = s.charCodeAt(i) & 0xff; }return buf; } var buf = s2ab(wbout); var blob = new Blob([buf], { type: 'application/octet-stream' }); return blob; }, // 将blob对象 创建bloburl,然后用a标签实现弹出下载框 openDownloadDialog: function openDownloadDialog(blob, fileName) { if ((typeof blob === "undefined" ? "undefined" : typeof_default()(blob)) === 'object' && blob instanceof Blob) { blob = URL.createObjectURL(blob); // 创建blob地址 } var aLink = document.createElement('a'); aLink.href = blob; // HTML5新增的属性,指定保存文件名,可以不要后缀,注意,有时候 file:///模式下不会生效 aLink.download = fileName || ''; var event; if (window.MouseEvent) event = new MouseEvent('click'); // 移动端 else { event = document.createEvent('MouseEvents'); event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); } aLink.dispatchEvent(event); }, 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 arr1 = []; outdata.map(function (li, index) { var str = {}; str.deviceNum = li["设备号"]; str.mac = li["mac地址"]; str.imei = li["imei"]; str.app = li["app绑定号"]; str.write = li["生产写入号"]; arr1.push(str); }); // this.tableData=arr that.userlist1statu = false; that.$nextTick(function () { that.userlist2 = arr1; that.userlist1statu = true; }); }; reader.readAsArrayBuffer(f); }; reader.readAsBinaryString(f); } } }); // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-a62d80e4","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/aNormEquip.vue var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{on:{"click":function($event){_vm.contentSearchShow=false}}},[_c('el-row',{staticClass:"elrow",attrs:{"gutter":20}},[_c('el-col',{attrs:{"span":24}},[_c('el-card',{attrs:{"shadow":"hover"}},[_c('el-row',[_c('el-col',{attrs:{"span":6}},[_c('div',{staticClass:"grid-content grid-con-2"},[_c('div',{staticClass:"colposition"},[_c('img',{staticClass:"w100",attrs:{"src":__webpack_require__("sNnU"),"alt":""}}),_vm._v(" "),_c('div',{staticClass:"grid-cont-right"},[_c('div',[_vm._v("异常状态")]),_vm._v(" "),_c('div',{staticClass:"grid-num"},[_vm._v(_vm._s(_vm.abnormal))])])])])])],1)],1)],1)],1),_vm._v(" "),_c('div',{staticClass:"container"},[_c('div',{staticClass:"handle-box"},[_c('selectoption'),_vm._v(" "),_c('el-cascader',{attrs:{"options":_vm.options,"size":"small","props":{ checkStrictly: true },"clearable":true},on:{"change":_vm.checkNode},model:{value:(_vm.searchRoom),callback:function ($$v) {_vm.searchRoom=$$v},expression:"searchRoom"}}),_vm._v(" "),_c('el-input',{staticClass:"handle-input mr10 width100",attrs:{"size":"small","placeholder":"最近多少天","clearable":true},on:{"input":function($event){return _vm.changesr($event)}},model:{value:(_vm.search.lastDays),callback:function ($$v) {_vm.$set(_vm.search, "lastDays", $$v)},expression:"search.lastDays"}}),_vm._v(" "),_c('el-input',{staticClass:"handle-input mr10 width100",attrs:{"size":"small","placeholder":"掉线多少天","clearable":true},on:{"input":function($event){return _vm.changesr($event)}},model:{value:(_vm.search.offlineDays),callback:function ($$v) {_vm.$set(_vm.search, "offlineDays", $$v)},expression:"search.offlineDays"}}),_vm._v(" "),_c('el-button',{staticClass:"mr10",attrs:{"type":"primary","size":"small","icon":"el-icon-search"},on:{"click":_vm.handleSearch}},[_vm._v("搜索")]),_vm._v(" "),_c('el-button',{staticClass:"mr10",attrs:{"type":"primary","size":"small"},on:{"click":_vm.restSearch}},[_vm._v("重置搜索")])],1),_vm._v(" "),_c('div',{staticClass:"switchiconfont"},[_c('i',{staticClass:"iconfont httpicon-liebiao1",class:_vm.activeiconfont ? 'active' : '',attrs:{"title":"切换方块展示"},on:{"click":function($event){return _vm.activeiconfun(true)}}}),_vm._v(" "),_c('i',{staticClass:"iconfont httpicon-liebiao",class:_vm.activeiconfont ? '' : 'active',attrs:{"title":"切换表格展示"},on:{"click":function($event){return _vm.activeiconfun(false)}}})]),_vm._v(" "),(_vm.activeiconfont)?_c('div',{staticClass:"roomcontent"},_vm._l((_vm.tableData),function(item,index){return _c('div',{key:index,staticClass:"roomconli"},[_c('deviceLi',{attrs:{"data":item,"src":_vm.deviceImg}}),_vm._v(" "),_c('div',{staticClass:"button-list"},[(item.roomId ? true : false)?_c('div',{on:{"click":function($event){return _vm.unbindsave(index, item)}}},[_vm._v("\n 解绑房间\n ")]):_c('div',{on:{"click":function($event){return _vm.bindRoom(index, item)}}},[_vm._v("绑定房间")]),_vm._v(" "),_c('div',{on:{"click":function($event){return _vm.detailsFun(index, item)}}},[_vm._v("门锁操作")]),_vm._v(" "),(item.manufactureId==101)?_c('div',{on:{"click":function($event){return _vm.AddAdministrator(index, item)}}},[_vm._v("初始化")]):_vm._e(),_vm._v(" "),(item.manufactureId==201 || item.manufactureId==221)?_c('div',{on:{"click":function($event){return _vm.getEmergence(index, item)}}},[_vm._v("临时密码")]):_vm._e(),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.userInfo.type == 0),expression:"userInfo.type == 0"}],on:{"click":function($event){return _vm.deleteLock(index, item)}}},[_vm._v("删除")]),_vm._v(" "),(item.manufactureId==101)?_c('div',{on:{"click":function($event){return _vm.RemoteUnlocking(index, item)}}},[_vm._v("远程开锁")]):_vm._e(),_vm._v(" "),_c('div',{on:{"click":function($event){return _vm.Reset(index, item)}}},[_vm._v("重置门锁")])])],1)}),0):_c('el-table',{ref:"multipleTable",staticClass:"table",attrs:{"data":_vm.tableData,"border":"","stripe":"","header-cell-class-name":"table-header","empty-text":"无","height":"450"},on:{"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"type":"selection","width":"55"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"deviceNum","label":"设备号","width":"200"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"accessPlatformText","label":"锁平台"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"imei","label":"IMEI","width":"150"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.imei)?_c('span',{},[_vm._v(_vm._s(scope.row.imei))]):_c('span',{},[_vm._v("空")])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"imsi","label":"IMSI","width":"150"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.imsi)?_c('span',{},[_vm._v(_vm._s(scope.row.imsi))]):_c('span',{},[_vm._v("空")])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"iccid","label":"ICCID","width":"180"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.iccid)?_c('span',{},[_vm._v(_vm._s(scope.row.iccid))]):_c('span',{},[_vm._v("空")])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"","label":"信号强度","width":"150"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.rssi <= 10)?_c('i',{staticClass:"iconfont httpicon-xinhao38 red"}):(10 < scope.row.rssi && scope.row.rssi < 20)?_c('i',{staticClass:"iconfont httpicon-xinhao38 orange"}):(20 <= scope.row.rssi && scope.row.rssi <= 100)?_c('i',{staticClass:"iconfont httpicon-xinhao38 green"}):_c('i',{staticClass:"iconfont httpicon-wuxinhao red"}),_c('span',{staticClass:"spanli dling"},[_vm._v("\n "+_vm._s(scope.row.rssi || 0))])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"电量"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.battery <= 20)?_c('i',{staticClass:"iconfont httpicon-dianchi-didianliang red"}):(20 < scope.row.battery && scope.row.battery < 60)?_c('i',{staticClass:"iconfont httpicon-icon-test orange"}):(60 <= scope.row.battery && scope.row.battery <= 100)?_c('i',{staticClass:"iconfont httpicon-icon-test green"}):_c('i',{staticClass:"iconfont httpicon-icon-test red"}),_c('span',{staticClass:"spanli dling"},[_vm._v(" "+_vm._s(scope.row.battery || 0)+"%")])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"在线状态","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-tag',{attrs:{"type":scope.row.isOnline == '1' ? 'success' : scope.row.isOnline == '0' ? 'danger' : ''}},[(scope.row.isOnline == 1)?_c('span',[_vm._v("在线")]):_c('span',[_vm._v("离线")])])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"绑定房间","width":"200"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.roomName)?_c('span',{staticClass:"blue"},[_vm._v(_vm._s(scope.row.roomName))]):_c('span',{},[_vm._v("空")])]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"firmwareVersion","label":"版本","width":"160"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"createAt","label":"上线时间","width":"160"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"操作","width":"500","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [(scope.row.roomId)?_c('el-button',{staticClass:"red",attrs:{"type":"text"},on:{"click":function($event){return _vm.unbindsave(scope.$index, scope.row)}}},[_vm._v("解绑房间\n ")]):_c('el-button',{attrs:{"type":"text"},on:{"click":function($event){return _vm.bindRoom(scope.$index, scope.row)}}},[_vm._v("绑定房间")]),_vm._v(" "),_c('el-button',{attrs:{"type":"text"},on:{"click":function($event){return _vm.detailsFun(scope.$index, scope.row)}}},[_vm._v("门锁操作")]),_vm._v(" "),(scope.row.manufactureId==101 && _vm.userInfo.type == 0)?_c('el-button',{attrs:{"type":"text"},on:{"click":function($event){return _vm.AddAdministrator(scope.$index, scope.row)}}},[_vm._v("初始化\n ")]):_vm._e(),_vm._v(" "),_c('el-button',{directives:[{name:"show",rawName:"v-show",value:(_vm.userInfo.type == 0),expression:"userInfo.type == 0"}],staticClass:"red",attrs:{"type":"text"},on:{"click":function($event){return _vm.deleteLock(scope.$index, scope.row)}}},[_vm._v("\n 删除")]),_vm._v(" "),_c('el-button',{staticClass:"red",attrs:{"type":"text"},on:{"click":function($event){return _vm.getEmergence(scope.$index, scope.row)}}},[_vm._v("临时密码\n ")]),_vm._v(" "),(scope.row.manufactureId==101)?_c('el-button',{attrs:{"type":"text"},on:{"click":function($event){return _vm.RemoteUnlocking(scope.$index, scope.row)}}},[_vm._v("远程开锁 ")]):_vm._e(),_vm._v(" "),_c('el-button',{attrs:{"type":"text"},on:{"click":function($event){return _vm.Reset(scope.$index, scope.row)}}},[_vm._v("重置门锁")])]}}])})],1),_vm._v(" "),_c('div',{staticClass:"pagination"},[_c('el-pagination',{attrs:{"current-page":_vm.$store.state.currentPage,"page-sizes":[10,20,100],"page-size":_vm.pageSize,"layout":"total, sizes, prev, pager, next, jumper","total":_vm.pageTotal},on:{"size-change":_vm.handleSizeChange,"current-change":_vm.handlePageChange}})],1)],1),_vm._v(" "),_c('el-dialog',{attrs:{"title":"绑定房间","visible":_vm.roomVisible,"width":"30%"},on:{"update:visible":function($event){_vm.roomVisible=$event}},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('span',{staticClass:"dialog-footer"},[_c('el-button',{on:{"click":function($event){_vm.roomVisible = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.bindsave}},[_vm._v("确 定")])],1)]},proxy:true}])},[_c('div',{staticClass:"ztree"},[_c('el-tree',{ref:"tree",attrs:{"data":_vm.zNodes,"show-checkbox":"","node-key":"id","props":_vm.defaultProps},on:{"check-change":_vm.handleCheckChange}})],1)]),_vm._v(" "),_c('el-dialog',{attrs:{"title":"远程开锁密码","visible":_vm.Unlocking,"width":"30%"},on:{"update:visible":function($event){_vm.Unlocking=$event}},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('span',{staticClass:"dialog-footer"},[_c('el-button',{attrs:{"size":"middle"},on:{"click":function($event){_vm.Unlocking = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"middle"},on:{"click":_vm.Unlockingsave}},[_vm._v("确 定")])],1)]},proxy:true}])},[_c('div',[_c('el-form',{ref:"locking",attrs:{"model":_vm.lockingform,"label-width":"100px"}},[_c('el-form-item',{attrs:{"label":"管理员密码"}},[_c('el-input',{attrs:{"show-password":"","clearable":true},model:{value:(_vm.lockingform.password),callback:function ($$v) {_vm.$set(_vm.lockingform, "password", $$v)},expression:"lockingform.password"}})],1)],1)],1)]),_vm._v(" "),_c('el-dialog',{attrs:{"title":"编辑","visible":_vm.editVisible,"width":"30%"},on:{"update:visible":function($event){_vm.editVisible=$event}},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('span',{staticClass:"dialog-footer"},[_c('el-button',{attrs:{"size":"small"},on:{"click":function($event){_vm.editVisible = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":_vm.initialization}},[_vm._v("确 定")])],1)]},proxy:true}])},[_c('el-form',{ref:"form",attrs:{"model":_vm.form,"label-width":"100px"}},[_c('el-form-item',{attrs:{"label":"型号"}},[_c('el-select',{attrs:{"size":"middle","placeholder":"请选择"},model:{value:(_vm.form.manufacturer),callback:function ($$v) {_vm.$set(_vm.form, "manufacturer", $$v)},expression:"form.manufacturer"}},_vm._l((_vm.manufacturerList),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.label,"value":item.value}})}),1)],1),_vm._v(" "),(_vm.form.manufacturer == 101)?_c('div',[_c('el-form-item',{attrs:{"label":"设备号"}},[_c('el-input',{attrs:{"size":"middle","clearable":true},model:{value:(_vm.form.deviceNum),callback:function ($$v) {_vm.$set(_vm.form, "deviceNum", $$v)},expression:"form.deviceNum"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"IMEI"}},[_c('el-input',{attrs:{"size":"middle","clearable":true},model:{value:(_vm.form.imei),callback:function ($$v) {_vm.$set(_vm.form, "imei", $$v)},expression:"form.imei"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"运营商"}},[_c('el-select',{attrs:{"size":"middle","placeholder":"请选择"},model:{value:(_vm.form.platformId),callback:function ($$v) {_vm.$set(_vm.form, "platformId", $$v)},expression:"form.platformId"}},_vm._l((_vm.accessPlatform.select),function(item){return _c('el-option',{key:item.code,attrs:{"label":item.desc,"value":item.code}})}),1)],1)],1):(_vm.form.manufacturer == 201)?_c('div',[_c('el-form-item',{attrs:{"label":"设备号"}},[_c('el-input',{attrs:{"size":"middle","clearable":true},model:{value:(_vm.form.lockerId),callback:function ($$v) {_vm.$set(_vm.form, "lockerId", $$v)},expression:"form.lockerId"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"IMEI"}},[_c('el-input',{attrs:{"size":"middle","clearable":true},model:{value:(_vm.form.imei),callback:function ($$v) {_vm.$set(_vm.form, "imei", $$v)},expression:"form.imei"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"超管名称"}},[_c('el-input',{attrs:{"size":"middle","clearable":true},model:{value:(_vm.form.lockerSuperAdminId),callback:function ($$v) {_vm.$set(_vm.form, "lockerSuperAdminId", $$v)},expression:"form.lockerSuperAdminId"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"超管密码"}},[_c('el-input',{attrs:{"size":"middle","clearable":true},model:{value:(_vm.form.authKey),callback:function ($$v) {_vm.$set(_vm.form, "authKey", $$v)},expression:"form.authKey"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"客户码"}},[_c('el-input',{attrs:{"size":"middle","clearable":true},model:{value:(_vm.form.customerCode),callback:function ($$v) {_vm.$set(_vm.form, "customerCode", $$v)},expression:"form.customerCode"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"连接方式"}},[_c('el-select',{attrs:{"placeholder":"请选择","size":"middle"},model:{value:(_vm.form.type),callback:function ($$v) {_vm.$set(_vm.form, "type", $$v)},expression:"form.type"}},[_c('el-option',{key:"0",attrs:{"label":"直连","value":"0"}}),_vm._v(" "),_c('el-option',{key:"1",attrs:{"label":"aep","value":"1"}})],1)],1)],1):_vm._e(),_vm._v(" "),_c('el-form-item',{attrs:{"label":"选择房间"}},[_c('el-cascader',{attrs:{"options":_vm.options,"size":"middle","props":{ checkStrictly: true },"clearable":""},on:{"change":_vm.checkNodeOne},model:{value:(_vm.checkNodeId1),callback:function ($$v) {_vm.checkNodeId1=$$v},expression:"checkNodeId1"}})],1),_vm._v(" "),(_vm.form.manufacturer == 701||_vm.form.manufacturer == 702||_vm.form.manufacturer == 703||_vm.form.manufacturer == 704||_vm.form.manufacturer == 705||_vm.form.manufacturer == 706||_vm.form.manufacturer == 707)?_c('div',[_c('el-form-item',{attrs:{"label":"设备号"}},[_c('el-input',{attrs:{"size":"middle","clearable":true},model:{value:(_vm.form.deviceNum),callback:function ($$v) {_vm.$set(_vm.form, "deviceNum", $$v)},expression:"form.deviceNum"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"设备验证码"}},[_c('el-input',{attrs:{"size":"small","clearable":true},model:{value:(_vm.form.validateCode),callback:function ($$v) {_vm.$set(_vm.form, "validateCode", $$v)},expression:"form.validateCode"}})],1)],1):_vm._e()],1)],1),_vm._v(" "),_c('el-drawer',{attrs:{"title":"门锁操作","visible":_vm.drawer,"custom-class":"operationclass","size":"50%","before-close":_vm.handleClose},on:{"update:visible":function($event){_vm.drawer=$event}}},[_c('div',{staticClass:"rltable"},[_c('el-tabs',{attrs:{"border":""},on:{"tab-click":_vm.handleClick},model:{value:(_vm.activeName),callback:function ($$v) {_vm.activeName=$$v},expression:"activeName"}},[_c('el-tab-pane',{attrs:{"label":"门锁详情","name":"0"}},[_c('el-form',{staticClass:"demo-form-inline",attrs:{"inline":true,"model":_vm.formInline}},[_c('el-form-item',{attrs:{"label":"设备号:"}},[_c('span',{staticClass:"half"},[_vm._v(_vm._s(_vm.formInline.deviceNum))])]),_vm._v(" "),_c('el-form-item',{attrs:{"label":"IMEI:"}},[_c('span',{staticClass:"half"},[_vm._v(_vm._s(_vm.formInline.imei))])]),_vm._v(" "),_c('el-form-item',{attrs:{"label":"IMSI:"}},[_c('span',{staticClass:"half"},[_vm._v(_vm._s(_vm.formInline.imsi))])]),_vm._v(" "),_c('el-form-item',{attrs:{"label":"ICCID:"}},[_c('span',{staticClass:"half"},[_vm._v(_vm._s(_vm.formInline.iccid))])]),_vm._v(" "),_c('el-form-item',{attrs:{"label":"信号强度:"}},[_c('span',{staticClass:"half"},[_vm._v(_vm._s(_vm.formInline.rssi))])]),_vm._v(" "),_c('el-form-item',{attrs:{"label":"电池电量:"}},[_c('span',{staticClass:"half"},[_vm._v(_vm._s(_vm.formInline.battery))])]),_vm._v(" "),_c('el-form-item',{attrs:{"label":"在线状态:"}},[(_vm.formInline.isOnline == 1)?_c('span',{staticClass:"half"},[_vm._v("在线")]):_c('span',{staticClass:"half"},[_vm._v("离线")])]),_vm._v(" "),_c('el-form-item',{attrs:{"label":"绑定房间:"}},[_c('span',{staticClass:"half"},[_vm._v(_vm._s(_vm.formInline.roomName))])]),_vm._v(" "),_c('el-form-item',{attrs:{"label":"上线时间:"}},[_c('span',{staticClass:"half"},[_vm._v(_vm._s(_vm.formInline.createAt))])]),_vm._v(" "),_c('el-form-item',{attrs:{"label":"更新时间:"}},[_c('span',{staticClass:"half"},[_vm._v(_vm._s(_vm.formInline.lastReportAt))])]),_vm._v(" "),(_vm.formInline.manufactureId==101)?_c('el-form-item',{attrs:{"label":"音量设置:"}},[_c('el-slider',{staticClass:"step",attrs:{"step":50,"marks":_vm.marks,"show-stops":""},on:{"change":_vm.stepFun},model:{value:(_vm.value2),callback:function ($$v) {_vm.value2=$$v},expression:"value2"}})],1):_vm._e(),_vm._v(" "),(_vm.formInline.manufactureId==101)?_c('el-form-item',{attrs:{"label":"常开设置:"}},[_c('el-switch',{attrs:{"inactive-text":_vm.switchtext},on:{"change":_vm.switchFun},model:{value:(_vm.value1),callback:function ($$v) {_vm.value1=$$v},expression:"value1"}})],1):_vm._e(),_vm._v(" "),(_vm.formInline.manufactureId==101)?_c('el-form-item',{attrs:{"label":"数据同步:"}},[_c('el-button',{attrs:{"type":"text","size":"mini"},on:{"click":function($event){return _vm.dataSynchronization(1, _vm.formInline)}}},[_vm._v("数据同步")])],1):_vm._e()],1),_vm._v(" "),_c('div',{staticClass:"date-form"},[_c('el-date-picker',{attrs:{"type":"monthrange","size":"small","align":"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始月份","end-placeholder":"结束月份","picker-options":_vm.pickerOptions},on:{"change":_vm.getElectricity},model:{value:(_vm.dateTime),callback:function ($$v) {_vm.dateTime=$$v},expression:"dateTime"}}),_vm._v(" "),_c('div',{staticClass:"discount"},[_c('div',{ref:"main",staticStyle:{"width":"100%","height":"400px"},attrs:{"id":"myLine"}})]),_vm._v(" "),_c('el-date-picker',{attrs:{"type":"monthrange","size":"small","align":"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始月份","end-placeholder":"结束月份","picker-options":_vm.pickerOptions},on:{"change":_vm.getSignal},model:{value:(_vm.dateTimeOne),callback:function ($$v) {_vm.dateTimeOne=$$v},expression:"dateTimeOne"}}),_vm._v(" "),_c('div',{staticClass:"discount"},[_c('div',{ref:"main1",staticStyle:{"width":"100%","height":"400px"},attrs:{"id":"myLineOne"}})])],1)],1),_vm._v(" "),_c('el-tab-pane',{attrs:{"label":"开锁记录","name":"1"}},[(_vm.sendStatus)?_c('UnlockRecord',{attrs:{"roomId":_vm.sendroomId}}):_vm._e()],1),_vm._v(" "),_c('el-tab-pane',{attrs:{"label":"警告日志","name":"2"}},[(_vm.sendStatus)?_c('warningLog',{attrs:{"deviceNum":_vm.sendDevice}}):_vm._e()],1),_vm._v(" "),_c('el-tab-pane',{attrs:{"label":"设备反馈日志","name":"3"}},[(_vm.sendStatus)?_c('DeviceFeedbackLog',{attrs:{"deviceNum":_vm.senddeviceNum}}):_vm._e()],1),_vm._v(" "),_c('el-tab-pane',{attrs:{"label":"凭证记录","name":"4"}},[(_vm.sendStatus)?_c('voucherCom',{attrs:{"deviceNum":_vm.senddeviceNum}}):_vm._e()],1)],1)],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',{attrs:{"size":"small"},on:{"click":function($event){_vm.uploadkj = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"small"},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-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.exportBtn}},[_vm._v("下载模板")]),_vm._v(" "),_c('el-select',{attrs:{"placeholder":"请选择","size":"mini"},model:{value:(_vm.batchAccess),callback:function ($$v) {_vm.batchAccess=$$v},expression:"batchAccess"}},_vm._l((_vm.accessPlatform.select),function(item){return _c('el-option',{key:item.code,attrs:{"label":item.desc,"value":item.code}})}),1),_vm._v(" "),_c('el-select',{attrs:{"placeholder":"请选择","size":"mini"},model:{value:(_vm.manufacturer),callback:function ($$v) {_vm.manufacturer=$$v},expression:"manufacturer"}},_vm._l((_vm.manufacturerList),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.label,"value":item.value}})}),1),_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:{"type":"selection","width":"55"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"deviceNum","label":"设备号","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"mac","label":"mac地址","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"sn","label":"sn","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"imei","label":"imei","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"app","label":"app绑定号","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"write","label":"生产写入号","align":"center"}})],1):_vm._e()],1),_vm._v(" "),_c('el-dialog',{attrs:{"title":"紧急密码,每天仅能用一次","visible":_vm.getEmergenceStatus,"width":"30%"},on:{"update:visible":function($event){_vm.getEmergenceStatus=$event}}},[_c('el-form',{ref:"Emergence",attrs:{"model":_vm.Emergence,"label-width":"80px"}},[_c('el-form-item',{attrs:{"label":"临时密码"}},[_c('el-input',{staticClass:"handle-input mr10",attrs:{"placeholder":"","disabled":""},model:{value:(_vm.Emergence.password),callback:function ($$v) {_vm.$set(_vm.Emergence, "password", $$v)},expression:"Emergence.password"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"电话"}},[_c('el-input',{staticClass:"handle-input mr10",attrs:{"type":"number","maxlength":"11","placeholder":"请输入手机号","clearable":true},model:{value:(_vm.Emergence.EmerPhone),callback:function ($$v) {_vm.$set(_vm.Emergence, "EmerPhone", $$v)},expression:"Emergence.EmerPhone"}})],1)],1),_vm._v(" "),_c('span',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{attrs:{"size":"small"},on:{"click":function($event){_vm.getEmergenceStatus = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":_vm.sendEmergence}},[_vm._v("发 送")])],1)],1)],1)} var staticRenderFns = [] var esExports = { render: render, staticRenderFns: staticRenderFns } /* harmony default export */ var views_aNormEquip = (esExports); // CONCATENATED MODULE: ./src/views/aNormEquip.vue function injectStyle (ssrContext) { __webpack_require__("04Yk") } 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-a62d80e4" /* moduleIdentifier (server only) */ var __vue_module_identifier__ = null var Component = normalizeComponent( aNormEquip, views_aNormEquip, __vue_template_functional__, __vue_styles__, __vue_scopeId__, __vue_module_identifier__ ) /* harmony default export */ var src_views_aNormEquip = __webpack_exports__["default"] = (Component.exports); /***/ }) });