import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '指标ID',
    align:"center",
    dataIndex: 'id'
   },
   {
    title: '影响指标值的原因',
    align:"center",
    dataIndex: 'affectFactor'
   },
   {
    title: '大于警告值的风险',
    align:"center",
    dataIndex: 'geWarnRisk'
   },
   {
    title: '超过预警值应该采取的措施',
    align:"center",
    dataIndex: 'geWarnAct'
   },
   {
    title: '超过阀值应该采取的措施',
    align:"center",
    dataIndex: 'geTolAct'
   },
];

export const searchFormSchema: FormSchema[] = [
];

export const formSchema: FormSchema[] = [
  {
    label: '指标编码',
    field: 'mtrcNo',
    component: 'Input',
	  show: false
  },
  {
    label: '影响因素',
    field: 'affectFactor',
    component: 'InputTextArea',
    colProps: {lg: 24},
    itemProps:{labelCol:{xs: {span: 24},sm: {span: 3},},wrapperCol:{xs: {span: 24},sm: {span: 21},}},
    componentProps: {
      rows: 4
    }
  },
  {
    label: '超过阈值风险',
    field: 'geWarnRisk',
    component: 'InputTextArea',
    colProps: {lg: 24},
    itemProps:{labelCol:{xs: {span: 24},sm: {span: 3},},wrapperCol:{xs: {span: 24},sm: {span: 21},}},
    componentProps: {
      rows: 4
    }
  },
  {
    label: '超过预警措施',
    field: 'geTolAct',
    component: 'InputTextArea',
    colProps: {lg: 24},
    itemProps:{labelCol:{xs: {span: 24},sm: {span: 3},},wrapperCol:{xs: {span: 24},sm: {span: 21},}},
    componentProps: {
      rows: 4
    }
  },
  {
    label: '超过阈值措施',
    field: 'geWarnAct',
    component: 'InputTextArea',
    colProps: {lg: 24},
    itemProps:{labelCol:{xs: {span: 24},sm: {span: 3},},wrapperCol:{xs: {span: 24},sm: {span: 21},}},
    componentProps: {
      rows: 4
    }
  },
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	}
];


/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}