export const colorConfig = {
  success: '#67c23a',
  error: '#c23a3a'
}
export const anomaly_tableColums = (isError:any) => {
  return [
    {
      name: '序号',
      type: 'index',
      width: '100px',
    },
    {
      name: '数据类型',
      code: 'jobDesc',
    },
    // {
    //   name: '任务指标',
    //   code: '',
    // },
    {
      name: '状态结果',
      code: 'runStatus',
      width: '200px',
      render: (row:any) => {
        const val = row.runStatus
        const color = isError(val) ? colorConfig.error : colorConfig.success
        return <span style={`color:${color}`}>{val}</span>
      }
    },
    {
      name: '监测时间',
      code: 'handleTime',
    },
  ]
}