mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
修复设备显示和Webhook时间戳问题
This commit is contained in:
@@ -27,7 +27,7 @@ public class MqttClientConnectModel
|
|||||||
private Integer proto_ver;
|
private Integer proto_ver;
|
||||||
|
|
||||||
/** 时间戳(秒) **/
|
/** 时间戳(秒) **/
|
||||||
private Integer connected_at;
|
private Long connected_at;
|
||||||
|
|
||||||
/** 错误原因 **/
|
/** 错误原因 **/
|
||||||
private String reason;
|
private String reason;
|
||||||
@@ -80,11 +80,11 @@ public class MqttClientConnectModel
|
|||||||
this.proto_ver = proto_ver;
|
this.proto_ver = proto_ver;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getConnected_at() {
|
public Long getConnected_at() {
|
||||||
return connected_at;
|
return connected_at;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setConnected_at(Integer connected_at) {
|
public void setConnected_at(Long connected_at) {
|
||||||
this.connected_at = connected_at;
|
this.connected_at = connected_at;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -242,8 +242,8 @@ public class DeviceServiceImpl implements IDeviceService {
|
|||||||
JSONObject thingsModelObject = JSONObject.parseObject(thingsModelService.getCacheThingsModelByProductId(deviceList.get(i).getProductId()));
|
JSONObject thingsModelObject = JSONObject.parseObject(thingsModelService.getCacheThingsModelByProductId(deviceList.get(i).getProductId()));
|
||||||
JSONArray properties = thingsModelObject.getJSONArray("properties");
|
JSONArray properties = thingsModelObject.getJSONArray("properties");
|
||||||
JSONArray functions = thingsModelObject.getJSONArray("functions");
|
JSONArray functions = thingsModelObject.getJSONArray("functions");
|
||||||
// 物模型转换为对象中的不同类别集合
|
// 物模型转换为对象中的不同类别集合,isOnlyRead忘了干啥用的,暂时保留吧
|
||||||
convertJsonToCategoryList(properties, deviceList.get(i), true, true);
|
convertJsonToCategoryList(properties, deviceList.get(i), true, false);
|
||||||
convertJsonToCategoryList(functions, deviceList.get(i), true, false);
|
convertJsonToCategoryList(functions, deviceList.get(i), true, false);
|
||||||
deviceList.get(i).setThingsModelValue("");
|
deviceList.get(i).setThingsModelValue("");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,19 +82,19 @@
|
|||||||
<el-descriptions :column="2" border size="mini" style="height:82px;margin-top:10px;overflow:hidden;">
|
<el-descriptions :column="2" border size="mini" style="height:82px;margin-top:10px;overflow:hidden;">
|
||||||
<el-descriptions-item v-for="subItem in item.readOnlyList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
<el-descriptions-item v-for="subItem in item.readOnlyList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<span style="white-space: nowrap;text-overflow: ellipsis;width:40px;overflow:hidden;height:40px;">{{subItem.name}}</span>
|
<span style="white-space: nowrap;text-overflow: ellipsis;min-width:48px;overflow:hidden;height:40px;">{{subItem.name}}</span>
|
||||||
</template>
|
</template>
|
||||||
<el-link type="primary" :underline="false" style="white-space: nowrap;">{{subItem.shadow==""?"0":subItem.shadow}} {{subItem.unit==null?"":subItem.unit}}</el-link>
|
<el-link type="primary" :underline="false" style="white-space: nowrap;">{{subItem.shadow==""?"0":subItem.shadow}} {{subItem.unit==null?"":subItem.unit}}</el-link>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item v-for="subItem in item.boolList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
<el-descriptions-item v-for="subItem in item.boolList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<div style="white-space: nowrap;text-overflow:ellipsis;width:40px;overflow:hidden;" :title="subItem.name">{{subItem.name}}</div>
|
<div style="white-space: nowrap;text-overflow:ellipsis;min-width:48px;overflow:hidden;" :title="subItem.name">{{subItem.name}}</div>
|
||||||
</template>
|
</template>
|
||||||
<el-switch v-model="subItem.shadow" @change="publishThingsModel(item,subItem)" :active-value="'1'" :inactive-value="'0'" :disabled="shadowUnEnable(item)" />
|
<el-switch v-model="subItem.shadow" @change="publishThingsModel(item,subItem)" :active-value="'1'" :inactive-value="'0'" :disabled="shadowUnEnable(item)" />
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item v-for="subItem in item.enumList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
<el-descriptions-item v-for="subItem in item.enumList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<div style="white-space: nowrap;text-overflow:ellipsis;width:40px;overflow:hidden;" :title="subItem.name">{{subItem.name}}</div>
|
<div style="white-space: nowrap;text-overflow:ellipsis;min-width:48px;overflow:hidden;" :title="subItem.name">{{subItem.name}}</div>
|
||||||
</template>
|
</template>
|
||||||
<el-select v-model="subItem.shadow" placeholder="请选择" @change="publishThingsModel(item,subItem)" clearable size="mini" :title="subItem.name" :disabled="shadowUnEnable(item)">
|
<el-select v-model="subItem.shadow" placeholder="请选择" @change="publishThingsModel(item,subItem)" clearable size="mini" :title="subItem.name" :disabled="shadowUnEnable(item)">
|
||||||
<el-option v-for="children in subItem.enumList" :key="children.value" :label="children.text" :value="children.value" />
|
<el-option v-for="children in subItem.enumList" :key="children.value" :label="children.text" :value="children.value" />
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item v-for="subItem in item.decimalList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
<el-descriptions-item v-for="subItem in item.decimalList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<div style="white-space: nowrap;text-overflow:ellipsis;width:40px;overflow:hidden;" :title="subItem.name">{{subItem.name}}</div>
|
<div style="white-space: nowrap;text-overflow:ellipsis;min-width:48px;overflow:hidden;" :title="subItem.name">{{subItem.name}}</div>
|
||||||
</template>
|
</template>
|
||||||
<el-input v-model="subItem.shadow" :placeholder="'小数:'+subItem.name" size="mini" :title="'小数:'+subItem.name" :disabled="shadowUnEnable(item)">
|
<el-input v-model="subItem.shadow" :placeholder="'小数:'+subItem.name" size="mini" :title="'小数:'+subItem.name" :disabled="shadowUnEnable(item)">
|
||||||
<el-button slot="append" icon="el-icon-s-promotion" @click="publishThingsModel(item,subItem)" style="font-size:16px;padding:10px;" title="指令发送"></el-button>
|
<el-button slot="append" icon="el-icon-s-promotion" @click="publishThingsModel(item,subItem)" style="font-size:16px;padding:10px;" title="指令发送"></el-button>
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item v-for="subItem in item.integerList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
<el-descriptions-item v-for="subItem in item.integerList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<div style="white-space: nowrap;text-overflow:ellipsis;width:40px;overflow:hidden;" :title="subItem.name">{{subItem.name}}</div>
|
<div style="white-space: nowrap;text-overflow:ellipsis;min-width:48px;overflow:hidden;" :title="subItem.name">{{subItem.name}}</div>
|
||||||
</template>
|
</template>
|
||||||
<el-input v-model="subItem.shadow" :placeholder="'整数:'+subItem.name" :title="'整数:'+subItem.name" size="mini" :disabled="shadowUnEnable(item)">
|
<el-input v-model="subItem.shadow" :placeholder="'整数:'+subItem.name" :title="'整数:'+subItem.name" size="mini" :disabled="shadowUnEnable(item)">
|
||||||
<el-button slot="append" icon="el-icon-s-promotion" @click="publishThingsModel(item,subItem)" style="font-size:16px;padding:10px;" title="指令发送"></el-button>
|
<el-button slot="append" icon="el-icon-s-promotion" @click="publishThingsModel(item,subItem)" style="font-size:16px;padding:10px;" title="指令发送"></el-button>
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item v-for="subItem in item.arrayList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
<el-descriptions-item v-for="subItem in item.arrayList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<div style="white-space: nowrap;text-overflow:ellipsis;width:40px;overflow:hidden;" :title="subItem.name">{{subItem.name}}</div>
|
<div style="white-space: nowrap;text-overflow:ellipsis;min-width:48px;overflow:hidden;" :title="subItem.name">{{subItem.name}}</div>
|
||||||
</template>
|
</template>
|
||||||
<el-input v-model="subItem.shadow" :placeholder="'数组:'+subItem.name" :title="'数组:'+subItem.name" size="mini" :disabled="shadowUnEnable(item)">
|
<el-input v-model="subItem.shadow" :placeholder="'数组:'+subItem.name" :title="'数组:'+subItem.name" size="mini" :disabled="shadowUnEnable(item)">
|
||||||
<el-button slot="append" icon="el-icon-s-promotion" @click="publishThingsModel(item,subItem)" style="font-size:16px;padding:10px;" title="指令发送"></el-button>
|
<el-button slot="append" icon="el-icon-s-promotion" @click="publishThingsModel(item,subItem)" style="font-size:16px;padding:10px;" title="指令发送"></el-button>
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item v-for="subItem in item.stringList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
<el-descriptions-item v-for="subItem in item.stringList" :key="subItem.id" :contentStyle="{height:'40px'}">
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
<div style="white-space: nowrap;text-overflow:ellipsis;width:40px;overflow:hidden;" :title="subItem.name">{{subItem.name}}</div>
|
<div style="white-space: nowrap;text-overflow:ellipsis;min-width:48px;overflow:hidden;" :title="subItem.name">{{subItem.name}}</div>
|
||||||
</template>
|
</template>
|
||||||
<el-input v-model="subItem.shadow" :placeholder="'字符串:'+subItem.name" :title="'字符串:'+subItem.name" size="mini" :disabled="shadowUnEnable(item)">
|
<el-input v-model="subItem.shadow" :placeholder="'字符串:'+subItem.name" :title="'字符串:'+subItem.name" size="mini" :disabled="shadowUnEnable(item)">
|
||||||
<el-button slot="append" icon="el-icon-s-promotion" @click="publishThingsModel(item,subItem)" style="font-size:16px;padding:10px;" title="指令发送"></el-button>
|
<el-button slot="append" icon="el-icon-s-promotion" @click="publishThingsModel(item,subItem)" style="font-size:16px;padding:10px;" title="指令发送"></el-button>
|
||||||
|
|||||||
Reference in New Issue
Block a user