<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper" style="background: #f0f2f5; padding: 16px; margin-bottom: 16px; border-radius: 4px;">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :md="6" :sm="24">
            <a-form-item label="查询类型">
              <a-select v-model="queryType" placeholder="请选择查询类型" @change="handleQueryTypeChange">
                <a-select-option value="online">在线数据</a-select-option>
                <a-select-option value="history">历史数据</a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <template v-if="queryType === 'history'">
            <a-col :md="6" :sm="24">
              <a-form-item label="开始时间">
                <a-date-picker v-model="startTime" placeholder="请选择开始时间" show-time valueFormat="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="24">
              <a-form-item label="结束时间">
                <a-date-picker v-model="endTime" placeholder="请选择结束时间" show-time valueFormat="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
              </a-form-item>
            </a-col>
          </template>
          <a-col :md="6" :sm="24">
            <div style="margin-top: 4px;">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button v-if="queryType === 'history'" type="primary" @click="switchToOnline" style="margin-left: 8px">返回在线数据</a-button>
              <a-button v-else type="primary" @click="switchToHistory" style="margin-left: 8px">查询历史数据</a-button>
            </div>
          </a-col>
        </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('bu_zy_gijcj_6_online')">导出</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;" v-if="selectedRowKeys.length > 0">
        <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="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        @change="handleTableChange">

        <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-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>

    <bu-zy-gijcj_6-online-modal ref="modalForm" @ok="modalFormOk" :queryType="queryType" :queryMonth="queryMonth"></bu-zy-gijcj_6-online-modal>
  </a-card>
</template>

