<template>
  <div class="app-container mes-admin-page">
    <el-card class="topCard">
      <div class="topDiv queryToolbar">
        <div>
          <!--<span style="margin-left: 10px">制造编号：</span>-->
          <!--<el-input v-model="workCode" placeholder="制造编号" clearable size="small" style="width: 200px; margin-left: 13px"/>-->
          <!--<span style="margin-left: 10px">项目名称：</span>-->
          <!--<el-input v-model="projectName" placeholder="项目名称" clearable size="small" style="width: 200px; margin-left: 13px"/>-->
          <span style="margin-left: 10px">{{ $t('assemblyQualitydataQuery.stationNumberLabel') }}</span>
          <el-select
            v-model="stationNumberValue"
            :placeholder="$t('assemblyQualitydataQuery.selectStationNumber')"
            filterable
            clearable
            size="small"
            style="width: 200px">
            <el-option
              v-for="item in stationNumber"
              :key="item.value"
              :label="item.label"
              :value="item.value"
              size="mini"/>
          </el-select>
          <span style="margin-left: 10px">{{ $t('assemblyQualitydataQuery.orderNumberLabel') }}</span>
          <el-input v-model="orderNumberValue" :placeholder="$t('assemblyQualitydataQuery.orderNumber')" clearable size="small" style="width: 150px; "/>
          <span style="margin-left: 10px">{{ $t('assemblyQualitydataQuery.productModelLabel') }}</span>
          <el-select v-model="engineTypeValue" :placeholder="$t('assemblyQualitydataQuery.selectProductModel')" filterable clearable size="small" style="width: 150px">
            <el-option
              v-for="item in engineType"
              :key="item.value"
              :label="item.label"
              :value="item.value"
              size="mini"/>
          </el-select>
          <span style="margin-left: 10px">{{ $t('assemblyQualitydataQuery.productionTimeLabel') }}</span>
          <el-date-picker
            v-model="dateTime"
            :clearable="false"
            align="center"
            :end-placeholder="$t('assemblyQualitydataQuery.endDate')"
            format="yyyy-MM-dd"
            :range-separator="$t('assemblyQualitydataQuery.dateRangeSeparator')"
            size="small"
            :start-placeholder="$t('assemblyQualitydataQuery.startDate')"
            style="width: 240px;"
            type="daterange"
            value-format="yyyy-MM-dd"/>
          <!--<span style="margin-left: 10px">批次条码：</span>-->
          <!--<el-input v-model="traceabilityCode" placeholder="请输入批次条码" clearable size="small" style="width: 200px; margin-left: 13px"/>-->
          <!--<span style="margin-left: 10px">精确追溯码：</span>-->
          <!--<el-input v-model="traceabilityCode" placeholder="请输入精确追溯码" clearable size="small" style="width: 200px"/>-->
          <!--<el-select v-model="traceabilityCode" placeholder="请选择精确追溯码" filterable clearable size="small" style="width: 200px">-->
          <!--  <el-option-->
          <!--    v-for="item in traceabilityCodeArr"-->
          <!--    :key="item.ID"-->
          <!--    :label="item.label"-->
          <!--    :value="item.value"-->
          <!--    size="mini"/>-->
          <!--</el-select>-->
          <!--<span style="margin-left: 10px">总成编号：</span>-->
          <!--<el-input v-model="assemblyNumber" style="width:150px;" placeholder="总成编号" size="small" clearable/>-->
          <!--<span style="margin-left: 10px">测量位置：</span>-->
          <!--<el-select v-model="measuringPositionValue" placeholder="请选择测量位置" filterable clearable size="small" style="width: 200px" @change="getMeasuringProject()">-->
          <!--  <el-option-->
          <!--    v-for="item in measuringPosition"-->
          <!--    :key="item.value"-->
          <!--    :label="item.label"-->
          <!--    :value="item.value"-->
          <!--    size="mini"/>-->
          <!--</el-select>-->
          <!--          <span style="margin-left: 10px">产品编号：</span>-->
          <!--          <el-select v-model="assemblyNumberValue" placeholder="请选择产品编号" allow-create filterable clearable size="small" style="width: 280px;">-->
          <!--            <el-option-->
          <!--              v-for="item in assemblyNumber"-->
          <!--              :key="item.value"-->
          <!--              :label="item.label"-->
          <!--              :value="item.value"-->
          <!--              size="mini"/>-->
          <!--          </el-select>-->
          <el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 5px" @click="pageCurrent=1;selectDate()">{{ $t('assemblyQualitydataQuery.search') }}</el-button>
          <el-button type="info" size="small" icon="el-icon-download" style="margin-left: 5px" @click="exportExcel()">Excel</el-button>
        </div>
        <div style="margin-top: 10px">

          <!--          <el-select v-model="orderNumberValue" placeholder="请选择订单" clearable filterable size="small" style="width: 200px">-->
          <!--            <el-option-->
          <!--              v-for="item in orderNumber"-->
          <!--              :key="item.value"-->
          <!--              :label="item.label"-->
          <!--              :value="item.value"-->
          <!--              size="mini"/>-->
          <!--          </el-select>-->
          <!--<span style="margin-left: 10px">间隔号：</span>-->
          <!--<el-input v-model="splitCode" placeholder="制造编号" clearable size="small" style="width: 200px; margin-left: 13px"/>-->
          <!--<span style="margin-left: 10px">DS/ES编号：</span>-->
          <!--<el-input v-model="unitCode" placeholder="DS/ES编号" clearable size="small" style="width: 200px; margin-left: 13px"/>-->

          <!--          <el-select v-model="batchBarcodeValue" placeholder="请选择批次条码" clearable filterable size="small" style="width: 200px; margin-left: 13px">-->
          <!--            <el-option-->
          <!--              v-for="item in batchBarcode"-->
          <!--              :key="item.value"-->
          <!--              :label="item.label"-->
          <!--              :value="item.value"-->
          <!--              size="mini"/>-->
          <!--          </el-select>-->
          <!--          <span style="margin-left: 10px">是否合格：</span>-->
          <!--          <el-select v-model="isQualifiedValue" placeholder="请选择是否合格" size="small" style="width: 200px; ">-->
          <!--            <el-option-->
          <!--              v-for="item in isQualified"-->
          <!--              :key="item.value"-->
          <!--              :label="item.label"-->
          <!--              :value="item.value"-->
          <!--              size="mini"/>-->
          <!--          </el-select>-->
          <!--          <span style="margin-left: 10px">测量项目：</span>-->
          <!--          <el-select v-model="measuringProjectValue" placeholder="请选择测量项目" filterable clearable size="small" style="width: 200px">-->
          <!--            <el-option-->
          <!--              v-for="item in measuringProject"-->
          <!--              :key="item.value"-->
          <!--              :label="item.label"-->
          <!--              :value="item.value"-->
          <!--              size="mini"/>-->
          <!--          </el-select>-->
        </div>
        <div class="tablePanel">
          <el-table
            v-loading="loading"
            ref="multipleTable"
            :data="tableData"
            :header-cell-style="{background:'#eef1f6',color:'#606266'}"
            :cell-class-name="tableRowClassName"
            :element-loading-text="$t('assemblyQualitydataQuery.loadingData')"
            element-loading-spinner="el-icon-loading"
            element-loading-background="rgba(0, 0, 0, 0.2)"
            class="main assemblyTable"
            tooltip-effect="dark"
            height="600px"
            style="width: 100%"
            border
            size="mini">
            <!--        <el-table-column :selectable="selectable" type="selection" width="45" align="center"/>-->
            <el-table-column type="index" width="60" :label="$t('assemblyQualitydataQuery.sequence')" align="center"/>
            <el-table-column align="center" width="100px" :label="$t('assemblyQualitydataQuery.orderNumber')">
              <template slot-scope="scope">
                {{ scope.row.订单号 }}
              </template>
            </el-table-column>
            <el-table-column align="center" width="100px" :label="$t('assemblyQualitydataQuery.stationNumber')">
              <template slot-scope="scope">
                {{ scope.row.工位号 }}
              </template>
            </el-table-column>
            <el-table-column align="center" :label="$t('assemblyQualitydataQuery.productNumber')">
              <template slot-scope="scope">
                {{ scope.row.发动机号 }}
              </template>
            </el-table-column>

            <el-table-column align="center" width="120px" :label="$t('assemblyQualitydataQuery.productModel')">
              <template slot-scope="scope">
                {{ scope.row.发动机型号 }}
              </template>
            </el-table-column>
            <!--<el-table-column align="center" label="制造编号">-->
            <!--  <template slot-scope="scope">-->
            <!--    {{ scope.row.制造编号 }}-->
            <!--  </template>-->
            <!--</el-table-column>-->
            <!--<el-table-column align="center" label="项目名称">-->
            <!--  <template slot-scope="scope">-->
            <!--    {{ scope.row.项目名称 }}-->
            <!--  </template>-->
            <!--</el-table-column>-->
            <!--<el-table-column align="center" label="间隔号">-->
            <!--  <template slot-scope="scope">-->
            <!--    {{ scope.row.间隔号 }}-->
            <!--  </template>-->
            <!--</el-table-column>-->
            <!--<el-table-column align="center" label="DS/ES编号">-->
            <!--  <template slot-scope="scope">-->
            <!--    {{ scope.row.单元号 }}-->
            <!--  </template>-->
            <!--</el-table-column>-->

            <!--<el-table-column align="center" label="工位名称">-->
            <!--  <template slot-scope="scope">-->
            <!--    {{ scope.row.工位名称 }}-->
            <!--  </template>-->
            <!--</el-table-column>-->
            <el-table-column align="center" width="100px" :label="$t('assemblyQualitydataQuery.measuringPosition')">
              <template slot-scope="scope">
                {{ scope.row.测量位置 }}
              </template>
            </el-table-column>
            <el-table-column align="center" width="100px" :label="$t('assemblyQualitydataQuery.measuringProject')">
              <template slot-scope="scope">
                {{ scope.row.测量项目 }}
              </template>
            </el-table-column>
            <el-table-column align="center" :label="$t('assemblyQualitydataQuery.measuringValue')" width="100px">
              <template slot-scope="scope">
                {{ scope.row.测量值 }}
              </template>
            </el-table-column>
            <el-table-column align="center" :label="$t('assemblyQualitydataQuery.measuringUnit')" width="80px">
              <template slot-scope="scope">
                {{ scope.row.测量单位 }}
              </template>
            </el-table-column>
            <!--          <el-table-column align="center" label="理论值" width="80px">-->
            <!--            <template slot-scope="scope">-->
            <!--              {{ scope.row.理论值 }}-->
            <!--            </template>-->
            <!--          </el-table-column>-->
