import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeColumn, JVxeTypes} from '/@/components/jeecg/JVxeTable/types';
import { ref } from 'vue';

export const columnsN = ref<JVxeColumn[]>([
  /*{ key: 'num', title: '序号', width: 80, type: JVxeTypes.normal },*/
  {
    title: '学校代码',
    key: 'schoolCode',
    width: 100,
    type: JVxeTypes.input,
  },
  {
    title: '院校代码',
    key: 'institutionCode',
    width: 100,
    type: JVxeTypes.input,
  },
  {
    title: '学校名称',
    key: 'schoolName',
    width: 150,
    type: JVxeTypes.input,
  },
  {
    title: '专业代码',
    key: 'majorCode',
    width: 100,
    type: JVxeTypes.input,
  },
  {
    title: '专业名称',
    key: 'majorName',
    width: 200,
    type: JVxeTypes.textarea,
  },
  {
    title: '招生代码',
    key: 'enrollmentCode',
    width: 100,
    type: JVxeTypes.input,
  },
  {
    title: '专业类型',
    key: 'majorType',
    width: 130,
    type: JVxeTypes.input,
  },
  {
    title: '专业类别子级',
    key: 'majorTypeChild',
    width: 130,
    type: JVxeTypes.input,
  },
  {
    title: '主考科目',
    key: 'mainSubjects',
    width: 130,
    type: JVxeTypes.input,
  },
  {
    title: '年份',
    key: 'year',
    width: 100,
    type: JVxeTypes.inputNumber,
  },
  {
    title: '科类(文科/理科)',
    key: 'category',
    width: 100,
    type: JVxeTypes.input,
  },
  {
    title: '批次',
    key: 'batch',
    width: 100,
    type: JVxeTypes.input,
  },
  {
    title: '录取方式(文*x+专*y)',
    key: 'rulesEnrollProbability',
    width: 150,
    type: JVxeTypes.input,
  },
  {
    title: '录取概率计算规则运算符',
    key: 'probabilityOperator',
    width: 150,
    type: JVxeTypes.input,
  },
  {
    title: '省控线',
    key: 'controlLine',
    width: 100,
    type: JVxeTypes.inputNumber,
  },
  {
    title: '录取线',
    key: 'admissionLine',
    width: 100,
    type: JVxeTypes.inputNumber,
  },
  {
    title: '招生人数',
    key: 'enrollNum',
    width: 100,
    type: JVxeTypes.inputNumber,
  },
  {
    title: '实际投档人数',
    key: 'actualPitcherNum',
    width: 100,
    type: JVxeTypes.inputNumber,
  },
  {
    title: '录取数',
    key: 'admissionNum',
    width: 100,
    type: JVxeTypes.inputNumber,
  },
  {
    title: '一志愿录取数',
    key: 'oneVolunteerAdmissionNum',
    width: 100,
    type: JVxeTypes.inputNumber,
  },
  {
    title: '最低分数差',
    key: 'scoreLineDifference',
    width: 100,
    type: JVxeTypes.inputNumber,
  },
  {
    title: '学费',
    key: 'tuition',
    width: 200,
    type: JVxeTypes.input,
  },
  {
    title: '备注',
    key: 'detail',
    width: 200,
    type: JVxeTypes.textarea,
  }

]);



//列表数据
export const columns: BasicColumn[] = [
   {
    title: '学校代码',
    align:"center",
    dataIndex: 'schoolCode'
   },
   {
    title: '院校代码',
    align:"center",
    dataIndex: 'institutionCode'
   },
   {
    title: '学校名称',
    align:"center",
    dataIndex: 'schoolName'
   },
   {
    title: '专业代码',
    align:"center",
    dataIndex: 'majorCode'
   },
   {
    title: '专业名称',
    align:"center",
    dataIndex: 'majorName'
   },
   {
    title: '专业类型',
    align:"center",
    dataIndex: 'majorType'
   },
   {
    title: '专业类别子级',
    align:"center",
    dataIndex: 'majorTypeChild'
   },
   {
    title: '年份',
    align:"center",
    dataIndex: 'year'
   },
   {
    title: '科类(文科/理科)',
    align:"center",
    dataIndex: 'category'
   },
   {
    title: '录取方式',
    align:"center",
    dataIndex: 'rulesEnrollProbability'
   },
   {
    title: '录取概率计算规则运算符',
    align:"center",
    dataIndex: 'probabilityOperator'
   },
   {
    title: '省控线',
    align:"center",
    dataIndex: 'controlLine'
   },
   {
    title: '录取线',
    align:"center",
    dataIndex: 'admissionLine'
   },
   {
    title: '招生人数',
    align:"center",
    dataIndex: 'enrollNum'
   },
   {
    title: '实际投档人数',
    align:"center",
    dataIndex: 'actualPitcherNum'
   },
   {
    title: '录取数',
    align:"center",
    dataIndex: 'admissionNum'
   },
   {
    title: '一志愿录取数',
    align:"center",
    dataIndex: 'oneVolunteerAdmissionNum'
   },
   {
    title: '最低分数差',
    align:"center",
    dataIndex: 'scoreLineDifference'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'detail'
   },
   {
    title: '批次',
    align:"center",
    dataIndex: 'batch'
   },
   {
    title: '招生代码',
    align:"center",
    dataIndex: 'enrollmentCode'
   },
   {
    title: '是否使用主项成绩',
    align:"center",
    dataIndex: 'checkMaster'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '学校代码',
    field: 'schoolCode',
    component: 'Input',
  },
  {
    label: '院校代码',
    field: 'institutionCode',
    component: 'Input',
  },
  {
    label: '学校名称',
    field: 'schoolName',
    component: 'Input',
  },
  {
    label: '专业代码',
    field: 'majorCode',
    component: 'Input',
  },
  {
    label: '专业名称',
    field: 'majorName',
    component: 'Input',
  },
  {
    label: '专业类型',
    field: 'majorType',
    component: 'Input',
  },
  {
    label: '专业类别子级',
    field: 'majorTypeChild',
    component: 'Input',
  },
  {
    label: '年份',
    field: 'year',
    component: 'Input',
  },
  {
    label: '科类(文科/理科)',
    field: 'category',
    component: 'Input',
  },
  {
    label: '录取方式',
    field: 'rulesEnrollProbability',
    component: 'Input',
  },
  {
    label: '录取概率计算规则运算符',
    field: 'probabilityOperator',
    component: 'Input',
  },
  {
    label: '省控线',
    field: 'controlLine',
    component: 'InputNumber',
  },
  {
    label: '录取线',
    field: 'admissionLine',
    component: 'InputNumber',
  },
  {
    label: '招生人数',
    field: 'enrollNum',
    component: 'InputNumber',
  },
  {
    label: '实际投档人数',
    field: 'actualPitcherNum',
    component: 'InputNumber',
  },
  {
    label: '录取数',
    field: 'admissionNum',
    component: 'InputNumber',
  },
  {
    label: '一志愿录取数',
    field: 'oneVolunteerAdmissionNum',
    component: 'InputNumber',
  },
  {
    label: '最低分数差',
    field: 'scoreLineDifference',
    component: 'InputNumber',
  },
  {
    label: '备注',
    field: 'detail',
    component: 'Input',
  },
  {
    label: '批次',
    field: 'batch',
    component: 'Input',
  },
  {
    label: '招生代码',
    field: 'enrollmentCode',
    component: 'Input',
  },
  {
    label: '是否使用主项成绩',
    field: 'checkMaster',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



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