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

export const testConfigSealedGoaf: Config[] = [
  // 1. 密闭统计
  {
    deviceType: 'goaf_statistics',
    moduleName: '密闭统计',
    pageType: 'sealed_goaf_mine',
    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%' }],
      },
      list: [],
      board: [
        {
          type: 'F',
          readFrom: 'goafStatusNum',
          layout: 'label-top',
          items: [
            {
              label: '设备总数',
              value: '${total}',
            },
            {
              label: '正常',
              value: '${status1}',
            },
            {
              label: '未知',
              value: '${unknown}',
            },
            {
              label: '断线',
              value: '${status0}',
            },
            {
              label: '报警',
              value: '${alarm}',
            },
          ],
        },
      ],
      chart: [],
      gallery: [],
      gallery_list: [],
      table: [],
      complex_list: [],
      preset: [],
    },
    showStyle: {
      size: 'width:440px;height:170px;',
      version: '原版',
      position: 'top:70px;left:25px;',
    },
  },

  // 2. 密闭预警统计
  {
    deviceType: 'warning_statistics',
    moduleName: '密闭预警统计',
    pageType: 'sealed_goaf_mine',
    moduleData: {
      header: {
        show: false,
        readFrom: '',
        selector: {
          show: false,
          value: '',
        },
        slot: {
          show: false,
          value: '',
        },
      },
      background: {
        show: false,
        type: 'video',
        link: '',
      },
      layout: {
        direction: 'column',
        items: [
          {
            name: 'board',
            basis: '100%',
          },
        ],
      },
      board: [
        {
          type: 'C',
          readFrom: 'goafAlarmNum[0]',
          layout: 'val-top',
          items: [
            {
              label: '低风险',
              value: '${alarm1}',
            },
            {
              label: '一般风险',
              value: '${alarm2}',
            },
            {
              label: '较高风险',
              value: '${alarm3}',
            },
            {
              label: '高风险',
              value: '${alarm4}',
            },
          ],
        },
      ],
      chart: [],
      gallery: [],
      gallery_list: [],
      table: [],
      list: [],
      complex_list: [],
      preset: [],
    },
    showStyle: {
      size: 'width:440px;height:210px;',
      version: '原版',
      position: 'top:250px;left:25px;',
    },
  },
  // 3.预警信息列表
  {
    deviceType: 'warning_list',
    moduleName: '预警信息列表',
    pageType: 'sealed_goaf_mine',
    moduleData: {
      header: {
        show: true,
        readFrom: '',
        selector: {
          show: false,
          value: '',
        },
        slot: {
          show: false,
          value: '',
        },
      },
      background: {
        show: false,
        type: 'video',
        link: '',
      },
      layout: {
        direction: 'column',
        items: [
          {
            name: 'table',
            basis: '100%',
            overflow: true,
          },
        ],
      },
      board: [],
      chart: [],
      gallery: [],
      gallery_list: [],
      table: [
        {
          type: 'C',
          // parser: 'json',
          readFrom: 'provinceAlarm.records',
          columns: [
            {
              name: '告警类型',
              prop: 'alarmTypeCont',
            },
            {
              name: '安装位置',
              prop: 'devicePos',
            },
            {
              name: '告警描述',
              prop: 'alarmName',
            },
          ],
        },
      ],
      list: [],
      complex_list: [],
      preset: [],
    },
    showStyle: {
      size: 'width:440px;height:420px;',
      version: '原版',
      position: 'top:470px;left:25px;',
    },
  },
  // 4.  密闭墙内墙详情展示
  {
    deviceType: 'detail_inner_display',
    moduleName: '老空区永久密闭详情展示',
    pageType: 'sealed_goaf_mine',
    moduleData: {
      header: {
        show: false,
        readFrom: '',
        selector: {
          show: false,
          value: '',
        },
        slot: {
          show: false,
          value: '',
        },
      },
      background: {
        show: false,
        type: 'video',
        link: '',
      },
      layout: {
        direction: 'column',
        items: [
          {
            name: 'board_table',
            basis: '100%',
            overflow: true,
          },
        ],
      },
      board: [],
      chart: [],
      gallery: [],
      gallery_list: [],
      table: [],
      list: [],
      complex_list: [],
      preset: [
        {
          readFrom: 'monitorData',
          boardConfigs: [
            {
              type: 'D',
              layout: 'val-top',
              title: '密闭墙内详情',
              items: [
                { label: '甲烷', value: '${ch4Val}' },
                { label: '一氧化碳', value: '${coVal}' },
                { label: '二氧化碳', value: '${co2Val}' },
                { label: '氧气', value: '${o2Val}' },
                { label: '乙烯', value: '${c2h2Val}' },
                { label: '乙炔', value: '${c2h4Val}' },
                { label: '压差', value: '${sourcePressure}' },
                { label: '温度', value: '${temperature}' },
              ],
            },
            {
              type: 'D',
              layout: 'val-top',
              title: '密闭墙外详情',
              items: [
                { label: '甲烷', value: '${ch4ValOut}' },
                { label: '一氧化碳', value: '${coValOut}' },
                { label: '二氧化碳', value: '${co2ValOut}' },
                { label: '氧气', value: '${o2ValOut}' },
                { label: '乙烯', value: '${c2h2ValOut}' },
                { label: '乙炔', value: '${c2h4ValOut}' },
                { label: '压差', value: '${sourcePressure}' },
                { label: '温度', value: '${temperatureOut}' },
              ],
            },
          ],
          table: {
            type: 'D',
            readFrom: '',
            columns: [
              { name: '安装位置', prop: 'devicePos' },
              { name: '预警等级', prop: 'alarmLevel' },
              { name: '状态', prop: 'gjMineStatus' },
            ],
          },
        },
      ],
    },
    showStyle: {
      size: 'width:440px;height:800px;',
      version: '原版',
      position: 'top:30px;right:25px;',
    },
  },
  // 4.  密闭墙外详情展示
  // {
  //   deviceType: 'detail_outer_display',
  //   moduleName: '密闭墙外详情展示',
  //   pageType: 'sealed_goaf_mine',
  //   moduleData: {
  //     header: {
  //       show: false,
  //       readFrom: '',
  //       selector: {
  //         show: false,
  //         value: '',
  //       },
  //       slot: {
  //         show: false,
  //         value: '',
  //       },
  //     },
  //     background: {
  //       show: false,
  //       type: 'video',
  //       link: '',
  //     },
  //     layout: {
  //       direction: 'column',
  //       items: [
  //         {
  //           name: 'board_table',
  //           basis: '100%',
  //           overflow: true,
  //         },
  //       ],
  //     },
  //     board: [],
  //     chart: [],
  //     gallery: [],
  //     gallery_list: [],
  //     table: [],
  //     list: [],
  //     complex_list: [],
  //     preset: [
  //       {
  //         readFrom: 'monitorData',
  //         board: {
  //           type: 'D',
  //           layout: 'val-top',
  //           items: [
  //             { label: '甲烷', value: '${ch4Val}' },
  //             { label: '一氧化碳', value: '${coVal}' },
  //             { label: '二氧化碳', value: '${co2Val}' },
  //             { label: '氧气', value: '${o2Val}' },
  //             { label: '乙烯', value: '${c2h2Val}' },
  //             { label: '乙炔', value: '${c2h4Val}' },
  //             { label: '压差', value: '${dailyYaCha}' },
  //             { label: '温度', value: '${temperature}' },
  //           ],
  //         },
  //         table: {
  //           type: 'D',
  //           readFrom: '',
  //           columns: [
  //             { name: '安装位置', prop: 'devicePos' },
  //             { name: '预警等级', prop: 'alarmLevel' },
  //             { name: '状态统计', prop: 'gjMineStatus' },
  //           ],
  //         },
  //       },
  //     ],
  //   },
  //   showStyle: {
  //     size: 'width:440px;height:420px;',
  //     version: '原版',
  //     position: 'top:460px;right:25px;',
  //   },
  // },
  // // 6. 煤层自燃倾向性
  // {
  //   deviceType: 'coalSeam_fire',
  //   moduleName: '煤层自燃倾向性',
  //   pageType: 'sealed_goaf_mine',
  //   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:210px;',
  //     version: '原版',
  //     position: 'top:650px;right:25px;',
  //   },
  // },
];
