|
|
@ -6,7 +6,7 @@ |
|
|
|
type="primary" |
|
|
|
plain |
|
|
|
size="mini" |
|
|
|
@click="handleAdd" |
|
|
|
@click="handleSendCommand" |
|
|
|
>远程开锁</el-button> |
|
|
|
</el-col> |
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getAttributes(deviceId)"></right-toolbar> |
|
|
@ -25,11 +25,13 @@ |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
min-width="100" |
|
|
|
/> |
|
|
|
<el-table-column label="类型" align="center" prop="noticeType" min-width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
label="类型" |
|
|
|
align="center" |
|
|
|
prop="tips" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
min-width="100" |
|
|
|
/> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
<pagination |
|
|
@ -90,6 +92,16 @@ export default { |
|
|
|
this.getqueryProjectInfoByKey(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleSendCommand(){ |
|
|
|
sendCommand({ |
|
|
|
"commandId": "447242774207233", // 命令ID, |
|
|
|
"commandParams": 1, // 命令参数, |
|
|
|
"deviceId": this.deviceId |
|
|
|
}).then(res => { |
|
|
|
this.$message.success('操作成功'); |
|
|
|
this.getAttributes(this.deviceId) // 根据项目id查找设备列表 |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 阈值设定弹窗 |
|
|
|
handleSettings() { |
|
|
|
this.open = true; |
|
|
@ -127,6 +139,20 @@ export default { |
|
|
|
deviceId: _id, |
|
|
|
}).then(res => { |
|
|
|
this.loading = false; |
|
|
|
let isOpenValue = { |
|
|
|
0 : "开锁失败", |
|
|
|
1 : "开锁成功", |
|
|
|
} |
|
|
|
let typeValue = { |
|
|
|
'A1': '指纹', |
|
|
|
'A2': '刷卡', |
|
|
|
'A3': '密码', |
|
|
|
} |
|
|
|
res.rows.forEach(item => { |
|
|
|
item.attributeValue = JSON.parse(item.attributeValue) |
|
|
|
console.log('item.attributeValue',item.attributeValue); |
|
|
|
item.tips = `${typeValue[item.attributeValue.type]}${isOpenValue[item.attributeValue.isOpen]}` |
|
|
|
}) |
|
|
|
this.tableList = res.rows; |
|
|
|
this.total = res.total; |
|
|
|
}); |
|
|
|