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: '公司名称',
    align:"center",
    dataIndex: 'companyName'
   },
   {
    title: '初始化的域名',
    align:"center",
    dataIndex: 'domain'
   },
   {
    title: '联系方式',
    align:"center",
    dataIndex: 'tel'
   },
   {
    title: '联系人',
    align:"center",
    dataIndex: 'contact'
   },
   {
    title: '邮箱',
    align:"center",
    dataIndex: 'email'
   },
   {
    title: '公司名英⽂简称',
    align:"center",
    dataIndex: 'enname'
   },
   {
    title: '套餐名',
    align:"center",
    dataIndex: 'tcName'
   },
   {
    title: '套餐周期，单位⽉',
    align:"center",
    dataIndex: 'tcPeriod'
   },
   {
    title: '站点选择的⼩语种语⾔',
    align:"center",
    dataIndex: 'tcLanguage'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remark'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '公司名称',
    field: 'companyName',
    component: 'Input',
  },
  {
    label: '初始化的域名',
    field: 'domain',
    component: 'Input',
  },
  {
    label: '联系方式',
    field: 'tel',
    component: 'Input',
  },
  {
    label: '联系人',
    field: 'contact',
    component: 'Input',
  },
  {
    label: '邮箱',
    field: 'email',
    component: 'Input',
  },
  {
    label: '公司名英⽂简称',
    field: 'enname',
    component: 'Input',
  },
  {
    label: '套餐名',
    field: 'tcName',
    component: 'Input',
  },
  {
    label: '套餐周期，单位⽉',
    field: 'tcPeriod',
    component: 'InputNumber',
  },
  {
    label: '站点选择的⼩语种语⾔',
    field: 'tcLanguage',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  companyName: {title: '公司名称',order: 0,view: 'text', type: 'string',},
  domain: {title: '初始化的域名',order: 1,view: 'text', type: 'string',},
  tel: {title: '联系方式',order: 2,view: 'text', type: 'string',},
  contact: {title: '联系人',order: 3,view: 'text', type: 'string',},
  email: {title: '邮箱',order: 4,view: 'text', type: 'string',},
  enname: {title: '公司名英⽂简称',order: 5,view: 'text', type: 'string',},
  tcName: {title: '套餐名',order: 6,view: 'text', type: 'string',},
  tcPeriod: {title: '套餐周期，单位⽉',order: 7,view: 'number', type: 'number',},
  tcLanguage: {title: '站点选择的⼩语种语⾔',order: 8,view: 'text', type: 'string',},
  remark: {title: '备注',order: 9,view: 'text', type: 'string',},
};

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