
export const tableColumnsConfig = [
  {
    title: 'regionsId',
    hidden: true,
    dataIndex: 'regionsId',
  },
  // {
  //   title: '父级地区编码',
  //   dataIndex: 'fatherId',
  //   className: 'v_top',
  // },
  // {
  //   title: '父级地区名称',
  //   dataIndex: 'fatherName',
  //   className: 'v_top',
  // },
  {
    title: '地区代码',
    dataIndex: 'regionsCode',
    className: 'v_top',
  },
  {
    title: '地区名称',
    dataIndex: 'regionsName',
  },
  {
    title: '操作',
    key: 'operate',
    align: 'center',
    fixed: 'right',
    width: 150,
    scopedSlots: { customRender: 'action' },
  },
]


export function detailFormItems(self) {
  let _this = self
  return [
    {
      type: 'input',
      name: 'regionsId',
      hidden:true,
      disabled: true,
      label: 'regionsId',
      value: '',
    },
    {
      type: 'input',
      name: 'fatherId',
      hidden:true,
      disabled: true,
      label: '父级地区ID',
      value: '',
    },
    {
      type: 'input',
      name: 'fatherName',
      disabled: true,
      hidden:true,
      // required: true,
      label: '父级地区名称',
      value: '',
    },
    {
      type: 'input',
      name: 'regionsCode',
      required: true,
      label: '地区代码',
      value: '',
    },
    {
      type: 'input',
      name: 'regionsName',
      required: true,
      label: '地区名称',
      value: '',
    },
    {
      type: 'input',
      name: 'levelId',
      rules: [
      { required: true, message: '数据不能为空' }, 
      { pattern: /^[(\d{1,2}|100|NA)]+$/, message: '只能输入数值', trigger: 'blur' },],
      label: '层级',
      value: '',
    },
    {
      type: 'radio',
      name: 'isEnable',
      label: '是否启用',
      required: true,
      value: 1,
      options: [
        {
          label: '是',
          value: 1,
        },
        {
          label: '否',
          value: 0,
        },
      ],
    },
    {
      type: 'input',
      name: 'sort',
      rules: [
      { required: true, message: '数据不能为空' }, 
      { pattern: /^[(\d{1,2}|100|NA)]+$/, message: '只能输入数值', trigger: 'blur' },],
      label: '排序号',
      value: '',
    },
  ]
}
