import ColumnSetting from "/@/components/Table/src/components/settings/ColumnSetting.vue";

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:'TB1101',
    content: [
      { type: "text", value: "(1) 本机构及下属机构是否全部完成软件正版化：" },
      { type: "yesno", value: "", field: "C23A001" },
      { type: "br"},
    ],
    remarks: {
    rows:3,
    field:"C23A002"
    }
  },
  {
    serialNumber: "2",
    code:"TB1102",
    type:"AttachTable",
    project: "本年度新采购软件情况",
    showFooter:true,
    content: [
      { field: 'col0', title: '软件属性',headerAlign: 'center',width:100 },
      { field: '', title: '操作系统软件（不含预装）',headerAlign: 'center',
        children: [
          { field: 'col1_0', title: '许可数(个)',slots: { default: 'form_default' }},
          { field: 'col1_1', title: '金额(万元)',slots: { default: 'form_default' }}
        ]
      },
      { field: '', title: '办公软件',headerAlign: 'center',
        children: [
          { field: 'col2_0', title: '许可数(个)',slots: { default: 'form_default' }},
          { field: 'col2_1', title: '金额(万元)',slots: { default: 'form_default' }}
        ]
      },
      { field: '', title: '杀毒软件',headerAlign: 'center',
        children: [
          { field: 'col3_0', title: '许可数(个)',slots: { default: 'form_default' }},
          { field: 'col3_1', title: '金额(万元)',slots: { default: 'form_default' }}
        ]
      },
      { field: '', title: '其他软件',headerAlign: 'center',
        children: [
          { field: 'col4_0', title: '许可数(个)',slots: { default: 'form_default' }},
          { field: 'col4_1', title: '金额(万元)',slots: { default: 'form_default' }}
        ]
      },
      { field: '', title: '总计',headerAlign: 'center',
        children: [
          { field: 'col5_0', title: '许可数(个)',slots: { default: 'form_default' }},
          { field: 'col5_1', title: '金额(万元)',slots: { default: 'form_default' }}
        ]
      },
    ],
    datas: [
      { 
        col0: "国内",
        col1_0:{ formType:'number',field: "C23A003"},
        col1_1:{ formType:'number',field: "C23A004"},
        col2_0:{ formType:'number',field: "C23A005"},
        col2_1:{ formType:'number',field: "C23A006"},
        col3_0:{ formType:'number',field: "C23A007"},
        col3_1:{ formType:'number',field: "C23A008"},
        col4_0:{ formType:'number',field: "C23A009"},
        col4_1:{ formType:'number',field: "C23A010"},
        col5_0:{ formType:'number',field: "C23A011"},
        col5_1:{ formType:'number',field: "C23A012"},
      },
      { 
        col0: "国外",
        col1_0:{ formType:'number',field: "C23A013"},
        col1_1:{ formType:'number',field: "C23A014"},
        col2_0:{ formType:'number',field: "C23A015"},
        col2_1:{ formType:'number',field: "C23A016"},
        col3_0:{ formType:'number',field: "C23A017"},
        col3_1:{ formType:'number',field: "C23A018"},
        col4_0:{ formType:'number',field: "C23A019"},
        col4_1:{ formType:'number',field: "C23A020"},
        col5_0:{ formType:'number',field: "C23A021"},
        col5_1:{ formType:'number',field: "C23A022"},
      },
      { 
        col0: "合计",
        col1_0:{ formType:'number',field: "C23A023"},
        col1_1:{ formType:'number',field: "C23A024"},
        col2_0:{ formType:'number',field: "C23A025"},
        col2_1:{ formType:'number',field: "C23A026"},
        col3_0:{ formType:'number',field: "C23A027"},
        col3_1:{ formType:'number',field: "C23A028"},
        col4_0:{ formType:'number',field: "C23A029"},
        col4_1:{ formType:'number',field: "C23A030"},
        col5_0:{ formType:'number',field: "C23A031"},
        col5_1:{ formType:'number',field: "C23A032"},
      },
   
    ],
    remarks: {
      rows:12,
      field:"C23A033"
    },
    calcSum:{
      tp:true,
      rows: {
          "col5_0":["col1_0","col2_0","col3_0","col4_0"],
          "col5_1":["col1_1","col2_1","col3_1","col4_1"]
      },
    }
  },
  {
    serialNumber: "3",
    code:"TB1103",
    type:"AttachTable",
    showFooter:true,
    project: "本年度软件升级及维护情况(不含新采购软件)",
    content: [
      { field: 'col0', title: '软件属性',width:100},
      { field: 'col1', title: '操作系统软件(万元)', slots: { default: 'form_default' }},
      { field: 'col2', title: '办公软件(万元)', slots: { default: 'form_default' }},
      { field: 'col3', title: '杀毒软件(万元)',slots: { default: 'form_default' }},
      { field: 'col4', title: '其他软件(万元)', slots: { default: 'form_default' }},
      { field: 'col5', title: '总金额(万元)',slots: { default: 'form_default' } },
    ],
    datas: [
      { 
        col0: "国内",
        col1:{ formType:'number',field: "C23A034"},
        col2:{ formType:'number',field: "C23A035"},
        col3:{ formType:'number',field: "C23A036"},
        col4:{ formType:'number',field: "C23A037"},
        col5:{ formType:'number',field: "C23A038"},
      },
      { 
        col0: "国外",
        col1:{ formType:'number',field: "C23A039"},
        col2:{ formType:'number',field: "C23A040"},
        col3:{ formType:'number',field: "C23A041"},
        col4:{ formType:'number',field: "C23A042"},
        col5:{ formType:'number',field: "C23A043"},
      },
      { 
        col0: "合计",
        col1:{ formType:'number',field: "C23A044"},
        col2:{ formType:'number',field: "C23A045"},
        col3:{ formType:'number',field: "C23A046"},
        col4:{ formType:'number',field: "C23A047"},
        col5:{ formType:'number',field: "C23A048"},
      },
    ],
    remarks: {
      rows:8,
      field:"C23A049"
    },
    calcSum:{
      tp:true,
      rows: {
        "col5":["col1","col2","col3","col4"]
      },
     }
  }
]