import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { optionsListApi } from '/@/api/demo/select';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '指标编号',
    align:"center",
    dataIndex: 'mtrcNo',
    width :100,
   },
   {
    title: '指标名称',
    align:"left",
    dataIndex: 'mtrcName',
    width :240,
   },
  /** 
   {
    title: '所属领域id',
    align:"center",
    dataIndex: 'domainNo_dictText'
   },*/
   {
    title: '所属领域',
    align:"left",
    dataIndex: 'domainNo',
    width :240,
   },/**
   {
    title: '监测频率',
    align:"center",
    dataIndex: 'collFreq_dictText'
   }, */
   {
    title: '监测频率',
    align:"left",
    dataIndex: 'collFreqname',
    width :100,
   },/**
   {
    title: '采集方式',
    align:"center",
    dataIndex: 'mtrcClass'
   },*/
   {
    title: '采集方式',
    align:"left",
    dataIndex: 'mtrcClassname',
    width :100,
   },
   {
    title: '首页统计',
    align:"left",
    dataIndex: 'pageStatus',
    width :100,
   
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '首页统计',
    field: 'pageStatus',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"rate_approve",
        stringToNumber: false,
        type: 'radio',
     },
     
  },

// TODO 主键隐藏字段，目前写死为ID
{
  label: '',
  field: 'id',
  component: 'Input',
  show: false
},
];

//表单数据
export const formSchemabak: FormSchema[] = [
  {
    label: '指标编号',
    field: 'mtrcNo',
    component: 'Input',
  },
  {
    label: '指标名称',
    field: 'mtrcName',
    component: 'Input',
  },/** 
  {
    label: '所属领域id',
    field: 'domainNo',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:""
     },
  },*/
  {
    label: '所属领域',
    field: 'domain',
    component: 'Input',
  },
  {
    label: '监测频率',
    field: 'collFreq',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"colletrate"
     },
  },/** 
  {
    label: '监测频率',
    field: 'collFreqname',
    component: 'Input',
  },*/
  {
    label: '采集方式',
    field: 'mtrcClass',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"colletway"
     },
  },/** 
  {
    label: '采集方式',
    field: 'mtrcClassname',
    component: 'Input',
  },*/
  {
    label: '首页统计',
    field: 'pageStatus',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"rate_approve"
     },
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



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