完成签约之后直接添加人员,录入下发凭证
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2384 lines
84 KiB

webpackJsonp([17,47],{
/***/ "/Z10":
/***/ (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/emptyLog.vue
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var emptyLog = ({
name: "warningLog",
data: function data() {
return {
query: {
operType: "",
operateName: "",
operModul: "",
pageNum: 1,
pageSize: 10
},
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.emptyLog;
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: 3
};
} else {
q = {
alertType: this.query.alertType,
deviceNum: this.query.deviceName,
deviceType: 3
};
}
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 % 1000;
})[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: 3
})
};
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 = {
alertType: this.query.alertType,
deviceNum: this.deviceNum,
deviceType: 3
};
} else {
q = {
alertType: this.query.alertType,
deviceNum: this.query.deviceName,
deviceType: 3
};
}
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 % 1000;
})[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;
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: 3
};
} else {
q = {
alertType: this.query.alertType,
deviceNum: this.query.deviceName,
deviceType: 3
};
}
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 % 1000;
})[0];
if (alertTypeDesc) {
li['alertTypeDesc'] = alertTypeDesc.desc;
}
});
_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.query.pageNum = val;
var q = {};
if (this.deviceNum != '') {
q = {
alertType: this.query.alertType,
deviceNum: this.deviceNum,
deviceType: 3
};
} else {
q = {
alertType: this.query.alertType,
deviceNum: this.query.deviceName,
deviceType: 3
};
}
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 % 1000;
})[0];
if (alertTypeDesc) {
li['alertTypeDesc'] = alertTypeDesc.desc;
}
});
_this5.tableData = res.data.list;
_this5.pageTotal = res.data.total;
});
}
}
});
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-8240002c","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/emptyLog.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:{"label":"序号","type":"index","width":"80"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n\t\t\t "+_vm._s(_vm.pageTotal - ((_vm.query.pageNum-1)*_vm.query.pageSize) - scope.$index)+"\n\t\t\t ")]}}])}),_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, prev, pager, next","current-page":_vm.query.pageNum,"page-size":_vm.query.pageSize,"total":_vm.pageTotal},on:{"current-change":_vm.handlePageChange}})],1)],1)])}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ var log_emptyLog = (esExports);
// CONCATENATED MODULE: ./src/views/log/emptyLog.vue
function injectStyle (ssrContext) {
__webpack_require__("Ymsh")
}
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-8240002c"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
emptyLog,
log_emptyLog,
__vue_template_functional__,
__vue_styles__,
__vue_scopeId__,
__vue_module_identifier__
)
/* harmony default export */ var views_log_emptyLog = __webpack_exports__["default"] = (Component.exports);
/***/ }),
/***/ "/wWu":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("bOdI");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// 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/regenerator/index.js
var regenerator = __webpack_require__("Xxa5");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("exGp");
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// 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/views/log/emptyLog.vue + 2 modules
var emptyLog = __webpack_require__("/Z10");
// 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/device/airSwitchDevice.vue
var _methods;
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var airSwitchDevice = ({
inject: ['reload'],
name: "doorLock",
data: function data() {
return {
emptyNode: [{ date: "" }],
deviceImg: __webpack_require__("p4EX"),
selectoption: [],
selectoptionValue: '',
senddeviceNum: '',
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: {
name: "",
deviceNum: "",
roomname: '',
imei: "",
isOnline: "",
startBattery: '0',
endBattery: '100'
},
tableData: [],
multipleSelection: [],
delList: [],
editVisible: false,
roomVisible: false,
pageTotal: 0,
sumpageTotal: 0,
currentPage4: 1,
form: {
manufacturer: "",
validateCode: ''
},
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: '',
gatewayDeviceList: [],
searchRoom: '',
accessPlatform: {}
};
},
components: {
zTree: zTree1["a" /* default */],
deviceLi: deviceLi["a" /* default */],
UnlockRecord: UnlockRecord["a" /* default */],
warningLog: emptyLog["default"],
DeviceFeedbackLog: DeviceFeedbackLog["a" /* default */]
},
beforeCreate: function beforeCreate() {},
created: function created() {
this.manufacturerList = this.$MANUFACTURER.MANUFACTURER.airSwitch;
this.accessPlatform = this.$MANUFACTURER.accessPlatform;
this.userInfo = JSON.parse(localStorage.getItem('info'));
this.getdevice();
this.getalllist();
this.info = JSON.parse(localStorage.getItem("info"));
this.$store.commit("increment", 1);
this.getcard();
this.getallTree();
this.getGatewayDeviceList();
},
methods: (_methods = {
// 获取网关设备
getGatewayDeviceList: function getGatewayDeviceList() {
var _this2 = this;
var data = {
q: stringify_default()({
lockType: 99
}),
pageNum: 0,
pageSize: 0
};
Object(api["g" /* httpPost */])(data, this.$api.getDeviceItems).then(function (res) {
if (res.success) {
_this2.gatewayDeviceList = res.data.list;
} else {
_this2.$message.error(res.message);
}
});
},
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 _this3 = 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) {
_this3.$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) {
_this3.$message.success("重置成功");
var str = {
deviceNum: row.deviceNum,
imei: row.imei,
order: 6101
};
Object(api["g" /* httpPost */])(str, _this3.$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, _this3.$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, _this3.$api.getDeviceOperateUserInfo).then(function (res3) {
if (res3.success) {
_this3.$message.success("初始化成功");
callback(true);
}
});
});
} else {
_this3.$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 _this4 = this;
this.$confirm("是否确认数据同步?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function () {
_this4.orderDeviceData(row);
});
},
// 获取指定锁所有非703凭证数据
orderDeviceData: function orderDeviceData(row) {
var _this5 = 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, _this5.$api.orderDeviceData).then(function (res1) {
if (res1.success) {
var alllist = res1.data;
_this5.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 {
_this5.$message.error(res1.msg);
}
});
} else {
_this5.$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]);
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 _this6 = this;
var q = {
roomIds: [id],
lockType: 3
};
var data = {
q: stringify_default()(q),
pageNum: 1,
pageSize: this.pageSize
};
Object(api["d" /* httpGet */])(data, this.$api.getAirSwitchParameter).then(function (res) {
if (res.data.list.length > 0) {
_this6.$message.error("该房间已绑定锁,请重新选择");
_this6.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 _this7 = 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 arrdata = Object(utils["o" /* uniqueArray1 */])(res.data, "id");
_this7.options = Object(utils["p" /* ztreeToElementTree */])(arrdata, {});
});
},
// 获取门卡概况
getcard: function getcard() {
var _this8 = this;
allFun["a" /* default */].getAnalysis("", 3, function (callback) {
_this8.sumpageTotal = callback.total;
_this8.online = callback.onlineTotal;
_this8.unonline = callback.offlineTotal;
_this8.abnormal = callback.abnormalTotal;
});
},
// 发送离线密码
sendEmergence: function sendEmergence() {
var _this9 = 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) {
_this9.$message.success('发送成功');
} else {
_this9.$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 _this10 = this;
var data = {
code: "zg/getEmergence",
data: {
lockerId: row.deviceNum
}
};
Object(api["g" /* httpPost */])(data, this.$api.sendCommand).then(function (res) {
if (res.success) {
_this10.$message.success("获取成功");
_this10.Emergence.password = res.data.data;
_this10.Emergence.device = row.deviceNum;
_this10.Emergence.name = row.roomName;
_this10.getEmergenceStatus = true;
} else {
_this10.$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 _this11 = this;
return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
return regenerator_default.a.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
if (!(_this11.batchAccess == "")) {
_context.next = 4;
break;
}
_this11.$message.error("请选择运营商");
_context.next = 10;
break;
case 4:
if (!(_this11.multipleSelection1.length == 0)) {
_context.next = 8;
break;
}
_this11.$message.error("请勾选要批量添加的设备");
_context.next = 10;
break;
case 8:
_context.next = 10;
return _this11.multipleSelection1.map(function (li, index) {
var str = {
deviceNum: li.deviceNum,
imei: li.imei,
imsi: li.imei, //row.imsi,
order: 5101,
platformId: _this11.batchAccess
};
Object(api["g" /* httpPost */])(str, _this11.$api.DeviceRegisterDevice).then(function (res) {
if (res.data.success) {
// this.$message.success(res.data.msg);
// this.editVisible = false;
// this.getdevice();
_this11.AddAdministrator(index, li);
}
});
}).then(function (res) {
_this11.$message.success("添加成功");
_this11.editVisible = false;
_this11.getdevice();
});
case 10:
case "end":
return _context.stop();
}
}
}, _callee, _this11);
}))();
},
//音量设置
stepFun: function stepFun(val) {
var _this12 = 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) {
_this12.$message.success("设置成功");
} else {
_this12.$message.error(res.msg);
}
});
},
// 常开设置
switchFun: function switchFun(e) {
var _this13 = 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) {
_this13.$message.success("设置成功");
} else {
_this13.$message.error(res.msg);
}
});
},
// 关闭侧边栏
handleClose: function handleClose() {
this.drawer = false;
},
// tabs标签页切换
handleClick: function handleClick(tab, event) {
this.commpontentStatus = true;
}
}, defineProperty_default()(_methods, "handleClose", function handleClose(done) {
done();
}), defineProperty_default()(_methods, "detailsFun", function detailsFun(index, row) {
var _this14 = this;
this.drawer = true;
this.formInline = row;
this.sendStatus = false;
var data = {
pageNum: 1,
pageSize: 1,
q: stringify_default()({
deviceNum: row.deviceNum
})
};
allFun["a" /* default */].getAirSwitchMethds(data, function (callback) {
if (callback.success) {
var nstaList = JSON.parse(callback.data.list[0].nsta);
nstaList.map(function (li, index) {
li['id'] = index;
});
_this14.emptyNode = nstaList;
} else {
_this14.$message.error(callback.message);
}
// RequestSet.hex2int("0106",(callback)=>{
// console.log(callback)
// })
});
this.$nextTick(function () {
this.sendroomId = row.deviceNum;
this.senddeviceNum = row.deviceNum;
this.sendStatus = true;
});
}), defineProperty_default()(_methods, "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);
// }
});
}), defineProperty_default()(_methods, "Reset", function Reset(index, row) {
var _this15 = 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: _this15.info.username,
roomName: row.roomName
}
};
Object(api["g" /* httpPost */])(data3, _this15.$api.sendCommand).then(function (res) {
if (res.success) {
_this15.$message.success("重置成功");
var q = {
id: row.roomId
};
var tenant = {
q: stringify_default()(q)
};
Object(api["d" /* httpGet */])(tenant, _this15.$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, _this15.$api.unbindCard).then(function (res) {});
});
});
});
} else {
_this15.$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: _this15.info.username,
roomName: row.roomName
}
};
Object(api["g" /* httpPost */])(data2, _this15.$api.sendCommand).then(function (res2) {
if (res2.success) {
_this15.$message.success("重置成功");
var q = {
id: row.roomId
};
var tenant = {
q: stringify_default()(q)
};
Object(api["d" /* httpGet */])(tenant, _this15.$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, _this15.$api.unbindCard).then(function (res) {});
});
});
});
} else {
_this15.$message.error(res2.msg);
}
});
}
});
}), defineProperty_default()(_methods, "activeiconfun", function activeiconfun(t) {
this.activeiconfont = t;
}), defineProperty_default()(_methods, "getresult", function getresult() {
var data = {};
}), defineProperty_default()(_methods, "Unlockingsave", function Unlockingsave() {}), defineProperty_default()(_methods, "RemoteUnlocking", function RemoteUnlocking(index, row) {
var _this16 = 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) {
_this16.$message.success("开锁成功!");
_this16.Unlocking = false;
} else {
_this16.$message.error("开锁失败!");
}
});
}), defineProperty_default()(_methods, "AddAdministrator", function AddAdministrator(index, row) {
var _this17 = this;
var str = {
deviceNum: row.deviceNum,
imei: row.imei,
order: 6101
};
Object(api["g" /* httpPost */])(str, this.$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, _this17.$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, _this17.$api.getDeviceOperateUserInfo).then(function (res3) {
if (res3.success) {
_this17.$message.success("初始化成功");
}
});
});
}), defineProperty_default()(_methods, "initialization", function initialization() {
var _this18 = this;
if (this.checkNodeId1 == '') {
this.$message.error("请选择房间");
} else {
if (this.form.manufacturer == 703) {
if (this.form.deviceNum == "" || this.form.gatewayDevice === '' || this.form.manufacturer === '') {
this.$message.error("请填写完整信息");
} else {
var data = {};
var data = {
deviceNum: this.form.deviceNum,
gatewayDevice: this.form.gatewayDevice,
manufactureId: this.form.manufacturer,
enterpriseId: this.userInfo.enterpriseId
};
allFun["a" /* default */].gatewayBindsChildDevic(data, function (callback) {
if (callback.success) {
var data = [{
siteId: _this18.checkNodeId1,
deviceId: callback.data.id
}];
Object(api["g" /* httpPost */])(data, _this18.$api.bindDeviceSite).then(function (res) {
if (res.success) {
_this18.editVisible = false;
_this18.$message.success("绑定成功");
}
}).catch(function (error) {
_this18.$message.error("\u7ED1\u5B9A\u5931\u8D25");
});
_this18.$message.success(res.data.msg);
_this18.editVisible = false;
_this18.getdevice();
} else {
_this18.$message.error(callback.message);
}
});
}
} else if (this.form.manufacturer == 1003) {
var data = {
deviceNum: this.form.deviceNum,
order: 5101,
enterpriseId: this.userInfo.enterpriseId,
platformId: this.form.platformId,
manufactureId: this.form.manufacturer
};
allFun["a" /* default */].RegisterDevice(data, function (callback) {
if (callback.success) {
var data = [{
siteId: _this18.checkNodeId1,
deviceId: callback.data.id
}];
Object(api["g" /* httpPost */])(data, _this18.$api.bindDeviceSite).then(function (res) {
if (res.success) {
_this18.editVisible = false;
_this18.$message.success("绑定成功");
}
}).catch(function (error) {
_this18.$message.error("\u7ED1\u5B9A\u5931\u8D25");
});
_this18.$message.success(callback.data.msg);
_this18.editVisible = false;
_this18.getdevice();
} else {
_this18.$message.error(callback.message);
}
});
}
}
}), defineProperty_default()(_methods, "onClick", function onClick(evt, treeId, treeNode) {
// 点击事件
this.treedata = treeNode;
}), defineProperty_default()(_methods, "getalllist", function getalllist() {
var _this19 = this;
var data = {};
Object(api["d" /* httpGet */])(data, this.$api.getTree).then(function (res) {
var array = Object(utils["n" /* uniqueArray */])(res.data, "id");
_this19.zNodes = Object(utils["p" /* ztreeToElementTree */])(array, {});
});
}), defineProperty_default()(_methods, "getdevice", function getdevice() {
var _this20 = this;
var data = {
pageNum: this.$store.state.currentPage,
pageSize: 10,
q: stringify_default()({
lockType: 3
})
};
Object(api["d" /* httpGet */])(data, this.$api.getAirSwitchParameter).then(function (res) {
var online = 0,
unonline = 0,
devIds = "";
if (res.data.list.length > 0) {
res.data.list.map(function (li) {
var accessPlatform = _this20.accessPlatform.show.filter(function (item) {
return item.code == li.accessPlatform;
})[0];
if (accessPlatform) {
li['accessPlatformText'] = accessPlatform.desc;
} else {
li['accessPlatformText'] = '';
}
if (li.isOnline == 1) {
online++;
} else if (li.isOnline == 0) {
unonline++;
}
li.createAt = _this20.timestampToTime(li.createAt);
if (li.lastReportAt) {
li.lastReportAt = moment_default()(li.lastReportAt).format("YYYY-MM-DD HH:mm:ss");
} else {
li.lastReportAt = '';
}
devIds += li.deviceNum + ",";
});
var newArr = Object(utils["n" /* uniqueArray */])(res.data.list, "id");
_this20.tableData = newArr;
} else {
_this20.tableData = [];
}
_this20.currentPage4 = 1;
_this20.pageTotal = res.data.total;
});
}), defineProperty_default()(_methods, "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;
}), defineProperty_default()(_methods, "handleChange", function handleChange(value) {
console.log(value);
}), defineProperty_default()(_methods, "restSearch", function restSearch() {
this.search = {
name: "",
deviceNum: "",
roomname: '',
imei: "",
isOnline: "",
unBind: '',
startBattery: '',
endBattery: ''
};
this.checkNodeId = '';
this.searchRoom = "";
this.handleSearch();
}), defineProperty_default()(_methods, "handleSearch", function handleSearch() {
var _this21 = 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: 3,
unBind: this.search.unBind
};
var data = {
q: stringify_default()(q),
pageNum: 1,
pageSize: this.pageSize
};
Object(api["d" /* httpGet */])(data, this.$api.getAirSwitchParameter).then(function (res) {
if (res.data.list.length > 0) {
res.data.list.map(function (li) {
var accessPlatform = _this21.accessPlatform.show.filter(function (item) {
return item.code == li.accessPlatform;
})[0];
if (accessPlatform) {
li['accessPlatformText'] = accessPlatform.desc;
} else {
li['accessPlatformText'] = '';
}
li.createAt = _this21.timestampToTime(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");
_this21.pageTotal = res.data.total;
_this21.tableData = newArr;
} else {
_this21.tableData = [];
_this21.pageTotal = 0;
}
_this21.currentPage4 = 1;
_this21.$store.commit("increment", 1);
});
// this.$set(this.query, "pageIndex", 1);
}), defineProperty_default()(_methods, "handleDelete", function handleDelete(index) {
var _this22 = this;
// 二次确认删除
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(function () {
_this22.$message.success("删除成功");
_this22.tableData.splice(index, 1);
}).catch(function () {});
}), defineProperty_default()(_methods, "handleSelectionChange", function handleSelectionChange(val) {
this.multipleSelection = val;
}), defineProperty_default()(_methods, "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 = [];
}), defineProperty_default()(_methods, "deleteLock", function deleteLock(index, row) {
var _this23 = this;
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(function () {
// if (row.manufactureId == 101) {
if (row.roomId) {
var data = [{
siteId: row.roomId,
deviceId: row.id
}];
Object(api["g" /* httpPost */])(data, _this23.$api.unbindDeviceSite).then(function (res) {
if (res.success) {
var data = {
deviceNum: row.deviceNum,
imei: row.imei,
order: 5102,
gatewayDevice: row.bluetoothMac || ''
};
allFun["a" /* default */].DeleteDevic(data, row.manufactureId, function (callback) {
if (callback.success) {
if (row.manufactureId == 703) {
var str = {
code: "ys/deleteDevice",
data: {
deviceNum: row.deviceNum
}
};
Object(api["g" /* httpPost */])(str, _this23.$api.sendCommand).then(function (res3) {
if (res3.success) {
_this23.getdevice();
_this23.$message.success('删除成功');
} else {
_this23.$message.error('删除失败');
}
});
_this23.$message.success('解绑成功');
} else {
_this23.getdevice();
_this23.$message.success('删除成功');
}
} else {
_this23.$message.error(callback.msg);
}
});
}
}).catch(function (error) {
_this23.$message.error("\u89E3\u7ED1\u5931\u8D25");
});
} else {
var data = {
deviceNum: row.deviceNum,
imei: row.imei,
order: 5102,
gatewayDevice: row.bluetoothMac || ''
};
allFun["a" /* default */].DeleteDevic(data, row.manufactureId, function (callback) {
if (callback.success) {
if (row.manufactureId == 703) {
var str = {
code: "ys/deleteDevice",
data: {
deviceNum: row.deviceNum
}
};
Object(api["g" /* httpPost */])(str, _this23.$api.sendCommand).then(function (res3) {
if (res3.success) {
_this23.getdevice();
_this23.$message.success('删除成功');
} else {
_this23.$message.error('删除失败');
}
});
_this23.$message.success('解绑成功');
} else {
_this23.getdevice();
_this23.$message.success('删除成功');
}
} else {
_this23.$message.error("删除失败");
}
});
}
}).catch(function () {});
}), defineProperty_default()(_methods, "bindRoom", function bindRoom(index, row) {
this.bromm = row;
this.roomVisible = true;
this.$refs.tree.setCheckedKeys([]);
}), defineProperty_default()(_methods, "bindsave", function bindsave() {
var _this24 = 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) {
_this24.$message.success("绑定成功");
_this24.getdevice();
}
}).catch(function (error) {
_this24.$message.error("\u7ED1\u5B9A\u5931\u8D25");
});
}), defineProperty_default()(_methods, "unbindsave", function unbindsave(index, row) {
var _this25 = 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, _this25.$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, _this25.$api.unbindCard).then(function (res) {});
});
Object(api["g" /* httpPost */])(data, _this25.$api.unbindDeviceSite).then(function (res) {
if (res.success) {
_this25.$message.success("解绑成功");
_this25.getdevice();
} else {
_this25.$message.error("\u89E3\u7ED1\u5931\u8D25");
}
});
});
});
}).catch(function () {});
}), defineProperty_default()(_methods, "addequipment", function addequipment() {
this.editVisible = true;
this.form.customerCode = this.$store.state.customerCode;
}), defineProperty_default()(_methods, "handleEdit", function handleEdit(index, row) {
this.idx = index;
this.form = row;
this.editVisible = true;
}), defineProperty_default()(_methods, "saveEdit", function saveEdit() {
this.editVisible = false;
this.$message.success("\u4FEE\u6539\u7B2C " + (this.idx + 1) + " \u884C\u6210\u529F");
this.$set(this.tableData, this.idx, this.form);
}), defineProperty_default()(_methods, "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);
}), defineProperty_default()(_methods, "getlistNum", function getlistNum(val, size) {
var _this26 = 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: 3,
unBind: this.search.unBind
};
var data = {
q: stringify_default()(q),
pageNum: val,
pageSize: size
};
Object(api["d" /* httpGet */])(data, this.$api.getAirSwitchParameter).then(function (res) {
res.data.list.map(function (li) {
var accessPlatform = _this26.accessPlatform.show.filter(function (item) {
return item.code == li.accessPlatform;
})[0];
if (accessPlatform) {
li['accessPlatformText'] = accessPlatform.desc;
} else {
li['accessPlatformText'] = '';
}
li.createAt = _this26.timestampToTime(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");
_this26.tableData = newArr;
_this26.pageTotal = res.data.total;
});
}), defineProperty_default()(_methods, "handlePageChange", function handlePageChange(val) {
var _this27 = 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: 3,
unBind: this.search.unBind
};
var data = {
q: stringify_default()(q),
pageNum: val,
pageSize: this.pageSize
};
Object(api["d" /* httpGet */])(data, this.$api.getAirSwitchParameter).then(function (res) {
res.data.list.map(function (li) {
var accessPlatform = _this27.accessPlatform.show.filter(function (item) {
return item.code == li.accessPlatform;
})[0];
if (accessPlatform) {
li['accessPlatformText'] = accessPlatform.desc;
} else {
li['accessPlatformText'] = '';
}
li.createAt = _this27.timestampToTime(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");
_this27.tableData = newArr;
_this27.pageTotal = res.data.total;
});
}), defineProperty_default()(_methods, "btnClick", function btnClick() {
document.querySelector(".input-file").click();
}), defineProperty_default()(_methods, "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.imei = li["imei"];
str.ID = 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);
}), _methods)
});
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-5d4cd080","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/device/airSwitchDevice.vue
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_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-1"},[_c('div',{staticClass:"colposition"},[_c('img',{staticClass:"w100",attrs:{"src":__webpack_require__("xXHN"),"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.sumpageTotal))])])])])]),_vm._v(" "),_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__("sFbI"),"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.online))])])])])]),_vm._v(" "),_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__("BpHi"),"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.unonline))])])])])]),_vm._v(" "),_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 },"placeholder":"请选择房源","clearable":""},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.roomname),callback:function ($$v) {_vm.$set(_vm.search, "roomname", $$v)},expression:"search.roomname"}}),_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.deviceNum),callback:function ($$v) {_vm.$set(_vm.search, "deviceNum", $$v)},expression:"search.deviceNum"}}),_vm._v(" "),_c('el-input',{staticClass:"handle-input mr10 width100",attrs:{"size":"small","placeholder":"IMEI","clearable":true},on:{"input":function($event){return _vm.changesr($event)}},model:{value:(_vm.search.imei),callback:function ($$v) {_vm.$set(_vm.search, "imei", $$v)},expression:"search.imei"}}),_vm._v(" "),_c('el-select',{staticClass:"handle-select mr10",attrs:{"size":"small","placeholder":"状态","clearable":""},model:{value:(_vm.search.isOnline),callback:function ($$v) {_vm.$set(_vm.search, "isOnline", $$v)},expression:"search.isOnline"}},[_c('el-option',{key:"1",attrs:{"label":"离线","value":"0"}}),_vm._v(" "),_c('el-option',{key:"2",attrs:{"label":"在线","value":"1"}}),_vm._v(" "),_c('el-option',{key:"3",attrs:{"label":"异常","value":"2"}})],1),_vm._v(" "),_c('el-select',{staticClass:"handle-select mr10",attrs:{"size":"small","placeholder":"绑定状态","clearable":true},model:{value:(_vm.search.unBind),callback:function ($$v) {_vm.$set(_vm.search, "unBind", $$v)},expression:"search.unBind"}},[_c('el-option',{key:"0",attrs:{"label":"已绑定","value":"0"}}),_vm._v(" "),_c('el-option',{key:"1",attrs:{"label":"未绑定","value":"1"}})],1),_vm._v(" "),_c('div',{staticClass:"quantity"},[_vm._v("\n\t\t\t\t\t电量: "),_c('el-input',{staticClass:"w50",attrs:{"placeholder":"","size":"mini"},on:{"input":function($event){return _vm.InputFun($event,'startBattery')}},model:{value:(_vm.search.startBattery),callback:function ($$v) {_vm.$set(_vm.search, "startBattery", $$v)},expression:"search.startBattery"}},[_c('template',{slot:"append"},[_vm._v("%")])],2),_vm._v(" - "),_c('el-input',{staticClass:"w50",attrs:{"placeholder":"","size":"mini"},on:{"input":function($event){return _vm.InputFun($event,'endBattery')}},model:{value:(_vm.search.endBattery),callback:function ($$v) {_vm.$set(_vm.search, "endBattery", $$v)},expression:"search.endBattery"}},[_c('template',{slot:"append"},[_vm._v("%")])],2)],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',{directives:[{name:"show",rawName:"v-show",value:(_vm.info.type == 0),expression:"info.type == 0"}],attrs:{"type":"primary","size":"small"},on:{"click":_vm.addequipment}},[_vm._v("添加设备")]),_vm._v(" "),_c('el-button',{directives:[{name:"show",rawName:"v-show",value:(_vm.info.type == 0),expression:"info.type == 0"}],attrs:{"type":"primary","size":"small"},on:{"click":_vm.BatchAdd}},[_vm._v("批量添加")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":_vm.restSearch}},[_vm._v("重置")]),_vm._v(" "),_c('el-button',{directives:[{name:"show",rawName:"v-show",value:(_vm.info.type == 0),expression:"info.type == 0"}],attrs:{"type":"primary","size":"small"},on:{"click":_vm.refreshFun}},[_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\t\t\t\t\t\t\t解绑房间\n\t\t\t\t\t\t")]):_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(" "),_c('div',{on:{"click":function($event){return _vm.deleteLock(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":"无"},on:{"selection-change":_vm.handleSelectionChange}},[_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":"","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\t\t\t\t\t\t\t"+_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":"400","align":"center","fixed":"right"},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\t\t\t\t\t\t")]):_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(" "),_c('el-button',{attrs:{"type":"text"},on:{"click":function($event){return _vm.deleteLock(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',{on:{"click":function($event){_vm.Unlocking = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},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',{on:{"click":function($event){_vm.editVisible = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},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:{"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(" "),_c('el-form-item',{attrs:{"label":"选择房间"}},[_c('el-cascader',{attrs:{"options":_vm.options,"size":"small","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 == 1003)?_c('div',[_c('el-form-item',{attrs:{"label":"设备号"}},[_c('el-input',{attrs:{"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-select',{attrs:{"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._e(),_vm._v(" "),(_vm.form.manufacturer == 703)?_c('div',[_c('el-form-item',{attrs:{"label":"设备号:"}},[_c('el-input',{attrs:{"placeholder":"请输入内容","size":"middle"},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-select',{attrs:{"placeholder":"请选择网关设备","size":"middle"},model:{value:(_vm.form.gatewayDevice),callback:function ($$v) {_vm.$set(_vm.form, "gatewayDevice", $$v)},expression:"form.gatewayDevice"}},_vm._l((_vm.gatewayDeviceList),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.deviceNum,"value":item.deviceNum}})}),1)],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":"信号强度:"}},[_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":"门的状态:"}},[(_vm.formInline.lockStatus == 0)?_c('span',{staticClass:"half"},[_vm._v("关闭")]):_vm._e(),_vm._v(" "),(_vm.formInline.lockStatus == 1)?_c('span',{staticClass:"half"},[_vm._v("打开")]):_vm._e(),_vm._v(" "),(_vm.formInline.lockStatus == 2)?_c('span',{staticClass:"half"},[_vm._v("异常")]):_vm._e()]),_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()],1),_vm._v(" "),_c('el-table',{attrs:{"data":_vm.emptyNode,"height":"300","align":"center","border":""}},[_c('el-table-column',{attrs:{"prop":"id","label":"ID","width":"150"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"nodeNo","label":"节点号","width":"150"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"nodeType","label":"节点类型","width":"150"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"voltage","label":"电压","width":"150"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"leakCurrent","label":"漏电","width":"150"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"power","label":"有功功率","width":"150"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"temperature","label":"内部温度","width":"150"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"current","label":"电流","width":"150"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"nTemperature","label":"N相温度","width":"150"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"powerFactor","label":"功率因数","width":"150"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"alert","label":"报警位","width":"150"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"totalEnergy","label":"总电量","width":"150"}})],1)],1),_vm._v(" "),_c('el-tab-pane',{attrs:{"label":"警告日志","name":"2"}},[(_vm.sendStatus)?_c('warningLog',{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',{on:{"click":function($event){_vm.uploadkj = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.batchUploadfun}},[_vm._v("确 定")])],1)]},proxy:true}])},[_c('input',{staticClass:"input-file",attrs:{"type":"file","accept":".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"},on:{"change":_vm.exportData}}),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.btnClick}},[_vm._v("导入EXCEL")]),_vm._v(" "),_c('el-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-form',{ref:"form",attrs:{"model":_vm.form,"label-width":"70px"}}),_vm._v(" "),(_vm.userlist1statu)?_c('el-table',{ref:"multipleTable1",staticClass:"table",attrs:{"data":_vm.userlist2,"border":"","height":"200","header-cell-class-name":"table-header"},on:{"selection-change":_vm.handleSelectionChange1}},[_c('el-table-column',{attrs:{"type":"selection","width":"55"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"ID","label":"ID","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"deviceNum","label":"设备号","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"imei","label":"IMEI","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',{on:{"click":function($event){_vm.getEmergenceStatus = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.sendEmergence}},[_vm._v("发 送")])],1)],1)],1)}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ var device_airSwitchDevice = (esExports);
// CONCATENATED MODULE: ./src/views/device/airSwitchDevice.vue
function injectStyle (ssrContext) {
__webpack_require__("bShl")
}
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-5d4cd080"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
airSwitchDevice,
device_airSwitchDevice,
__vue_template_functional__,
__vue_styles__,
__vue_scopeId__,
__vue_module_identifier__
)
/* harmony default export */ var views_device_airSwitchDevice = __webpack_exports__["default"] = (Component.exports);
/***/ }),
/***/ "Ymsh":
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/***/ "bShl":
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/***/ "p4EX":
/***/ (function(module, exports) {
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAABuCAYAAACp6nrWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDcuMS1jMDAwIDc5LmIwZjhiZTkwLCAyMDIxLzEyLzE1LTIxOjI1OjE1ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjMuMiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RDFEQUZGMTNFREU2MTFFQzhBM0Q4NUYxQUVCNTVDQTUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RDFEQUZGMTRFREU2MTFFQzhBM0Q4NUYxQUVCNTVDQTUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpEMURBRkYxMUVERTYxMUVDOEEzRDg1RjFBRUI1NUNBNSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpEMURBRkYxMkVERTYxMUVDOEEzRDg1RjFBRUI1NUNBNSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PpyMR1sAAAcVSURBVHja7FpbiFVVGP7/tfc+M3NmplEzE7O8Wz1IaTeJwF66SIQkYZlgQdZTEFJGSD5FSOVDPnQRuxBERD10geyiVAY+adJFoUBIqSav5OTMOLP3XuvvW2vvs+dcZ86ZJhPc+7DO3mftdfnWf/n+fy0Oiwj935ei8+DKQeQgchA5iBxEDiIHkYPIQeQgchA5iBxEDuKCBOHbr0vmbtwizOvxGP7H83kovSRyNe5nK0Dgakul0n4OFt6DYuqpIzyH0h84f22i6opRjqLoBu9buexZVIQyI1V50yCG2ZhbcP9zgkCEMPpdxHxrKyB8dDoiE2grzHymVXUwQGxLDcibIHVc2yqIAhM9mtP2hR07qq6zLLIZd2vRQX1zk3ouUK+lpedhtH4c7+e3AsJO8mxjY2dqGlgmb3UnvlsCoVKG660XBOG+KDITPzpT97NXB8oJNnKcqRKMKFV6T61Joma5go9yIscUS/Dym3TgOG3QDnB3kcc7SOtEKlY9zOO2iVpJs3IlGZweQ1V31l888oJTx5hlp46nop1luzjtN0EgEvGrkvF14Nd9Fbrz+2jg5IpNorui4sU7UBGS4YB4Ql0UIEqSBYD7UVOsGuJwHE3ZTv5pPA5BXV5mwv/GRWtUQU7EbtgaOtdx95fd09+ZzBz3mHjyJFT9gV4nqBLKpWVdLqu2Ob9x5GFSYqhjeBDiMjTsFa6M/MJSW1cpKL1adMdqGC5SQxOIhAuE9AmGRJSlmcRIN6HpnJQ3BlAXNwXC+QHwGg9u6ayN13F9IXcnWmU74WYx0SE3l1dwHsUCbzHmw9E8pTEIrCD2Axr0Avs8rWCiJ60UpKHJ8S8AsVEUWnA7WlkQ2vGEHYtHIbPGNmEXbwz5OsR6ZApM423DDEqnaXi7soLCjKIzxf6Hw85+0JdPPWe6XF/hcg/jETAZjzRhmFxqTPwzej6kjFPLIiGzsipCfGy8aI8OQuocuIi82CftxQvxZjHKoM1RUL4FkBOZx1nBGDO2YXIqfElBF4YD0r6+LQrsijK1DOBprfag+zig4mAHVKBt+3V4t6HM02+21O4WpTBybIhjaUISThoG5MOOuMO20JrmvDIAFub6SMnfbYNd1DaUmjS7FQ5VJ9CVwU6ySfzRE0RLPfgYGCebpBvrhYmnOSAHjdB2BDRqGy7a8AYW1xmFNBxXKtlsDLJyLOXiVBk7zC3jmjWuFTxAQQWmFZrkVhjTTs8ZhKlQ6IyERczLJPoHUh4ZVbDU2WIS3kLscEbM2Q52frJpFuyozQYDKcVeIV2WNBW5K/4gkLqrGgtAAcIqSsEVj/wF4iaTdVDTWeE2J0wmAxXRbEey3HT8vF75fqcCIaqx1Oa5GMKWgG3je2H6x0Wrd1n7iCs+dQ9oCiKzCdL6Cc3vGEXKQaYG4ZeIvb0mUNfpQMZWxyDH1K8ilJhC1u1wz7WkAcn4ZHxNOojBC2YZNNMFKX2OaV5JR60+ArDRdTaW9j3ZxNeqWZtVEprRQRjL+/j4+EAt0yGLrRDKF6wMxYVhGmo7S6Ef3QBgc5IFwqVjXhkM+fVSin7HYkTXlNHhCqW8hiBMeWqmEXm1DvtYyw7nspYR4Y+iLURenrix28RSFJgXooKxVV1VY16BVr/hvrtM3zO1R0tUXQNmPladH9rgZcqqFHr7YQF3dWPJ59n6s44/0RzZgFUNovT7owr3NLS0bsqPAV6t2ZWPAGiHJLchqu5XyuUQ0ySzNzrgCR8SF+jkPdQcLQUwtDlMNmEm2lcK63adWsuk8e7Kd2Py/QjXmHMkdcOgx33oWGMSI7IXVXsrxWnsWo7YdMwu0FkFm8njPYkZTHIEJyBdxj1+rBOTgzxrHV5xchyVSkIQHH3xw/FviJMgZAH8VVY7z9gwrbg2FLLdvdmtrboqU7PTJp0cHwimosuSjN0Q8aGyqS4P2FtU4JSXrKhcqsou01IuBpnlJUlYb9K++bXxrlyk0a7c1v3opOs70e8RI6sSbBhUzNOg8TVZNpTRhaQJCq0ut3KEv30t7sqpYnuXBiNsu2jriDT0A1jvLrR4q6ZfFL9vuSFzaeIDbILfGx2c3WS5okGU7UjPOU+lCcQhYLIEtCwbmujNJOKKBQKC4sWo3Ijnu6tM9XWbJtR1UfjNV9w41NvQuQXlKXEh3gW2F2GOy6rabcSrJzDVUUCdVbVKS/F9fV2n3zB+XHcSle43i+mBe3XhMvYraftT3D5rAHhW3dyV5JHID/vjIBr3mdXQyGDZwPegHGymsxZ+Dvb0gRJlo2QGotgiiM66x9FM9jh6Z+N9DAAo9Xyo+BlVJ9E9mZ5lmyZ38r0jusOWIF0Lxj3tGX27YbUOhv1gmg72oL4XUvoOJvsanr+us8nK/xSag8hB5CByEDmIHEQOIgeRg8hB5CByEDmICw/EPwIMAHIJyjTyJCZjAAAAAElFTkSuQmCC"
/***/ })
});