feiyu02
2024-05-06 9e0df95ffda0ef9f2339f7caf413b357640aea28
src/constant/radio-options.js
@@ -1,7 +1,17 @@
import { TYPE0, TYPE1, TYPE2 } from '@/constant/device-type';
// 监测因子单选框选项
export const radioOptions = {
  type0: [
    //无人机
function radioOptions(deviceType) {
  if ([TYPE0, TYPE1].includes(deviceType)) {
    return option1;
  } else if (deviceType == TYPE2) {
    return option2;
  } else {
    return [];
  }
}
const option1 = [
    {
      label: 'NO2',
      name: 'NO2',
@@ -42,9 +52,9 @@
      name: 'VOC',
      value: '10'
    }
  ],
  type1: [
    //无人船
];
const option2 = [
    {
      label: '温度',
      name: '温度',
@@ -70,5 +80,5 @@
      name: 'PH',
      value: '5'
    }
  ]
};
];
export { radioOptions };