<script>

  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import BuZyGijcj_6OnlineModal from './modules/BuZyGijcj_6OnlineModal'

  export default {
    name: 'BuZyGijcj_6OnlineList',
    mixins:[JeecgListMixin, mixinDevice],
    components: {
      BuZyGijcj_6OnlineModal
    },
    data () {
      return {
        description: 'bu_zy_gijcj_6_online管理页面',
        // 查询类型: online/history
        queryType: 'online',
        // 历史数据查询开始时间
        startTime: undefined,
        // 历史数据查询结束时间
        endTime: undefined,
        // 表头
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'上传服务器名',
            align:"center",
            dataIndex: 'serverName'
          },
          {
            title:'传感器ID',
            align:"center",
            dataIndex: 'sensorId'
          },
          {
            title:'状态',
            align:"center",
            dataIndex: 'status'
          },
          {
            title:'报警字段名',
            align:"center",
            dataIndex: 'statusname'
          },
          {
            title:'车体1.1安全螺母',
            align:"center",
            dataIndex: 'dbx100100'
          },
          {
            title:'车体1.2安全螺母',
            align:"center",
            dataIndex: 'dbx100101'
          },
          {
            title:'车体2.1安全螺母',
            align:"center",
            dataIndex: 'dbx100102'
          },
          {
            title:'车体2.2安全螺母',
            align:"center",
            dataIndex: 'dbx100103'
          },
          {
            title:'车体3.1安全螺母',
            align:"center",
            dataIndex: 'dbx100104'
          },
          {
            title:'车体3.2安全螺母',
            align:"center",
            dataIndex: 'dbx100105'
          },
          {
            title:'车体4.1安全螺母',
            align:"center",
            dataIndex: 'dbx100106'
          },
          {
            title:'车体4.2安全螺母',
            align:"center",
            dataIndex: 'dbx100107'
          },
          {
            title:'车体5.1安全螺母',
            align:"center",
            dataIndex: 'dbx100110'
          },
          {
            title:'车体5.2安全螺母',
            align:"center",
            dataIndex: 'dbx100111'
          },
          {
            title:'车体6.1安全螺母',
            align:"center",
            dataIndex: 'dbx100112'
          },
          {
            title:'车体6.2安全螺母',
            align:"center",
            dataIndex: 'dbx100113'
          },
          {
            title:'车体7.1安全螺母',
            align:"center",
            dataIndex: 'dbx100114'
          },
          {
            title:'车体7.2安全螺母',
            align:"center",
            dataIndex: 'dbx100115'
          },
          {
            title:'车体8.1安全螺母',
            align:"center",
            dataIndex: 'dbx100116'
          },
          {
            title:'车体8.2安全螺母',
            align:"center",
            dataIndex: 'dbx100117'
          },
          {
            title:'车体9.1安全螺母',
            align:"center",
            dataIndex: 'dbx100120'
          },
          {
            title:'车体9.2安全螺母',
            align:"center",
            dataIndex: 'dbx100121'
          },
          {
            title:'车体10.1安全螺母',
            align:"center",
            dataIndex: 'dbx100122'
          },
          {
            title:'车体10.2安全螺母',
            align:"center",
            dataIndex: 'dbx100123'
          },
          {
            title:'车体11.1安全螺母',
            align:"center",
            dataIndex: 'dbx100124'
          },
          {
            title:'车体11.2安全螺母',
            align:"center",
            dataIndex: 'dbx100125'
          },
          {
            title:'车体12.1安全螺母',
            align:"center",
            dataIndex: 'dbx100126'
          },
          {
            title:'车体12.2安全螺母',
            align:"center",
            dataIndex: 'dbx100127'
          },
          {
            title:'车体1.1工作螺母',
            align:"center",
            dataIndex: 'dbx100140'
          },
          {
            title:'车体1.2工作螺母',
            align:"center",
            dataIndex: 'dbx100141'
          },
          {
            title:'车体2.1工作螺母',
            align:"center",
            dataIndex: 'dbx100142'
          },
          {
            title:'车体2.2工作螺母',
            align:"center",
            dataIndex: 'dbx100143'
          },
          {
            title:'车体3.1工作螺母',
            align:"center",
            dataIndex: 'dbx100144'
          },
          {
            title:'车体3.2工作螺母',
            align:"center",
            dataIndex: 'dbx100145'
          },
          {
            title:'车体4.1工作螺母',
            align:"center",
            dataIndex: 'dbx100146'
          },
          {
            title:'车体4.2工作螺母',
            align:"center",
            dataIndex: 'dbx100147'
          },
          {
            title:'车体5.1工作螺母',
            align:"center",
            dataIndex: 'dbx100150'
          },
          {
            title:'车体5.2工作螺母',
            align:"center",
            dataIndex: 'dbx100151'
          },
          {
            title:'车体6.1工作螺母',
            align:"center",
            dataIndex: 'dbx100152'
          },
          {
            title:'车体6.2工作螺母',
            align:"center",
            dataIndex: 'dbx100153'
          },
          {
            title:'车体7.1工作螺母',
            align:"center",
            dataIndex: 'dbx100154'
          },
          {
            title:'车体7.2工作螺母',
            align:"center",
            dataIndex: 'dbx100155'
          },
          {
            title:'车体8.1工作螺母',
            align:"center",
            dataIndex: 'dbx100156'
          },
          {
            title:'车体8.2工作螺母',
            align:"center",
            dataIndex: 'dbx100157'
          },
          {
            title:'车体9.1工作螺母',
            align:"center",
            dataIndex: 'dbx100160'
          },
          {
            title:'车体9.2工作螺母',
            align:"center",
            dataIndex: 'dbx100161'
          },
          {
            title:'车体10.1工作螺母',
            align:"center",
            dataIndex: 'dbx100162'
          },
          {
            title:'车体10.2工作螺母',
            align:"center",
            dataIndex: 'dbx100163'
          },
          {
            title:'车体11.1工作螺母',
            align:"center",
            dataIndex: 'dbx100164'
          },
          {
            title:'车体11.2工作螺母',
            align:"center",
            dataIndex: 'dbx100165'
          },
          {
            title:'车体12.1工作螺母',
            align:"center",
            dataIndex: 'dbx100166'
          },
          {
            title:'车体12.2工作螺母',
            align:"center",
            dataIndex: 'dbx100167'
          },
          {
            title:'转向架1安全螺母',
            align:"center",
            dataIndex: 'dbx100180'
          },
          {
            title:'转向架2安全螺母',
            align:"center",
            dataIndex: 'dbx100181'
          },
          {
            title:'转向架3安全螺母',
            align:"center",
            dataIndex: 'dbx100182'
          },
          {
            title:'转向架4安全螺母',
            align:"center",
            dataIndex: 'dbx100183'
          },
          {
            title:'转向架5安全螺母',
            align:"center",
            dataIndex: 'dbx100184'
          },
          {
            title:'转向架6安全螺母',
            align:"center",
            dataIndex: 'dbx100185'
          },
          {
            title:'转向架7安全螺母',
            align:"center",
            dataIndex: 'dbx100186'
          },
          {
            title:'转向架8安全螺母',
            align:"center",
            dataIndex: 'dbx100187'
          },
          {
            title:'转向架9安全螺母',
            align:"center",
            dataIndex: 'dbx100190'
          },
          {
            title:'转向架10安全螺母',
            align:"center",
            dataIndex: 'dbx100191'
          },
          {
            title:'转向架11安全螺母',
            align:"center",
            dataIndex: 'dbx100192'
          },
          {
            title:'转向架12安全螺母',
            align:"center",
            dataIndex: 'dbx100193'
          },
          {
            title:'转向架1工作螺母',
            align:"center",
            dataIndex: 'dbx1001100'
          },
          {
            title:'转向架2工作螺母',
            align:"center",
            dataIndex: 'dbx1001101'
          },
          {
            title:'转向架3工作螺母',
            align:"center",
            dataIndex: 'dbx1001102'
          },
          {
            title:'转向架4工作螺母',
            align:"center",
            dataIndex: 'dbx1001103'
          },
          {
            title:'转向架5工作螺母',
            align:"center",
            dataIndex: 'dbx1001104'
          },
          {
            title:'转向架6工作螺母',
            align:"center",
            dataIndex: 'dbx1001105'
          },
          {
            title:'转向架7工作螺母',
            align:"center",
            dataIndex: 'dbx1001106'
          },
          {
            title:'转向架8工作螺母',
            align:"center",
            dataIndex: 'dbx1001107'
          },
          {
            title:'转向架9工作螺母',
            align:"center",
            dataIndex: 'dbx1001110'
          },
          {
            title:'转向架10工作螺母',
            align:"center",
            dataIndex: 'dbx1001111'
          },
          {
            title:'转向架11工作螺母',
            align:"center",
            dataIndex: 'dbx1001112'
          },
          {
            title:'转向架12工作螺母',
            align:"center",
            dataIndex: 'dbx1001113'
          },
          {
            title:'车体同步故障',
            align:"center",
            dataIndex: 'dbx1001200'
          },
          {
            title:'转向架同步故障',
            align:"center",
            dataIndex: 'dbx1001201'
          },
          {
            title:'系统上电状态',
            align:"center",
            dataIndex: 'dbx1001203'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
            width:147,
            scopedSlots: { customRender: 'action' }
          }
        ],
        url: {
          list: "/gijcj/buZyGijcj_6Online/list",
          historyList: "/gijcj/buZyGijcj_6Online/historyListByTimeRange",
          delete: "/gijcj/buZyGijcj_6Online/delete",
          deleteBatch: "/gijcj/buZyGijcj_6Online/deleteBatch",
          exportXlsUrl: "/gijcj/buZyGijcj_6Online/exportXls",
          importExcelUrl: "gijcj/buZyGijcj_6Online/importExcel",
          
        },
        dictOptions:{},
        superFieldList:[],
      }
    },
    created() {
    this.getSuperFieldList();
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      },
    },
    methods: {
      initDictConfig(){
      },
      getSuperFieldList(){
        let fieldList=[];
        fieldList.push({type:'string',value:'serverName',text:'上传服务器名'})
        fieldList.push({type:'string',value:'sensorId',text:'传感器ID'})
        fieldList.push({type:'int',value:'status',text:'状态'})
        fieldList.push({type:'string',value:'statusname',text:'报警字段名'})
        fieldList.push({type:'int',value:'dbx100100',text:'车体1.1安全螺母'})
        fieldList.push({type:'int',value:'dbx100101',text:'车体1.2安全螺母'})
        fieldList.push({type:'int',value:'dbx100102',text:'车体2.1安全螺母'})
        fieldList.push({type:'int',value:'dbx100103',text:'车体2.2安全螺母'})
        fieldList.push({type:'int',value:'dbx100104',text:'车体3.1安全螺母'})
        fieldList.push({type:'int',value:'dbx100105',text:'车体3.2安全螺母'})
        fieldList.push({type:'int',value:'dbx100106',text:'车体4.1安全螺母'})
        fieldList.push({type:'int',value:'dbx100107',text:'车体4.2安全螺母'})
        fieldList.push({type:'int',value:'dbx100110',text:'车体5.1安全螺母'})
        fieldList.push({type:'int',value:'dbx100111',text:'车体5.2安全螺母'})
        fieldList.push({type:'int',value:'dbx100112',text:'车体6.1安全螺母'})
        fieldList.push({type:'int',value:'dbx100113',text:'车体6.2安全螺母'})
        fieldList.push({type:'int',value:'dbx100114',text:'车体7.1安全螺母'})
        fieldList.push({type:'int',value:'dbx100115',text:'车体7.2安全螺母'})
        fieldList.push({type:'int',value:'dbx100116',text:'车体8.1安全螺母'})
        fieldList.push({type:'int',value:'dbx100117',text:'车体8.2安全螺母'})
        fieldList.push({type:'int',value:'dbx100120',text:'车体9.1安全螺母'})
        fieldList.push({type:'int',value:'dbx100121',text:'车体9.2安全螺母'})
        fieldList.push({type:'int',value:'dbx100122',text:'车体10.1安全螺母'})
        fieldList.push({type:'int',value:'dbx100123',text:'车体10.2安全螺母'})
        fieldList.push({type:'int',value:'dbx100124',text:'车体11.1安全螺母'})
        fieldList.push({type:'int',value:'dbx100125',text:'车体11.2安全螺母'})
        fieldList.push({type:'int',value:'dbx100126',text:'车体12.1安全螺母'})
        fieldList.push({type:'int',value:'dbx100127',text:'车体12.2安全螺母'})
        fieldList.push({type:'int',value:'dbx100140',text:'车体1.1工作螺母'})
        fieldList.push({type:'int',value:'dbx100141',text:'车体1.2工作螺母'})
        fieldList.push({type:'int',value:'dbx100142',text:'车体2.1工作螺母'})
        fieldList.push({type:'int',value:'dbx100143',text:'车体2.2工作螺母'})
        fieldList.push({type:'int',value:'dbx100144',text:'车体3.1工作螺母'})
        fieldList.push({type:'int',value:'dbx100145',text:'车体3.2工作螺母'})
        fieldList.push({type:'int',value:'dbx100146',text:'车体4.1工作螺母'})
        fieldList.push({type:'int',value:'dbx100147',text:'车体4.2工作螺母'})
        fieldList.push({type:'int',value:'dbx100150',text:'车体5.1工作螺母'})
        fieldList.push({type:'int',value:'dbx100151',text:'车体5.2工作螺母'})
        fieldList.push({type:'int',value:'dbx100152',text:'车体6.1工作螺母'})
        fieldList.push({type:'int',value:'dbx100153',text:'车体6.2工作螺母'})
        fieldList.push({type:'int',value:'dbx100154',text:'车体7.1工作螺母'})
        fieldList.push({type:'int',value:'dbx100155',text:'车体7.2工作螺母'})
        fieldList.push({type:'int',value:'dbx100156',text:'车体8.1工作螺母'})
        fieldList.push({type:'int',value:'dbx100157',text:'车体8.2工作螺母'})
        fieldList.push({type:'int',value:'dbx100160',text:'车体9.1工作螺母'})
        fieldList.push({type:'int',value:'dbx100161',text:'车体9.2工作螺母'})
        fieldList.push({type:'int',value:'dbx100162',text:'车体10.1工作螺母'})
        fieldList.push({type:'int',value:'dbx100163',text:'车体10.2工作螺母'})
        fieldList.push({type:'int',value:'dbx100164',text:'车体11.1工作螺母'})
        fieldList.push({type:'int',value:'dbx100165',text:'车体11.2工作螺母'})
        fieldList.push({type:'int',value:'dbx100166',text:'车体12.1工作螺母'})
        fieldList.push({type:'int',value:'dbx100167',text:'车体12.2工作螺母'})
        fieldList.push({type:'int',value:'dbx100180',text:'转向架1安全螺母'})
        fieldList.push({type:'int',value:'dbx100181',text:'转向架2安全螺母'})
        fieldList.push({type:'int',value:'dbx100182',text:'转向架3安全螺母'})
        fieldList.push({type:'int',value:'dbx100183',text:'转向架4安全螺母'})
        fieldList.push({type:'int',value:'dbx100184',text:'转向架5安全螺母'})
        fieldList.push({type:'int',value:'dbx100185',text:'转向架6安全螺母'})
        fieldList.push({type:'int',value:'dbx100186',text:'转向架7安全螺母'})
        fieldList.push({type:'int',value:'dbx100187',text:'转向架8安全螺母'})
        fieldList.push({type:'int',value:'dbx100190',text:'转向架9安全螺母'})
        fieldList.push({type:'int',value:'dbx100191',text:'转向架10安全螺母'})
        fieldList.push({type:'int',value:'dbx100192',text:'转向架11安全螺母'})
        fieldList.push({type:'int',value:'dbx100193',text:'转向架12安全螺母'})
        fieldList.push({type:'int',value:'dbx1001100',text:'转向架1工作螺母'})
        fieldList.push({type:'int',value:'dbx1001101',text:'转向架2工作螺母'})
        fieldList.push({type:'int',value:'dbx1001102',text:'转向架3工作螺母'})
        fieldList.push({type:'int',value:'dbx1001103',text:'转向架4工作螺母'})
        fieldList.push({type:'int',value:'dbx1001104',text:'转向架5工作螺母'})
        fieldList.push({type:'int',value:'dbx1001105',text:'转向架6工作螺母'})
        fieldList.push({type:'int',value:'dbx1001106',text:'转向架7工作螺母'})
        fieldList.push({type:'int',value:'dbx1001107',text:'转向架8工作螺母'})
        fieldList.push({type:'int',value:'dbx1001110',text:'转向架9工作螺母'})
        fieldList.push({type:'int',value:'dbx1001111',text:'转向架10工作螺母'})
        fieldList.push({type:'int',value:'dbx1001112',text:'转向架11工作螺母'})
        fieldList.push({type:'int',value:'dbx1001113',text:'转向架12工作螺母'})
        fieldList.push({type:'int',value:'dbx1001200',text:'车体同步故障'})
        fieldList.push({type:'int',value:'dbx1001201',text:'转向架同步故障'})
        fieldList.push({type:'int',value:'dbx1001203',text:'系统上电状态'})
        this.superFieldList = fieldList
      },
      // 查询类型变更
      handleQueryTypeChange(value) {
        if (value === 'online') {
          // 切换到在线数据查询
          this.loadData(1)
        }
      },
      // 切换到历史数据查询
      switchToHistory() {
        this.queryType = 'history'
      },
      // 切换到在线数据查询
      switchToOnline() {
        this.queryType = 'online'
        // 清空历史查询条件
        this.startTime = undefined
        this.endTime = undefined
        this.loadData(1)
      },
      // 重写加载数据方法
      loadData(arg) {
        if (!this.url.list) {
          this.$message.error('请设置url.list属性!')
          return
        }
        // 加载数据 若传入参数1则加载第一页的内容
        if (arg === 1) {
          this.ipagination.current = 1
        }
        let params = this.getQueryParams()// 查询条件
        if (this.queryType === 'history') {
          // 历史数据查询
          if (!this.startTime || !this.endTime) {
            this.$message.warning('请选择完整的起止时间')
            return
          }
          
          if (this.startTime >= this.endTime) {
            this.$message.warning('开始时间必须小于结束时间')
            return
          }
          
          params.startTime = this.startTime
          params.endTime = this.endTime
          
          this.loading = true
          this.$http({
            url: this.url.historyList,
            method: 'get',
            params: params
          }).then((res) => {
            if (res.success) {
              this.dataSource = res.result.records
              this.ipagination.total = res.result.total
            } else {
              // 处理后端返回的错误信息
              this.$message.error(res.message)
              // 清空表格数据
              this.dataSource = []
              this.ipagination.total = 0
            }
            this.loading = false
          })
        } else {
          // 在线数据查询
          this.loading = true
          this.$http({
            url: this.url.list,
            method: 'get',
            params: params
          }).then((res) => {
            if (res.success) {
              this.dataSource = res.result.records
              this.ipagination.total = res.result.total
            } else {
              // 处理后端返回的错误信息
              this.$message.error(res.message)
              // 清空表格数据
              this.dataSource = []
              this.ipagination.total = 0
            }
            this.loading = false
          })
        }
      },
      handleEdit(record) {
        // 将查询类型和月份信息传递给编辑模态框
        this.$refs.modalForm.edit(record, this.queryType, this.queryMonth);
      },
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
</style>