|
|
@ -9,13 +9,13 @@ |
|
|
|
@click="handleAdd" |
|
|
|
>远程开锁</el-button> |
|
|
|
</el-col> |
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getAttributes(deviceId)"></right-toolbar> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="tableList" max-height="600"> |
|
|
|
<el-table-column label="序号" align="center" prop="noticeId" width="100" > |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{scope.$index+1}} |
|
|
|
{{ scope.$index + 1 + (queryParams.pageNum - 1) * queryParams.pageSize }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
@ -37,18 +37,19 @@ |
|
|
|
:total="total" |
|
|
|
:page.sync="queryParams.pageNum" |
|
|
|
:limit.sync="queryParams.pageSize" |
|
|
|
@pagination="getList" |
|
|
|
@pagination="getAttributes(deviceId)" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { queryProjectInfoByKey, deviceList, attributes, sendAttribute, sendCommand } from "@/api/school"; |
|
|
|
import { queryProjectInfoByKey, deviceList, attributes, sendAttribute, sendCommand,attributesRecord } from "@/api/school"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "Notice", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
deviceId: "", // 设备id |
|
|
|
// 遮罩层 |
|
|
|
loading: true, |
|
|
|
// 选中数组 |
|
|
@ -71,9 +72,6 @@ export default { |
|
|
|
queryParams: { |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 10, |
|
|
|
noticeTitle: undefined, |
|
|
|
createBy: undefined, |
|
|
|
status: undefined |
|
|
|
}, |
|
|
|
// 表单参数 |
|
|
|
form: {}, |
|
|
@ -123,11 +121,14 @@ export default { |
|
|
|
|
|
|
|
// 根据设备id查找设备信息 |
|
|
|
getAttributes(_id) { |
|
|
|
attributes({ |
|
|
|
attributesRecord({ |
|
|
|
pageNum: this.queryParams.pageNum, |
|
|
|
pageSize: this.queryParams.pageSize, |
|
|
|
deviceId: _id, |
|
|
|
}).then(res => { |
|
|
|
this.loading = false; |
|
|
|
this.tableList = res.data.deviceAttributeRecordList; |
|
|
|
this.tableList = res.rows; |
|
|
|
this.total = res.total; |
|
|
|
}); |
|
|
|
}, |
|
|
|
/** 下发属性 */ |
|
|
@ -147,15 +148,6 @@ export default { |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
/** 查询公告列表 */ |
|
|
|
getList() { |
|
|
|
this.loading = true; |
|
|
|
listNotice(this.queryParams).then(response => { |
|
|
|
this.noticeList = response.rows; |
|
|
|
this.total = response.total; |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
/** 新增按钮操作 */ |
|
|
|
handleAdd() { |
|
|
|
this.$message.success('操作成功'); |
|
|
|