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: 'websiteQualityId'
   },
   {
    title: '站点的标识符',
    align:"center",
    dataIndex: 'siteId'
   },
   {
    title: '客户的标识符',
    align:"center",
    dataIndex: 'clientId'
   },
   {
    title: '站点地图状态码',
    align:"center",
    dataIndex: 'sitemapStatusCode_dictText'
   },
   {
    title: '站点地图问题列表',
    align:"center",
    dataIndex: 'sitemapStatusProblems'
   },
   {
    title: 'Google Analytics状态码',
    align:"center",
    dataIndex: 'gaStatusCode_dictText'
   },
   {
    title: 'Google Analytics问题列表',
    align:"center",
    dataIndex: 'gaStatusProblems'
   },
   {
    title: '域名状态码',
    align:"center",
    dataIndex: 'domainStatusCode_dictText'
   },
   {
    title: '域名问题列表',
    align:"center",
    dataIndex: 'domainStatusProblems'
   },
   {
    title: '查询电子邮件状态码',
    align:"center",
    dataIndex: 'inquiryEmailStatusCode_dictText'
   },
   {
    title: '查询电子邮件问题列表',
    align:"center",
    dataIndex: 'inquiryEmailStatusProblems'
   },
   {
    title: '加载速度状态码',
    align:"center",
    dataIndex: 'loadSpeedStatusCode_dictText'
   },
   {
    title: '加载速度问题列表',
    align:"center",
    dataIndex: 'loadSpeedStatusProblems'
   },
   {
    title: '进度状态',
    align:"center",
    dataIndex: 'progress_dictText'
   },
   {
    title: '站点的加载时间（单位是秒）',
    align:"center",
    dataIndex: 'loadTime'
   },
   {
    title: '创建日期',
    align:"center",
    dataIndex: 'createTime'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '站点的标识符',
    field: 'siteId',
    component: 'Input',
  },
  {
    label: '客户的标识符',
    field: 'clientId',
    component: 'Input',
  },
  {
    label: '站点地图状态码',
    field: 'sitemapStatusCode',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"progress"
     },
  },
  {
    label: '站点地图问题列表',
    field: 'sitemapStatusProblems',
    component: 'Input',
  },
  {
    label: 'Google Analytics状态码',
    field: 'gaStatusCode',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"progress"
     },
  },
  {
    label: 'Google Analytics问题列表',
    field: 'gaStatusProblems',
    component: 'Input',
  },
  {
    label: '域名状态码',
    field: 'domainStatusCode',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"progress"
     },
  },
  {
    label: '域名问题列表',
    field: 'domainStatusProblems',
    component: 'Input',
  },
  {
    label: '查询电子邮件状态码',
    field: 'inquiryEmailStatusCode',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"progress"
     },
  },
  {
    label: '查询电子邮件问题列表',
    field: 'inquiryEmailStatusProblems',
    component: 'Input',
  },
  {
    label: '加载速度状态码',
    field: 'loadSpeedStatusCode',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:""
     },
  },
  {
    label: '加载速度问题列表',
    field: 'loadSpeedStatusProblems',
    component: 'Input',
  },
  {
    label: '进度状态',
    field: 'progress',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"progress"
     },
  },
  {
    label: '站点的加载时间（单位是秒）',
    field: 'loadTime',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  websiteQualityId: {title: '唯一标识符',order: 0,view: 'number', type: 'number',},
  siteId: {title: '站点的标识符',order: 1,view: 'text', type: 'string',},
  clientId: {title: '客户的标识符',order: 2,view: 'text', type: 'string',},
  sitemapStatusCode: {title: '站点地图状态码',order: 3,view: 'number', type: 'number',},
  sitemapStatusProblems: {title: '站点地图问题列表',order: 4,view: 'text', type: 'string',},
  gaStatusCode: {title: 'Google Analytics状态码',order: 5,view: 'number', type: 'number',},
  gaStatusProblems: {title: 'Google Analytics问题列表',order: 6,view: 'text', type: 'string',},
  domainStatusCode: {title: '域名状态码',order: 7,view: 'number', type: 'number',},
  domainStatusProblems: {title: '域名问题列表',order: 8,view: 'text', type: 'string',},
  inquiryEmailStatusCode: {title: '查询电子邮件状态码',order: 9,view: 'number', type: 'number',},
  inquiryEmailStatusProblems: {title: '查询电子邮件问题列表',order: 10,view: 'text', type: 'string',},
  loadSpeedStatusCode: {title: '加载速度状态码',order: 11,view: 'number', type: 'number',},
  loadSpeedStatusProblems: {title: '加载速度问题列表',order: 12,view: 'text', type: 'string',},
  progress: {title: '进度状态',order: 13,view: 'number', type: 'number',},
  loadTime: {title: '站点的加载时间（单位是秒）',order: 14,view: 'number', type: 'number',},
  createTime: {title: '创建日期',order: 15,view: 'datetime', type: 'string',},
};

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