import type { VxeGridProps, VxeColumnPropTypes } from 'vxe-table';
import XEUtils from 'xe-utils';

interface VxeColumn {
  type?: string;
  field?: string;
  title?: string;
  width?: number | string;
  minWidth?: number | string;
  maxWidth?: number | string;
  sortable?: boolean;
  formatter?: (value: any) => string;
  treeNode?: boolean;
  slots?: {};
  visible?: boolean;
  editRender?: {};
  align?: string;
  showOverflow?: boolean | string;
  fixed?: string;
  filters?: [] | {};
  filterMethod?: any;
  filterMethodTp?: string;
  filterRender?: any;
}

export const tableFormData = [
  {
    serialNumber: "1",
    project: "卫星导航系统应用整体情况",
    code: 'TM2001',
    type: "VxeTable",
    columns: [
      { field: '', title: '业务场景',headerAlign: 'center',
        children: [
          { field: 'COL1', title: '场景类型',
            editRender: {
              name: 'VxeSelect',
              options: ["授时", "定位", "导航", "短报文通信", "国际搜救", "其他"],
            },
            slots:{ edit: 'select',default: 'default_select'},
          },
          { field: 'COL3', title: '场景简述', editRender: { name: 'VxeInput',}}
        ]
      },
      { field: '', title: '产品情况',headerAlign: 'center',
        children: [
          { field: '', showHeaderOverflow: true, title: '至年底计划拥有BDS载体保有量',
            children: [
              { field: 'COL8', title: '保有量', editRender: { name: 'VxeNumberInput'}},
              { field: 'COL5', title: '单用', editRender: { name: 'VxeNumberInput'}},
              { field: 'COL6', title: '主用', editRender: { name: 'VxeNumberInput'}},
              { field: 'COL7', title: '优先', editRender: { name: 'VxeNumberInput'}},
             
            ]
          },
          { field: '', showHeaderOverflow: true,title: '截至本月底拥有BDS载体保有量',
            children: [
              { field: 'COL9', title: '保有量', editRender: { name: 'VxeNumberInput'}},
              { field: 'COL011', title: '单用', editRender: { name: 'VxeNumberInput'}},
              { field: 'COL013', title: '主用', editRender: { name: 'VxeNumberInput'}},
              { field: 'COL015', title: '优先', editRender: { name: 'VxeNumberInput'}},
            ]
          },
          { field: '', showHeaderOverflow: true,title: '截至本月底拥有GPS载体保有量',
            children: [
              { field: 'COL017', title: '保有量', editRender: { name: 'VxeNumberInput'}},
              { field: 'COL019', title: '单用', editRender: { name: 'VxeNumberInput'}},
              { field: 'COL021', title: '主用', editRender: { name: 'VxeNumberInput'}},
              { field: 'COL023', title: '优先', editRender: { name: 'VxeNumberInput'}},
            
            ]
          },
          { field: 'col2_3', showHeaderOverflow: true,title: '截至本月底拥有其他载体保有量',
            children: [
              { field: 'COL025', title: '保有量', editRender: { name: 'VxeNumberInput'}},
              { field: 'COL027', title: '单用', editRender: { name: 'VxeNumberInput'}},
              { field: 'COL029', title: '主用', editRender: { name: 'VxeNumberInput'}},
              { field: 'COL031', title: '优先', editRender: { name: 'VxeNumberInput'}},
              
            ]
          },
        ],
      },
   
      { title: '操作', slots: { default: 'action' },width:100 }
    ],
  
    datas: [],
    remarks: ""
  },
  {
    serialNumber: "2",
    project: "卫星导航系统应用清单",
    code: 'TM2002',
    type: "VxeTable",
    columns: [
      { field: '', title: '业务场景',headerAlign: 'center',
        children: [
          { field: 'COL001', title: '场景类型',
            editRender: {
              name: 'VxeSelect',
              options: ["授时", "定位", "导航", "短报文通信", "国际搜救", "其他"],
            },
          },
          { field: 'COL003', title: '场景简述', editRender: { name: 'VxeInput',}}
        ]
      },
      { field: '', title: '产品情况',headerAlign: 'center',
        children: [
          { field: 'COL005', title: '名称',editRender: { name: 'VxeInput',}},
          { field: 'COL006', title: '描述',editRender: { name: 'VxeInput',}},
          { field: 'COL007', title: '是否境内生产',editRender: {
            name: 'VxeSelect',
            options: [
              { label: '是', value: '是' },
              { label: '否', value: '否' }
            ]
          }},
          { field: 'COL008', title: '生产厂家',editRender: { name: 'VxeInput',}},
          { field: 'COL009', title: '生产型号',editRender: { name: 'VxeInput',}},
        ],
      },
      { field: '', title: '产品所用器件情况',headerAlign: 'center',
        children: [
          { field: 'COL011', title: '器件类型',editRender: {
              name: 'VxeSelect',
              options: [
                { label: '芯片', value: '芯片' },
                { label: '模块', value: '模块' },
                { label: '板卡', value: '板卡' },
                { label: '不涉及', value: '不涉及' }
              ]
            }
          },
          { field: 'COL012', title: '是否境内生产',editRender: { 
            name: 'VxeSelect',
            options: [
              { label: '是', value: '是' },
              { label: '否', value: '否' }
            ]
          }},
          { field: 'COL013', title: '生产厂家',editRender: { name: 'VxeInput',}},
          { field: 'COL014', title: '生产型号',editRender: { name: 'VxeInput',}},
        ],
      },
      { field: '', title: '产品应用现状',headerAlign: 'center',
        children: [
          { field: 'COL016', title: '应用模式',editRender: { 
            options: [
              { label: '仅BDS ', value: '仅BDS' },{ label: '仅GPS', value: '仅GPS' },{ label: '仅其他', value: '仅其他' },
              { label: '主用BDS', value: '主用BDS' },{ label: '主用GPS', value: '主用GPS' },{ label: '主用其他  ', value: '主用其他 ' },
              { label: '优先用BDS', value: '优先用BDS' },{ label: '优先用GPS', value: '优先用GPS' },{ label: '优先用其他', value: '优先用其他'},
              { label: '其他', value: '其他'}
            ]}
          },
          { field: 'COL018', title: '应用台数',editRender: { name: 'VxeNumberInput'}},
        ],
      },
      { title: '操作', slots: { default: 'action' },width:100 }
    ],
  
    datas: [],
    remarks: ""
  }
];

