import { BasicColumn, FormSchema } from '/@/components/Table';
import { alarmCellRender } from '/@/views/monitor/sealedMonitor/monitor.data';

export const boardData = [
  {
    label: '存在风险情况数量',
    value: '10',
  },
  {
    label: '低风险',
    value: '27',
  },
  {
    label: '一般风险',
    value: '27',
  },
  {
    label: '较高风险',
    value: '27',
  },
  {
    label: '高风险',
    value: '27',
  },
];
// 实时数据相关
export const columns: BasicColumn[] = [
  {
    title: '区域',
    dataIndex: 'areaName',
    fixed: 'left',
    width: 100,
  },
  {
    title: '煤矿名称',
    dataIndex: 'mineName',
    fixed: 'left',
    width: 200,
  },
  {
    title: '老空区永久密闭名称',
    dataIndex: 'devicePos',
    fixed: 'left',
    width: 200,
  },
  {
    title: '所属煤层',
    dataIndex: 'coalSeamName',
    width: 100,
  },
  {
    title: '自燃倾向性',
    dataIndex: 'coalSeamLevel',
    width: 100,
  },
  {
    title: 'CO(ppm)',
    width: 100,
    dataIndex: 'coVal',
  },
  {
    title: 'CO2(%)',
    width: 100,
    dataIndex: 'co2Val',
  },
  {
    title: 'CH4(%)',
    width: 100,
    dataIndex: 'ch4Val',
  },
  {
    title: 'C2H2(ppm)',
    dataIndex: 'c2h2Val',
    width: 100,
  },
  {
    title: 'C2H4(ppm)',
    dataIndex: 'c2h4Val',
    width: 100,
  },
  {
    title: 'O2(%)',
    dataIndex: 'o2Val',
    width: 100,
  },
  {
    title: '温度(℃)',
    dataIndex: 'temperature',
    width: 100,
  },
  {
    title: '温差(℃)',
    dataIndex: 'temperatureDiff',
    width: 100,
  },
  {
    title: '风险分析',
    dataIndex: 'alarmName',
    width: 100,
    customRender({ record }) {
      return alarmCellRender(record);
    },
  },
  {
    title: '分析时间',
    dataIndex: 'createTime',
    width: 100,
  },
  {
    title: '是否解决',
    customRender: () => '未解决',
    width: 100,
  },
];

export const schemas: FormSchema[] = [
  {
    label: '煤矿名称',
    field: 'deptId',
    component: 'MineCascader', // 自定义组件名
    colProps: { span: 6 },
    rules: [],
  },
  {
    label: '超限判定条件',
    field: 'alarmFiled',
    component: 'Select', // 自定义组件名
    colProps: { span: 6 },
    componentProps: {
      options: [
        {
          label: '甲烷',
          value: 'ch4Val',
        },
        {
          label: '氧气',
          value: 'o2Val',
        },
        {
          label: '一氧化碳',
          value: 'coVal',
        },
        {
          label: '二氧化碳',
          value: 'co2Val',
        },
        {
          label: '乙烯',
          value: 'c2h4Val',
        },
        {
          label: '乙炔',
          value: 'c2h2Val',
        },
        {
          label: '压差',
          value: 'sourcePressure',
        },
        {
          label: '温度',
          value: 'temperature',
        },
      ],
    },
    rules: [],
  },
];
