From 1788c96aea9247cc36ef8b82734997f1a6a92fb4 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 23 八月 2024 11:07:42 +0800 Subject: [PATCH] 新增新版本。静安区特供版 --- src/constant/radio-options.js | 93 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 93 insertions(+), 0 deletions(-) diff --git a/src/constant/radio-options.js b/src/constant/radio-options.js index 2a0067d..c56bd55 100644 --- a/src/constant/radio-options.js +++ b/src/constant/radio-options.js @@ -1 +1,94 @@ +import { TYPE0, TYPE1, TYPE2 } from '@/constant/device-type'; +import { option1, option2 } from '@/constant/radio-options/options'; +import { option1 as option1Jingan } from '@/constant/radio-options/options-jingan'; + // 鐩戞祴鍥犲瓙鍗曢�夋閫夐」 +function radioOptions(deviceType) { + if (import.meta.env.VITE_DATA_MODE == 'jingan') { + if (TYPE0 == deviceType) { + return option1Jingan; + } else { + return []; + } + } else { + if ([TYPE0, TYPE1].includes(deviceType)) { + return option1; + } else if (deviceType == TYPE2) { + return option2; + } else { + return []; + } + } +} + +// const option1 = [ +// { +// label: 'NO2', +// name: 'NO2', +// value: '1' +// }, +// { +// label: 'CO', +// name: 'CO', +// value: '2' +// }, +// { +// label: 'H2S', +// name: 'H2S', +// value: '3' +// }, +// { +// label: 'SO2', +// name: 'SO2', +// value: '4' +// }, +// { +// label: 'O3', +// name: 'O3', +// value: '5' +// }, +// { +// label: 'PM2.5', +// name: 'PM25', +// value: '6' +// }, +// { +// label: 'PM10', +// name: 'PM10', +// value: '7' +// }, +// { +// label: 'TVOC', +// name: 'VOC', +// value: '10' +// } +// ]; + +// const option2 = [ +// { +// label: '娓╁害', +// name: 'TMP', +// value: '1' +// }, +// { +// label: '鐢靛鐜�', +// name: 'spC', +// value: '2' +// }, +// { +// label: '娴婂害', +// name: 'tur', +// value: '3' +// }, +// { +// label: '婧惰В姘�', +// name: 'DO', +// value: '4' +// }, +// { +// label: 'PH', +// name: 'PH', +// value: '5' +// } +// ]; +export { radioOptions }; -- Gitblit v1.9.3