From 9aca5ea467645ad58ac31427f5cd1873e2df4cab Mon Sep 17 00:00:00 2001
From: Zhunianya <2698076424@qq.com>
Date: Wed, 17 Dec 2025 15:09:52 +0800
Subject: [PATCH] =?UTF-8?q?fix(=E6=97=A5=E5=BF=97):=20=E6=A0=87=E8=AF=86?=
=?UTF-8?q?=E7=AC=A6=E7=9A=84=E5=AD=97=E6=AE=B5=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vue/src/views/iot/device/device-log.vue | 50 ++++++++++++-------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/vue/src/views/iot/device/device-log.vue b/vue/src/views/iot/device/device-log.vue
index 6be328dd..6ed51f3a 100644
--- a/vue/src/views/iot/device/device-log.vue
+++ b/vue/src/views/iot/device/device-log.vue
@@ -6,8 +6,8 @@
-
-
+
+
@@ -36,7 +36,7 @@
{{ scope.row.createTime }}
-
+
@@ -103,7 +103,7 @@ export default {
deviceId: null,
serialNumber: null,
deviceName: null,
- identity: null,
+ identify: null,
isMonitor: null,
},
// 时间范围
@@ -145,7 +145,7 @@ export default {
formatValueDisplay(row) {
// 类型(1=属性上报,2=调用功能,3=事件上报,4=设备升级,5=设备上线,6=设备离线)
if (row.logType == 1) {
- let propertyItem = this.getThingsModelItem(1, row.identity);
+ let propertyItem = this.getThingsModelItem(1, row.identify);
if (propertyItem != "") {
return (propertyItem.parentName ? '[' + propertyItem.parentName + (propertyItem.arrayIndex ? propertyItem.arrayIndex : '') + '] ' : '') +
propertyItem.name +
@@ -153,7 +153,7 @@ export default {
(propertyItem.datatype.unit != undefined ? propertyItem.datatype.unit : '') + '';
}
} else if (row.logType == 2) {
- let functionItem = this.getThingsModelItem(2, row.identity);
+ let functionItem = this.getThingsModelItem(2, row.identify);
if (functionItem != "") {
return (functionItem.parentName ? '[' + functionItem.parentName + (functionItem.arrayIndex ? functionItem.arrayIndex : '') + '] ' : '') +
functionItem.name +
@@ -161,7 +161,7 @@ export default {
(functionItem.datatype.unit != undefined ? functionItem.datatype.unit : '') + '';
}
} else if (row.logType == 3) {
- let eventItem = this.getThingsModelItem(3, row.identity);
+ let eventItem = this.getThingsModelItem(3, row.identify);
if (eventItem != "") {
return (eventItem.parentName ? '[' + eventItem.parentName + (eventItem.arrayIndex ? eventItem.arrayIndex : '') + '] ' : '') +
eventItem.name +
@@ -199,17 +199,17 @@ export default {
return oldValue;
},
/** 获取物模型中的项*/
- getThingsModelItem(type, identity) {
+ getThingsModelItem(type, identify) {
if (type == 1 && this.thingsModel.properties) {
for (let i = 0; i < this.thingsModel.properties.length; i++) {
//普通类型 integer/decimal/string/emum//bool
- if (this.thingsModel.properties[i].id == identity) {
+ if (this.thingsModel.properties[i].id == identify) {
return this.thingsModel.properties[i];
}
// 对象 object
if (this.thingsModel.properties[i].datatype.type == "object") {
for (let j = 0; j < this.thingsModel.properties[i].datatype.params.length; j++) {
- if (this.thingsModel.properties[i].datatype.params[j].id == identity) {
+ if (this.thingsModel.properties[i].datatype.params[j].id == identify) {
this.thingsModel.properties[i].datatype.params[j].parentName = this.thingsModel.properties[i].name;
return this.thingsModel.properties[i].datatype.params[j];
}
@@ -219,14 +219,14 @@ export default {
if (this.thingsModel.properties[i].datatype.type == "array" && this.thingsModel.properties[i].datatype.arrayType) {
if (this.thingsModel.properties[i].datatype.arrayType == "object") {
// 数组元素格式:array_01_parentId_humidity,array_01_前缀终端上报时加上,物模型中没有
- let realIdentity = identity;
+ let realidentify = identify;
let arrayIndex = 0;
- if (identity.indexOf("array_") > -1) {
- arrayIndex = identity.substring(6, 8);
- realIdentity = identity.substring(9);
+ if (identify.indexOf("array_") > -1) {
+ arrayIndex = identify.substring(6, 8);
+ realidentify = identify.substring(9);
}
for (let j = 0; j < this.thingsModel.properties[i].datatype.params.length; j++) {
- if (this.thingsModel.properties[i].datatype.params[j].id == realIdentity) {
+ if (this.thingsModel.properties[i].datatype.params[j].id == realidentify) {
// 标注索引和父级名称
this.thingsModel.properties[i].datatype.params[j].arrayIndex = Number(arrayIndex) + 1;
this.thingsModel.properties[i].datatype.params[j].parentName = this.thingsModel.properties[i].name;
@@ -236,7 +236,7 @@ export default {
} else {
// 普通类型
for (let j = 0; j < this.thingsModel.properties[i].datatype.arrayCount.length; j++) {
- if (this.thingsModel.properties[i].id == realIdentity) {
+ if (this.thingsModel.properties[i].id == realidentify) {
this.thingsModel.properties[i].arrayIndex = Number(arrayIndex) + 1;
this.thingsModel.properties[i].parentName = "元素";
return this.thingsModel.properties[i];
@@ -249,13 +249,13 @@ export default {
} else if (type == 2 && this.thingsModel.functions) {
for (let i = 0; i < this.thingsModel.functions.length; i++) {
//普通类型 integer/decimal/string/emum/bool
- if (this.thingsModel.functions[i].id == identity) {
+ if (this.thingsModel.functions[i].id == identify) {
return this.thingsModel.functions[i];
}
// 对象 object
if (this.thingsModel.functions[i].datatype.type == "object") {
for (let j = 0; j < this.thingsModel.functions[i].datatype.params.length; j++) {
- if (this.thingsModel.functions[i].datatype.params[j].id == identity) {
+ if (this.thingsModel.functions[i].datatype.params[j].id == identify) {
this.thingsModel.functions[i].datatype.params[j].parentName = this.thingsModel.functions[i].name;
return this.thingsModel.functions[i].datatype.params[j];
}
@@ -264,15 +264,15 @@ export default {
// 数组 array
if (this.thingsModel.functions[i].datatype.type == "array" && this.thingsModel.functions[i].datatype.arrayType) {
// 数组元素格式:array_01_parentId_humidity,array_01_前缀终端上报时加上,物模型中没有
- let realIdentity = identity;
+ let realidentify = identify;
let arrayIndex = 0;
- if (identity.indexOf("array_") > -1) {
- arrayIndex = identity.substring(6, 8);
- realIdentity = identity.substring(9);
+ if (identify.indexOf("array_") > -1) {
+ arrayIndex = identify.substring(6, 8);
+ realidentify = identify.substring(9);
}
if (this.thingsModel.functions[i].datatype.arrayType == "object") {
for (let j = 0; j < this.thingsModel.functions[i].datatype.params.length; j++) {
- if (this.thingsModel.functions[i].datatype.params[j].id == realIdentity) {
+ if (this.thingsModel.functions[i].datatype.params[j].id == realidentify) {
// 标注索引和父级名称
this.thingsModel.functions[i].datatype.params[j].arrayIndex = Number(arrayIndex) + 1;
this.thingsModel.functions[i].datatype.params[j].parentName = this.thingsModel.functions[i].name;
@@ -282,7 +282,7 @@ export default {
} else {
// 普通类型
for (let j = 0; j < this.thingsModel.functions[i].datatype.arrayCount.length; j++) {
- if (this.thingsModel.functions[i].id == realIdentity) {
+ if (this.thingsModel.functions[i].id == realidentify) {
this.thingsModel.functions[i].arrayIndex = Number(arrayIndex) + 1;
this.thingsModel.functions[i].parentName = "元素";
return this.thingsModel.functions[i];
@@ -294,7 +294,7 @@ export default {
}
} else if (type == 3 && this.thingsModel.events) {
for (let i = 0; i < this.thingsModel.events.length; i++) {
- if (this.thingsModel.events[i].id == identity) {
+ if (this.thingsModel.events[i].id == identify) {
return this.thingsModel.events[i];
}
}