import { until } from '@vueuse/shared';
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: "信息科技外包治理 ",
    project2: " ",
    code: 'TB10001',
    content: [

      { type: "text", value: "（1）信息科技外包风险纳入全面风险管理体系" },
      { type: "yesno", field: "C20A001"},

      { type: "br" },

      { type: "text", value: "（2）高管层已明确信息科技外包风险主管部门" },
      { type: "yesno", field: "C20A002"},
      
      { type: "brspace" },
      { type: "text", value: "如是，部门名称：" },
      { type: "input", field: "C20A003"},
      { type: "br" },

      { type: "text", value: "（3）发布信息科技外包战略" },
      { type: "yesno", field: "C20A004"},
      { type: "brspace" },
      { type: "text", value: "如是，经过董（理）事会或其授权设立的专业委员会审批" },
      { type: "yesno", field: "C20A005"},
  
    ],
    remarks: {
      rows:8,
      field:"C20A006"
    }
  },

  {
    serialNumber: "2",
    project: "信息科技外包准入",
    code: 'D20A001',
    content: [
      { type: "text", value: "（1）对拟开展的外包活动进行风险评估" },
      { type: "yesno", field: "D20A002"},
      { type: "br" },

      { type: "text", value: "（2）重要外包活动向董（理）事会或高管层报告并经过审批" },
      { type: "yesno", field: "D20C003"},
      { type: "br" },

      { type: "text", value: "（3）建立服务提供商准入标准" },
      { type: "yesno", field: "D20C004"},
      { type: "br" },

      { type: "text", value: "（4）本年度有新开展的重要外包" },
      { type: "yesno", field: "D20C005"},
      { type: "text", value: "，若是，重要外包合同数量" },
      { type: "number", field: "D20C006",unit:"个"},
  
      { type: "brspace" },
      { type: "text", value: "上述合同签订前，对重要外包的备选服务提供商开展尽职调查" },
      { type: "yesno", field: "D20C007"},
      { type: "brspace" },
      { type: "text", value: "尽职调查涉及的重要外包合同数量" },
      { type: "number", field: "D20C008",unit:"个"},

      { type: "br" },
      { type: "brspace" },

      { type: "text", value: "对重要外包备选服务提供商开展的尽职调查内容包括：" },
      { 
        type: "checkbox-group", 
        field: "C23A001",
        options: [
          '服务提供商的技术和行业经验，人员及能力',
          '服务提供商的内部控制和管理能力',
          '服务提供商的网络和信息安全保障能力',
          '服务提供商的持续经营状况',
          '服务提供商及其母公司或实际控制人遵守国家和金融监管总局相关法律法规要求的情况',
          '服务提供商过往配合银行保险机构审计、评估、检查及监管机构监督检查情况',
          '服务提供商与银行保险机构的关联性',
        ],
        otherOption:true,
        otherField:"C23A002"
      },
      { type: "br" },
      { type: "text", value: "（5）存在实施外包项目后与服务提供商签订合同情况" },
      { type: "yesno", field: "D20C009"},


      { type: "br" },
      { type: "text", value: " （6）与服务提供商签订的外包合同或协议内容包括" },
      { 
        type: "checkbox-group", 
        field: "D20A010",
        options: [
          '服务范围、服务内容、工作时限及安排、责任分配、交付物要求以及后续合作中的相关限定条件，服务质量考核评价约定',
          '合规、内控及风险管理要求',
          '服务持续性要求',
          '机构对服务提供商进行风险评估、检测、检查和审计的权利',
          '服务提供商承诺接受金融监管总局对其所承担的机构外包服务的监督检查',
          '合同变更或终止的触发条件，合同变更或终止的过渡安排',
          '知识产权归属以及允许服务提供商使用的内容及范围',
          '资源保障条款',
          '安全保密和消费者权益保护约定',
          '争端解决机制、违约及赔偿条款',
          '报告条款',
          '明确转包分包要求',
        ],
      },

    ],
    remarks: {
      rows:20,
      field:"D20A025"
    }
  },
  {
    serialNumber: "3",
    project: "信息科技外包监控评价",
    code: 'D20A011',
    content: [
      { type: "text", value: "（1）建立明确的服务目录、服务水平协议以及服务水平监控评价机制" },
      { type: "yesno", field: "D20A012"},

      { type: "br" },
      { type: "text", value: "（2）建立服务效能和质量监控指标，并进行相应监控" },
      { type: "yesno", field: "D20A013"},
      
      
      { type: "brspace" },
      { type: "text", value: "若是，相关监控指标包括:" },
      
      { 
        type: "checkbox-group", 
        field: "D20A014",
        options: [
          '信息系统和设备及基础设施的可用率',
          '故障次数、故障解决率、故障的响应时间、故障的解决时间',
          '服务的次数、客户满意度',
          '业务需求的及时完成率、程序的缺陷数、需求变更率',
          '外包人员工作饱和率、外包人员的考核合格率',
          '网络和信息安全指标、业务连续性指标'
        ]
      },

      { type: "br" },
      { type: "text", value: "（3）对服务提供商的财务、内控及安全管理进行持续监控，防范外包服务意外终止或服务质量急剧下降" },
      { type: "yesno", field: "D20A015"},

      
      { type: "br" },
      { type: "text", value: "（4）存在关联外包" },
      { type: "yesno", field: "D20A016"},
      { type: "brspace" },
      { type: "text", value: "若是，推动母公司或所属集团将外包服务质量纳入对服务提供商的业绩评价范围" },
      { type: "yesno", field: "D20A017"},

    ],
    remarks: {
      rows:10,
      field:"D20A026"
    }
  },
  {
    serialNumber: "4",
    project: "信息科技外包风险管理",
    project2: "业务连续性管理",
    code: 'D20A018',
    content: [

      { type: "text", value: "（1）针对可能对业务连续性管理造成重大影响的重要外包服务建立的风险控制、缓释或转移措施" },
      { 
        type: "checkbox-group", 
        field: "D20A019",
        options: [
          '事先制定退出策略，并在外包服务实施过程中持续收集服务提供商相关信息，尽早发现可能导致服务中断或服务质量下降的情况',
          '明确措施和方法，在服务供应商服务质量不能满足合同要求的情况下，保障获取其外包服务资源的优先权',
          '要求服务提供商提供必要的应急和灾备资源保障，制定应急处理预案并在预案中明确为机构提供应急响应和恢复的优先级，原则上应为最高级',
          '组织服务提供商参与应急计划编制和应急演练，至少每年在综合性演练或专项演练中纳入一个或多个服务提供商开展一次相关演练',
          '对于重要外包，需考虑预先在机构内部配置相应的人力资源，掌握必要的技能，以在外包服务中断期间自行维持最低限度的服务能力'
        ],
         otherOption: true, 
         otherField: 'D20A020',
      },
    ],
    remarks: {
      rows:5,
      field:"D20A027"
    }
  },
  {
    serialNumber: "5",
    project: "信息科技外包风险管理",
    project2: "信息安全管理",
    code: 'D20A020',
    content: [
      { type: "text", value: "（1）对信息科技外包活动采取的网络和信息安全管理措施" },
      { 
        type: "radio-group", 
        field: "D20A021",
        options: [
          '与服务提供商签订安全保密协议，外包人员签署安全保密承诺书',
          '对服务提供商和外包人员开展信息安全教育或培训，增强网络和信息安全意识',
          '明确外包活动需要访问或使用的信息资产，对外包人员根据"必需知道"和"最小授权"原则分配访问权限，严格管控远程维护行为',
          '对信息系统开发交付物（含拥有知识产权的源代码）进行安全扫描和检查',
          '对客户信息、源代码和文档等敏感信息采取严格管控措施，对敏感信息泄露风险进行持续监测',
          '定期对外包活动进行网络和信息安全评估'
        ],
         otherOption: true, 
         otherField: 'D20A022',
      },

      { type: "br" },
      { type: "text", value: "（2）本年度对信息科技外包活动进行网络和信息安全评估" },
      { type: "yesno", field: "D20A023"},
      { type: "brspace" },
      { type: "text", value: "如是，评估数量" },
      { type: "number", field: "D20A024",unit:"个"},

    ],
    remarks: {
      rows:5,
      field:"D20A028"
    }
  },
  {
    serialNumber: "6",
    project: "信息科技外包风险管理",
    project2: "开发测试管理",
    code: 'D23A001',
    content: [

      { type: "text", value: "（1）针对外包人员本地驻场开发测试过程的安全管理，采取的措施包括" },
      { 
        type: "checkbox-group", 
        field: "C23A001",
        options: [
          '提供专用办公场所并加强办公场地信息安全管理',
          '采用本机构发放的关闭有关权限的专用电脑工作',
          '外包终端访问云桌面不许使用未经本机构授权的软件',
          '未经审批严禁开发终端访问互联网',
          '源代码纳入本机构版本服务器统一管理',
        ],
         otherOption: true, 
         otherField: 'C23A002',
      },
    ],
    remarks: {
      rows:5,
      field:"C23A003"
    }
  },
  {
    serialNumber: "7",
    project: "信息科技外包风险管理",
    project2: "集中度风险管理",
    code: 'TB1000302',
    content: [
      { type: "text", value: "（1）存在集中度风险的外包服务及其提供商" },
      { type: "yesno", field: "C20A001" },
      { type: "br" },
      { type:"text", value: "若是，采取的降低集中度风险的措施" },
      { 
        type: "checkbox-group", 
        field: "C20A002",
        options: [
         '分散信息科技外包活动',
          '注重对外包项目知识产权保护',
          '提高自身研发运维能力',
          '储备潜在替代服务提供商'
        ],
         otherOption: true, 
         otherField: 'C20A003',
      },
    ],
    remarks: {
      rows:5,
      field:"D20A004"
    }
  },
  {
    serialNumber: "8",
    project: "信息科技外包风险管理",
    project2: "跨境外包",
    code: 'TB1000303',
    content: [
    
      { type: "text", value: "（1）存在信息科技跨境外包" },
      { type: "yesno", field: "C20A001"},
      { type: "brspace" },
      { type: "text", value: "若是，对跨境外包采取的风险识别和风险监测手段包括" },

      { 
        type: "checkbox-group", 
        field: "C20A002",
        options: [
            '充分评估服务提供商所在国家或地区的政治、经济、社会、法律、文化等经营环境'
        ],
         otherOption: true, 
         otherField: 'D20C001',
      },

    ],
    remarks: {
      rows:5,
      field:"C20A003"
    }
  },
  {
    serialNumber: "9",
    project: "信息科技外包风险管理",
    project2: "非驻场外包",
    code: 'TB1000304',
    content: [
      { type: "text", value: "（1）存在符合重要外包标准的非驻场外包服务" },
      { type: "yesno", field: "C20A001"},
      { type: "brspace" },
      { type: "text", value: "若是，近三年对符合重要外包标准的非驻场外包服务开展过实地检查" },
      { type: "yesno", field: "C20A002"},
    
    ],
    remarks: {
      rows:5,
      field:"C20A003"
    }
  },
  {
    serialNumber: "10",
    project: "主要信息科技外包情况",
    code: 'TB10004',
    content: [

      { type: "text", value: "（1）咨询规划类主要信息科技外包服务合同数量" },
      { type: "number", field: "C20A001",unit:"个"},
      { type: "text", value: "，其中重要外包数量" },
      { type: "number", field: "C23A001",unit:"个"},

      { type: "brspace" },
      { type: "text", value: "开发测试类主要信息科技外包服务合同数量" },
      { type: "number", field: "C20A002",unit:"个"},
      { type: "text", value: "，其中重要外包数量" },
      { type: "number", field: "C23A002",unit:"个"},
      
      { type: "brspace" },
      { type: "text", value: "运行维护类主要信息科技外包服务合同数量" },
      { type: "number", field: "C20A003",unit:"个"},
      { type: "text", value: "，其中重要外包数量" },
      { type: "number", field: "C23A003",unit:"个"},
      
       
      { type: "brspace" },
      { type: "text", value: "安全服务类主要信息科技外包服务合同数量" },
      { type: "number", field: "C20A004",unit:"个"},
      { type: "text", value: "，其中重要外包数量" },
      { type: "number", field: "C23A004",unit:"个"},
      
            
      { type: "brspace" },
      { type: "text", value: "业务支持类主要信息科技外包服务合同数量" },
      { type: "number", field: "C20A005",unit:"个"},
      { type: "text", value: "，其中重要外包数量" },
      { type: "number", field: "C23A005",unit:"个"},

      { type: "br" },

      { type: "text", value: " （2）本年度按监管要求在合同签订前二十个工作日向监管报告的相关外包活动数量" },
      { type: "number", field: "D20C001",unit:"个"},

      { type: "br" },
      { type: "text", value: "（3）本年度正在执行和在本年度已完成的主要信息科技外包服务合同总数" },
      { type: "number", field: "C20A006",unit:"个"},
      { type: "brspace" },
      { type: "text", value: "合同总金额" },
      { type: "number", field: "C20A007",unit:"万元"},
      { type: "text", value: "工作总量" },
      { type: "number", field: "C20A008",unit:"人月"},

      { type: "brspace" },
      { type: "text", value: "其中本年度新增的主要信息科技外包服务合同数量" },
      { type: "number", field: "C20A009",unit:"个"},

      { type: "brspace" },
      { type: "text", value: "本年度正在执行的主要信息科技外包服务合同数量" },
      { type: "number", field: "C20A010",unit:"个"},

      { type: "brspace" },
      { type: "text", value: "本年度已完成的主要信息科技外包服务合同数量" },
      { type: "number", field: "C20A011",unit:"个"},


      { type: "br" },
      { type: "text", value: "（4）本年度涉及关联外包的主要信息科技外包服务合同数量" },
      { type: "number", field: "C20A012",unit:"个"},

      { type: "br" },
      { type: "text", value: "（5）本年度发生服务中断或异常退出的主要信息科技外包服务合同数量" },
      { type: "number", field: "C20A013",unit:"个"},

      { type: "br" },
      { type: "text", value: "（6）本年度正在执行和本年度已完成的主要信息科技跨境外包服务合同数量" },
      { type: "number", field: "C20A014",unit:"个"},

      { type: "br" },
      { type: "text", value: "（7）本年度正在执行和本年度已完成的主要信息科技非驻场外包服务合同数量" },
      { type: "number", field: "C20A015",unit:"个"},


      { type: "brspace" },
      { type: "text", value: "主要信息科技外包情况-备注" },
      { type: "input", field: "C20A016",width:"50%"},
      

      { type: "br" },
      {
        serialNumber: "1006",
        code:"TB1000401",
        type:"MultiColumnTable",
        project: "合同明细表-咨询规划类",
        content: [
          { name: "合同名称",formType:'input',field:"C20A001" },

          { name: "服务类型", formType:'checkbox-group', field: "C20A003",options:[
            "信息科技战略规划","信息科技治理（含数据管理）","信息科技风险管理","信息安全管理体系",
            "业务连续性管理体系","数据中心（机房）建设","重要信息系统架构和建设","新兴技术应用","其他"
            ],
            otherOption:true,
            otherField:""  
            
          },
          { name: "起始时间",formType:"date", field: "C20A008" },
          { name: "计划完成时间",formType:"date",field: "C20A010" },
          

          { name: "是否新增",formType:"yesno",field: "C20A012" },
          { name: "执行状态",formType:"radio-group",field: "C20A013",
            options: ["执行中","已完成"]
          },
          { name: "完成时间",formType:"date",field: "C20A014",},
          
          { name: "合同涉及重要信息系统(与TB3系统名称保存一致)",formType: "input",field: "C24A001"},

          { name: "工作总量(人月)",formType:'number',field:"C20A015" },
          { name: "金额(万元)", formType:'number', field: "C20A016" },

          { name: "提供商名称",formType:"input", field: "C20A017" },
          { name: "组织机构代码",formType:"input",field: "C20A018" },

          { name: "实施方式",formType:"radio-group",field: "C20A019",options:["驻场外包","非驻场外包"] },

          { name: "跨境情况",formType:"select",field: "C20A020",options:["跨境外包","非跨境外包"]  },
          
          { name: "关联外包类型",formType: "radio-group",field: "C20A022",options:[
            "母公司","关联公司或附属机构","非关联外包"
          ]},
          { name: "发生服务中断或异常退出",formType: "yesno",field: "C20A023"},
        ],
      },
      { type: "br" },
      {
        serialNumber: "1006",
        code:"TB90031",
        type:"MultiColumnTable",
        project: "合同明细表-开发测试类",
        content: [
          { name: "合同名称",formType:'input',field:"C20A001" },
          { name: "服务类型", formType:'checkbox-group', field: "C20A004",options:[
            "定制开发","测试","人力外包","SaaS","其他"
            ],
            otherOption:true,
            otherField:"" 
          },
          { name: "起始时间",formType:"date", field: "C20A008" },
          { name: "计划完成时间",formType:"date",field: "C20A010" },
          
          { name: "是否新增",formType:"yesno",field: "C20A012" },
          { name: "执行状态",formType:"radio-group",field: "C20A013",
            options: ["执行中","已完成"]
          },
          { name: "完成时间",formType:"date",field: "C20A014",},
          
          { name: "合同涉及重要信息系统(与TB3系统名称保存一致)",formType: "input",field: "C24A001"},

          { name: "工作总量(人月)",formType:'number',field:"C20A015" },
          { name: "金额(万元)", formType:'number', field: "C20A016" },

          { name: "提供商名称",formType:"input", field: "C20A017" },
          { name: "组织机构代码",formType:"input",field: "C20A018" },

          { name: "实施方式",formType:"radio-group",field: "C20A019",options:["驻场外包","非驻场外包"] },
          { name: "跨境情况",formType:"radio-group",field: "C20A020",options:["跨境外包","非跨境外包"]  },
          { name: "关联外包类型",formType: "radio-group",field: "C20A022",optons:[
            "母公司","关联公司或附属机构","非关联外包"
          ]},
          { name: "发生服务中断或异常退出",formType: "yesno",field: "C20A023"},
        ],
      },
      { type: "br" },
      {
        serialNumber: "1006",
        code:"TB90031",
        type:"MultiColumnTable",
        project: "合同明细表-运行维护类",
        content: [
          { name: "合同名称",formType:'input',field:"C20A001" },

          { name: "服务类型", formType:'checkbox-group', field: "C20A005",options:[
            "数据中心（机房）物理环境的托管或运行维护",
            "软硬件基础设施托管或运行维护","应用系统运维","电子机具运维",
            "办公桌面运维","人力外包","其他"
            ],
            otherOption:true,
            otherField:"" 
          },

          { name: "起始时间",formType:"date", field: "C20A008" },
          { name: "计划完成时间",formType:"date",field: "C20A010" },
          
          { name: "是否新增",formType:"yesno",field: "C20A012" },
          { name: "执行状态",formType:"radio-group",field: "C20A013",
            options: ["执行中","已完成"]
          },
          { name: "完成时间",formType:"date",field: "C20A014",},
          
          { name: "合同涉及重要信息系统(与TB3系统名称保存一致)",formType: "input",field: "C24A001"},

          { name: "工作总量(人月)",formType:'number',field:"C20A015" },
          { name: "金额(万元)", formType:'number', field: "C20A016" },

          { name: "提供商名称",formType:"input", field: "C20A017" },
          { name: "组织机构代码",formType:"input",field: "C20A018" },

          { name: "实施方式",formType:"radio-group",field: "C20A019",options:["驻场外包","非驻场外包"] },
          { name: "跨境情况",formType:"radio-group",field: "C20A020",options:["跨境外包","非跨境外包"]  },
          { name: "关联外包类型",formType: "radio-group",field: "C20A022",optons:[
            "母公司","关联公司或附属机构","非关联外包"
          ]},
          { name: "发生服务中断或异常退出",formType: "yesno",field: "C20A023"},
        ],
      },

      { type: "br" },
      {
        serialNumber: "1006",
        code:"TB90031",
        type:"MultiColumnTable",
        project: "合同明细表-安全服务类",
        content: [
          { name: "合同名称",formType:'input',field:"C20A001" },
        
          { name: "服务类型", formType:'checkbox-group', field: "C20A006",options:[
            "安全运营服务","安全加固服务","安全测试服务","安全设备运维","安全日志处理与分析",
            "密钥管理及运行维护","数据安全服务","人力外包","其他"
            ],
            otherOption:true,
            otherField:"" 
          },

          { name: "起始时间",formType:"date", field: "C20A008" },
          { name: "计划完成时间",formType:"date",field: "C20A010" },
          
          { name: "是否新增",formType:"yesno",field: "C20A012" },
          { name: "执行状态",formType:"radio-group",field: "C20A013",
            options: ["执行中","已完成"]
          },
          { name: "完成时间",formType:"date",field: "C20A014",},
          
          { name: "合同涉及重要信息系统(与TB3系统名称保存一致)",formType: "input",field: "C24A001"},

          { name: "工作总量(人月)",formType:'number',field:"C20A015" },
          { name: "金额(万元)", formType:'number', field: "C20A016" },

          { name: "提供商名称",formType:"input", field: "C20A017" },
          { name: "组织机构代码",formType:"input",field: "C20A018" },

          { name: "实施方式",formType:"radio-group",field: "C20A019",options:["驻场外包","非驻场外包"] },
          { name: "跨境情况",formType:"radio-group",field: "C20A020",options:["跨境外包","非跨境外包"]  },
          { name: "关联外包类型",formType: "radio-group",field: "C20A022",optons:[
            "母公司","关联公司或附属机构","非关联外包"
          ]},
          { name: "发生服务中断或异常退出",formType: "yesno",field: "C20A023"},
        ],
      },
      { type: "br" },
      {
        serialNumber: "1006",
        code:"TB90031",
        type:"MultiColumnTable",
        project: "合同明细表-业务支持类",
        content: [
          { name: "合同名称",formType:'input',field:"C20A001" },
          { name: "服务类型", formType:'checkbox-group', field: "C20A007",options:[
            "市场拓展","业务运营","企业管理","资产处置","数据处理","数据利用","其他" 
            ],
            otherOption:true,
            otherField:"" 
          },
          { name: "起始时间",formType:"date", field: "C20A008" },
          { name: "计划完成时间",formType:"date",field: "C20A010" },
          

          { name: "是否新增",formType:"yesno",field: "C20A012" },
          { name: "执行状态",formType:"radio-group",field: "C20A013",
            options: ["执行中","已完成"]
          },
          { name: "完成时间",formType:"date",field: "C20A014",},
          
           { name: "合同涉及重要信息系统(与TB3系统名称保存一致)",formType: "input",field: "C24A001"},

          { name: "工作总量(人月)",formType:'number',field:"C20A015" },
          { name: "金额(万元)", formType:'number', field: "C20A016" },

          { name: "提供商名称",formType:"input", field: "C20A017" },
          { name: "组织机构代码",formType:"input",field: "C20A018" },

          { name: "实施方式",formType:"radio-group",field: "C20A019",options:["驻场外包","非驻场外包"] },
          { name: "跨境情况",formType:"radio-group",field: "C20A020",options:["跨境外包","非跨境外包"]  },
          { name: "关联外包类型",formType: "radio-group",field: "C20A022",optons:[
            "母公司","关联公司或附属机构","非关联外包"
          ]},
          { name: "发生服务中断或异常退出",formType: "yesno",field: "C20A023"},
        ],
      },

      { type: "br" },
      { type: "text", value: "备注" },
      { type: "input", field: "COL49",width:"50%"},
    ],
    remarks: {
      rows:10,
      field:"C20A006"
    }
  },

  {
    serialNumber: "11",
    project: "附件",
    code: 'TB10005',
    type:"AttachTable",
    content:[
      { 
        field: 'col1',title: '名称', width:'40%',
      },{
        field: 'col2',title: '附件索引', width:'60%',slots: { default: 'form_default' },
      }
    ],
    datas: [
      { 
        col1: "信息科技外包战略 ",
        col2:{ formType:'input',field: "TB10005001"},
        col3:{ formType:'input',field: "TB10005002"},
      },
      { 
        col1: "信息科技外包风险管理评估报告",
        col2:{ formType:'input',field: "C23A001F"},
        col3:{ formType:'input',field: "C23A002F"},
      },
    ],
    remarks: {
      rows:10,
      field:"C20A006"
    }
  }

];


