import type { Config } from '@/components/Configurable/types';

export const testConfigSealedGoaf: Config[] = [
  // 1. 矿井状况
  {
    deviceType: 'goafs_info',
    moduleName: '矿井状况',
    pageType: 'sealed_goaf',
    moduleData: {
      header: {
        show: true,
        readFrom: '',
        selector: { show: false, value: '' },
        slot: { show: true, value: '(总计:365)' },
      },
      background: { show: false, type: 'video', link: '' },
      layout: {
        direction: 'row',
        items: [{ name: 'board', basis: '100%' }],
      },
      list: [],
      board: [
        {
          type: 'A',
          readFrom: '',
          layout: 'label-top',
          items: [
            {
              label: '生产矿井',
              value: '219',
            },
            {
              label: '建设矿井',
              value: '219',
            },
            {
              label: '停产停建',
              value: '17',
            },
            {
              label: '长期停产停建',
              value: '17',
            },
            {
              label: '实施关闭',
              value: '2',
            },
            {
              label: '情况变化',
              value: '1',
            },
          ],
        },
      ],
      chart: [],
      gallery: [],
      gallery_list: [],
      table: [],
      complex_list: [],
      preset: [],
    },
    showStyle: {
      size: 'width:440px;height:185px;',
      version: '原版',
      position: 'top:20px;left:10px;',
    },
  },
  // 2. 当日生产状态
  {
    deviceType: 'spray_auto',
    moduleName: '当日生产状态',
    pageType: 'sealed_goaf',
    moduleData: {
      header: {
        show: true,
        readFrom: '',
        selector: { show: false, value: '' },
        slot: { show: true, value: '(总计:211)' },
      },
      background: { show: false, type: 'video', link: '' },
      layout: {
        direction: 'row',
        items: [{ name: 'board', basis: '100%' }],
      },
      list: [],
      board: [
        {
          type: 'A',
          readFrom: '',
          layout: 'label-top',
          items: [
            {
              label: '${productionStatusData[0].name}',
              value: '${productionStatusData[0].num}',
            },
            {
              label: '${productionStatusData[1].name}',
              value: '${productionStatusData[1].num}',
            },
            {
              label: '${productionStatusData[2].name}',
              value: '${productionStatusData[2].num}',
            },
            {
              label: '${productionStatusData[3].name}',
              value: '${productionStatusData[3].num}',
            },
          ],
        },
      ],
      chart: [],
      gallery: [],
      gallery_list: [],
      table: [],
      complex_list: [],
      preset: [],
    },
    showStyle: {
      size: 'width:440px;height:140px;',
      version: '原版',
      position: 'top:210px;left:10px;',
    },
  },
  // 3. 煤层自燃倾向性
  {
    deviceType: 'coalSeam_fire',
    moduleName: '煤层自燃倾向性',
    pageType: 'sealed_goaf',
    moduleData: {
      header: {
        show: false,
        readFrom: '',
        selector: {
          show: false,
          value: '',
        },
        slot: {
          show: false,
          value: '',
        },
      },
      background: {
        show: false,
        type: 'video',
        link: '',
      },
      layout: {
        direction: 'column',
        items: [
          {
            name: 'chart',
            basis: '100%',
          },
        ],
      },
      chart: [
        {
          type: 'pie_drag',
          readFrom: '',
          legend: { show: false, formatter: '{b}:{c}\n{d}%' },
          xAxis: [{ show: false }],
          yAxis: [{ show: false, name: '风量', position: 'left' }],
          series: [{ readFrom: 'coalSeamFireData', xprop: 'coalSeamLevel', yprop: 'num', label: '' }],
        },
      ],
      gallery: [],
      gallery_list: [],
      table: [],
      list: [],
      complex_list: [],
      preset: [],
    },
    showStyle: {
      size: 'width:440px;height:180px;',
      version: '原版',
      position: 'top:340px;left:10px;',
    },
  },
  // 4. 联网状态
  {
    deviceType: 'isOnline',
    moduleName: '联网状态',
    pageType: 'sealed_goaf',
    moduleData: {
      header: {
        show: true,
        readFrom: '',
        selector: {
          show: true,
          value: '${pos}',
        },
        slot: {
          show: false,
          value: '',
        },
      },
      background: {
        show: false,
        type: 'video',
        link: '',
      },
      layout: {
        direction: 'column',
        items: [
          {
            name: 'board',
            basis: '40%',
            overflow: true,
          },
          {
            name: 'table',
            basis: '60%',
            overflow: true,
          },
        ],
      },
      board: [
        {
          type: 'B',
          readFrom: '',
          layout: 'val-top',
          items: [
            {
              label: '应接入',
              value: '210',
            },
            {
              label: '在线',
              value: '27',
            },
            {
              label: '中断',
              value: '17',
            },
            {
              label: '未接入',
              value: '1',
            },
          ],
        },
      ],
      chart: [],
      gallery: [],
      gallery_list: [],
      table: [
        {
          type: 'A',
          // parser: 'json',
          readFrom: 'tableArray',
          columns: [
            {
              name: ' ',
              prop: 'index',
            },
            {
              name: '应接入',
              prop: 'yjr',
            },
            {
              name: '在线',
              prop: 'zx',
            },
            {
              name: '中断',
              prop: 'zd',
            },
            {
              name: '未接入',
              prop: 'wjr',
            },
          ],
        },
      ],
      list: [],
      complex_list: [],
      preset: [],
      mock: {
        isOnline: [
          {
            pos: '生成矿井',
            boardArray: [
              {
                label: '低风险',
                value: '210',
              },
              {
                label: '一般风险',
                value: '27',
              },
              {
                label: '较高风险',
                value: '17',
              },
              {
                label: '高风险',
                value: '1',
              },
            ],
            tableArray: [
              {
                index: '执法一处',
                yjr: '50',
                zx: '20',
                zd: '0',
                wjr: '0',
              },
              {
                index: '执法二处',
                yjr: '50',
                zx: '20',
                zd: '0',
                wjr: '0',
              },
              {
                index: '执法三处',
                yjr: '50',
                zx: '20',
                zd: '0',
                wjr: '0',
              },
              {
                index: '执法四处',
                yjr: '50',
                zx: '20',
                zd: '0',
                wjr: '0',
              },
              {
                index: '执法五处',
                yjr: '50',
                zx: '20',
                zd: '0',
                wjr: '0',
              },
              {
                index: '执法六处',
                yjr: '50',
                zx: '20',
                zd: '0',
                wjr: '0',
              },
            ],
          },
        ],
      },
    },
    showStyle: {
      size: 'width:440px;height:300px;',
      version: '原版',
      position: 'top:520px;left:10px;',
    },
  },
  // 5. 密闭情况总览
  {
    deviceType: 'sealed_info',
    moduleName: '密闭情况总览',
    pageType: 'sealed_goaf',
    moduleData: {
      header: {
        show: true,
        readFrom: '',
        selector: {
          show: false,
          value: '',
        },
        slot: {
          show: true,
          value: '(总计:211)',
        },
      },
      background: {
        show: false,
        type: 'video',
        link: '',
      },
      layout: {
        direction: 'column',
        items: [
          {
            name: 'board',
            basis: '40%',
            overflow: true,
          },
          {
            name: 'table',
            basis: '60%',
            overflow: true,
          },
        ],
      },
      board: [
        {
          type: 'C',
          readFrom: '',
          layout: 'val-top',
          items: [
            {
              label: '低风险',
              value: '210',
            },
            {
              label: '一般风险',
              value: '27',
            },
            {
              label: '较高风险',
              value: '17',
            },
            {
              label: '高风险',
              value: '1',
            },
          ],
        },
      ],
      chart: [],
      gallery: [],
      gallery_list: [],
      table: [
        {
          type: 'A',
          // parser: 'json',
          readFrom: 'tableArray',
          columns: [
            {
              name: ' ',
              prop: 'index',
            },
            {
              name: '低风险',
              prop: 'dfx',
            },
            {
              name: '一般风险',
              prop: 'ybfx',
            },
            {
              name: '较高风险',
              prop: 'jgfx',
            },
            {
              name: '高风险',
              prop: 'gfx',
            },
          ],
        },
      ],
      list: [],
      complex_list: [],
      preset: [],
      mock: {
        boardArray: [
          {
            label: '低风险',
            value: '210',
          },
          {
            label: '一般风险',
            value: '27',
          },
          {
            label: '较高风险',
            value: '17',
          },
          {
            label: '高风险',
            value: '1',
          },
        ],
        tableArray: [
          {
            index: '执法一处',
            dfx: '50',
            ybfx: '20',
            jgfx: '0',
            gfx: '0',
          },
          {
            index: '执法二处',
            dfx: '50',
            ybfx: '20',
            jgfx: '0',
            gfx: '0',
          },
          {
            index: '执法三处',
            dfx: '50',
            ybfx: '20',
            jgfx: '0',
            gfx: '0',
          },
          {
            index: '执法四处',
            dfx: '50',
            ybfx: '20',
            jgfx: '0',
            gfx: '0',
          },
          {
            index: '执法五处',
            dfx: '50',
            ybfx: '20',
            jgfx: '0',
            gfx: '0',
          },
          {
            index: '执法六处',
            dfx: '50',
            ybfx: '20',
            jgfx: '0',
            gfx: '0',
          },
        ],
      },
    },
    showStyle: {
      size: 'width:440px;height:330px;',
      version: '原版',
      position: 'top:-20px;right:10px;',
    },
  },
  // 6. 采空区密闭预警分析
  {
    deviceType: 'goafmonitoring',
    moduleName: '采空区密闭预警分析',
    pageType: 'sealed_goaf',
    moduleData: {
      header: {
        show: true,
        readFrom: '',
        selector: {
          show: false,
          value: '${pos}',
        },
        slot: {
          show: true,
          value: '(总计:200)',
        },
      },
      background: {
        show: false,
        type: 'video',
        link: '',
      },
      layout: {
        direction: 'column',
        items: [
          {
            name: 'board',
            basis: '40%',
            overflow: true,
          },
          {
            name: 'table',
            basis: '60%',
            overflow: true,
          },
        ],
      },
      board: [
        {
          type: 'C',
          readFrom: '',
          layout: 'val-top',
          items: [
            {
              label: '低风险',
              value: '210',
            },
            {
              label: '一般风险',
              value: '27',
            },
            {
              label: '较高风险',
              value: '17',
            },
            {
              label: '高风险',
              value: '1',
            },
          ],
        },
      ],
      chart: [],
      gallery: [],
      gallery_list: [],
      table: [
        {
          type: 'A',
          // parser: 'json',
          readFrom: 'goafAlarmData',
          columns: [
            {
              name: ' ',
              prop: 'managementName',
            },
            {
              name: '低风险',
              prop: 'alarm1',
            },
            {
              name: '一般风险',
              prop: 'alarm2',
            },
            {
              name: '较高风险',
              prop: 'alarm3',
            },
            {
              name: '高风险',
              prop: 'alarm4',
            },
          ],
        },
      ],
      list: [],
      complex_list: [],
      preset: [],
      // mock: {
      //   goafMonitoring: [
      //     {
      //       pos: '自燃',
      //       boardArray: [
      //         {
      //           label: '低风险',
      //           value: '210',
      //         },
      //         {
      //           label: '一般风险',
      //           value: '27',
      //         },
      //         {
      //           label: '较高风险',
      //           value: '17',
      //         },
      //         {
      //           label: '高风险',
      //           value: '1',
      //         },
      //       ],
      //       tableArray: [
      //         {
      //           managementName: '执法一处',
      //           dfx: '50',
      //           ybfx: '20',
      //           jgfx: '0',
      //           gfx: '0',
      //         },
      //         {
      //           managementName: '执法二处',
      //           dfx: '50',
      //           ybfx: '20',
      //           jgfx: '0',
      //           gfx: '0',
      //         },
      //         {
      //           managementName: '执法三处',
      //           dfx: '50',
      //           ybfx: '20',
      //           jgfx: '0',
      //           gfx: '0',
      //         },
      //         {
      //           managementName: '执法四处',
      //           dfx: '50',
      //           ybfx: '20',
      //           jgfx: '0',
      //           gfx: '0',
      //         },
      //         {
      //           managementName: '执法五处',
      //           dfx: '50',
      //           ybfx: '20',
      //           jgfx: '0',
      //           gfx: '0',
      //         },
      //       ],
      //     },
      //   ],
      // },
    },
    showStyle: {
      size: 'width:440px;height:300px;',
      version: '原版',
      position: 'top:310px;right:10px;',
    },
  },
  // 7. 当日报警情况统计
  {
    deviceType: 'realtime_monitor',
    moduleName: '当日报警情况统计',
    pageType: 'sealed_goaf',
    moduleData: {
      header: {
        show: false,
        readFrom: '',
        selector: {
          show: false,
          value: '',
        },
        slot: {
          show: false,
          value: '',
        },
      },
      background: {
        show: false,
        type: 'video',
        link: '',
      },
      layout: {
        direction: 'row',
        items: [
          {
            name: 'board',
            basis: '100%',
          },
        ],
      },
      board: [
        {
          type: 'D',
          readFrom: '',
          layout: 'val-top',
          items: [
            {
              label: '${overLimitData[0].alarmDesc}',
              value: '${overLimitData[0].num}',
            },
            {
              label: 'CH4超限',
              value: '27',
            },
            {
              label: 'C2H4超限',
              value: '17',
            },
            {
              label: 'C2H2超限',
              value: '1',
            },
            {
              label: 'O2超限',
              value: '210',
            },
            {
              label: '温度超限',
              value: '27',
            },
            {
              label: '压差超限',
              value: '17',
            },
            {
              label: '设备断连',
              value: '1',
            },
          ],
        },
      ],
      chart: [],
      gallery: [],
      gallery_list: [],
      table: [],
      list: [],
      complex_list: [],
      preset: [],
    },
    showStyle: {
      size: 'width:440px;height:210px;',
      version: '原版',
      position: 'top:620px;right:10px;',
    },
  },
];
