<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->

    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <!--      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
      <a-button type="primary" icon="download" @click="handleExportXls('under')">导出</a-button>

      <!--      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
      <!--        <a-button type="primary" icon="import">导入</a-button>-->
      <!--      </a-upload>-->
      <!-- 高级查询区域 -->
      <!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->

      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
      </a-dropdown>
    </div>

    <!-- table区域-begin -->
    <div>
      <!--      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
      <!--        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项-->
      <!--        <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
      <!--      </div>-->

      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource1"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        @change="handleTableChange">

        <!--        <template slot="State" slot-scope="text">-->
        <!--          <a-tag v-if="text === 'false'" color="#87d068">false</a-tag>-->
        <!--          <a-tag v-else color="#f50">true</a-tag>-->
        <!--        </template>-->
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text,record">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            下载
          </a-button>
        </template>

        <span slot="action" slot-scope="text, record">
<!--          <a @click="handleEdit(record)">编辑</a>-->

          <!--          <a @click="handleDetail(record)">详情</a>-->


          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a @click="handleDetail(record)">详情</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>



        </span>

      </a-table>
    </div>

    <under-modal ref="modalForm" @ok="modalFormOk"></under-modal>
  </a-card>
</template>

<script>

import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin1'
import UnderModal from './modules/UnderModal'
import {getAction} from "@api/manage";

