From 1a0e4972f80278bfa9e53283374b745b6c968341 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 13 八月 2024 17:30:57 +0800
Subject: [PATCH] 设备信息管理模块

---
 common/dataProductionDeviceType.js |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/common/dataProductionDeviceType.js b/common/dataProductionDeviceType.js
index 916109e..abaac5b 100644
--- a/common/dataProductionDeviceType.js
+++ b/common/dataProductionDeviceType.js
@@ -58,4 +58,19 @@
   }
 }
 
-export { productionDevices };
+function toLabel(sceneType, valueArr) {
+  const labelArr = [];
+  let options = productionDevices(sceneType);
+  valueArr.forEach(v => {
+    if (options) {
+      const op = options.find(o => {
+        return o.value == v;
+      });
+      labelArr.push(op.label);
+      options = options.children;
+    }
+  });
+  return labelArr;
+}
+
+export { productionDevices, toLabel };

--
Gitblit v1.9.3