<!--            <el-table-column align="center" :label="$t('assemblyQualitydataQuery.upperLimit')" width="100px">-->
<!--              <template slot-scope="scope">-->
<!--                {{ scope.row.上限值 }}-->
<!--              </template>-->
<!--            </el-table-column>-->
<!--            <el-table-column align="center" :label="$t('assemblyQualitydataQuery.lowerLimit')" width="100px">-->
<!--              <template slot-scope="scope">-->
<!--                {{ scope.row.下限值 }}-->
<!--              </template>-->
<!--            </el-table-column>-->
            <el-table-column align="center" width="150px" :label="$t('assemblyQualitydataQuery.productionDate')">
              <template slot-scope="scope">
                {{ scope.row.生产日期 }}
              </template>
            </el-table-column>
            <el-table-column align="center" :label="$t('assemblyQualitydataQuery.qualifiedFlag')" width="110px">
              <template slot-scope="scope">
                {{ scope.row.合格标志 }}
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div class="block" style="margin-top: 10px;">
          <el-pagination
            v-if="!loading"
            :current-page="pageCurrent"
            :page-sizes="[15, 30, 40]"
            :page-size="pageSize"
            :total="total"
            layout="total, sizes, prev, pager, next, jumper"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange" />
        </div>
      </div>
    </el-card>
  </div>
