/**
 * 水表口径
 */
const dnTypeMap = [
  { value: 3, label: "DN15", },
  { value: 5, label: "DN20", },
  { value: 8, label: "DN25", },
  { value: 12, label: "DN32", },
  { value: 20, label: "DN40", },
  { value: 32, label: "DN50", },
  { value: 60, label: "DN65", },
  { value: 79, label: "DN80", },
  { value: 125, label: "DN100", },
  { value: 200, label: "DN125", },
  { value: 312, label: "DN150", },
  { value: 500, label: "DN200", },
  { value: 787, label: "DN250", },
  { value: 1250, label: "DN300", },
  { value: 2000, label: "DN400", },
  { value: 3125, label: "DN500", },
  { value: 5000, label: "DN600", },
  { value: 7875, label: "DN800", },
]

/**
 * 安装方向
 */
const setupDirMap = [
  { value: '0', label: "正向", },
  { value: '1', label: "反向", },
  { value: '2', label: "左90°", },
  { value: '3', label: "右90°", },
]

/**
 * 水表尾数单位
 */
const unitTypeMap = [
  {
    value: 1,
    label: 0.001,
  },
  {
    value: 2,
    label: 0.01,
  },
  {
    value: 3,
    label: 0.1,
  },
  {
    value: 4,
    label: 1,
  },
  {
    value: 5,
    label: 10,
  },
  {
    value: 6,
    label: 100,
  },
  {
    value: 7,
    label: 1000,
  },
  {
    value: 8,
    label: 10000,
  }
]

/**
 * 压力表精度
 */
const pgPrecisionTypeMap = [
  {
    value: 0,
    label: 1,
  },
  {
    value: 1,
    label: 0.1,
  },
  {
    value: 2,
    label: 0.01,
  },
  {
    value: 3,
    label: 0.001,
  },
  {
    value: 4,
    label: 0.0001,
  },
]


type mapStatee = Record<string, string>;
/**
 * 设备类型
 */
const deviceTypeMap: mapStatee = {
  1: "水表",
  2: "压力表",
  3: "煤气表",
};

/**
 * 水表字体样式
 */
const meterFontStyle: mapStatee = {
  0: "黑底白字",
  1: "白底黑字",
}

//type numberKeyMap = Record<number, string>;
/**
 * 压力表计量单位
 */
const pgDeviceUnitMap = [
  {
    value: 0,
    label: 'MPa',
  },
  {
    value: 1,
    label: 'Pa',
  }, {
    value: 2,
    label: 'KPa',
  }, {
    value: 3,
    label: 'psi',
  }, {
    value: 4,
    label: 'bar',
  }, {
    value: 5,
    label: 'mbar',
  }, {
    value: 6,
    label: 'kgf/cm²',
  }, {
    value: 7,
    label: 'mmHg',
  }, {
    value: 8,
    label: 'atm',
  },
]

//日志上传等级
const logUploadLevel = [
  {
    value: 0,
    label: '不传',
  },{
    value: 1,
    label: '精简',
  }, {
    value: 2,
    label: '全部',
  },
]


/**
 * 天线类型
 */
const tianxianType: mapStatee = {
  0:'外置',
  1:'内置'
}

/**
 * 串口日志的来源
 */
const comLogFrom: mapStatee = {
  0:'APP',
  1:'配置任务',
  2:'错误上传',
  3:'手动触发'
}

/**
 * 压力表人工配置坐标点的优先级
 */
 const PGManualConfigLevel: mapStatee = {
  0:'低',
  1:'高',
}

export default {
  dnTypeMap,
  setupDirMap,
  unitTypeMap,
  pgPrecisionTypeMap,
  deviceTypeMap,
  meterFontStyle,
  pgDeviceUnitMap,
  logUploadLevel,
  tianxianType,
  comLogFrom,
  PGManualConfigLevel
}