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: "基本情况",
    code: 'TB08001',
    content: [
      { type: "text", value: "（1）建立运维管理制度定期评价及修订完善机制" },
      { type: "yesno", field: "COL1_8"},
      { type: "brspace" },
      { type: "text", value: "本年度新增或修订运维管理制度：" },
      { type: "yesno", field: "COL1_9"},
      { type: "br" },

      { type: "text", value: "（2）运维管理制度涵盖以下范围" },
      { 
        type: "checkbox-group", 
        field: "COL1_10",
        options: [
          "变更管理","事件管理","问题管理","容量管理","配置管理","服务水平管理","可用性管理","机房管理"
        ],
        otherOption:true,
        otherField:"COL1_11"
      },
      { type: "br" },
      { type: "text", value: "（3）自主运维的重要信息系统数量" },
      { type: "number", field: "C24A001",width:"50px",unit:'个'},
      { type: "text", value: "，委托第三方运维的重要信息系统数量" },
      { type: "number", field: "C24A002",width:"50px",unit:'个'}
     
    ],
    remarks: {
      rows:6,
      field:"COL1_100"
    }
  },

  {
    serialNumber: "2",
    project: "监控情况",
    code: 'TB08002',
    content: [
      { type: "text", value: "（1）自动化工具监控范围" },
      { 
        type: "checkbox-group", 
        field: "COL2_1_1",
        options: [
          "机房物理环境","主机及服务器","操作系统",
          "网络环境","数据库","中间件","应用系统","存储",
          "虚拟化","云平台"
        ],
        otherOption:true,
        otherField:"COL2_1_9"
      },

      { type: "br" },
      { type: "text", value: "（2）自动化工具实现集中监控、展示和集中预警处置" },
      { type: "yesno", field: "COL9"},
      { type: "br" },

      { type: "text", value: "（3）使用自动化工具实现应用系统监控的重要信息系统数量" },
      { type: "number", field: "COL2_2",unit:"个"},
      { type: "text", value: "，使用自动化工具实现应用系统监控的重要信息系统比率" },
      { type: "number", field: "COL2_3",unit:"%"},

      { type: "br" },
      { type: "text", value: "（4）保存重要信息系统日志" },
      { type: "yesno", field: "C24A003",extraLabel:"日志保存期限",extraField:"C24A004",unit:"月"},
     
    ],
    remarks: {
      rows:6,
      field:"COL2_100"
    }
  },
  {
    serialNumber: "3",
    project: "变更管理",
    code: 'TB08003',
    content: [
      { type: "text", value: "（1）变更管理范围" },
      { 
        type: "checkbox-group", 
        field: "COL3_1_1",
        options: [
          "生产系统","准生产系统","开发测试系统"
        ],
        otherOption:true,
        otherField:"COL3_1_5"
      },
     
      { type: "br" },
      { type: "text", value: "（2）建立变更的统一管理机制" },
      { type: "yesno", field: "COL3_5",extraLabel:"变更管理组织（团队）名称",extraField:"COL3_6"},
      { type: "br" },
      
      { type: "text", value: "（3）对变更进行分级管理：" },
      { type: "yesno", field: "COL3_2",extraFields:[
        {label:"分为",formType: "number", field: "COL3_3",unit:"级"},
        {label:"，建立不同级别的变更评审和审批机制",formType: "yesno", field: "COL3_4",unit:"级"},
      ]},
     
      
      // { type: "yesno", field: "COL3_2"},
      // { type: "brspace" },
      // { type: "text", value: "如是，分为" },
      // { type: "number", field: "COL3_3",unit:"级"},
      // { type: "text", value: "，建立不同级别的变更评审和审批机制" },
      // { type: "yesno", field: "COL3_4"},

      { type: "br" },
      { type: "text", value: "（4）风险管理部门（组织）对重要信息系统投产及变更进行风险评估" },
      { type: "yesno", field: "COL3_7"},
      { type: "brspace" },
      { type: "text", value: "内部审计人员或信息安全人员定期进行变更抽查" },
      { type: "yesno", field: "COL3_13"},

      { type: "br" },
      { type: "text", value: "（5）是否存在由系统开发人员负责实施生产系统投产变更情况" },
      { type: "yesno", field: "COL9"},

      { type: "br" },
      { type: "text", value: "（6）安排固定的变更（非紧急变更）执行窗口" },
      { type: "yesno", field: "COL3_8"},
      { type: "brspace" },
      { type: "text", value: "如是，窗口时间" },
      { type: "input", field: "COL3_9"},


      { type: "br" },
      { type: "text", value: "（7）所有涉及生产环境的变更，变更前制定回退和应急方案" },
      { type: "yesno", field: "COL3_10"},


      { type: "br" },
      { type: "text", value: "（8）所有变更均留有记录" },

      { type: "yesno", field: "COL3_11",extraFields:[
        {label:"保留方式",formType: "checkbox", field: "COL3_12_1",options:[
             "纸质","电子文档","专门的管理平台"
        ]},
      ]},
      
      
      // { type: "yesno", field: "COL3_11"},
      // { type: "brspace" },
      // { type: "text", value: "如是，" },
      // { 
      //   type: "checkbox-group", 
      //   field: "COL3_12_1",
      //   options: [
      //     "纸质","电子文档","专门的管理平台"
      //   ],
      // },

      
      { type: "br" },
      { type: "text", value: "（9）建立变更的后评价机制" },
      { type: "yesno", field: "COL3_14"},
     
      { type: "br" },
      { type: "text", value: "（10）本年度投产变更数量：" },
      { type: "input", field: "COL3_15",unit:"次"},
    
      { type: "text", value: "，投产变更回退数量" },
      { type: "input", field: "COL3_16",unit:"次"},
      
      { type: "brspace" },
      { type: "text", value: "向监管报备的重大投产变更数量" },
      { type: "input", field: "COL_17",unit:"次"},
     
    ],

    remarks: {
      rows:22,
      field:"COL3_100"
    }
  },

  {
    serialNumber: "4",
    project: "事件管理",
    code: 'TB08004',
    content: [
      { type: "text", value: "（1）事件管理范围：" },
      { 
        type: "checkbox-group", 
        field: "COL4_1_1",
        options: [
          "生产系统","准生产系统","开发测试系统"
        ],
        otherOption:true,
        otherField:"COL4_1_5"      
      },
      { type: "br" },

      { type: "text", value: "（2）对事件进行分级管理：" },
      { type: "yesno", field: "COL4_3"},

      { type: "brspace" },
      { type: "text", value: "如是，分为" },
      { type: "number", field: "COL4_4",unit:"级"},
     
      { type: "br" },
      { type: "text", value: "（3）使用专门的管理平台进行事件管理" },
      { type: "yesno", field: "COL4_2"},
     
      { type: "br" },

      { type: "text", value: "（4）所有事件均留有记录" },
      { type: "yesno", field: "COL9"},

     
      { type: "br" },
      { type: "text", value: "（5）本年度事件数量：" },
      { type: "input", field: "COL5_1",unit:"起,"},
      { type: "text", value: "向监管报告的重大事件数量" },
      { type: "input", field: "COL_5_2",unit:"起"},

      { type: "brspace" },
      { type: "text", value: "其中，重要业务运营中断事件" },
      { type: "input", field: "C24A005",unit:"起,"},
      { type: "text", value: "重要业务运营缓慢或异常事件" },
      { type: "input", field: "C24A006",unit:"起"},


      { type: "brspace" },
      { type: "text", value: "上述事件中，信息技术故障" },
      { type: "input", field: "C24A007",unit:"起，"},

      { type: "text", value: "外部服务中断" },
      { type: "input", field: "C24A008",unit:"起"},

      { type: "brspace" },
      { type: "text", value: "第三方无法合作或提供服务" },
      { type: "input", field: "C24A009",unit:"起，"},
      { type: "text", value: "人为破坏" },
      { type: "input", field: "C24A010",unit:"起"},

      { type: "brspace" },
      { type: "text", value: "自然灾害：" },
      { type: "input", field: "C24A011",unit:"起，"},
      { type: "text", value: "其他原因" },
      { type: "input", field: "C24A012",unit:"起"},

    ],
    
    remarks: {
      rows:6,
      field:"COL4_100"
    }
    
  },
  {
    serialNumber: "5",
    project: "问题管理",
    code: 'TB08005',
    content: [
      { type: "text", value: "（1）问题管理范围" },
      { 
        type: "checkbox-group", 
        field: "COL5_1_1",
        options: [
          "生产系统","准生产系统","开发测试系统"
        ],
        otherOption:true,
        otherField:"COL5_1_5"      
      },
      { type: "br" },
      { type: "text", value: "（2）具备将事件转化为问题的管理机制：" },
      { type: "yesno", field: "COL5_2"},

      { type: "br" },
      { type: "text", value: "（3）使用专门的管理平台进行问题管理：" },
      { type: "yesno", field: "COL5_3"},
     
    ],
    remarks: {
      rows:6,
      field:"COL5_100"
    }
  },
  {
    serialNumber: "6",
    project: "容量管理",
    code: 'TB08006',
    content: [
      { type: "text", value: "（1）容量管理范围：" },
      { 
        type: "checkbox-group", 
        field: "COL6_3_1",
        options: [
          "网络设备","主机","数据库","应用系统","存储"
        ],
        otherOption:true,
        otherField:"COL6_3_5"      
      },

      { type: "br" },
      { type: "text", value: "（2）建立容量管理的定期评估机制：" },
      { type: "COL6_4", field: "COL6_4"},

      { type: "brspace" },
      { type: "text", value: "如是，评估周期" },
      { type: "input", field: "COL6_5"},
     
      { type: "brspace" },
      { type: "text", value: "实施重大变更或业务环境发生变更时，评估变更对容量指标的影响：" },
      { type: "yesno", field: "COL6_7"},
     

      { type: "br" },
      { type: "text", value: "（3）使用专门的管理平台进行容量管理：" },
      { type: "yesno", field: "COL6_6"},

    ],
    remarks: {
      rows:6,
      field:"COL6_100"
    }
  },
  {
    serialNumber: "7",
    project: "配置管理",
    code: 'TB08007',
    content: [
      { type: "text", value: "（1）使用专门的管理平台进行配置管理：" },
      { type: "yesno", field: "COL7_3"},

      { type: "br" },
      { type: "text", value: "（2）配置管理范围：" },
      { 
        type: "checkbox-group", 
        field: "COL7_4",
        options: [
          "网络设备","安全设备","主机","数据库","中间件","应用系统","操作系统"
        ],
        otherOption:true,
        otherField:"COL7_5"      
      },
     
    ],
    remarks: {
      rows:6,
      field:"COL7_100"
    }
  },
  {
    serialNumber: "8",
    project: "内部服务水平管理",
    code: 'TB08008',
    content:[

      { type: "text", value: "（1）在机构内部签订服务水平协议或制定服务水平考核指标" },
      { type: "yesno", field: "COL8_1"},

      { type: "brspace" },
      { type: "text", value: "如是，定期检查、通报执行情况" },
      { type: "yesno", field: "COL8_3"},

      { type: "brspace" },
      { type: "text", value: "通报执行频率" },
      { type: "number", field: "COL8_4",unit:"月/次"},
     
      { type: "brspace" },
      { type: "text", value: "机构内部服务水平指标的达标比例：" },
      { type: "number", field: "COL8_5",unit:"%"},
     
    ],

    remarks: {
      rows:6,
      field:"COL8_100"
    }
   
  }
];