</template>

<script>
import { getNowShotTime, getNowTime1 } from '../../../utils/tool'

export default {
  data() {
    return {
      traceabilityCodeArr: [], // 精确追溯码数组
      traceabilityCode: '', // 精确追溯码
      assemblyNumber: [], // 总成编号
      assemblyNumberValue: '', // 总成编号
      orderNumberValue: '', // 订单号
      orderNumber: [], // 订单号
      stationNumberValue: '', // 工位号
      stationNumber: [], // 工位号
      measuringPosition: [], // 测量位置
      measuringPositionValue: '', // 测量位置
      measuringProject: [], // 测量项目
      measuringProjectValue: '', // 测量项目
      engineTypeValue: '', // 机型
      engineType: [], // 机型
      batchBarcode: [], // 批次条码
      batchBarcodeValue: '', // 批次条码
      workCode: '', // 制造编号
      projectName: '', // 项目名称
      splitCode: '', // 间隔号
      unitCode: '', // 单元号
      isQualified: [
        {
          label: this.$t('assemblyQualitydataQuery.qualified'),
          value: 1
        }, {
          label: this.$t('assemblyQualitydataQuery.unqualified'),
          value: 0
        }, {
          label: this.$t('assemblyQualitydataQuery.all'),
          value: 2
        }
      ], // 是否合格
      isQualifiedValue: 2, // 是否合格
      dateTime: [], // 时间
      loading: false, // 时间
      tableData: [], // 时间
      date: new Date(),
      timer: '',
      total: 0, // 总条数
      pageList: 30, // 每页显示条数
      pageSize: 30, // 每页显示条数
      pageCurrent: 1 // 后台获取页
    }
  },
  created() {
    this.dateTime = [getNowShotTime(), getNowShotTime()]
    this.getStationNumber()
    this.getEngineType()
  },
  watch: {
    '$i18n.locale'() {
      this.isQualified = [
        {
          label: this.$t('assemblyQualitydataQuery.qualified'),
          value: 1
        }, {
          label: this.$t('assemblyQualitydataQuery.unqualified'),
          value: 0
        }, {
          label: this.$t('assemblyQualitydataQuery.all'),
          value: 2
        }
      ]
    }
  },
  mounted() {
    this.getOrderNumber()
    this.getTraceabilityCode()
    this.getAssemblyNumber()
  },
  methods: {
    // 表格颜色变化
    tableRowClassName({ row, rowIndex }) {
      // console.log(row, rowIndex)
      if (rowIndex % 2 === 0) {
        return 'black'
      } else {
        return 'red'
      }
    },
    // 获取工位号
    getStationNumber() {
      this.stationNumber = []
      var param = []
      var Data = this.CreateData('11', 'MES_计划BOM_工位与名称_查询', param)
      this.ExecDatabase(Data).then(response => {
        for (let i = 0; i < response.data.length; i++) {
          this.stationNumber.push({
            label: `【${response.data[i].工位号}】${response.data[i].工位名称}`,
            value: response.data[i].工位号
          })
        }
      })
    },
    // 初始化获取产品型号
    getEngineType() {
      this.engineType = []
      var param = []
      var Data = this.CreateData('11', 'MES_基本变量_机型代码_查询', param)
      this.ExecDatabase(Data).then(response => {
        for (let i = 0; i < response.data.length; i++) {
          this.engineType.push({
            label: response.data[i].发动机型号 + '-' + response.data[i].标识字符,
            value: response.data[i].发动机机型标志
          })
        }
      })
    },
    // 订单号
    getOrderNumber() {
      this.orderNumber = []
      var isQualifiedValue
      if (!this.isQualifiedValue) {
        isQualifiedValue = null
      } else {
        isQualifiedValue = this.isQualifiedValue
      }
      var param = []
      param[0] = ['开始时间', this.dateTime[0] + ' ' + '00:00:00']
      param[1] = ['结束时间', this.dateTime[1] + ' ' + '23:59:59']
      // param[0] = ['开始时间', this.dateTime[0]]
      // param[1] = ['结束时间', this.dateTime[1]]
      param[2] = ['合格标志', isQualifiedValue]
      var Data = this.CreateData('11', '测量数据合格索引_订单号_查询 ', param)
      this.ExecDatabase(Data).then(response => {
        for (let i = 0; i < response.data.length; i++) {
          this.orderNumber.push({
            label: response.data[i].订单号,
            value: response.data[i].订单号
          })
        }
      })
    },
    // 追溯
    getTraceabilityCode() {
      this.traceabilityCodeArr = []
      var engineTypeValue_check, stationNumberValue_check
      this.engineTypeValue ? engineTypeValue_check = 1 : engineTypeValue_check = 0
      this.stationNumberValue ? stationNumberValue_check = 1 : stationNumberValue_check = 0
      var param = []
      param[0] = ['开始时间', this.dateTime[0] + ' ' + '00:00:00']
      param[1] = ['结束时间', this.dateTime[1] + ' ' + '23:59:59']
      // param[0] = ['开始时间', this.dateTime[0]]
      // param[1] = ['结束时间', this.dateTime[1]]
      param[2] = ['发动机型号_ischeck', engineTypeValue_check]
      param[3] = ['发动机型号', this.engineTypeValue]
      param[4] = ['工位号_ischeck', stationNumberValue_check]
      param[5] = ['工位号', this.stationNumberValue]
      param[6] = ['分线总线', 1]
      var Data = this.CreateData('11', '初始化二维码_查询 ', param)
      this.ExecDatabase(Data).then(response => {
        for (let i = 0; i < response.data.length; i++) {
          this.traceabilityCodeArr.push({
            label: response.data[i].物料条码,
            value: response.data[i].物料条码,
            ID: response.data[i].ID
          })
        }
      })
    },
    getAssemblyNumber() {
      this.assemblyNumber = []
      var engineTypeValue_check, stationNumberValue_check
      this.engineTypeValue ? engineTypeValue_check = 1 : engineTypeValue_check = 0
      this.stationNumberValue ? stationNumberValue_check = 1 : stationNumberValue_check = 0
      var param = []
      param[0] = ['开始时间', this.dateTime[0] + ' ' + '00:00:00']
      param[1] = ['结束时间', this.dateTime[1] + ' ' + '23:59:59']
      // param[0] = ['开始时间', this.dateTime[0]]
      // param[1] = ['结束时间', this.dateTime[1]]
      param[2] = ['发动机型号_ischeck', engineTypeValue_check]
      param[3] = ['发动机型号', this.engineTypeValue]
      param[4] = ['工位号_ischeck', stationNumberValue_check]
      param[5] = ['工位号', this.stationNumberValue]
      param[6] = ['分线总线', 1]
      var Data = this.CreateData('11', '测量数据合格索引_发动机号_发动机型号_查询 ', param)
      this.ExecDatabase(Data).then(response => {
        for (let i = 0; i < response.data.length; i++) {
          this.assemblyNumber.push({
            label: response.data[i].发动机号,
            value: response.data[i].发动机号
          })
        }
      })
    },
    getBatchBarcode() {
      this.batchBarcode = []
      var param = []
      param[0] = ['开始时间', this.dateTime[0] + ' ' + '00:00:00']
      param[1] = ['结束时间', this.dateTime[1] + ' ' + '23:59:59']
      // param[0] = ['开始时间', this.dateTime[0]]
      // param[1] = ['结束时间', this.dateTime[1]]
      param[2] = ['工位号', this.stationNumberValue]
      var Data = this.CreateData('11', '物料数据_视图_物料条码批次号_查询 ', param)
      this.ExecDatabase(Data).then(response => {
        for (let i = 0; i < response.data.length; i++) {
          this.batchBarcode.push({
            label: response.data[i].物料条码,
            value: response.data[i].物料条码
          })
        }
      })
    },
    getMeasuringPosition() {
      this.measuringPosition = []
      var param = []
      param[0] = ['工位号', this.stationNumberValue]
      var Data = this.CreateData('11', '质量数据查询_测量位置 ', param)
      this.ExecDatabase(Data).then(response => {
        for (let i = 0; i < response.data.length; i++) {
          this.measuringPosition.push({
            label: response.data[i].测量位置,
            value: response.data[i].测量位置
          })
        }
      }).then(() => {
        this.getMeasuringProject()
      })
    },
    getMeasuringProject() {
      this.measuringProject = []
      var param = []
      param[0] = ['工位号', this.stationNumberValue]
      param[1] = ['测量位置', this.measuringPositionValue]
      var Data = this.CreateData('11', '质量数据查询_测量项目 ', param)
      this.ExecDatabase(Data).then(response => {
        for (let i = 0; i < response.data.length; i++) {
          this.measuringProject.push({
            label: response.data[i].测量项目,
            value: response.data[i].测量项目
          })
        }
      })
    },
    selectDate() {
      this.tableData = []
      let engineTypeValue_check, assemblyNumberValue_check, stationNumberValue_check, measuringPositionValue_check, measuringProjectValue_check, traceabilityCode_check, orderNumberValue_check,
        workCodeValue_check, projectNameValue_check, splitCodeValue_check, unitCodeValue_check
      this.engineTypeValue ? engineTypeValue_check = 1 : (engineTypeValue_check = 0, this.engineTypeValue = '')
      this.assemblyNumberValue ? assemblyNumberValue_check = 1 : (assemblyNumberValue_check = 0, this.assemblyNumberValue = '')
      this.stationNumberValue ? stationNumberValue_check = 1 : (stationNumberValue_check = 0, this.stationNumberValue = '')
      this.measuringPositionValue ? measuringPositionValue_check = 1 : (measuringPositionValue_check = 0, this.measuringPositionValue = '')
      this.measuringProjectValue ? measuringProjectValue_check = 1 : (measuringProjectValue_check = 0, this.measuringProjectValue = '')
      this.traceabilityCode ? traceabilityCode_check = 1 : (traceabilityCode_check = 0, this.traceabilityCode = '')
      this.orderNumberValue ? orderNumberValue_check = 1 : (orderNumberValue_check = 0, this.orderNumberValue = '')
      this.workCode ? workCodeValue_check = 1 : (workCodeValue_check = 0, this.workCode = '')
      this.projectName ? projectNameValue_check = 1 : (projectNameValue_check = 0, this.projectName = '')
      this.splitCode ? splitCodeValue_check = 1 : (splitCodeValue_check = 0, this.splitCode = '')
      this.unitCode ? unitCodeValue_check = 1 : (unitCodeValue_check = 0, this.unitCode = '')
      var param = []
      param[0] = ['开始时间', this.dateTime[0] + ' ' + '00:00:00']
      param[1] = ['结束时间', this.dateTime[1] + ' ' + '23:59:59']
      param[2] = ['发动机型号_ischeck', engineTypeValue_check]
      param[3] = ['发动机型号', this.engineTypeValue]
      param[4] = ['发动机号_ischeck', assemblyNumberValue_check]
      param[5] = ['发动机号', this.assemblyNumberValue]
      param[6] = ['工位号_ischeck', stationNumberValue_check]
      param[7] = ['工位号', this.stationNumberValue]
      param[8] = ['测量位置_ischeck', measuringPositionValue_check]
      param[9] = ['测量位置', this.measuringPositionValue]
      param[10] = ['测量项目_ischeck', measuringProjectValue_check]
      param[11] = ['测量项目', this.measuringProjectValue]
      param[12] = ['订单号_ischeck', orderNumberValue_check]
      param[13] = ['订单号', this.orderNumberValue]
      param[14] = ['批次条码_ischeck', traceabilityCode_check]
      param[15] = ['批次条码', this.traceabilityCode]
      param[16] = ['合格标志', this.isQualifiedValue]
      param[17] = ['制造编号', this.workCode]
      param[18] = ['制造编号_ischeck', workCodeValue_check]
      param[19] = ['项目名称', this.projectName]
      param[20] = ['项目名称_ischeck', projectNameValue_check]
      param[21] = ['间隔号', this.splitCode]
      param[22] = ['间隔号_ischeck', splitCodeValue_check]
      param[23] = ['单元号', this.unitCode]
      param[24] = ['单元号_ischeck', unitCodeValue_check]
      param[25] = ['PageCurrent', this.pageCurrent]
      param[26] = ['PageSize', this.pageSize]
      param[27] = ['PageCount', '1111', 'int', '1']
      param[28] = ['ItemCount', '1111', 'int', '1']
      var Data = this.CreateData('11', '质量数据_发动机质量数据_各个工位_视图_发动机型号_综合查询', param)
      this.ExecDatabase(Data).then(response => {
        if (response.data.result.length !== 0) {
          this.tableData = response.data.result
        }
        this.total = parseInt(response.data.output[0].ItemCount)
        this.loading = false
      })
    },
    exportExcel() {
      if (this.tableData.length !== 0) {
        let engineTypeValue_check, assemblyNumberValue_check, stationNumberValue_check, measuringPositionValue_check, measuringProjectValue_check, traceabilityCode_check, orderNumberValue_check
        this.engineTypeValue ? engineTypeValue_check = 1 : (engineTypeValue_check = 0, this.engineTypeValue = '')
        this.assemblyNumberValue ? assemblyNumberValue_check = 1 : (assemblyNumberValue_check = 0, this.assemblyNumberValue = '')
        this.stationNumberValue ? stationNumberValue_check = 1 : (stationNumberValue_check = 0, this.stationNumberValue = '')
        this.measuringPositionValue ? measuringPositionValue_check = 1 : (measuringPositionValue_check = 0, this.measuringPositionValue = '')
        this.measuringProjectValue ? measuringProjectValue_check = 1 : (measuringProjectValue_check = 0, this.measuringProjectValue = '')
        this.traceabilityCode ? traceabilityCode_check = 1 : (traceabilityCode_check = 0, this.traceabilityCode = '')
        this.orderNumberValue ? orderNumberValue_check = 1 : (orderNumberValue_check = 0, this.orderNumberValue = '')
        var param = []
        param[0] = ['开始时间', this.dateTime[0] + ' ' + '00:00:00']
        param[1] = ['结束时间', this.dateTime[1] + ' ' + '23:59:59']
        // param[0] = ['开始时间', this.dateTime[0]]
        // param[1] = ['结束时间', this.dateTime[1]]
        param[2] = ['发动机型号_ischeck', engineTypeValue_check]
        param[3] = ['发动机型号', this.engineTypeValue]
        param[4] = ['发动机号_ischeck', assemblyNumberValue_check]
        param[5] = ['发动机号', this.assemblyNumberValue]
        param[6] = ['工位号_ischeck', stationNumberValue_check]
        param[7] = ['工位号', this.stationNumberValue]
        param[8] = ['测量位置_ischeck', measuringPositionValue_check]
        param[9] = ['测量位置', this.measuringPositionValue]
        param[10] = ['测量项目_ischeck', measuringProjectValue_check]
        param[11] = ['测量项目', this.measuringProjectValue]
        param[12] = ['订单号_ischeck', orderNumberValue_check]
        param[13] = ['订单号', this.orderNumberValue]
        param[14] = ['批次条码_ischeck', traceabilityCode_check]
        param[15] = ['批次条码', this.traceabilityCode]
        param[16] = ['合格标志', this.isQualifiedValue]
        var Data = this.CreateData('2001', '质量数据查询_综合查询新', param)
        this.exportExcel_NPOI(Data)
      } else {
        this.$message.warning(this.$t('assemblyQualitydataQuery.noData'))
      }
    },
    // 分页
    handleSizeChange(val) {
      this.pageCurrent = 1
      this.pageSize = val
      this.selectDate()
    },
    handleCurrentChange(val) {
      this.pageCurrent = val
      this.selectDate()
    }
  }
}
</script>

<style scoped>
  .topCard{
    margin: 5px;
  }
  .topDiv{
    margin-bottom: 10px;
  }
  .queryToolbar {
    align-items: flex-end;
  }
  .tablePanel {
    width: 100%;
    max-width: 100%;
    padding-top: 4px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(243,247,251,0.94) 100%);
    overflow-x: auto;
  }
  .assemblyTable {
    width: 100% !important;
    max-width: 100%;
  }
  .panelHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  .panelTitle {
    color: #203247;
    font-size: 15px;
    font-weight: 700;
  }
  .panelSubtitle {
    color: #6b7f93;
    font-size: 12px;
    margin-top: 3px;
  }
  .compactHeader {
    padding: 0 2px;
  }
  ::v-deep .queryToolbar .el-button {
    margin-bottom: 2px;
  }
</style>
