From e2ee83dae86dfab479d18c25608018d7c9c130ae Mon Sep 17 00:00:00 2001
From: fhysy <1149505133@qq.com>
Date: Wed, 21 May 2025 17:40:43 +0800
Subject: [PATCH] =?UTF-8?q?feat(iot):=20=E6=B7=BB=E5=8A=A0=E8=AE=BE?=
=?UTF-8?q?=E5=A4=87=E5=8A=9F=E8=83=BD=E6=8E=A7=E5=88=B6=E6=8E=A5=E5=8F=A3?=
=?UTF-8?q?=E3=80=81=E7=89=A9=E6=A8=A1=E5=9E=8B=E6=B7=BB=E5=8A=A0=E4=BA=8B?=
=?UTF-8?q?=E4=BB=B6=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 新增 setFunctionControl 函数用于设备功能控制
- 优化型号列表展示,增加型号名称的链接
- 物模型添加事件配置
- 优化数据加载和提交逻辑
---
src/api/iot/device.js | 8 +
src/views/iot/device/profile/functionWrap.vue | 97 ++-
src/views/iot/model/index.vue | 549 ++++++-------
.../profile/attribute/eventFormModel.vue | 721 ++++++++++++++++++
src/views/profile/attribute/eventView.vue | 440 +++++++++++
.../profile/attribute/functionFormModel.vue | 35 +-
src/views/profile/attribute/functionView.vue | 181 +++--
src/views/profile/attribute/index.vue | 73 +-
src/views/profile/attribute/paramsJson.vue | 125 +--
9 files changed, 1740 insertions(+), 489 deletions(-)
create mode 100644 src/views/profile/attribute/eventFormModel.vue
create mode 100644 src/views/profile/attribute/eventView.vue
diff --git a/src/api/iot/device.js b/src/api/iot/device.js
index dfec29db..d5dd5f71 100644
--- a/src/api/iot/device.js
+++ b/src/api/iot/device.js
@@ -265,3 +265,11 @@ export function deviceSendTimingConfig(data) {
data: data
});
}
+// 功能下发
+export function setFunctionControl(data) {
+ return request({
+ url: "/iot/dev/opt/function",
+ method: "post",
+ data: data
+ });
+}
diff --git a/src/views/iot/device/profile/functionWrap.vue b/src/views/iot/device/profile/functionWrap.vue
index 1991540d..537a8b59 100644
--- a/src/views/iot/device/profile/functionWrap.vue
+++ b/src/views/iot/device/profile/functionWrap.vue
@@ -333,7 +333,7 @@
+.enum-box {
+ border: 1px solid #d8d7d7;
+ padding: 10px;
+ margin-bottom: 10px;
+
+ .enum-header {
+ margin-bottom: 10px;
+ }
+}
+
+.is-error input {
+ border-color: #F56C6C;
+}
+
+.el-form-item__error {
+ color: #F56C6C;
+ font-size: 12px;
+ line-height: 1;
+ padding-top: 4px;
+ position: absolute;
+ top: 100%;
+ left: 0;
+}
+
+
+
diff --git a/src/views/profile/attribute/eventView.vue b/src/views/profile/attribute/eventView.vue
new file mode 100644
index 00000000..8e122ef0
--- /dev/null
+++ b/src/views/profile/attribute/eventView.vue
@@ -0,0 +1,440 @@
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+ {{ eventLevel[scope.row.expands.level] }}
+
+
+
+
+ {{
+ scope.row.valueType ? scope.row.valueType.properties.length : 0
+ }}
+
+
+
+
+ 修改
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/profile/attribute/functionFormModel.vue b/src/views/profile/attribute/functionFormModel.vue
index 0f38f8bb..d1367e85 100644
--- a/src/views/profile/attribute/functionFormModel.vue
+++ b/src/views/profile/attribute/functionFormModel.vue
@@ -35,9 +35,9 @@
{{ scope.row.expands.required ? '是' : '否'}}
-
+
- {{ funDataTypeOption[scope.row.funDataType] }}
+ {{ dataTypeOption[scope.row.valueType.type] }}
-
-
+
+
-
+