import type {ErrorSystem} from "@/api/device/interface/error"

const errordata = ref<ErrorSystem.ErrorSystemList[]>([
      {
        id: '1',
        name: 'Q/GDW 1650.2-2016-A',
        standard_Name:'Q/GDW 1650.2-2016',
        standard_Time:'2016',
        dev_Level:'A级',
        enable:1,
        state:1,
      },
      {
        id: '2',
        name: 'Q/GDW 1650.2-2021-A',
        standard_Name:'Q/GDW 1650.2-2021',
        standard_Time:'2021',
        dev_Level:'A级',
        enable:1,
        state:1,
      },
      {
        id: '3',
        name: 'GBT 19862-2016-A',
        standard_Name:'GBT 19862-2016',
        standard_Time:'2016',
        dev_Level:'A级',
        enable:1,
        state:1,
      },
    ])

    const errorADetail = ref<ErrorSystem.Error_detail[]>([
      {
           col1: '电压偏差',
           col2: '',
           deviceLevel: 'A', 
           measurementType:'电压',
           condition: '10%~150%标称电压', 
           maxErrorValue: '±0.1%Un' 
      },
      {
          col1:'频率偏差',
          col2: '',
           deviceLevel: 'A',
           measurementType:'频率',
           condition: '42.5~57.5 Hz',
           maxErrorValue: '±0.01Hz'
      },
      {
          col1:'三相不平衡度',
          col2: '',
         deviceLevel: 'A',
         measurementType:'电压',
         condition: '0.5%~5%',
         maxErrorValue: '±0.15%'
      },
      {
          col1:'三相不平衡度',
          col2: '',
        deviceLevel: 'A',
        measurementType:'电压',
        condition: '5%（不包含）~ 40%',
        maxErrorValue: '±0.3%'
     },
     {
         col1:'三相不平衡度',
         col2: '',
      deviceLevel: 'A',
      measurementType:'电流',
      condition: '',
      maxErrorValue: '±1%'
      },
      {
          col1:'电压波动',
          col2: '电压幅值',
        deviceLevel: 'A',
        measurementType:'电压',
        condition: '',
        maxErrorValue: '±0.2%Un'
      },
      {
          col1:'电压波动',
          col2: '持续时间',
        deviceLevel: 'A',
        measurementType:'时间',
        condition: '',
        maxErrorValue: '±1周波'
      },
      {
          col1:'闪变',
          col2: '',
        deviceLevel: 'A',
        measurementType:'短时间闪变',
        condition: 'Pst：0.2~10',
        maxErrorValue: '±5%'
      },
      {
          col1:'谐波和间谐波',
          col2: '',
        deviceLevel: 'A',
        measurementType:'电压',
        condition: 'Uh≥1%Un',
        maxErrorValue: '±5%Uh'
      },
      {
          col1:'谐波和间谐波',
          col2: '',
        deviceLevel: 'A',
        measurementType:'电压',
        condition: 'Uh＜1%Un',
        maxErrorValue: '±0.05%Un'
      },
      {
          col1:'谐波和间谐波',
          col2: '',
        deviceLevel: 'A',
        measurementType:'电流',
        condition: 'In≥3%In',
        maxErrorValue: '±5%Ih'
      },
      {
          col1:'谐波和间谐波',
          col2: '',
        deviceLevel: 'A',
        measurementType:'电流',
        condition: 'In＜3%In',
        maxErrorValue: '±0.15%In'
      },
      {
          col1:'谐波和间谐波',
          col2: '',
        deviceLevel: 'A',
        measurementType:'相角',
        condition: '',
        maxErrorValue: 'h≤5,±1°*h'
      },
      {
          col1:'谐波和间谐波',
          col2: '',
        deviceLevel: 'A',
        measurementType:'相角',
        condition: '',
        maxErrorValue: 'h>5,±5°'
      },
      {
          col1:'谐波和间谐波',
          col2: '',
        deviceLevel: 'A',
        measurementType:'功率',
        condition: 'Ph≥150W',
        maxErrorValue: '±1%Ph'
      },
      {
          col1:'谐波和间谐波',
          col2: '',
        deviceLevel: 'A',
        measurementType:'功率',
        condition: 'Ph＜150W',
        maxErrorValue: '±1.5W'
      },
      {
          col1:'高频次谐波',
          col2: '',
        deviceLevel: 'A',
        measurementType:'电压',
        condition: 'Uh≥1%Un',
        maxErrorValue: '±5%Uh'
      },
      {
          col1:'高频次谐波',
          col2: '',
        deviceLevel: 'A',
        measurementType:'电压',
        condition: 'Uh＜1%Un',
        maxErrorValue: '±0.05%Un'
      },
      {
          col1:'高频次谐波',
          col2: '',
        deviceLevel: 'A',
        measurementType:'电流',
        condition: 'In≥3%In',
        maxErrorValue: '±5%Ih'
      },
      {
          col1:'高频次谐波',
          col2: '',
        deviceLevel: 'A',
        measurementType:'电流',
        condition: 'In＜3%In',
        maxErrorValue: '±0.15%In'
      },
      {
          col1:'功率',
          col2: '',
        deviceLevel: 'A',
        measurementType:'功率',
        condition: '',
        maxErrorValue: '±0.5%'
      },
      {
          col1:'电流',
          col2: '',
        deviceLevel: 'A',
        measurementType:'电流',
        condition: 'I≥0.05In',
        maxErrorValue: '±0.5%'
      },
      {
          col1:'电流',
          col2: '',
        deviceLevel: 'A',
        measurementType:'电流',
        condition: '0.01In≤I＜0.05In',
        maxErrorValue: '±1%'
      },
      {
        col1: '电压暂降、电压暂升和短时中断',
          col2: '电压幅值',
        deviceLevel: 'A',
        measurementType:'电压',
        condition: '',
        maxErrorValue: '±0.2%Un'
      },
      {
        col1: '电压暂降、电压暂升和短时中断',
        col2: '持续时间',
        deviceLevel: 'A',
        measurementType:'时间',
        condition: '',
        maxErrorValue: '±1周波'
      },
    ])
    
    const errorSDetail = ref<ErrorSystem.Error_detail[]>([
      {
           col1: '电压偏差',
           col2: '',
           deviceLevel: 'S', 
           measurementType:'电压',
           condition: '20%~120%标称电压', 
           maxErrorValue: '±0.5%' 
      },
      {
          col1:'频率偏差',
          col2: '',
           deviceLevel: 'S',
           measurementType:'频率',
           condition: '42.5~57.5 Hz',
           maxErrorValue: '±0.05Hz'
      },
      {
          col1:'三相不平衡度',
          col2: '',
         deviceLevel: 'S',
         measurementType:'电压',
         condition: '1%~5%',
         maxErrorValue: '±0.2%'
      },
      {
          col1:'三相不平衡度',
          col2: '',
        deviceLevel: 'S',
        measurementType:'电压',
        condition: '5%（不包含）~ 40%',
        maxErrorValue: '±0.6%'
     },
     {
         col1:'三相不平衡度',
         col2: '',
         deviceLevel: 'S',
         measurementType:'电流',
         condition: '',
         maxErrorValue: '±1%'
      },
      {
          col1:'电压波动',
          col2: '电压幅值',
        deviceLevel: 'S',
        measurementType:'电压',
        condition: '',
        maxErrorValue: '±1.0%Un'
      },
      {
          col1:'电压波动',
          col2: '持续时间',
        deviceLevel: 'S',
        measurementType:'时间',
        condition: '使用半波刷新方均根值',
        maxErrorValue: '±1周波'
      },
      {
        col1:'电压波动',
        col2: '持续时间',
      deviceLevel: 'S',
      measurementType:'时间',
      condition: '使用全波刷新方均根值',
      maxErrorValue: '±2周波'
    },
      {
          col1:'闪变',
          col2: '',
        deviceLevel: 'S',
        measurementType:'短时间闪变',
        condition: 'Pst：0.4~4',
        maxErrorValue: '±10%'
      },
      {
          col1:'谐波和间谐波',
          col2: '',
        deviceLevel: 'S',
        measurementType:'电压',
        condition: 'Uh≥3%Un',
        maxErrorValue: '±5%Uh'
      },
      {
          col1:'谐波和间谐波',
          col2: '',
        deviceLevel: 'S',
        measurementType:'电压',
        condition: 'Uh＜3%Un',
        maxErrorValue: '±0.15%Un'
      },
      {
          col1:'谐波和间谐波',
          col2: '',
        deviceLevel: 'S',
        measurementType:'电流',
        condition: 'In≥10%In',
        maxErrorValue: '±5%Ih'
      },
      {
          col1:'谐波和间谐波',
          col2: '',
        deviceLevel: 'S',
        measurementType:'电流',
        condition: 'In＜10%In',
        maxErrorValue: '±0.5%In'
      },
      {
          col1:'高频次谐波',
          col2: '',
        deviceLevel: 'S',
        measurementType:'电压',
        condition: 'Uh≥3%Un',
        maxErrorValue: '±5%Uh'
      },
      {
          col1:'高频次谐波',
          col2: '',
        deviceLevel: 'S',
        measurementType:'电压',
        condition: 'Uh＜3%Un',
        maxErrorValue: '±0.15%Un'
      },
      {
          col1:'高频次谐波',
          col2: '',
        deviceLevel: 'S',
        measurementType:'电流',
        condition: 'In≥10%In',
        maxErrorValue: '±5%Ih'
      },
      {
          col1:'高频次谐波',
          col2: '',
        deviceLevel: 'S',
        measurementType:'电流',
        condition: 'In＜10%In',
        maxErrorValue: '±0.5%In'
      },
      {
          col1:'功率',
          col2: '',
        deviceLevel: 'S',
        measurementType:'功率',
        condition: '',
        maxErrorValue: '±0.5%'
      },
      {
          col1:'电流',
          col2: '',
        deviceLevel: 'S',
        measurementType:'电流',
        condition: 'I≥0.05In',
        maxErrorValue: '±0.5%'
      },
      {
          col1:'电流',
          col2: '',
        deviceLevel: 'S',
        measurementType:'电流',
        condition: '0.01In≤I＜0.05In',
        maxErrorValue: '±1%'
      },
      {
        col1: '电压暂降、电压暂升和短时中断',
          col2: '电压幅值',
        deviceLevel: 'S',
        measurementType:'电压',
        condition: '',
        maxErrorValue: '±1.0%Un'
      },
      {
        col1: '电压暂降、电压暂升和短时中断',
        col2: '持续时间',
        deviceLevel: 'S',
        measurementType:'时间',
        condition: '使用半波刷新方均根值',
        maxErrorValue: '±1周波'
      },
      {
        col1: '电压暂降、电压暂升和短时中断',
        col2: '持续时间',
        deviceLevel: 'S',
        measurementType:'时间',
        condition: '使用全波刷新方均根值',
        maxErrorValue: '±2周波'
      },
    ])
    
    export default {errordata,errorADetail,errorSDetail}