import { PublicConfigClass } from '@/packages/public'
import { chartInitConfig, requestSqlConfig } from '@/settings/designSetting'
import { CreateComponentType } from '@/packages/index.d'
import { TaskRadioConfig } from './index'
import cloneDeep from 'lodash/cloneDeep'

export const option = {
  textColor: '#FFFFFF',
  textSize: 14,
  colors: ['#004714','#74C288'],
  checkColor: '#00F535',
  dataValue: '1',
  dataset: [
    { label: '一般' ,value: '1' },
    { label: '较大' ,value: '2' },
    { label: '重大' ,value: '3' },
    { label: '特大' ,value: '4' }
  ]
}

export default class Config extends PublicConfigClass implements CreateComponentType {
  public key = TaskRadioConfig.key
  public attr = { ...chartInitConfig, w: 484, h: 40, zIndex: 1 }
  public chartConfig = cloneDeep(TaskRadioConfig)
  public option = cloneDeep(option)
  public request = { ...requestSqlConfig, requestSQLContent: { sql: 'select * from fm_fireclueinfo where "Id" = #{Id}' }, }
  public filter = "return res.result;"
}
