| | |
| | | |
| | | // 监测设备类型 |
| | | function monitorDevices(sceneType) { |
| | | switch (sceneType) { |
| | | switch (parseInt(sceneType)) { |
| | | // 工地,码头,搅拌站,堆场 |
| | | case '1': |
| | | case '2': |
| | | case '3': |
| | | case '14': |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | case 14: |
| | | return dustDeviceType; |
| | | // 餐饮 |
| | | case '5': |
| | | case 5: |
| | | return fumeDeviceType; |
| | | // 工业企业,汽修 |
| | | case '4': |
| | | case '6': |
| | | case 4: |
| | | case 6: |
| | | return vocDeviceType; |
| | | default: |
| | | return dustDeviceTypebreak; |
| | | return dustDeviceType; |
| | | } |
| | | } |
| | | |
| | | export { monitorDevices }; |
| | | function toLabel(sceneType, valueArr) { |
| | | const labelArr = []; |
| | | let options = monitorDevices(sceneType); |
| | | valueArr.forEach(v => { |
| | | if (options) { |
| | | const op = options.find(o => { |
| | | return o.value == v; |
| | | }); |
| | | labelArr.push(op.label); |
| | | options = options[0].children; |
| | | } |
| | | }); |
| | | return labelArr; |
| | | } |
| | | |
| | | export { monitorDevices, toLabel }; |