From 1a0e4972f80278bfa9e53283374b745b6c968341 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 13 八月 2024 17:30:57 +0800 Subject: [PATCH] 设备信息管理模块 --- common/dataTreatmentDeviceType.js | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/common/dataTreatmentDeviceType.js b/common/dataTreatmentDeviceType.js index 734bc25..c518f8f 100644 --- a/common/dataTreatmentDeviceType.js +++ b/common/dataTreatmentDeviceType.js @@ -58,4 +58,19 @@ } } -export { treatmentDevices }; +function toLabel(sceneType, valueArr) { + const labelArr = []; + let options = treatmentDevices(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 { treatmentDevices, toLabel }; -- Gitblit v1.9.3