export default {
  name: 'UnderList',
  mixins:[JeecgListMixin, mixinDevice],
  components: {
    UnderModal
  },
  data () {
    return {
      description: 'under管理页面',
      dataSource1: [],

      // 表头
      columns: [
        {
          title: '#',
          dataIndex: '',
          key:'rowIndex',
          width:60,
          align:"center",
          customRender:function (t,r,index) {
            return parseInt(index)+1;
          }
        },
        // {
        //   title:'设备编码(预留)',
        //   align:"center",
        //   dataIndex: 'devicecode'
        // },
        // {
        //   title:'内部代码:(车牌号)',
        //   align:"center",
        //   dataIndex: 'internalcode'
        // },
        // {
        //   title:'设备当前操作模式',
        //   align:"center",
        //   dataIndex: 'operationmode'
        // },
        // {
        //   title:'设备累计运行时间(H)',
        //   align:"center",
        //   dataIndex: 'runningtime'
        // },
        // {
        //   title:'发送时间',
        //   align:"center",
        //   dataIndex: 'sendtime',
        //   customRender:function (text) {
        //     return !text?"":(text.length>10?text.substr(0,20):text)
        //   }
        // },
        // {
        //   title:'插入时间',
        //   align:"center",
        //   dataIndex: 'cjtime',
        //   customRender:function (text) {
        //     return !text?"":(text.length>10?text.substr(0,20):text)
        //   }
        // },
        // {
        //   title:'测试结论',
        //   align:"center",
        //   dataIndex: 'testVerdict'
        // },
        {
          title:'1-1号脱扣',
          align:"center",
          dataIndex: 'bsObstruction11',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-2号脱扣',
          align:"center",
          dataIndex: 'bsObstruction12',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-3号脱扣',
          align:"center",
          dataIndex: 'bsObstruction13',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-4号脱扣',
          align:"center",
          dataIndex: 'bsObstruction14',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-5号脱扣',
          align:"center",
          dataIndex: 'bsObstruction15',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-6号脱扣',
          align:"center",
          dataIndex: 'bsObstruction16',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-车体上极限位',
          align:"center",
          dataIndex: 'bsNw1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-转向架上极限位',
          align:"center",
          dataIndex: 'blNw1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-1转向架高度',
          align:"center",
          dataIndex: 'emergencyStopLocal1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-2转向架高度',
          align:"center",
          dataIndex: 'upLocal1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-3转向架高度',
          align:"center",
          dataIndex: 'downLocal1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-4转向架高度',
          align:"center",
          dataIndex: 'blBsLocal1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-同步误差值',
          align:"center",
          dataIndex: 'mmLocal1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-设备电源启动',
          align:"center",
          dataIndex: 'bl1Wd1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-联动架车模式车位指示',
          align:"center",
          dataIndex: 'bl3Wd1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-联动架车模式车位指示',
          align:"center",
          dataIndex: 'break1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-下降',
          align:"center",
          dataIndex: 'bsEll1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-上升',
          align:"center",
          dataIndex: 'blEll1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-不同步报警',
          align:"center",
          dataIndex: 'asynalarm1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-电源相序报警',
          align:"center",
          dataIndex: 'powerphasealarm1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'1-急停动作',
          align:"center",
          dataIndex: 'emerstopaction1',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-1号脱扣',
          align:"center",
          dataIndex: 'bsObstruction21',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-2号脱扣',
          align:"center",
          dataIndex: 'bsObstruction22',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-3号脱扣',
          align:"center",
          dataIndex: 'bsObstruction23',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-4号脱扣',
          align:"center",
          dataIndex: 'bsObstruction24',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-5号脱扣',
          align:"center",
          dataIndex: 'bsObstruction25',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-6号脱扣',
          align:"center",
          dataIndex: 'bsObstruction26',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-车体上极限位',
          align:"center",
          dataIndex: 'bsNw2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-转向架上极限位',
          align:"center",
          dataIndex: 'blNw2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-1转向架高度',
          align:"center",
          dataIndex: 'emergencyStopLocal2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-2转向架高度',
          align:"center",
          dataIndex: 'upLocal2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-3转向架高度',
          align:"center",
          dataIndex: 'downLocal2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-4转向架高度',
          align:"center",
          dataIndex: 'blBsLocal2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-同步误差值',
          align:"center",
          dataIndex: 'mmLocal2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-设备电源启动',
          align:"center",
          dataIndex: 'bl1Wd2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-联动架车模式车位指示',
          align:"center",
          dataIndex: 'bl3Wd2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-联动架车模式车位指示',
          align:"center",
          dataIndex: 'break2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-下降',
          align:"center",
          dataIndex: 'bsEll2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-上升',
          align:"center",
          dataIndex: 'blEll2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-不同步报警',
          align:"center",
          dataIndex: 'asynalarm2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-电源相序报警',
          align:"center",
          dataIndex: 'powerphasealarm2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'2-急停动作',
          align:"center",
          dataIndex: 'emerstopaction2',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-1号脱扣',
          align:"center",
          dataIndex: 'bsObstruction31',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-2号脱扣',
          align:"center",
          dataIndex: 'bsObstruction32',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-3号脱扣',
          align:"center",
          dataIndex: 'bsObstruction33',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-4号脱扣',
          align:"center",
          dataIndex: 'bsObstruction34',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-5号脱扣',
          align:"center",
          dataIndex: 'bsObstruction35',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-6号脱扣',
          align:"center",
          dataIndex: 'bsObstruction36',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-车体上极限位',
          align:"center",
          dataIndex: 'bsNw3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-转向架上极限位',
          align:"center",
          dataIndex: 'blNw3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-1转向架高度',
          align:"center",
          dataIndex: 'emergencyStopLocal3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-2转向架高度',
          align:"center",
          dataIndex: 'upLocal3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-3转向架高度',
          align:"center",
          dataIndex: 'downLocal3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-4转向架高度',
          align:"center",
          dataIndex: 'blBsLocal3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-同步误差值',
          align:"center",
          dataIndex: 'mmLocal3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-设备电源启动',
          align:"center",
          dataIndex: 'bl1Wd3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-联动架车模式车位指示',
          align:"center",
          dataIndex: 'bl3Wd3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-联动架车模式车位指示',
          align:"center",
          dataIndex: 'break3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-下降',
          align:"center",
          dataIndex: 'bsEll3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-上升',
          align:"center",
          dataIndex: 'blEll3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-不同步报警',
          align:"center",
          dataIndex: 'asynalarm3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-电源相序报警',
          align:"center",
          dataIndex: 'powerphasealarm3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'3-急停动作',
          align:"center",
          dataIndex: 'emerstopaction3',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-1号脱扣',
          align:"center",
          dataIndex: 'bsObstruction41',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-2号脱扣',
          align:"center",
          dataIndex: 'bsObstruction42',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-3号脱扣',
          align:"center",
          dataIndex: 'bsObstruction43',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-4号脱扣',
          align:"center",
          dataIndex: 'bsObstruction44',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-5号脱扣',
          align:"center",
          dataIndex: 'bsObstruction45',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-6号脱扣',
          align:"center",
          dataIndex: 'bsObstruction46',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-车体上极限位',
          align:"center",
          dataIndex: 'bsNw4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-转向架上极限位',
          align:"center",
          dataIndex: 'blNw4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-1转向架高度',
          align:"center",
          dataIndex: 'emergencyStopLocal4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-2转向架高度',
          align:"center",
          dataIndex: 'upLocal4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-3转向架高度',
          align:"center",
          dataIndex: 'downLocal4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-4转向架高度',
          align:"center",
          dataIndex: 'blBsLocal4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-同步误差值',
          align:"center",
          dataIndex: 'mmLocal4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-设备电源启动',
          align:"center",
          dataIndex: 'bl1Wd4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-联动架车模式车位指示',
          align:"center",
          dataIndex: 'bl3Wd4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-联动架车模式车位指示',
          align:"center",
          dataIndex: 'break4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-下降',
          align:"center",
          dataIndex: 'bsEll4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-上升',
          align:"center",
          dataIndex: 'blEll4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-不同步报警',
          align:"center",
          dataIndex: 'asynalarm4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-电源相序报警',
          align:"center",
          dataIndex: 'powerphasealarm4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'4-急停动作',
          align:"center",
          dataIndex: 'emerstopaction4',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-1号脱扣',
          align:"center",
          dataIndex: 'bsObstruction51',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-2号脱扣',
          align:"center",
          dataIndex: 'bsObstruction52',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-3号脱扣',
          align:"center",
          dataIndex: 'bsObstruction53',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-4号脱扣',
          align:"center",
          dataIndex: 'bsObstruction54',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-5号脱扣',
          align:"center",
          dataIndex: 'bsObstruction55',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-6号脱扣',
          align:"center",
          dataIndex: 'bsObstruction56',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-车体上极限位',
          align:"center",
          dataIndex: 'bsNw5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-转向架上极限位',
          align:"center",
          dataIndex: 'blNw5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-1转向架高度',
          align:"center",
          dataIndex: 'emergencyStopLocal5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-2转向架高度',
          align:"center",
          dataIndex: 'upLocal5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-3转向架高度',
          align:"center",
          dataIndex: 'downLocal5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-4转向架高度',
          align:"center",
          dataIndex: 'blBsLocal5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-同步误差值',
          align:"center",
          dataIndex: 'mmLocal5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-设备电源启动',
          align:"center",
          dataIndex: 'bl1Wd5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-联动架车模式车位指示',
          align:"center",
          dataIndex: 'bl3Wd5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-联动架车模式车位指示',
          align:"center",
          dataIndex: 'break5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-下降',
          align:"center",
          dataIndex: 'bsEll5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-上升',
          align:"center",
          dataIndex: 'blEll5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-不同步报警',
          align:"center",
          dataIndex: 'asynalarm5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-电源相序报警',
          align:"center",
          dataIndex: 'powerphasealarm5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'5-急停动作',
          align:"center",
          dataIndex: 'emerstopaction5',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-1号脱扣',
          align:"center",
          dataIndex: 'bsObstruction61',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-2号脱扣',
          align:"center",
          dataIndex: 'bsObstruction62',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-3号脱扣',
          align:"center",
          dataIndex: 'bsObstruction63',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-4号脱扣',
          align:"center",
          dataIndex: 'bsObstruction64',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'65号脱扣',
          align:"center",
          dataIndex: 'bsObstruction65',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-6号脱扣',
          align:"center",
          dataIndex: 'bsObstruction66',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-车体上极限位',
          align:"center",
          dataIndex: 'bsNw6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-转向架上极限位',
          align:"center",
          dataIndex: 'blNw6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-1转向架高度',
          align:"center",
          dataIndex: 'emergencyStopLocal6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-2转向架高度',
          align:"center",
          dataIndex: 'upLocal6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-3转向架高度',
          align:"center",
          dataIndex: 'downLocal6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-4转向架高度',
          align:"center",
          dataIndex: 'blBsLocal6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-同步误差值',
          align:"center",
          dataIndex: 'mmLocal6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-设备电源启动',
          align:"center",
          dataIndex: 'bl1Wd6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-联动架车模式车位指示',
          align:"center",
          dataIndex: 'bl3Wd6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-联动架车模式车位指示',
          align:"center",
          dataIndex: 'break6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-下降',
          align:"center",
          dataIndex: 'bsEll6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-上升',
          align:"center",
          dataIndex: 'blEll6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-不同步报警',
          align:"center",
          dataIndex: 'asynalarm6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-电源相序报警',
          align:"center",
          dataIndex: 'powerphasealarm6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'6-急停动作',
          align:"center",
          dataIndex: 'emerstopaction6',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-1号脱扣',
          align:"center",
          dataIndex: 'bsObstruction71',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-2号脱扣',
          align:"center",
          dataIndex: 'bsObstruction72',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-3号脱扣',
          align:"center",
          dataIndex: 'bsObstruction73',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-4号脱扣',
          align:"center",
          dataIndex: 'bsObstruction74',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-5号脱扣',
          align:"center",
          dataIndex: 'bsObstruction75',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-6号脱扣',
          align:"center",
          dataIndex: 'bsObstruction76',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-车体上极限位',
          align:"center",
          dataIndex: 'bsNw7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-转向架上极限位',
          align:"center",
          dataIndex: 'blNw7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-1转向架高度',
          align:"center",
          dataIndex: 'emergencyStopLocal7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-2转向架高度',
          align:"center",
          dataIndex: 'upLocal7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-3转向架高度',
          align:"center",
          dataIndex: 'downLocal7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-4转向架高度',
          align:"center",
          dataIndex: 'blBsLocal7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-同步误差值',
          align:"center",
          dataIndex: 'mmLocal7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-设备电源启动',
          align:"center",
          dataIndex: 'bl1Wd7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-联动架车模式车位指示',
          align:"center",
          dataIndex: 'bl3Wd7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-联动架车模式车位指示',
          align:"center",
          dataIndex: 'break7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-下降',
          align:"center",
          dataIndex: 'bsEll7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-上升',
          align:"center",
          dataIndex: 'blEll7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-不同步报警',
          align:"center",
          dataIndex: 'asynalarm7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-电源相序报警',
          align:"center",
          dataIndex: 'powerphasealarm7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'7-急停动作',
          align:"center",
          dataIndex: 'emerstopaction7',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-1号脱扣',
          align:"center",
          dataIndex: 'bsObstruction81',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-2号脱扣',
          align:"center",
          dataIndex: 'bsObstruction82',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-3号脱扣',
          align:"center",
          dataIndex: 'bsObstruction83',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-4号脱扣',
          align:"center",
          dataIndex: 'bsObstruction84',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-5号脱扣',
          align:"center",
          dataIndex: 'bsObstruction85',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-6号脱扣',
          align:"center",
          dataIndex: 'bsObstruction86',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-车体上极限位',
          align:"center",
          dataIndex: 'bsNw8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-转向架上极限位',
          align:"center",
          dataIndex: 'blNw8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-1转向架高度',
          align:"center",
          dataIndex: 'emergencyStopLocal8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-2转向架高度',
          align:"center",
          dataIndex: 'upLocal8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-3转向架高度',
          align:"center",
          dataIndex: 'downLocal8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-4转向架高度',
          align:"center",
          dataIndex: 'blBsLocal8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-同步误差值',
          align:"center",
          dataIndex: 'mmLocal8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-设备电源启动',
          align:"center",
          dataIndex: 'bl1Wd8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-联动架车模式车位指示',
          align:"center",
          dataIndex: 'bl3Wd8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-联动架车模式车位指示',
          align:"center",
          dataIndex: 'break8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-下降',
          align:"center",
          dataIndex: 'bsEll8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-上升',
          align:"center",
          dataIndex: 'blEll8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-不同步报警',
          align:"center",
          dataIndex: 'asynalarm8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-电源相序报警',
          align:"center",
          dataIndex: 'powerphasealarm8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title:'8-急停动作',
          align:"center",
          dataIndex: 'emerstopaction8',
          scopedSlots: { customRender: 'State' },
        },
        {
          title: '操作',
          dataIndex: 'action',
          align:"center",
          fixed:"right",
          width:147,
          scopedSlots: { customRender: 'action' }
        }
      ],
      url: {
        list: "/energy/underOnline/list",
        underList: "/energy/underOnline/list",
        delete: "/energy/underOnline/delete",
        deleteBatch: "/energy/underOnline/deleteBatch",
        exportXlsUrl: "/energy/underOnline/exportXls",
        importExcelUrl: "energy/underOnline/importExcel",
      },
      dictOptions:{},
      superFieldList:[],
    }
  },
  created() {
    // this.getSuperFieldList();
  },
  computed: {
    importExcelUrl: function(){
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    },
  },

  mounted () {
  },
  beforeDestroy () {
    // 在组件销毁前清除定时器
    if (this.timer) {
      clearInterval(this.timer);
      this.timer = null; // 可选，将timer置为null表示没有定时器在运行
    }
  },


  methods: {
    initDictConfig(){
    },

    onChange(data){
      this.queryParam.beginTime = data + " 00:00:00";
      this.queryParam.endTime = data + " 23:59:59";
    },

    loadData1(arg) {
      //加载数据 若传入参数1则加载第一页的内容
      if (arg === 1) {
        this.ipagination.current = 1;
      }
      var params = this.getQueryParams();//查询条件

      // var params = "1384437481886601217";//查询条件
      this.loading = true;
      getAction(this.url.underList, params).then((res) => {
        if (res.success) {
          this.dataSource1 = res.result.records||res.result;
          if(res.result.total)
          {
            this.ipagination.total = res.result.total;
          }
        }
        if(res.code===510){
          this.$message.warning(res.message)
        }
        this.loading = false;
      })
    },


    // getSuperFieldList(){
    //   let fieldList=[];
    //   fieldList.push({type:'string',value:'devicecode',text:'设备编码(预留)'})
    //   fieldList.push({type:'string',value:'internalcode',text:'内部代码：如：车牌号'})
    //   fieldList.push({type:'int',value:'operationmode',text:'设备当前操作模式'})
    //   fieldList.push({type:'number',value:'runningtime',text:'设备累计运行时间(H)'})
    //   fieldList.push({type:'string',value:'bsObstruction11',text:'11号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction12',text:'12号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction13',text:'13号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction14',text:'14号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction15',text:'15号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction16',text:'16号脱扣'})
    //   fieldList.push({type:'string',value:'bsNw1',text:'1车体上极限位'})
    //   fieldList.push({type:'string',value:'blNw1',text:'1转向架上极限位'})
    //   fieldList.push({type:'string',value:'emergencyStopLocal1',text:'3-1转向架高度'})
    //   fieldList.push({type:'string',value:'upLocal1',text:'3-2转向架高度'})
    //   fieldList.push({type:'string',value:'downLocal1',text:'3-3转向架高度'})
    //   fieldList.push({type:'string',value:'blBsLocal1',text:'3-4转向架高度'})
    //   fieldList.push({type:'string',value:'mmLocal1',text:'同步误差值'})
    //   fieldList.push({type:'string',value:'bl1Wd1',text:'设备电源启动'})
    //   fieldList.push({type:'string',value:'bl3Wd1',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'break1',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'bsEll1',text:'下降'})
    //   fieldList.push({type:'string',value:'blEll1',text:'上升'})
    //   fieldList.push({type:'string',value:'asynalarm1',text:'不同步报警'})
    //   fieldList.push({type:'string',value:'powerphasealarm1',text:'电源相序报警'})
    //   fieldList.push({type:'string',value:'emerstopaction1',text:'1急停动作'})
    //   fieldList.push({type:'date',value:'sendtime',text:'发送时间'})
    //   fieldList.push({type:'date',value:'cjtime',text:'插入时间'})
    //   fieldList.push({type:'string',value:'testVerdict',text:'测试结论'})
    //   fieldList.push({type:'string',value:'bsObstruction21',text:'21号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction22',text:'22号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction23',text:'23号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction24',text:'24号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction25',text:'25号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction26',text:'26号脱扣'})
    //   fieldList.push({type:'string',value:'bsNw2',text:'2车体上极限位'})
    //   fieldList.push({type:'string',value:'blNw2',text:'2转向架上极限位'})
    //   fieldList.push({type:'string',value:'emergencyStopLocal2',text:'3-1转向架高度'})
    //   fieldList.push({type:'string',value:'upLocal2',text:'3-2转向架高度'})
    //   fieldList.push({type:'string',value:'downLocal2',text:'3-3转向架高度'})
    //   fieldList.push({type:'string',value:'blBsLocal2',text:'3-4转向架高度'})
    //   fieldList.push({type:'string',value:'mmLocal2',text:'同步误差值'})
    //   fieldList.push({type:'string',value:'bl1Wd2',text:'设备电源启动'})
    //   fieldList.push({type:'string',value:'bl3Wd2',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'break2',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'bsEll2',text:'下降'})
    //   fieldList.push({type:'string',value:'blEll2',text:'上升'})
    //   fieldList.push({type:'string',value:'asynalarm2',text:'不同步报警'})
    //   fieldList.push({type:'string',value:'powerphasealarm2',text:'电源相序报警'})
    //   fieldList.push({type:'string',value:'emerstopaction2',text:'2急停动作'})
    //   fieldList.push({type:'string',value:'bsObstruction31',text:'31号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction32',text:'32号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction33',text:'33号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction34',text:'34号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction35',text:'35号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction36',text:'36号脱扣'})
    //   fieldList.push({type:'string',value:'bsNw3',text:'3车体上极限位'})
    //   fieldList.push({type:'string',value:'blNw3',text:'3转向架上极限位'})
    //   fieldList.push({type:'string',value:'emergencyStopLocal3',text:'3-1转向架高度'})
    //   fieldList.push({type:'string',value:'upLocal3',text:'3-2转向架高度'})
    //   fieldList.push({type:'string',value:'downLocal3',text:'3-3转向架高度'})
    //   fieldList.push({type:'string',value:'blBsLocal3',text:'3-4转向架高度'})
    //   fieldList.push({type:'string',value:'mmLocal3',text:'同步误差值'})
    //   fieldList.push({type:'string',value:'bl1Wd3',text:'设备电源启动'})
    //   fieldList.push({type:'string',value:'bl3Wd3',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'break3',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'bsEll3',text:'下降'})
    //   fieldList.push({type:'string',value:'blEll3',text:'上升'})
    //   fieldList.push({type:'string',value:'asynalarm3',text:'不同步报警'})
    //   fieldList.push({type:'string',value:'powerphasealarm3',text:'电源相序报警'})
    //   fieldList.push({type:'string',value:'emerstopaction3',text:'3急停动作'})
    //   fieldList.push({type:'string',value:'bsObstruction41',text:'41号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction42',text:'42号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction43',text:'43号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction44',text:'44号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction45',text:'45号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction46',text:'46号脱扣'})
    //   fieldList.push({type:'string',value:'bsNw4',text:'4车体上极限位'})
    //   fieldList.push({type:'string',value:'blNw4',text:'4转向架上极限位'})
    //   fieldList.push({type:'string',value:'emergencyStopLocal4',text:'3-1转向架高度'})
    //   fieldList.push({type:'string',value:'upLocal4',text:'3-2转向架高度'})
    //   fieldList.push({type:'string',value:'downLocal4',text:'3-3转向架高度'})
    //   fieldList.push({type:'string',value:'blBsLocal4',text:'3-4转向架高度'})
    //   fieldList.push({type:'string',value:'mmLocal4',text:'同步误差值'})
    //   fieldList.push({type:'string',value:'bl1Wd4',text:'设备电源启动'})
    //   fieldList.push({type:'string',value:'bl3Wd4',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'break4',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'bsEll4',text:'下降'})
    //   fieldList.push({type:'string',value:'blEll4',text:'上升'})
    //   fieldList.push({type:'string',value:'asynalarm4',text:'不同步报警'})
    //   fieldList.push({type:'string',value:'powerphasealarm4',text:'电源相序报警'})
    //   fieldList.push({type:'string',value:'emerstopaction4',text:'4急停动作'})
    //   fieldList.push({type:'string',value:'bsObstruction51',text:'51号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction52',text:'52号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction53',text:'53号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction54',text:'54号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction55',text:'55号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction56',text:'56号脱扣'})
    //   fieldList.push({type:'string',value:'bsNw5',text:'5车体上极限位'})
    //   fieldList.push({type:'string',value:'blNw5',text:'5转向架上极限位'})
    //   fieldList.push({type:'string',value:'emergencyStopLocal5',text:'3-1转向架高度'})
    //   fieldList.push({type:'string',value:'upLocal5',text:'3-2转向架高度'})
    //   fieldList.push({type:'string',value:'downLocal5',text:'3-3转向架高度'})
    //   fieldList.push({type:'string',value:'blBsLocal5',text:'3-4转向架高度'})
    //   fieldList.push({type:'string',value:'mmLocal5',text:'同步误差值'})
    //   fieldList.push({type:'string',value:'bl1Wd5',text:'设备电源启动'})
    //   fieldList.push({type:'string',value:'bl3Wd5',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'break5',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'bsEll5',text:'下降'})
    //   fieldList.push({type:'string',value:'blEll5',text:'上升'})
    //   fieldList.push({type:'string',value:'asynalarm5',text:'不同步报警'})
    //   fieldList.push({type:'string',value:'powerphasealarm5',text:'电源相序报警'})
    //   fieldList.push({type:'string',value:'emerstopaction5',text:'5急停动作'})
    //   fieldList.push({type:'string',value:'bsObstruction61',text:'61号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction62',text:'62号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction63',text:'63号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction64',text:'64号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction65',text:'65号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction66',text:'66号脱扣'})
    //   fieldList.push({type:'string',value:'bsNw6',text:'6车体上极限位'})
    //   fieldList.push({type:'string',value:'blNw6',text:'6转向架上极限位'})
    //   fieldList.push({type:'string',value:'emergencyStopLocal6',text:'3-1转向架高度'})
    //   fieldList.push({type:'string',value:'upLocal6',text:'3-2转向架高度'})
    //   fieldList.push({type:'string',value:'downLocal6',text:'3-3转向架高度'})
    //   fieldList.push({type:'string',value:'blBsLocal6',text:'3-4转向架高度'})
    //   fieldList.push({type:'string',value:'mmLocal6',text:'同步误差值'})
    //   fieldList.push({type:'string',value:'bl1Wd6',text:'设备电源启动'})
    //   fieldList.push({type:'string',value:'bl3Wd6',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'break6',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'bsEll6',text:'下降'})
    //   fieldList.push({type:'string',value:'blEll6',text:'上升'})
    //   fieldList.push({type:'string',value:'asynalarm6',text:'不同步报警'})
    //   fieldList.push({type:'string',value:'powerphasealarm6',text:'电源相序报警'})
    //   fieldList.push({type:'string',value:'emerstopaction6',text:'6急停动作'})
    //   fieldList.push({type:'string',value:'bsObstruction71',text:'71号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction72',text:'72号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction73',text:'73号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction74',text:'74号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction75',text:'75号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction76',text:'76号脱扣'})
    //   fieldList.push({type:'string',value:'bsNw7',text:'7车体上极限位'})
    //   fieldList.push({type:'string',value:'blNw7',text:'7转向架上极限位'})
    //   fieldList.push({type:'string',value:'emergencyStopLocal7',text:'3-1转向架高度'})
    //   fieldList.push({type:'string',value:'upLocal7',text:'3-2转向架高度'})
    //   fieldList.push({type:'string',value:'downLocal7',text:'3-3转向架高度'})
    //   fieldList.push({type:'string',value:'blBsLocal7',text:'3-4转向架高度'})
    //   fieldList.push({type:'string',value:'mmLocal7',text:'同步误差值'})
    //   fieldList.push({type:'string',value:'bl1Wd7',text:'设备电源启动'})
    //   fieldList.push({type:'string',value:'bl3Wd7',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'break7',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'bsEll7',text:'下降'})
    //   fieldList.push({type:'string',value:'blEll7',text:'上升'})
    //   fieldList.push({type:'string',value:'asynalarm7',text:'不同步报警'})
    //   fieldList.push({type:'string',value:'powerphasealarm7',text:'电源相序报警'})
    //   fieldList.push({type:'string',value:'emerstopaction7',text:'7急停动作'})
    //   fieldList.push({type:'string',value:'bsObstruction81',text:'81号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction82',text:'82号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction83',text:'83号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction84',text:'84号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction85',text:'85号脱扣'})
    //   fieldList.push({type:'string',value:'bsObstruction86',text:'86号脱扣'})
    //   fieldList.push({type:'string',value:'bsNw8',text:'8车体上极限位'})
    //   fieldList.push({type:'string',value:'blNw8',text:'8转向架上极限位'})
    //   fieldList.push({type:'string',value:'emergencyStopLocal8',text:'3-1转向架高度'})
    //   fieldList.push({type:'string',value:'upLocal8',text:'3-2转向架高度'})
    //   fieldList.push({type:'string',value:'downLocal8',text:'3-3转向架高度'})
    //   fieldList.push({type:'string',value:'blBsLocal8',text:'3-4转向架高度'})
    //   fieldList.push({type:'string',value:'mmLocal8',text:'同步误差值'})
    //   fieldList.push({type:'string',value:'bl1Wd8',text:'设备电源启动'})
    //   fieldList.push({type:'string',value:'bl3Wd8',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'break8',text:'联动架车模式车位指示'})
    //   fieldList.push({type:'string',value:'bsEll8',text:'下降'})
    //   fieldList.push({type:'string',value:'blEll8',text:'上升'})
    //   fieldList.push({type:'string',value:'asynalarm8',text:'不同步报警'})
    //   fieldList.push({type:'string',value:'powerphasealarm8',text:'电源相序报警'})
    //   fieldList.push({type:'string',value:'emerstopaction8',text:'8急停动作'})
    //   this.superFieldList = fieldList
    // }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>