<template>
  <div class="app-container1">
    <el-tabs v-model="activeName" @tab-click="handleTabClick">
      <el-tab-pane label="汇总统计" name="first">
        <div class="search">
          <el-date-picker v-model="tab.table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" :picker-options="pickerOptions" />
          <el-button class="el-icon-arrow-left elIconArrowLeft" :disabled="Beforedisabled" @click="handleBefore" />
          <el-button class="el-icon-arrow-right elIconArrowRight" :disabled="Nextdisabled" @click="handleNext" />
          <span style="margin-left: 10px;">统计类型：</span>
          <el-select v-model="tab.radio" placeholder="统计类型" class="filter-item" style="width: 120px;" @change="changeRadio">
            <el-option v-for="item in statisticalTypeList" :key="item.id" :label="item.name" :value="item.id" />
          </el-select>
          <el-checkbox v-model="tab.checked" style="margin-right: 10px;" @change="changeChecked">按日期统计</el-checkbox>
          <el-input v-if="tab.isDriver" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 140px;" placeholder="驾驶员" />
          <el-input v-if="tab.isFormulaName" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 140px;" placeholder="配方名称" />
          <el-input v-if="tab.isHouseName" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 140px;" placeholder="栏舍名称" />
          <el-input v-if="tab.isLivestockType" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 140px;" placeholder="牲畜名称" />
          <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.projname" class="filter-item" style="width: 100px;" placeholder="车次" />
          <el-input v-if="tab.isFeed" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 140px;" placeholder="饲料" />
          <el-select v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.times" filterable placeholder="班次" class="filter-item" style="width: 120px;" clearable>
            <el-option v-for="item in tab2.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
          </el-select>
          <el-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.fname" class="filter-item" style="width: 100px;" placeholder="TMR名称" />
          <el-select v-if="tab.isTMRName" v-model="tab.table.getdataListParm.parammaps.fname" placeholder="请选择TMR设备" class="filter-item" style="width: 150px;">
            <el-option v-for="(item,index) in tab.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
          </el-select>
          <div style="display: inline-block;" class="filter-item1">
            <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.hlwc1" placeholder="混料误差值" style="width: 120px;" class="filter-item" clearable />
            <span>-</span>
            <el-input-number :controls="false" :precision="2"  v-model="tab.table.getdataListParm.parammaps.hlwc2" placeholder="混料误差值" style="width: 120px;" class="filter-item" clearable />
          </div>
          <div style="display: inline-block;" class="filter-item1">
            <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.hlzq1" placeholder="混料准确率" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
            <span>-</span>
            <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.hlzq2" placeholder="混料准确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
          </div>
          <div style="display: inline-block;" class="filter-item1">
            <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.hlzql1" placeholder="混料正确率" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
            <span>-</span>
            <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.hlzql2" placeholder="混料正确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
          </div>
          <div style="display: inline-block;" class="filter-item1">
            <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.slwc1" placeholder="撒料误差值" style="width: 120px;" class="filter-item" clearable />
            <span>-</span>
            <el-input-number :controls="false" :precision="2"  v-model="tab.table.getdataListParm.parammaps.slwc2" placeholder="撒料误差值" style="width: 120px;" class="filter-item" clearable />
          </div>
          <div style="display: inline-block;" class="filter-item1">
            <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.slzq1" placeholder="撒料准确率" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
            <span>-</span>
            <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.slzq2" placeholder="撒料准确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
          </div>
          <div style="display: inline-block;" class="filter-item1">
            <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.slzql1" placeholder="撒料正确率" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
            <span>-</span>
            <el-input-number :controls="false" :precision="2" v-model="tab.table.getdataListParm.parammaps.slzql2" placeholder="撒料正确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
          </div>
          <el-checkbox v-model="tab.table.getdataListParm.parammaps.error" style="margin-right: 10px;" @change="changeccysChecked">只看超出预设值数据</el-checkbox>
          <el-button class="successBorder" @click="form_search">查询</el-button>
          <el-button class="successBorder" @click="handleRefresh1">重置</el-button>
          <el-button class="export" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
          <svg-icon icon-class="Up" class="down" style="width: 40px;height: 40px;float: right;" @click="handleQuickJumpChart" />
        </div>
        <div id="table" class="table">
          <h4>混料</h4>
          <el-table
            :key="tab.table.tableKey"
            v-loading="tab.table.listLoading"
            element-loading-text="给我一点时间"
            :data="tab.table.list"
            border
            fit
            highlight-current-row
            style="width: 100%;"
            :row-style="rowStyle"
            :cell-style="cellStyle"
            class="elTable table-fixed"
            :max-height="myHeight2"
          >
            <el-table-column v-if="tab.checked" :key="0" sortable label="日期" min-width="70px" align="center" prop="计划时间" />
            <el-table-column v-if="tab.isDriver" :key="1" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
            <el-table-column v-if="tab.isFormulaName" :key="2" sortable label="配方名称" min-width="70px" align="center" prop="配方名称" />
            <el-table-column v-if="tab.isHouseName" :key="3" sortable label="栏舍名称" min-width="70px" align="center" prop="栏舍名称" />
            <el-table-column v-if="tab.isLivestockType" :key="4" sortable label="牲畜类别" min-width="70px" align="center" prop="牲畜类别" />
            <el-table-column v-if="tab.isTrainNumber" :key="5" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
            <el-table-column v-if="tab.isTrainNumber" :key="6" sortable label="车次" min-width="70px" align="center" prop="车次" />
            <el-table-column v-if="tab.isTrainNumber" :key="7" sortable label="班次" min-width="70px" align="center" prop="班次" />
            <el-table-column v-if="tab.isTrainNumber" :key="8" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
            <el-table-column v-if="tab.isTMRName" :key="9" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
            <el-table-column v-if="tab.isTMRName" :key="10" sortable label="班次" min-width="70px" align="center" prop="班次" />
            <el-table-column v-if="tab.isTMRName" :key="11" sortable label="车次" min-width="70px" align="center" prop="车次" />
            <el-table-column v-if="tab.isTMRName" :key="12" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
            <el-table-column v-if="tab.isFeed" :key="13" sortable label="饲料" min-width="70px" align="center" prop="fname" />
            <el-table-column :key="14" sortable label="理论重量" min-width="60px" align="center" prop="理论重量" />
            <el-table-column :key="15" sortable label="实际重量" min-width="60px" align="center" prop="实际重量" />
            <el-table-column :key="16" sortable label="计划混料操作数" min-width="60px" align="center" prop="计划混料操作数" />
            <el-table-column :key="17" sortable label="已混料操作数" min-width="50px" align="center" prop="已混料操作数" />
            <el-table-column :key="18" sortable label="混料操作率" min-width="60px" align="center" prop="混料操作率" />
            <el-table-column :key="19" sortable label="混料误差值" min-width="60px" align="center" prop="混料误差值" />
            <el-table-column :key="20" sortable label="混料准确率" min-width="60px" align="center" prop="混料准确率" />
            <el-table-column v-if="tab.isTrainNumber" :key="21" sortable label="混料时间" min-width="70px" align="center" prop="混料时间" />
            <el-table-column v-if="tab.isTrainNumber" :key="22" sortable label="等待时间" min-width="70px" align="center" prop="等待时间" />
            <el-table-column :key="23" sortable label="混料自动跳转次数" min-width="65px" align="center" prop="混料自动跳转次数" />
            <el-table-column :key="24" sortable label="混料手动跳转次数" min-width="65px" align="center" prop="混料手动跳转次数" />
            <el-table-column :key="25" sortable label="取消次数" min-width="70px" align="center" prop="取消次数" />
            <el-table-column :key="26" sortable label="混料正确数" min-width="70px" align="center" prop="混料正确数" />
            <el-table-column :key="27" sortable label="混料正确率" min-width="70px" align="center" prop="混料正确率" />
            <el-table-column :key="28" sortable label="去除取消正确率" min-width="60px" align="center" prop="去除取消正确率" />
            <el-table-column :key="29" sortable label="标准差" min-width="60px" align="center" prop="方差" />
            <el-table-column v-if="activeName=='first' && tab.table.list !== null" :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width" fixed="right">
              <template slot-scope="{row}">
                <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('1',row)" />
              </template>
            </el-table-column>
            <el-table-column v-else :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width">
              <template slot-scope="{row}">
                  <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('1',row)" />
              </template>
            </el-table-column>
          </el-table>
          <span v-if="tab.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab.table.total }}条</span>
          <div v-if="tab.radio !== '6'">
            <h4>撒料</h4>
            <el-table
              :key="tab.table2.tableKey"
              v-loading="tab.table2.listLoading"
              element-loading-text="给我一点时间"
              :data="tab.table2.list"
              border
              fit
              highlight-current-row
              style="width: 100%;"
              :row-style="rowStyle"
              :cell-style="cellStyle"
              class="elTable table-fixed"
              :max-height="myHeight2"
            >
              <el-table-column v-if="tab.checked" :key="0" sortable label="日期" min-width="70px" align="center" prop="计划时间" />
              <el-table-column v-if="tab.isDriver" :key="1" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
              <el-table-column v-if="tab.isFormulaName" :key="2" sortable label="配方名称" min-width="70px" align="center" prop="配方名称" />
              <el-table-column v-if="tab.isHouseName" :key="3" sortable label="栏舍名称" min-width="70px" align="center" prop="栏舍名称" />
              <el-table-column v-if="tab.isLivestockType" :key="4" sortable label="牲畜类别" min-width="70px" align="center" prop="牲畜类别" />
              <el-table-column v-if="tab.isTrainNumber" :key="5" sortable label="车次" min-width="70px" align="center" prop="车次" />
              <el-table-column v-if="tab.isTrainNumber" :key="6" sortable label="班次" min-width="70px" align="center" prop="班次" />
              <el-table-column v-if="tab.isTrainNumber" :key="7" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
              <el-table-column v-if="tab.isTrainNumber" :key="8" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
              <el-table-column v-if="tab.isTMRName" :key="9" sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
              <el-table-column v-if="tab.isTMRName" :key="10" sortable label="班次" min-width="70px" align="center" prop="班次" />
              <el-table-column v-if="tab.isTMRName" :key="11" sortable label="车次" min-width="70px" align="center" prop="车次" />
              <el-table-column v-if="tab.isTMRName" :key="12" sortable label="驾驶员" min-width="70px" align="center" prop="驾驶员" />
              <el-table-column v-if="tab.isFeed" :key="13" sortable label="饲料" min-width="70px" align="center" prop="饲料" />
              <el-table-column :key="14" sortable label="理论重量" min-width="60px" align="center" prop="理论重量" />
              <el-table-column :key="15" sortable label="实际重量" min-width="60px" align="center" prop="实际重量" />
              <el-table-column :key="16" sortable label="计划撒料操作数" min-width="60px" align="center" prop="计划撒料操作数" />
              <el-table-column :key="17" sortable label="已撒料操作数" min-width="50px" align="center" prop="已撒料操作数" />
              <el-table-column :key="18" sortable label="撒料操作率" min-width="60px" align="center" prop="撒料操作率" />
              <el-table-column :key="19" sortable label="撒料误差值" min-width="60px" align="center" prop="撒料误差值" />
              <el-table-column :key="20" sortable label="撒料准确率" min-width="60px" align="center" prop="撒料准确率" />
              <el-table-column v-if="tab.isTrainNumber" :key="21" sortable label="撒料时间" min-width="70px" align="center" prop="撒料时间" />
              <el-table-column v-if="tab.isTrainNumber" :key="22" sortable label="等待时间" min-width="70px" align="center" prop="等待时间" />
              <el-table-column :key="23" sortable label="撒料自动跳转次数" width="65px" align="center" prop="撒料自动跳转次数" />
              <el-table-column :key="24" sortable label="撒料手动跳转次数" width="65px" align="center" prop="撒料手动跳转次数" />
              <el-table-column :key="25" sortable label="取消次数" min-width="70px" align="center" prop="取消次数" />
              <el-table-column :key="26" sortable label="撒料正确数" min-width="70px" align="center" prop="撒料正确数" />
              <el-table-column :key="27" sortable label="撒料正确率" min-width="70px" align="center" prop="撒料正确率" />
              <el-table-column :key="28" sortable label="去除取消正确率" min-width="65px" align="center" prop="去除取消正确率" />
              <el-table-column :key="29" sortable label="标准差" min-width="60px" align="center" prop="方差" />
              <el-table-column v-if="activeName=='first' && tab.table2.list !== null" :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width" fixed="right">
                <template slot-scope="{row}">
                  <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('2',row)" />
                </template>
              </el-table-column>
              <el-table-column v-else :key="30" align="center" width="70" label="操作" class-name="small-padding fixed-width">
                <template slot-scope="{row}">
                    <el-button class="miniSuccess" icon="el-icon-search" @click="handleSee('2',row)" />
                  </template>
                </el-table-column>
            </el-table>
            <span v-if="tab.table2.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab.table2.total }}条</span>
          </div>
        </div>
        <div id="AnalysisChart" class="AnalysisChart">
          <el-row :gutter="10">
            <el-col :span="24" style="margin-bottom: 10px;margin-top: 10px;">
              <span>图表查询时间：</span>
              <el-radio-group v-model="tab.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeAllSpecificDate">
                <el-radio-button label="1" border>日</el-radio-button>
                <el-radio-button label="3" border>月</el-radio-button>
              </el-radio-group>
              <div v-show="tab.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
                <el-date-picker v-model="tab.chartDate" :clearable="false" class="inputDatetime filter-item" style="width:250px;" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptionsDate" />
              </div>
              <div v-show="tab.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
                <el-select v-model="tab.selectYear" class="filter-item" style="width:130px;margin-right:10px;" placeholder="请选择年份" @change="changeAllYear">
                  <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
                </el-select>
                <el-select v-model="tab.selectWeek" class="filter-item" style="width:170px;" multiple :multiple-limit="2" placeholder="请选择周">
                  <el-option v-for="(item,index) in tab.weekList" :key="index" :label="item.name" :value="item.id" />
                </el-select>
              </div>
              <div v-show="tab.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
                <el-date-picker v-model="tab.chartMonth" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" style="width:250px;" class="inputDatetime filter-item" range-separator="至" :picker-options="pickerOptionsMonth" />
              </div>
              <el-button class="successBorder" style="margin-left:10px;" @click="handleAllDate">确认</el-button>
              <svg-icon icon-class="Up" style="width: 40px;height: 40px;float: right;" @click="handleQuickJumpTop" />
            </el-col>
          </el-row>
          <el-row :gutter="10" class="dashboard-editor-container">
            <el-col :span="12">
              <div class="grid-content">
                <h4>计划统计</h4>
                <div v-if="tab.chart2.isChart" class="button">
                  <div class="chartButton">
                    <el-radio-group v-model="tab.chart2.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart2')">
                      <el-radio-button label="1" border>日</el-radio-button>
                      <el-radio-button label="3" border>月</el-radio-button>
                    </el-radio-group>
                    <div v-show="tab.chart2.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart2.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptionsDate" />
                    </div>
                    <div v-show="tab.chart2.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
                      <el-select v-model="tab.chart2.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" placeholder="年份" @change="changeChartYear('chart2')">
                        <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
                      </el-select>
                      <el-select v-model="tab.chart2.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" placeholder="请选择周">
                        <el-option v-for="(item,index) in tab.chart2.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
                      </el-select>
                    </div>
                    <div v-show="tab.chart2.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart2.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" format="yyyy-MM" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" range-separator="至" :picker-options="pickerOptionsMonth" />
                    </div>
                    <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart2')">确认</el-button>
                  </div>
                  <div>
                    <div class="exportTable2" @click="handleExport('chart2')">导出</div>
                    <div class="exportTable2" @click="handleTable('chart2')">切换表格</div>
                  </div>
                </div>
                <div v-if="tab.chart2.isChart" id="chartLine2" style="width:100%;height:385px;background: #fff;" />
                <div v-if="tab.chart2.isTable" class="table">
                  <div class="button">
                    <div class="exportTable" @click="handleExport('chart2')">导出</div>
                    <div class="exportTable" @click="handleChart('chart2')">切换图表</div>
                  </div>
                  <el-table
                    :key="tab.chart2.table.tableKey"
                    v-loading="tab.chart2.table.listLoading"
                    element-loading-text="给我一点时间"
                    :data="tab.chart2.table.list"
                    border
                    fit
                    highlight-current-row
                    style="width: 100%;"
                    height="385"
                    :row-style="rowStyle"
                    :cell-style="cellStyle"
                    class="elTable table-fixed"
                  >
                    <el-table-column label="日期" sortable min-width="85px" align="center" prop="日期" />
                    <el-table-column label="计划执行重量(kg)" sortable min-width="80px" align="center" prop="实际量" />
                    <el-table-column label="配方理论重量(kg)" sortable min-width="80px" align="center" prop="理论量" />
                    <el-table-column label="计划准确率" sortable min-width="85px" align="center" prop="field1" />
                    <el-table-column label="计划取消重量(kg)" sortable min-width="80px" align="center" prop="计划取消重量" />
                    <el-table-column label="计划准确率(去除取消重量)" sortable min-width="100px" align="center" prop="field3" />
                    <el-table-column label="计划正确数" sortable min-width="85px" align="center" prop="正确数" />
                    <el-table-column label="计划数" sortable min-width="60px" align="center" prop="计划数" />
                    <el-table-column label="计划正确率" sortable min-width="75px" align="center" prop="field2" />
                  </el-table>
                </div>
              </div>
            </el-col>
            <el-col :span="12">
              <div class="grid-content">
                <h4>配方准确率</h4>
                <div v-if="tab.chart1.isChart" class="button">
                  <div class="chartButton">
                    <my-select ref="tenantselect" :model="tab.chart1.getdataListParm.parammaps.statisticsList" :option="tab.chart1.statisticsList" :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" placeholder="请选择统计参数" @searchSelect="changeStatisticChart1" />
                    <el-radio-group v-model="tab.chart1.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart1')">
                      <el-radio-button label="1" border>日</el-radio-button>
                      <el-radio-button label="3" border>月</el-radio-button>
                    </el-radio-group>
                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart1.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptionsDate" />
                    </div>
                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
                      <el-select v-model="tab.chart1.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" placeholder="年份" @change="changeChartYear('chart1')">
                        <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
                      </el-select>
                      <el-select v-model="tab.chart1.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" placeholder="请选择周">
                        <el-option v-for="(item,index) in tab.chart1.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
                      </el-select>
                    </div>
                    <div v-show="tab.chart1.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart1.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" range-separator="至" :picker-options="pickerOptionsMonth" />
                    </div>
                    <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart1')">确认</el-button>
                  </div>
                  <div>
                    <div class="exportTable2" @click="handleExport('chart1')">导出</div>
                    <div class="exportTable2" @click="handleTable('chart1')">切换表格</div>
                  </div>
                </div>
                <div v-if="tab.chart1.isChart" id="chartLine1" style="width:100%;height:385px;" />
                <div v-if="tab.chart1.isTable" class="table">
                  <div class="button">
                    <div class="exportTable" @click="handleExport('chart1')">导出</div>
                    <div class="exportTable" @click="handleChart('chart1')">切换图表</div>
                  </div>
                  <el-table
                    :key="tab.chart1.table.tableKey"
                    v-loading="tab.chart1.table.listLoading"
                    element-loading-text="给我一点时间"
                    :data="tab.chart1.table.list"
                    border
                    fit
                    highlight-current-row
                    style="width: 100%;"
                    height="385"
                    :row-style="rowStyle"
                    :cell-style="cellStyle"
                    class="elTable table-fixed"
                  >
                    <el-table-column label="日期" sortable min-width="90px" align="center" prop="日期" />
                    <el-table-column label="配方名称" sortable min-width="90px" align="center" prop="名称" />
                    <el-table-column label="计划重量（kg）" sortable min-width="100px" align="center" prop="理论量" />
                    <el-table-column label="实际重量（kg）" sortable min-width="100px" align="center" prop="实际量" />
                    <el-table-column label="准确率" sortable min-width="90px" align="center" prop="准确率" />
                  </el-table>
                </div>
              </div>
            </el-col>
          </el-row>
          <el-row :gutter="10" class="dashboard-editor-container">
            <el-col :span="12">
              <div class="grid-content">
                <h4>牛群准确率</h4>
                <div v-if="tab.chart3.isChart" class="button">
                  <div class="chartButton">
                    <my-select ref="tenantselect" :model="tab.chart3.getdataListParm.parammaps.statisticsList" :option="tab.chart3.statisticsList" :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" placeholder="请选择统计参数" @searchSelect="changeStatisticChart3" />
                    <el-radio-group v-model="tab.chart3.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart3')">
                      <el-radio-button label="1" border>日</el-radio-button>
                      <el-radio-button label="3" border>月</el-radio-button>
                    </el-radio-group>
                    <div v-show="tab.chart3.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart3.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptionsDate" />
                    </div>
                    <div v-show="tab.chart3.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
                      <el-select v-model="tab.chart3.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" placeholder="年份" @change="changeChartYear('chart3')">
                        <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
                      </el-select>
                      <el-select v-model="tab.chart3.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" placeholder="请选择周">
                        <el-option v-for="(item,index) in tab.chart3.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
                      </el-select>
                    </div>
                    <div v-show="tab.chart3.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart3.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" range-separator="至" :picker-options="pickerOptionsMonth" />
                    </div>
                    <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart3')">确认</el-button>
                  </div>
                  <div>
                    <div class="exportTable2" @click="handleExport('chart3')">导出</div>
                    <div class="exportTable2" @click="handleTable('chart3')">切换表格</div>
                  </div>
                </div>
                <div v-if="tab.chart3.isChart" id="chartLine3" style="width:100%;height:385px;" />
                <div v-if="tab.chart3.isTable" class="table">
                  <div class="button">
                    <div class="exportTable" @click="handleExport('chart3')">导出</div>
                    <div class="exportTable" @click="handleChart('chart3')">切换图表</div>
                  </div>
                  <el-table
                    :key="tab.chart3.table.tableKey"
                    v-loading="tab.chart3.table.listLoading"
                    element-loading-text="给我一点时间"
                    :data="tab.chart3.table.list"
                    border
                    fit
                    highlight-current-row
                    style="width: 100%;"
                    height="385"
                    :row-style="rowStyle"
                    :cell-style="cellStyle"
                    class="elTable table-fixed"
                  >
                    <el-table-column label="日期" sortable min-width="90px" align="center" prop="日期" />
                    <el-table-column label="牲畜类别" sortable min-width="90px" align="center" prop="名称" />
                    <el-table-column label="计划重量（kg）" sortable min-width="100px" align="center" prop="理论量" />
                    <el-table-column label="实际重量（kg）" sortable min-width="100px" align="center" prop="实际量" />
                    <el-table-column label="准确率" sortable min-width="90px" align="center" prop="准确率" />
                  </el-table>
                </div>
              </div>
            </el-col>
            <el-col :span="12">
              <div class="grid-content">
                <h4>车辆准确率（重量）</h4>
                <div v-if="tab.chart4.isChart" class="button">
                  <div class="chartButton">
                    <my-select ref="tenantselect" :model="tab.chart4.getdataListParm.parammaps.statisticsList" :option="tab.chart4.statisticsList" :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" placeholder="请选择统计参数" @searchSelect="changeStatisticChart4" />
                    <el-radio-group v-model="tab.chart4.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart4')">
                      <el-radio-button label="1" border>日</el-radio-button>
                      <el-radio-button label="3" border>月</el-radio-button>
                    </el-radio-group>
                    <div v-show="tab.chart4.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart4.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptionsDate" />
                    </div>
                    <div v-show="tab.chart4.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
                      <el-select v-model="tab.chart4.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" placeholder="年份" @change="changeChartYear('chart4')">
                        <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
                      </el-select>
                      <el-select v-model="tab.chart4.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" placeholder="请选择周">
                        <el-option v-for="(item,index) in tab.chart4.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
                      </el-select>
                    </div>
                    <div v-show="tab.chart4.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart4.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" range-separator="至" :picker-options="pickerOptionsMonth" />
                    </div>
                    <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart4')">确认</el-button>
                  </div>
                  <div>
                    <div class="exportTable2" @click="handleExport('chart4')">导出</div>
                    <div class="exportTable2" @click="handleTable('chart4')">切换表格</div>
                  </div>
                </div>
                <div v-if="tab.chart4.isChart" id="chartLine4" style="width:100%;height:385px;" />
                <div v-if="tab.chart4.isTable" class="table">
                  <div class="button">
                    <div class="exportTable" @click="handleExport('chart4')">导出</div>
                    <div class="exportTable" @click="handleChart('chart4')">切换图表</div>
                  </div>
                  <el-table
                    :key="tab.chart4.table.tableKey"
                    v-loading="tab.chart4.table.listLoading"
                    element-loading-text="给我一点时间"
                    :data="tab.chart4.table.list"
                    border
                    fit
                    highlight-current-row
                    style="width: 100%;"
                    height="385"
                    :row-style="rowStyle"
                    :cell-style="cellStyle"
                    class="elTable table-fixed"
                  >
                    <el-table-column label="日期" sortable min-width="90px" align="center" prop="日期" />
                    <el-table-column label="车次" sortable min-width="90px" align="center" prop="名称" />
                    <el-table-column label="计划重量（kg）" sortable min-width="100px" align="center" prop="理论量" />
                    <el-table-column label="实际重量（kg）" sortable min-width="100px" align="center" prop="实际量" />
                    <el-table-column label="准确率" sortable min-width="90px" align="center" prop="准确率" />
                  </el-table>
                </div>
              </div>
            </el-col>
          </el-row>

          <el-row :gutter="10" class="dashboard-editor-container">
            <el-col :span="12">
              <div class="grid-content">
                <h4>混料统计</h4>
                <div v-if="tab.chart5.isChart" class="button">
                  <div class="chartButton">
                    <el-radio-group v-model="tab.chart5.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart5')">
                      <el-radio-button label="1" border>日</el-radio-button>
                      <el-radio-button label="3" border>月</el-radio-button>
                    </el-radio-group>
                    <div v-show="tab.chart5.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart5.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptionsDate" />
                    </div>
                    <div v-show="tab.chart5.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
                      <el-select v-model="tab.chart5.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" placeholder="年份" @change="changeChartYear('chart5')">
                        <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
                      </el-select>
                      <el-select v-model="tab.chart5.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" placeholder="请选择周">
                        <el-option v-for="(item,index) in tab.chart5.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
                      </el-select>
                    </div>
                    <div v-show="tab.chart5.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart5.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" range-separator="至" :picker-options="pickerOptionsMonth" />
                    </div>
                    <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart5')">确认</el-button>
                  </div>
                  <div>
                    <div class="exportTable2" @click="handleExport('chart5')">导出</div>
                    <div class="exportTable2" @click="handleTable('chart5')">切换表格</div>
                  </div>
                </div>
                <div v-if="tab.chart5.isChart" id="chartLine5" class="button" style="width:100%;height:385px;" />
                <div v-if="tab.chart5.isTable" class="table">
                  <div class="button">
                    <div class="exportTable" @click="handleExport('chart5')">导出</div>
                    <div class="exportTable" @click="handleChart('chart5')">切换图表</div>
                  </div>
                  <el-table
                    :key="tab.chart5.table.tableKey"
                    v-loading="tab.chart5.table.listLoading"
                    element-loading-text="给我一点时间"
                    :data="tab.chart5.table.list"
                    border
                    fit
                    highlight-current-row
                    style="width: 100%;"
                    height="385"
                    :row-style="rowStyle"
                    :cell-style="cellStyle"
                    class="elTable table-fixed"
                  >
                    <el-table-column label="日期" sortable min-width="100px" align="center" prop="日期" />
                    <el-table-column label="自动跳转次数" sortable min-width="130px" align="center" prop="field1" />
                    <el-table-column label="手动跳转次数" sortable min-width="130px" align="center" prop="field2" />
                    <el-table-column label="自动跳转理论重量" sortable min-width="110px" align="center" prop="理论自动" />
                    <el-table-column label="自动跳转实际重量" sortable min-width="110px" align="center" prop="实际自动" />
                    <el-table-column label="自动跳转准确率" sortable min-width="110px" align="center" prop="field3" />
                    <el-table-column label="手动跳转理论重量" sortable min-width="110px" align="center" prop="理论手动" />
                    <el-table-column label="手动跳转实际重量" sortable min-width="110px" align="center" prop="实际手动" />
                    <el-table-column label="手动跳转准确率" sortable min-width="110px" align="center" prop="field4" />
                  </el-table>
                </div>
              </div>
            </el-col>
            <el-col :span="12">
              <div class="grid-content">
                <h4>混料计划取消次数</h4>
                <div v-if="tab.chart6.isChart" class="button">
                  <div class="chartButton">
                    <el-radio-group v-model="tab.chart6.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart6')">
                      <el-radio-button label="1" border>日</el-radio-button>
                      <el-radio-button label="3" border>月</el-radio-button>
                    </el-radio-group>
                    <div v-show="tab.chart6.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart6.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptionsDate" />
                    </div>
                    <div v-show="tab.chart6.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
                      <el-select v-model="tab.chart6.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" placeholder="年份" @change="changeChartYear('chart6')">
                        <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
                      </el-select>
                      <el-select v-model="tab.chart6.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" placeholder="请选择周">
                        <el-option v-for="(item,index) in tab.chart6.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
                      </el-select>
                    </div>
                    <div v-show="tab.chart6.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart6.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" range-separator="至" :picker-options="pickerOptionsMonth" />
                    </div>
                    <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart6')">确认</el-button>
                  </div>
                  <div>
                    <div class="exportTable2" @click="handleExport('chart6')">导出</div>
                    <div class="exportTable2" @click="handleTable('chart6')">切换表格</div>
                  </div>
                </div>
                <div v-if="tab.chart6.isChart" id="chartLine6" style="width:100%;height:385px;" />
                <div v-if="tab.chart6.isTable" class="table">
                  <div class="button">
                    <div class="exportTable" @click="handleExport('chart6')">导出</div>
                    <div class="exportTable" @click="handleChart('chart6')">切换图表</div>
                  </div>
                  <el-table
                    :key="tab.chart6.table.tableKey"
                    v-loading="tab.chart6.table.listLoading"
                    element-loading-text="给我一点时间"
                    :data="tab.chart6.table.list"
                    border
                    fit
                    highlight-current-row
                    style="width: 100%;"
                    height="385"
                    :row-style="rowStyle"
                    :cell-style="cellStyle"
                    class="elTable table-fixed"
                  >
                    <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
                    <el-table-column label="混料计划取消次数" sortable min-width="110px" align="center" prop="field1" />
                  </el-table>
                </div>
              </div>
            </el-col>
          </el-row>

          <el-row :gutter="10" class="dashboard-editor-container" style="margin-bottom: 30px;">
            <el-col :span="24">
              <div class="grid-content">
                <h4>栏舍撒料时间统计</h4>
                <div v-if="tab.chart7.isChart" class="button">
                  <div class="chartButton">
                    <my-select ref="tenantselect" :model="tab.chart7.getdataListParm.parammaps.statisticsList" :option="tab.chart7.statisticsList"  :value="'name'" :label="'name'" style="width: 150px;margin-right: 5px;float: left;" placeholder="请选择统计参数" @searchSelect="changeStatisticChart7" />
                    <el-radio-group v-model="tab.chart7.getdataListParm.parammaps.specificDate" class="specificDate" size="mini" style="display: inline-block;" @change="changeChartSpecificDate('chart7')">
                      <el-radio-button label="1" border>日</el-radio-button>
                      <el-radio-button label="3" border>月</el-radio-button>
                    </el-radio-group>
                    <div v-show="tab.chart7.getdataListParm.parammaps.specificDate == '1'" class="day" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart7.getdataListParm.parammaps.inputDatetime" style="width:220px;" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptionsDate" />
                    </div>
                    <div v-show="tab.chart7.getdataListParm.parammaps.specificDate == '2'" class="week" style="display: inline-block; clear: both;margin-left:10px;">
                      <el-select v-model="tab.chart7.getdataListParm.parammaps.selectYear" class="filter-item" style="width:80px;margin-right:10px;" placeholder="年份" @change="changeChartYear('chart7')">
                        <el-option v-for="item in tab.yearList" :key="item" :label="item" :value="item" />
                      </el-select>
                      <el-select v-model="tab.chart7.getdataListParm.parammaps.selectWeek" class="filter-item" style="width:160px;" multiple :multiple-limit="2" placeholder="请选择周">
                        <el-option v-for="(item,index) in tab.chart7.getdataListParm.parammaps.weekList" :key="index" :label="item.name" :value="item.id" />
                      </el-select>
                    </div>
                    <div v-show="tab.chart7.getdataListParm.parammaps.specificDate == '3'" class="month" style="display: inline-block;margin-left:10px;">
                      <el-date-picker v-model="tab.chart7.getdataListParm.parammaps.chartMonth" style="width:220px;" :clearable="false" value-format="yyyy-MM-dd" type="monthrange" class="inputDatetime filter-item" range-separator="至" :picker-options="pickerOptionsMonth" />
                    </div>
                    <el-button class="successBorder" style="margin-left:10px;" @click="handleChartDate('chart7')">确认</el-button>
                  </div>
                  <div>
                    <div class="exportTable2" @click="handleExport('chart7')">导出</div>
                    <div class="exportTable2" @click="handleTable('chart7')">切换表格</div>
                  </div>
                </div>
                <div v-if="tab.chart7.isChart" id="chartLine7" style="width:100%;height:385px;" />
                <div v-if="tab.chart7.isTable" class="table">
                  <div class="button">
                    <div class="exportTable" @click="handleExport('chart7')">导出</div>
                    <div class="exportTable" @click="handleChart('chart7')">切换图表</div>
                  </div>
                  <el-table
                    :key="tab.chart7.table.tableKey"
                    v-loading="tab.chart7.table.listLoading"
                    element-loading-text="给我一点时间"
                    :data="tab.chart7.table.list"
                    border
                    fit
                    highlight-current-row
                    style="width: 100%;"
                    height="385"
                    :row-style="rowStyle"
                    :cell-style="cellStyle"
                    class="elTable table-fixed"
                  >
                    <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
                    <el-table-column label="栏舍" sortable min-width="110px" align="center" prop="fname" />
                    <el-table-column label="撒料时间" sortable min-width="110px" align="center" prop="撒料时间" />
                  </el-table>
                </div>
              </div>
            </el-col>
          </el-row>
        </div>
      </el-tab-pane>
      <el-tab-pane label="混料统计" name="second">
        <div class="search" ref="myHeightSecond">
          <el-date-picker v-model="tab2.table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" :picker-options="pickerOptions3" />
          <!-- <el-date-picker v-model="tab2.table.getdataListParm.parammaps.inputDatetime2" :clearable="false" style="width: 140px;margin-top: 5px;" type="date" placeholder="选择日期"> </el-date-picker> -->
          <el-button class="el-icon-arrow-left elIconArrowLeft" style="display:inline-block;margin-top: 5px;" :disabled="Beforedisabled2" @click="handleBefore2" />
          <el-button class="el-icon-arrow-right elIconArrowRight" style="display:inline-block;margin-top: 5px;" :disabled="Nextdisabled2" @click="handleNext2" />
          <el-select clearable filterable v-model="tab2.table.getdataListParm.parammaps.tmrtname" placeholder="TMR设备" class="filter-item" style="width: 120px;">
            <el-option v-for="(item,index) in tab2.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
          </el-select>
          <el-input v-model="tab2.table.getdataListParm.parammaps.projname" style="margin-top: 5px;width: 110px;" placeholder="车次" class="filter-item" clearable />
          <el-select v-model="tab2.table.getdataListParm.parammaps.times" style="margin-top: 5px;width: 110px;" filterable placeholder="班次" class="filter-item" clearable>
            <el-option v-for="item in tab2.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
          </el-select>
          <el-input v-model="tab2.table.getdataListParm.parammaps.templetname" style="margin-top: 5px;width: 110px;" placeholder="配方名称" class="filter-item" clearable />
          <el-select v-model="tab2.table.getdataListParm.parammaps.buttontype" style="margin-top: 5px;width: 130px;" filterable placeholder="跳转方式" class="filter-item" clearable>
            <el-option v-for="item in tab2.jumpModeList" :key="item.id" :label="item.name" :value="item.id" />
          </el-select>
          <div style="display: inline-block;" class="filter-item1">
            <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlwc1" placeholder="混料误差值" style="width: 120px;" class="filter-item" clearable />
            <span>-</span>
            <el-input-number :controls="false" :precision="2"  v-model="tab2.table.getdataListParm.parammaps.hlwc2" placeholder="混料误差值" style="width: 120px;" class="filter-item" clearable />
          </div>
          <div style="display: inline-block;" class="filter-item1">
            <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlzq1" placeholder="混料准确率" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
            <span>-</span>
            <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlzq2" placeholder="混料准确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
          </div>
          <div style="display: inline-block;" class="filter-item1">
            <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlzql1" placeholder="混料正确率" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
            <span>-</span>
            <el-input-number :controls="false" :precision="2" v-model="tab2.table.getdataListParm.parammaps.hlzql2" placeholder="混料正确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
          </div>
          <el-checkbox v-model="tab2.table.getdataListParm.parammaps.error" style="margin-right: 10px;">只看超出预设值数据</el-checkbox>

          <el-button class="successBorder" style="margin-top: 5px;" @click="form_search2">查询</el-button>
          <el-button class="successBorder" style="margin-top: 5px;" @click="handleRefresh2">重置</el-button>
          <el-button style="float: right;margin-right: 10px;margin-bottom:10px;margin-top: 5px;" class="export" icon="el-icon-upload2" @click="handleExport2">导出</el-button>
        </div>
        <div class="table">
          <u-table
            ref="plTable2"
            :key="tab2.table.tableKey"
            v-loading="tab2.table.listLoading"
            element-loading-text="给我一点时间"
            :data="tab2.table.list"
            border
            fit
            highlight-current-row
            style="width: 100%;"
            :row-style="rowStyle"
            :cell-style="cellStyle"
            class="elTable table-fixed"
            :height="myHeightSecond"
          >
            <u-table-column sortable label="日期" min-width="70px" align="center" prop="日期" />
            <u-table-column sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
            <u-table-column sortable label="车次" min-width="50px" align="center" prop="车次" />
            <u-table-column sortable label="班次" min-width="50px" align="center" prop="班次" />
           <u-table-column sortable label="配方名称" min-width="70px" align="center" prop="配方名称">
              <template slot-scope="{row}">
                <a @click="clickRecipeName2(row)" style="text-decoration: underline;color: #0000FF;">{{ row.配方名称 }}</a>
              </template>
            </u-table-column>
            <u-table-column sortable label="饲料" min-width="70px" align="center" prop="饲料">
              <template slot-scope="{row}">
                <a @click="clickFeed2(row)" style="text-decoration: underline;color: #0000FF;">{{ row.饲料 }}</a>
              </template>
            </u-table-column>
            <u-table-column sortable label="理论重量" min-width="55px" align="center" prop="理论重量" />
            <u-table-column sortable label="实际重量" min-width="55px" align="center" prop="实际重量" />
            <u-table-column sortable label="误差值" min-width="45px" align="center" prop="误差值" />
            <u-table-column sortable label="准确率" min-width="45px" align="center" prop="准确率" />
            <u-table-column sortable label="计划时间" min-width="55px" align="center" prop="计划时间" />
            <u-table-column sortable label="开始时间" min-width="55px" align="center" prop="开始时间" />
            <u-table-column sortable label="结束时间" min-width="55px" align="center" prop="结束时间" />
            <u-table-column sortable label="搅拌时间" min-width="55px" align="center" prop="搅拌时间" />
            <u-table-column sortable label="跳转方式" min-width="55px" align="center" prop="跳转方式" />
            <u-table-column sortable label="开始重量" min-width="55px" align="center" prop="开始重量" />
            <u-table-column sortable label="结束重量" min-width="55px" align="center" prop="结束重量" />
            <u-table-column sortable label="车次描述" min-width="55px" align="center" prop="remark" />
          </u-table>
          <span v-if="tab2.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab2.table.total }}条</span>
        </div>
      </el-tab-pane>
      <el-tab-pane label="撒料统计" name="third">
        <div class="search" ref="myHeightThird">
          <el-date-picker v-model="tab3.table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" :picker-options="pickerOptions3" />
          <!-- <el-date-picker v-model="tab3.table.getdataListParm.parammaps.inputDatetime2" :clearable="false" style="margin-top: 5px;width:140px;" type="date" placeholder="选择日期"> </el-date-picker> -->
          <el-button class="el-icon-arrow-left elIconArrowLeft" style="dispaly:inline-block;margin-top: 5px;" :disabled="Beforedisabled3" @click="handleBefore3" />
          <el-button class="el-icon-arrow-right elIconArrowRight" style="dispaly:inline-block;margin-top: 5px;" :disabled="Nextdisabled3" @click="handleNext3" />
          <el-select v-model="tab3.table.getdataListParm.parammaps.tmrtname" placeholder="TMR设备" class="filter-item" style="margin-top: 5px;width: 120px;" clearable filterable>
            <el-option v-for="(item,index) in tab3.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
          </el-select>
          <el-input v-model="tab3.table.getdataListParm.parammaps.projname" style="margin-top: 5px;width: 150px;" placeholder="车次" class="filter-item" clearable />
          <el-select v-model="tab3.table.getdataListParm.parammaps.times" style="margin-top: 5px;width: 100px;" filterable placeholder="班次" class="filter-item" clearable>
            <el-option v-for="item in tab3.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
          </el-select>
          <el-input v-model="tab3.table.getdataListParm.parammaps.templetname" style="margin-top: 5px;width: 110px;" placeholder="配方名称" class="filter-item" clearable />
          <el-input v-model="tab3.table.getdataListParm.parammaps.fname" style="margin-top: 5px;width: 110px;" placeholder="栏舍名称" class="filter-item" clearable />
          <el-select v-model="tab3.table.getdataListParm.parammaps.buttontype" style="margin-top: 5px;width: 110px;" filterable placeholder="跳转方式" class="filter-item" clearable>
            <el-option v-for="item in tab3.jumpModeList" :key="item.id" :label="item.name" :value="item.id" />
          </el-select>
          <div style="display: inline-block;" class="filter-item1">
            <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slwc1" placeholder="撒料误差值" style="width: 120px;" class="filter-item" clearable />
            <span>-</span>
            <el-input-number :controls="false" :precision="2"  v-model="tab3.table.getdataListParm.parammaps.slwc2" placeholder="撒料误差值" style="width: 120px;" class="filter-item" clearable />
          </div>
          <div style="display: inline-block;" class="filter-item1">
            <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slzq1" placeholder="撒料准确率" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
            <span>-</span>
            <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slzq2" placeholder="撒料准确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
          </div>
          <div style="display: inline-block;" class="filter-item1">
            <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slzql1" placeholder="撒料正确率" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
            <span>-</span>
            <el-input-number :controls="false" :precision="2" v-model="tab3.table.getdataListParm.parammaps.slzql2" placeholder="撒料正确率" :min="0" :max="100" style="width: 120px;" class="filter-item" clearable />
          </div>
          <el-checkbox v-model="tab3.table.getdataListParm.parammaps.error" style="margin-right: 10px;">只看超出预设值数据</el-checkbox>
          <el-button class="successBorder" style="margin-top: 5px;" @click="form_search3">查询</el-button>
          <el-button class="successBorder" style="margin-top: 5px;" @click="handleRefresh3">重置</el-button>
          <el-button style="float: right;margin-right: 10px;margin-bottom:10px;margin-top: 5px;" class="export" icon="el-icon-upload2" @click="handleExport3">导出</el-button>
        </div>
        <div class="table">
          <u-table
            ref="plTable3"
            :key="tab3.table.tableKey"
            v-loading="tab3.table.listLoading"
            element-loading-text="给我一点时间"
            :data="tab3.table.list"
            border
            fit
            highlight-current-row
            style="width: 100%;"
            :row-style="rowStyle"
            :cell-style="cellStyle"
            class="elTable table-fixed"
            :height="myHeightThird"
          >
            <u-table-column sortable label="日期" min-width="70px" align="center" prop="日期" />
            <u-table-column sortable label="TMR名称" min-width="70px" align="center" prop="TMR名称" />
            <u-table-column sortable label="车次" min-width="45px" align="center" prop="车次" />
            <u-table-column sortable label="班次" min-width="45px" align="center" prop="班次" />
            <u-table-column sortable label="配方名称" min-width="70px" align="center" prop="配方名称">
              <template slot-scope="{row}">
                <a @click="clickRecipeName3(row)" style="text-decoration: underline;color: #0000FF;">{{ row.配方名称 }}</a>
              </template>
            </u-table-column>
            <u-table-column sortable label="栏舍" min-width="70px" align="center" prop="栏舍">
              <template slot-scope="{row}">
                <a @click="clickFence3(row)" style="text-decoration: underline;color: #0000FF;">{{ row.栏舍 }}</a>
              </template>
            </u-table-column>
            <u-table-column sortable label="理论重量" min-width="55px" align="center" prop="理论重量" />
            <u-table-column sortable label="实际重量" min-width="55px" align="center" prop="实际重量" />
            <u-table-column sortable label="误差值" min-width="45px" align="center" prop="误差值" />
            <u-table-column sortable label="准确率" min-width="45px" align="center" prop="准确率" />
            <u-table-column sortable label="开始时间" min-width="55px" align="center" prop="开始时间" />
            <u-table-column sortable label="结束时间" min-width="55px" align="center" prop="结束时间" />
            <u-table-column sortable label="跳转方式" min-width="55px" align="center" prop="跳转方式" />
            <u-table-column sortable label="开始重量" min-width="55px" align="center" prop="开始重量" />
            <u-table-column sortable label="结束重量" min-width="55px" align="center" prop="结束重量" />
          </u-table>
          <span v-if="tab3.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab3.table.total }}条</span>
        </div>
      </el-tab-pane>
    </el-tabs>
    <!-- 导出 -->
    <el-dialog :title="textMap[exportList.dialogStatus]" :visible.sync="exportList.dialogFormVisible" :close-on-click-modal="false" width="20%">
    <div>
      <span>导出时间范围：</span>
      <el-date-picker v-model="exportList.inputDatetime" :clearable="false" style="width: 230px;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2" />
    </div>
    <div slot="footer" class="dialog-footer" style="margin-bottom: 10px;">
      <el-button class="cancelClose" @click="exportList.dialogFormVisible = false">关闭</el-button>
      <el-button  class="save" v-if="activeName=='second'" :disabled="isokDisable" @click="exportList2()">确认</el-button>
      <el-button  class="save" v-else-if="activeName=='third'" :disabled="isokDisable" @click="exportList3()">确认</el-button>
    </div>
    </el-dialog>
    <!-- 查看 -->
    <See :show.sync="isShowDialog"  :row-pid="rowPid" :start-time="startTime" :stop-time="stopTime"  :optdevice="optdevice" :title-fname="titlefname" :method-name="methodName" :error="error" />

    <!-- 配方名称弹窗 -->
    <el-dialog :title="textMap[recipeNameTemp2.dialogStatus]" :visible.sync="recipeNameTemp2.dialogFormVisible" :close-on-click-modal="false" width="90%">
      <div class="recipeNameTemp2">
        <div class="search">
          <el-date-picker ref="inputDatetime" :clearable="false" v-model="recipeNameTemp2.getdataListParm.parammaps.inputDatetime" class="filter-item inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
          <el-button class="successBorder" @click="handleRecipeNameSearch2">查询</el-button>
        </div>
        <div class="table">
          <el-table
            :key="recipeNameTemp2.tableKey"
            v-loading="recipeNameTemp2.listLoading"
            element-loading-text="给我一点时间"
            :data="recipeNameTemp2.list"
            border
            highlight-current-row
            style="width: 100%;"
            :row-style="rowStyle"
            :cell-style="cellStyle"
            class="elTable table-fixed"
            :max-height="450"
          >
            <el-table-column label="序号" align="center" type="index" width="50px" />
            <el-table-column label="修改时间" width="130px" align="center" prop="createdate" />
            <el-table-column label="配方名称" min-width="70px" align="center"  prop="tname">
              <template slot-scope="{row}">
                <span v-if="row.tname !==undefined &&row.tname.indexOf('/') !== -1" style="color: red;">
                  {{row.tname}}
                </span>
                <span v-else>{{row.tname}}</span>
              </template>
            </el-table-column>
            <el-table-column label="配方编码" width="130px" align="center" prop="tcode" />
            <el-table-column label="配方颜色" min-width="70px" align="center">
              <template slot-scope="scope">
                <el-color-picker v-model="scope.row.tcolor" size="mini" :predefine="predefineColors" style="vertical-align: middle;" :disabled="scope.row.NoEdit" />
              </template>
            </el-table-column>
            <el-table-column label="牲畜类别" width="130px" align="center" prop="ccname">
              <template slot-scope="{row}">
                <span v-if="row.ccname !==undefined &&row.ccname.indexOf('/') !== -1" style="color: red;">
                  {{row.ccname}}
                </span>
                <span v-else>{{row.ccname}}</span>
              </template>
            </el-table-column>
            <el-table-column label="配方类型" width="130px" align="center" prop="fttype">
            <template slot-scope="{row}">
                <span v-if="row.fttype !==undefined &&row.fttype.indexOf('/') !== -1" style="color: red;">
                  {{row.fttype}}
                </span>
                <span v-else>{{row.fttype}}</span>
              </template>
            </el-table-column>
            <el-table-column label="来源" width="130px" align="center" prop="source">
            <template slot-scope="{row}">
                <span v-if="row.source !==undefined &&row.source.indexOf('/') !== -1" style="color: red;">
                  {{row.source}}
                </span>
                <span v-else>{{row.source}}</span>
              </template>
            </el-table-column>
            <el-table-column label="版本号" width="130px" align="center" prop="version">
            <template slot-scope="{row}">
                <span v-if="row.version !== undefined && String(row.version).indexOf('/') !== -1" style="color: red;">
                  {{row.version}}
                </span>
                <span v-else>{{row.version}}</span>
              </template>
            </el-table-column>
            <el-table-column label="备注" width="130px" align="center" prop="remark">
              <template slot-scope="{row}">
                <span v-if="row.remark !==undefined &&row.remark.indexOf('/') !== -1" style="color: red;">
                  {{row.remark}}
                </span>
                <span v-else>{{row.remark}}</span>
              </template>
            </el-table-column>
            <el-table-column label="饲料信息" min-width="70px" align="center">
              <template slot-scope="{row}">
                <a @click="clickSeeFeed(row)" style="text-decoration: underline;color: #0000FF;">查看</a>
              </template>
            </el-table-column>
          </el-table>
          <pagination v-show="recipeNameTemp2.total>0" :total="recipeNameTemp2.total" :page.sync="recipeNameTemp2.getdataListParm.offset" :limit.sync="recipeNameTemp2.getdataListParm.pagecount" @pagination="getRecipeNameList2()" />
        </div>
      </div>
      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
        <el-button class="cancelClose1" @click="recipeNameTemp2.dialogFormVisible = false; ">关闭</el-button>
      </div>
    </el-dialog>
    <!-- 撒料统计-配方名称 -->
    <el-dialog :title="textMap[recipeNameTemp3.dialogStatus]" :visible.sync="recipeNameTemp3.dialogFormVisible" :close-on-click-modal="false" width="90%">
      <div class="recipeNameTemp3">
        <!-- <div class="search">
          <el-date-picker ref="inputDatetime" :clearable="false" v-model="recipeNameTemp3.getdataListParm.parammaps.inputDatetime" class="filter-item inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
          <el-button class="successBorder" @click="handleRecipeNameSearch3">查询</el-button>
        </div> -->
        <div class="table">
          <el-table
            :key="recipeNameTemp3.tableKey"
            v-loading="recipeNameTemp3.listLoading"
            element-loading-text="给我一点时间"
            :data="recipeNameTemp3.list"
            border
            highlight-current-row
            style="width: 100%;"
            :row-style="rowStyle"
            :cell-style="cellStyle"
            class="elTable table-fixed"
            :max-height="450"
          >
            <el-table-column label="序号" align="center" type="index" width="50px" />
            <el-table-column label="饲料组" width="130px" align="center" prop="feedgroup" />
            <el-table-column label="饲料名称" min-width="70px" align="center"  prop="fname">
              <template slot-scope="{row}">
                <span v-if="row.fweightstatus == 1" style="color: red;"> {{row.fname}} </span>
                <span v-else>{{row.fname}}</span>
              </template>
            </el-table-column>
            <el-table-column label="重量(KG)" width="130px" align="center" prop="fweight">
            <template slot-scope="{row}">
                <span v-if="row.fweight !==undefined &&row.fweight.indexOf('/') !== -1" style="color: red;">
                  {{row.fweight}}
                </span>
                <span v-else>{{row.fweight}}</span>
              </template>
            </el-table-column>
            <el-table-column label="搅拌延时(min)" width="130px" align="center" prop="autosecond" />
          </el-table>
          <pagination v-show="recipeNameTemp3.total>0" :total="recipeNameTemp3.total" :page.sync="recipeNameTemp3.getdataListParm.offset" :limit.sync="recipeNameTemp3.getdataListParm.pagecount" @pagination="getRecipeNameList3()" />
        </div>
      </div>
      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
        <el-button class="cancelClose1" @click="recipeNameTemp3.dialogFormVisible = false; ">关闭</el-button>
      </div>
    </el-dialog>
    <!-- 饲料 -->
    <el-dialog :title="textMap[feedTemp.dialogStatus]" :visible.sync="feedTemp.dialogFormVisible" :close-on-click-modal="false" width="98%">
      <div class="feedTemp">
        <div class="search">
          <el-date-picker ref="inputDatetime" v-model="feedTemp.getdataListParm.parammaps.inputDatetime" :clearable="false" class="filter-item inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
          <el-button class="successBorder" @click="handleFeedSearch">查询</el-button>
        </div>
        <div class="table">
          <el-table
            :key="feedTemp.tableKey"
            v-loading="feedTemp.listLoading"
            element-loading-text="给我一点时间"
            :data="feedTemp.list"
            border
            highlight-current-row
            style="width: 100%;"
            :row-style="rowStyle"
            :cell-style="cellStyle"
            class="elTable table-fixed"
          >
            <el-table-column label="序号" align="center" type="index" width="50px">
              <template slot-scope="scope">
                <span>{{ scope.$index + (feedTemp.pageNum-1) * feedTemp.pageSize + 1 }}</span>
              </template>
            </el-table-column>
            <el-table-column label="修改时间" min-width="100px" align="center" prop="updateTime" />
            <el-table-column label="饲料重量（KG）" min-width="100px" align="center">
              <template slot-scope="{row}">
                <span v-if="row.weight !==undefined &&row.weight.indexOf('/') !== -1" style="color: red;">
                  {{row.weight}}
                </span>
                <span v-else>{{row.weight}}</span>
              </template>
            </el-table-column>
          </el-table>
          <pagination v-show="feedTemp.total>0" :total="feedTemp.total" :page.sync="feedTemp.getdataListParm.offset" :limit.sync="feedTemp.getdataListParm.pagecount" @pagination="getFeedList()" />
        </div>
      </div>
      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
        <el-button class="cancelClose1" @click="feedTemp.dialogFormVisible = false; ">关闭</el-button>
      </div>
    </el-dialog>

    <!-- 栏舍 -->
    <el-dialog :title="textMap[fenceTemp.dialogStatus]" :visible.sync="fenceTemp.dialogFormVisible" :close-on-click-modal="false" width="90%">
      <div class="fenceTemp">
        <el-tabs v-model="fenceTemp.activeName" @tab-click="handleFenceTabClick">
          <el-tab-pane label="班次重量" name="first">
              <div class="search">
                <el-date-picker ref="inputDatetime" v-model="fenceTemp.tab1.getdataListParm.parammaps.inputDatetime" :clearable="false" class="filter-item inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
                <el-button class="successBorder" @click="handleFenceSearch">查询</el-button>
              </div>
              <div class="table">
                <u-table
                  :key="fenceTemp.tab1.tableKey"
                  v-loading="fenceTemp.tab1.listLoading"
                  element-loading-text="给我一点时间"
                  :data="fenceTemp.tab1.list"
                  border
                  highlight-current-row
                  style="width: 100%;"
                  :row-style="rowStyle"
                  :cell-style="cellStyle"
                  class="elTable table-fixed"
                  :span-method="objectSpanMethod1"
                >
                  <u-table-column label="序号" width="50px" align="center" type="index" />
                  <u-table-column label="修改时间" width="100px" align="center" prop="createdate" />
                  <u-table-column label="班次" min-width="100px" align="center" prop="times" />
                  <u-table-column label="实际牛头数" min-width="100px" align="center" prop="ccount">
                    <template slot-scope="{row}">
                      <span v-if="row.ccountstatus == 1" style="color: red;">{{row.ccount}}</span>
                      <span v-else >{{row.ccount}}</span>
                    </template>
                  </u-table-column>
                  <u-table-column label="系数（%）" min-width="100px" align="center" prop="ratio">
                    <template slot-scope="{row}">
                      <span v-if="row.ratiostatus == 1" style="color: red;">{{row.ratio}}</span>
                      <span v-else >{{row.ratio}}</span>
                    </template>
                  </u-table-column>
                  <u-table-column label="系数头数" min-width="100px" align="center" prop="ccountratio">
                    <template slot-scope="{row}">
                      <span v-if="row.ccountratiostatus == 1" style="color: red;">{{row.ccountratio}}</span>
                      <span v-else >{{row.ccountratio}}</span>
                    </template>
                  </u-table-column>
                  <u-table-column label="配方模板" min-width="70px" align="center" prop="ftname">
                    <template slot-scope="{row}">
                      <a v-if="row.ftnamestatus == 1" @click="clickRecipeTemplate3(row)" style="text-decoration: underline;color: red;">{{ row.ftname }}</a>
                      <a v-else @click="clickRecipeTemplate3(row)" style="text-decoration: underline;">{{ row.ftname }}</a>
                    </template>
                  </u-table-column>
                  <u-table-column label="比例（%）" min-width="100px" align="center">
                    <template slot-scope="{row}">
                        <span v-if="row.tratiostatus == 1" style="color: red;">{{row.tratio}}</span>
                        <span v-else >{{row.tratio}}</span>
                      </template>
                  </u-table-column>
                  <u-table-column label="重量（KG）" min-width="100px" align="center" prop="weight">
                    <template slot-scope="{row}">
                        <span v-if="row.weightstatus == 1" style="color: red;">{{row.weight}}</span>
                        <span v-else>{{row.weight}}</span>
                      </template>
                  </u-table-column>
                </u-table>
              </div>
          </el-tab-pane>
          <el-tab-pane label="车次重量" name="second">
              <div class="search">
                <el-date-picker ref="inputDatetime" :clearable="false" v-model="fenceTemp.tab2.getdataListParm.parammaps.inputDatetime" class="filter-item inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
                <el-button class="successBorder" @click="handleFenceSearch">查询</el-button>
              </div>
              <div class="table">
                <u-table
                  :key="fenceTemp.tab2.tableKey"
                  v-loading="fenceTemp.tab2.listLoading"
                  element-loading-text="给我一点时间"
                  :data="fenceTemp.tab2.list"
                  border
                  highlight-current-row
                  style="width: 100%;"
                  :row-style="rowStyle"
                  class="elTable table-fixed"
                  :span-method="objectSpanMethod2"
                  >
                  <u-table-column label="序号" width="50px" align="center" type="index" />
                  <u-table-column label="修改时间" width="100px" align="center" prop="createdate" />
                  <u-table-column label="班次" width="100px" align="center" prop="times" />
                  <!-- <u-table-column v-for="(item, index) in fenceTemp.tab2.tableLabel" :key="index" align="center" :min-width="item.width" :prop="item.prop" :label="item.label"> -->
                  <u-table-column v-for="(item, index) in fenceTemp.tab2.tableLabel" :key="index" align="center" :min-width="item.width" :prop="item.prop"  :label="item.label">
                    <template slot-scope="scope">
                      <span v-if="scope.row[item.prop] !==undefined &&scope.row[item.prop].indexOf('/') !== -1" style="color: red;">
                        {{scope.row[item.prop]}}
                      </span>
                      <span v-else>{{scope.row[item.prop]}}</span>
                    </template>
                  </u-table-column>
                </u-table>
              </div>
          </el-tab-pane>
        </el-tabs>
      </div>
        <div slot="footer" class="dialog-footer" style="bottom: 10px;">
          <el-button class="cancelClose1" @click="fenceTemp.dialogFormVisible = false; ">关闭</el-button>
        </div>
    </el-dialog>
    <!-- 配方模板修改记录 -->
    <el-dialog :title="textMap[modificationRecordTemp.dialogStatus]" :visible.sync="modificationRecordTemp.dialogFormVisible" :close-on-click-modal="false" width="90%">
      <div class="modificationRecord">
        <h3 style="flex: 1;">修改前</h3>
        <div class="top">
          <div class="left">
            <div><b>配方名称:</b>{{modificationRecordTemp.list1.tname}}</div>
            <div><b>配方编码:</b>{{modificationRecordTemp.list1.tcode}}</div>
            <div><b>配方颜色:</b><el-color-picker v-model="modificationRecordTemp.list1.tcolor" size="mini" :predefine="predefineColors" style="vertical-align: middle;" disabled /></div>
            <div><b>牲畜类别:</b>{{modificationRecordTemp.list1.ccname}}</div>
            <div><b>配方类型:</b>{{modificationRecordTemp.list1.fttype}}</div>
            <div><b>来源:</b>{{modificationRecordTemp.list1.source}}</div>
            <div><b>版本号:</b>{{modificationRecordTemp.list1.version}}</div>
            <div><b>备注:</b>{{modificationRecordTemp.list1.remark}}</div>
          </div>
          <div class="right">
            <el-table
              :key="modificationRecordTemp.tableKey1"
              v-loading="modificationRecordTemp.listLoading1"
              element-loading-text="给我一点时间"
              :data="modificationRecordTemp.list1.fit"
              border
              fit
              highlight-current-row
              style="width: 100%;"
              height="280"
              :row-style="rowStyle"
              :cell-style="cellStyle"
              class="elTable table-fixed"
              show-summary
              :summary-method="getSummaries1"
            >
              <el-table-column label="饲料组" min-width="90px" align="center" prop="feedgroup" />
              <el-table-column label="饲料名称" min-width="90px" align="center" prop="fname" />
              <el-table-column label="重量(KG)" min-width="100px" align="center" prop="fweight" />
              <el-table-column label="搅拌延时(min)" min-width="100px" align="center">
                <template slot-scope="{row}">
                  <span>{{ row.autosecond }}</span>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
        <hr/>
        <h3 style="color: red;">修改后</h3>
        <div class="bottom">
          <div class="left">
            <div><b>配方名称:</b>{{modificationRecordTemp.list2.tname}}</div>
            <div><b>配方编码:</b>{{modificationRecordTemp.list2.tcode}}</div>
            <div><b>配方颜色:</b><el-color-picker v-model="modificationRecordTemp.list2.tcolor" size="mini" :predefine="predefineColors" style="vertical-align: middle;" disabled /></div>
            <div><b>牲畜类别:</b>{{modificationRecordTemp.list2.ccname}}</div>
            <div><b>配方类型:</b>{{modificationRecordTemp.list2.fttype}}</div>
            <div><b>来源:</b>{{modificationRecordTemp.list2.source}}</div>
            <div><b>版本号:</b>{{modificationRecordTemp.list2.version}}</div>
            <div><b>备注:</b>{{modificationRecordTemp.list2.remark}}</div>
          </div>
          <div class="right">
            <el-table
              :key="modificationRecordTemp.tableKey2"
              v-loading="modificationRecordTemp.listLoading2"
              element-loading-text="给我一点时间"
              :data="modificationRecordTemp.list2.fit"
              border
              fit
              highlight-current-row
              style="width: 100%;"
              height="280"
              :row-style="rowStyle"
              :cell-style="cellStyle"
              class="elTable table-fixed"
              show-summary
              :summary-method="getSummaries2"
            >
              <el-table-column label="饲料组" min-width="90px" align="center" prop="feedgroup" />
              <el-table-column label="饲料名称" min-width="90px" align="center" prop="fname" />
              <el-table-column label="重量(KG)" min-width="100px" align="center" prop="fweight" />
              <el-table-column label="搅拌延时(min)" min-width="100px" align="center">
                <template slot-scope="{row}">
                  <span>{{ row.autosecond }}</span>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
      </div>
      <div slot="footer" class="dialog-footer" style="bottom: 10px;">
        <el-button class="cancelClose1" @click="modificationRecordTemp.dialogFormVisible = false; ">关闭</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import echarts from 'echarts'
import See from './see.vue'
require('echarts/theme/macarons')
import { GetDataByName, GetReportform, whichWeek, postJson } from '@/api/common'
import Cookies from 'js-cookie'
import { parseTime, json2excel, handleTableSpan, handleObjectSpanMethod } from '@/utils/index.js'
import Pagination from '@/components/Pagination'
import { MessageBox } from 'element-ui'
import mySelect from '@/components/mySelect'
export default {
  name: 'PastureErrorAnalysis',
  components: { Pagination, mySelect, See },
  data() {
    return {
      error:'',
      optdevice:'',
      stopTime:'',
      startTime:'',
      Eweight:'',
      predefineColors: [
        '#E57373', '#F06292', '#BA68C8', '#9575CD', '#7986CB', '#64B5F6', '#4FC3F7', '#4DD0E1', '#4DB6AC', '#81C784', '#AED581', '#DCE775', '#FFF176', '#FFD54F', '#FFB74D', '#FF8A65', '#A1887F', '#E0E0E0', '#90A4AE'
      ],
      pickerMinMonth: '',
      pickerOptionsMonth: {
        onPick: ({ maxDate, minDate }) => {
          this.pickerMinMonth = minDate.getTime()
          if (maxDate) {
            this.pickerMinMonth = ''
          }
        },
        // 限制不能选择今天之后的日期
        disabledDate: (time) => {
          if (this.pickerMinMonth !== '') {
            const one = 24 * 3600 * 1000 * 365 * 5
            const minTime = this.pickerMinMonth - 0
            let maxTime = this.pickerMinMonth + one
            if (maxTime > new Date()) {
              maxTime = new Date()
            }
            return time.getTime() < minTime || time.getTime() > maxTime
          }
          return time.getTime() >= Date.now()
        }
      },
      pickerMinDate: '',
      pickerOptionsDate: {
        showWeekNumber: false,
        onPick: ({ maxDate, minDate }) => {
          this.pickerMinDate = minDate.getTime()
          if (maxDate) {
            this.pickerMinDate = ''
          }
        },
        // 限制不能选择今天之后的日期
        disabledDate: (time) => {
          if (this.pickerMinDate !== '') {
            const one = 31 * 24 * 3600 * 1000
            const minTime = this.pickerMinDate - one
            let maxTime = this.pickerMinDate + one
            if (maxTime > new Date()) {
              maxTime = new Date()
            }
            return time.getTime() < minTime || time.getTime() > maxTime
          }
          return time.getTime() > Date.now()
        }
      },
      Beforedisabled: false,
      Nextdisabled: false,
      Beforedisabled2: false,
      Nextdisabled2: false,
      Beforedisabled3: false,
      Nextdisabled3: false,
      pickerOptions: {
        onPick: ({ maxDate, minDate }) => {
          this.pickerMinDate = minDate.getTime()
          if (maxDate) {
            this.pickerMinDate = ''
          }
        },
        // 限制不能选择今天之后的日期
        disabledDate: (time) => {
          if (this.pickerMinDate !== '') {
            const one = 31 * 24 * 3600 * 1000
            const minTime = this.pickerMinDate - one
            let maxTime = this.pickerMinDate + one
            if (maxTime > new Date()) {
              maxTime = new Date()
            }
            return time.getTime() < minTime || time.getTime() > maxTime
          }
          return time.getTime() > Date.now()
        }
      },
      pickerOptions2: {
        onPick: ({ maxDate, minDate }) => {
          this.pickerMinDate = minDate.getTime()
          if (maxDate) {
            this.pickerMinDate = ''
          }
        },
        // 限制不能选择今天之后的日期
        disabledDate: (time) => {
          if (this.pickerMinDate !== '') {
            const one = 100 * 24 * 3600 * 1000
            const minTime = this.pickerMinDate - one
            let maxTime = this.pickerMinDate + one
            if (maxTime > new Date()) {
              maxTime = new Date()
            }
            return time.getTime() < minTime || time.getTime() > maxTime
          }
          return time.getTime() > Date.now()
        }
      },
      pickerOptions3:{
        onPick: ({ maxDate, minDate }) => {
          this.pickerMinDate = minDate.getTime()
          if (maxDate) {
            this.pickerMinDate = ''
          }
        },
        // 限制不能选择今天之后的日期
        disabledDate: (time) => {
          if (this.pickerMinDate !== '') {
            const one = 365 * 24 * 3600 * 1000
            const minTime = this.pickerMinDate - one
            let maxTime = this.pickerMinDate + one
            if (maxTime > new Date()) {
              maxTime = new Date()
            }
            return time.getTime() < minTime || time.getTime() > maxTime
          }
          return time.getTime() > Date.now()
        }
      },
      // 班次
      maxTime: {
        getMaxTimesParm: {
          name: 'getSysoptEnable',
          page: 1,
          offset: 1,
          pagecount: 1,
          returntype: 'Map',
          parammaps: {
            pastureid: Cookies.get('pastureid'),
            inforname: 'times'
          }
        }
      },
      activeName: 'first',
      tab: {
        TMRNameList:[],
        radio: '7',
        isDriver: false,
        isFormulaName: false, // 配方名称
        isHouseName: true, // 栏舍名称
        isLivestockType: false, // 牲畜类别
        isTrainNumber: false, // 车次
        isTMRName: false, // TMR名称
        isFeed:false,//饲料
        checked: false, // 按日期统计
        chartDate: [],
        selectWeek: [],
        chartMonth: [],
        specificDate: '1',
        selectYear: parseTime(new Date(), '{y}'),
        yearList: [],
        weekList: [],
        table: {
          getdataListParm: {
            name: 'getAccuracyHFT',
            page: 1,
            offset: 1,
            pagecount: '',
            returntype: 'Map',
            parammaps: {
              pastureid: Cookies.get('pastureid'),
              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
              stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
              inputDatetime: [new Date(), new Date()],
              fname: '',
              sort: '',
              times: ''
            }
          },
          tableKey: 1,
          list: [],
          total: 0,
          listLoading: true,
          temp: {}
        },

        table2: {
          getdataListParm: {
            name: 'getAccuracySFT',
            page: 1,
            offset: 1,
            pagecount: '',
            returntype: 'Map',
            parammaps: {
              pastureid: Cookies.get('pastureid'),
              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
              stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
              inputDatetime: [new Date(), new Date()],
              fname: '',
              sort: '',
              times: ''
            }
          },
          tableKey: 2,
          list: [],
          total: 0,
          listLoading: true,
          temp: {}
        },
        chartDate: [],
        // 配方准确率
        chart1: {
          chartLine: null,
          chartLine_data: {},
          getdataListParm: {
            name: 'getAccuracyAllFT',
            page: 1,
            offset: 1,
            pagecount: '',
            returntype: 'Map',
            parammaps: {
              pastureid: Cookies.get('pastureid'),
              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
              stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
              inputDatetime: [new Date(), new Date()],
              specificDate: '1',
              selectYear: parseTime(new Date(), '{y}'),
              selectWeek: '',
              chartMonth: '',
              yearList: [],
              weekList: [],
              status: 0
            }
          },
          tableKey: 1,
          list: [],
          total: 0,
          listLoading: true,
          statisticsList: [],
          chart1Data3: [],
          isChart: true,
          isTable: false,
          table: {
            tableKey: 1,
            list: [],
            total: 0,
            listLoading: false
          }
        },

        // 计划统计
        chart2: {
          chartLine: null,
          chartLine_data: {},
          getdataListParm: {
            name: 'getAccuracyAllJH',
            page: 1,
            offset: 1,
            pagecount: '',
            returntype: 'Map',
            parammaps: {
              pastureid: Cookies.get('pastureid'),
              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
              stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
              inputDatetime: [new Date(), new Date()],
              specificDate: '1',
              selectYear: parseTime(new Date(), '{y}'),
              selectWeek: '',
              chartMonth: '',
              yearList: [],
              weekList: [],
              status: 0
            }
          },
          tableKey: 1,
          list: [],
          total: 0,
          listLoading: true,
          isChart: true,
          isTable: false,
          table: {
            tableKey: 1,
            list: [],
            total: 0,
            listLoading: false
          }
        },
        // 牛群准确率
        chart3: {
          chartLine: null,
          chartLine_data: {},
          getdataListParm: {
            name: 'getAccuracyAllNQ',
            page: 1,
            offset: 1,
            pagecount: '',
            returntype: 'Map',
            parammaps: {
              pastureid: Cookies.get('pastureid'),
              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
              stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
              inputDatetime: [new Date(), new Date()],
              specificDate: '1',
              selectYear: parseTime(new Date(), '{y}'),
              selectWeek: '',
              chartMonth: '',
              yearList: [],
              weekList: [],
              status: 0
            }
          },
          tableKey: 1,
          list: [],
          total: 0,
          listLoading: true,
          statisticsList: [],
          chart1Data3: [],
          isChart: true,
          isTable: false,
          table: {
            tableKey: 1,
            list: [],
            total: 0,
            listLoading: false
          }
        },
        // 车辆准确率（重量）
        chart4: {
          chartLine: null,
          chartLine_data: {},
          getdataListParm: {
            name: 'getAccuracyAllCC',
            page: 1,
            offset: 1,
            pagecount: '',
            returntype: 'Map',
            parammaps: {
              pastureid: Cookies.get('pastureid'),
              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
              stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
              inputDatetime: [new Date(), new Date()],
              specificDate: '1',
              selectYear: parseTime(new Date(), '{y}'),
              selectWeek: '',
              chartMonth: '',
              yearList: [],
              weekList: [],
              status: 0
            }
          },
          tableKey: 1,
          list: [],
          total: 0,
          listLoading: true,
          statisticsList: [],
          chart4Data3: [],
          isChart: true,
          isTable: false,
          table: {
            tableKey: 1,
            list: [],
            total: 0,
            listLoading: false
          }
        },
        // 混料统计
        chart5: {
          chartLine: null,
          chartLine_data: {},
          getdataListParm: {
            name: 'getAccuracyAllHL',
            page: 1,
            offset: 1,
            pagecount: '',
            returntype: 'Map',
            parammaps: {
              pastureid: Cookies.get('pastureid'),
              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
              stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
              inputDatetime: [new Date(), new Date()],
              specificDate: '1',
              selectYear: parseTime(new Date(), '{y}'),
              selectWeek: '',
              chartMonth: '',
              yearList: [],
              weekList: [],
              status: 0
            }
          },
          tableKey: 1,
          list: [],
          total: 0,
          listLoading: true,
          isChart: true,
          isTable: false,
          table: {
            tableKey: 1,
            list: [],
            total: 0,
            listLoading: false
          }
        },
        // 混料计划取消次数
        chart6: {
          chartLine: null,
          chartLine_data: {},
          getdataListParm: {
            name: 'getAccuracyAllQX',
            page: 1,
            offset: 1,
            pagecount: '',
            returntype: 'Map',
            parammaps: {
              pastureid: Cookies.get('pastureid'),
              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
              stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
              inputDatetime: [new Date(), new Date()],
              specificDate: '1',
              selectYear: parseTime(new Date(), '{y}'),
              selectWeek: '',
              chartMonth: '',
              yearList: [],
              weekList: [],
              status: 0
            }
          },
          tableKey: 1,
          list: [],
          total: 0,
          listLoading: true,
          isChart: true,
          isTable: false,
          table: {
            tableKey: 1,
            list: [],
            total: 0,
            listLoading: false
          }
        },
        // 栏舍撒料时间统计
        chart7: {
          chartLine: null,
          chartLine_data: {},
          getdataListParm: {
            name: 'getAccuracyAllLS',
            page: 1,
            offset: 1,
            pagecount: '',
            returntype: 'Map',
            parammaps: {
              pastureid: Cookies.get('pastureid'),
              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
              stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
              inputDatetime: [new Date(), new Date()],
              specificDate: '1',
              selectYear: parseTime(new Date(), '{y}'),
              selectWeek: '',
              chartMonth: '',
              yearList: [],
              weekList: [],
              status: 0
            }
          },
          tableKey: 1,
          list: [],
          total: 0,
          listLoading: true,
          statisticsList: [],
          chart7Data3: [],
          isChart: true,
          isTable: false,
          table: {
            tableKey: 1,
            list: [],
            total: 0,
            listLoading: false
          }
        }

      },

      tab2: {
        TMRNameList:[],
        table: {
          getdataListParm: {
            name: 'getStatisticsHL',
            page: 1,
            offset: 1,
            pagecount: '',
            returntype: 'Map',
            parammaps: {
              pastureid: Cookies.get('pastureid'),
              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
              stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
              inputDatetime: [new Date(), new Date()],
              inputDatetime2:new Date(),
              tmrtname: '',
              projname: '',
              times: '',
              buttontype: '',
              templetname: '',
              isuse: ''
            }
          },
          tableKey: 1,
          list: [],
          total: 0,
          listLoading: true,
          temp: {}
        },
        frequencyList: [],
        jumpModeList: [{ id: '0', name: '手动跳转' }, { id: '1', name: '自动跳转' }],
        isuseList: [{ id: '0', name: '未完成' }, { id: '2', name: '部分完成' }, { id: '1', name: '全部完成' }]
      },
      tab3: {
        TMRNameList:[],
        table: {
          getdataListParm: {
            name: 'getStatisticsSL',
            page: 1,
            offset: 1,
            pagecount: '',
            returntype: 'Map',
            parammaps: {
              pastureid: Cookies.get('pastureid'),
              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
              stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
              inputDatetime: [new Date(), new Date()],
              inputDatetime2: new Date(),
              tmrtname: '',
              projname: '',
              times: '',
              templetname: '',
              fname: '',
              buttontype: '',
              isuse: ''
            }
          },
          tableKey: 1,
          list: [],
          total: 0,
          listLoading: true,
          temp: {}
        },
        frequencyList: [],
        jumpModeList: [{ id: '0', name: '手动跳转' }, { id: '1', name: '自动跳转' }],
        isuseList: [{ id: '0', name: '未完成' }, { id: '2', name: '部分完成' }, { id: '1', name: '全部完成' }]
      },
      titlefname: '',
      methodName:'',
      rowPid: '',
      optdevice:'',
      startTime:'',
      stopTime:'',
      error:'',
      isShowDialog: false,
      statisticalTypeList: [{ id: '7', name: '无分类' }, { id: '0', name: '驾驶员' }, { id: '1', name: '配方名称' }, { id: '2', name: '栏舍名称' }, { id: '3', name: '牲畜类别' }, { id: '4', name: '车次' }, { id: '5', name: 'TMR名称' }, { id: '6', name: '饲料' }],
      rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
      cellStyle: { padding: 0 + 'px' },
      exportList:{
        dialogFormVisible:false,
        inputDatetime: [new Date(), new Date()]
      },
      textMap: {
        exportList: '导出',
        recipeNameTxt:'配方修改记录',
        feedTxt:'饲料',
        fenceTxt:'栏舍',
        modificationRecord:'配方模板修改记录'
      },
      isokDisable:false,
      // search
      myHeight2: document.documentElement.clientHeight - 85 - 150,
      myHeightSecond: '',
      myHeightThird:'',
      recipeNameTemp2:{
        dialogStatus: '',
        dialogFormVisible: false,
        getdataListParm: {
          name: 'getFitHistory1', 'name1': 'getFitHistory2', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
          parammaps: { inputDatetime: [], pastureid: '', ftid: '' }
        },
        tableKey: 0, total: 0, listLoading: true, list: []
      },
      recipeNameTemp3:{
        dialogStatus: '',
        dialogFormVisible: false,
        getdataListParm: {
          name: 'getFitHistory1', 'name1': 'getFitHistory2', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
          parammaps: { inputDatetime: [], pastureid: '', fitid: '' }
        },
        tableKey: 0, total: 0, listLoading: true, list: []
      },
      feedTemp:{
        dialogStatus: '',
        dialogFormVisible: false,
        getdataListParm: {
          name: 'getFitHistory1', 'name1': 'getFitHistory2', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
          parammaps: { inputDatetime: [], pastureid: '', fitid: '' }
        },
        tableKey: 0, total: 0, listLoading: true, list: []
      },
      fenceTemp:{
        dialogStatus: '',
        dialogFormVisible: false,
        spanObj1: {},
        spanObj2: {},
        mergekeys1: ['createdate'],
        mergekeys2: ['createdate'],
        tab1:{
          getdataListParm: {
            name: 'getPlanModifyFPlist',page: 1, offset: 1, pagecount: '', returntype: 'Map',
            parammaps: { inputDatetime: [], pastureid: '', fitid: '' }
          },
          tableKey: 0, total: 0, listLoading: true, list: [],
        },
        tab2:{
          getdataListParm: {
            name: 'getPlanModifyFPlist', page: 1, offset: 1, pagecount: '', returntype: 'Map',
            parammaps: { inputDatetime: [], pastureid: '', fitid: '' }
          },
          tableKey: 0, total: 0, listLoading: true, list: [],
        },
        activeName:'first'
      },
      modificationRecordTemp:{
        dialogStatus: '',
        dialogFormVisible: false,
        tableKey1: 0, total1: 0, listLoading1: false, list1: [],
        tableKey2: 0, total2: 0, listLoading2: false, list2: [],
        temp1:{},
        temp2:{},
        lastdate:'',currentdate:'',
      },
    }
  },
  created() {
    this.getTimeFn()
    this.getAllYear()
    this.getIsDisplay()
    this.getTabList()
    this.getTabList2()
    this.getChart1()
    this.getChart2()
    this.getChart3()
    this.getChart4()
    this.getChart5()
    this.getChart6()
    this.getChart7()
  },
  mounted() {},
  methods: {
    getAllYear() {
      var myDate = new Date()
      var thisYear = myDate.getFullYear() // 获取当年年份
      var Section = thisYear - 2001 // 声明一个变量 获得当前年份至想获取年份差 eg.2008
      this.tab.yearList = [] // 声明一个空数组 把遍历出的年份添加到数组里
      for (var i = 0; i <= Section; i++) {
        this.tab.yearList.push(thisYear--)
      }
      console.log(this.tab.yearList)
    },
    changeAllYear() {
      console.log('this.selectYear==>', this.tab.selectYear)
      this.tab.weekList = []
      this.tab.selectWeek = []
      var myWeekList = whichWeek(this.tab.selectYear)
      console.log(myWeekList)
      if(myWeekList !== null){
        for (let i = 0; i <= myWeekList.length; i++) {
          var obj = {}
          var a = i + 1
          obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
          obj.id = i
          this.tab.weekList.push(obj)
        }
      }
    },
    changeAllSpecificDate() {
      var start = ''
      var end = ''
      if (this.tab.specificDate == '2') {
        this.tab.selectYear = parseTime(new Date(), '{y}')
        this.changeAllYear()
      } else if (this.tab.specificDate == '3') {
        start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
        end = parseTime(new Date(), '{y}-{m}-{d}')
        this.tab.chartMonth = []
        this.tab.chartMonth.push(start, end)
      }
    },
    handleAllDate() {
      console.log('点击了确认时间')
      MessageBox.confirm('是否调整以下所有图表查询时间?', {
        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
      }).then(() => {
        var startDate = ''
        var endDate = ''
        var status = ''
        if (this.tab.specificDate == '1') {
          startDate = parseTime(this.tab.chartDate[0], '{y}-{m}-{d}')
          endDate = parseTime(this.tab.chartDate[1], '{y}-{m}-{d}')
          this.tab.chart1.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
          this.tab.chart2.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
          this.tab.chart3.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
          this.tab.chart4.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
          this.tab.chart5.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
          this.tab.chart6.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
          this.tab.chart7.getdataListParm.parammaps.inputDatetime = [startDate, endDate]
          status = 0
          console.log('开始日时==>', startDate)
          console.log('结束日时==>', endDate)
        } else if (this.tab.specificDate == '2') {
          if (this.tab.selectYear == '') {
            this.$message({ type: 'error', message: '请输入年', duration: 2000 })
            return
          }
          if(this.tab.selectWeek !== null){
            if (this.tab.selectWeek.length !== 2) {
              this.$message({ type: 'error', message: '请输入查询开始周跟结束周', duration: 2000 })
              return
            }
          }
          startDate = this.tab.selectYear + '-' + whichWeek(this.tab.selectYear)[this.tab.selectWeek[0]].month + '-' + whichWeek(this.tab.selectYear)[this.tab.selectWeek[0]].date
          endDate = this.tab.selectYear + '-' + whichWeek(this.tab.selectYear)[this.tab.selectWeek[1]].last.month + '-' + whichWeek(this.tab.selectYear)[this.tab.selectWeek[1]].last.date
          status = 1
          this.tab.chart1.getdataListParm.parammaps.selectYear = this.tab.selectYear
          this.tab.chart1.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
          this.tab.chart1.getdataListParm.parammaps.weekList = this.tab.weekList
          this.tab.chart2.getdataListParm.parammaps.selectYear = this.tab.selectYear
          this.tab.chart2.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
          this.tab.chart2.getdataListParm.parammaps.weekList = this.tab.weekList
          this.tab.chart3.getdataListParm.parammaps.selectYear = this.tab.selectYear
          this.tab.chart3.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
          this.tab.chart3.getdataListParm.parammaps.weekList = this.tab.weekList
          this.tab.chart4.getdataListParm.parammaps.selectYear = this.tab.selectYear
          this.tab.chart4.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
          this.tab.chart4.getdataListParm.parammaps.weekList = this.tab.weekList
          this.tab.chart5.getdataListParm.parammaps.selectYear = this.tab.selectYear
          this.tab.chart5.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
          this.tab.chart5.getdataListParm.parammaps.weekList = this.tab.weekList
          this.tab.chart6.getdataListParm.parammaps.selectYear = this.tab.selectYear
          this.tab.chart6.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
          this.tab.chart6.getdataListParm.parammaps.weekList = this.tab.weekList
          this.tab.chart7.getdataListParm.parammaps.selectYear = this.tab.selectYear
          this.tab.chart7.getdataListParm.parammaps.selectWeek = this.tab.selectWeek
          this.tab.chart7.getdataListParm.parammaps.weekList = this.tab.weekList
          console.log('开始周时间==>', startDate)
          console.log('结束周时间==>', endDate)
        } else if (this.tab.specificDate == '3') {
          if(this.tab.chartMonth !== null){
            if (this.tab.chartMonth.length > 0) {
              startDate = this.tab.chartMonth[0]
              var dataArr = this.tab.chartMonth[1].substring(0, 7).split('-')
              let temp = new Date(dataArr[0],dataArr[1],0);
              let mm = temp.getDate(); //这里mm就是天数啦
              endDate = this.tab.chartMonth[1].substring(0, 8) + mm
              status = 2
              this.tab.chart1.getdataListParm.parammaps.chartMonth = [startDate, endDate]
              this.tab.chart2.getdataListParm.parammaps.chartMonth = [startDate, endDate]
              this.tab.chart3.getdataListParm.parammaps.chartMonth = [startDate, endDate]
              this.tab.chart4.getdataListParm.parammaps.chartMonth = [startDate, endDate]
              this.tab.chart5.getdataListParm.parammaps.chartMonth = [startDate, endDate]
              this.tab.chart6.getdataListParm.parammaps.chartMonth = [startDate, endDate]
              this.tab.chart7.getdataListParm.parammaps.chartMonth = [startDate, endDate]
              console.log('开始月时间==>', startDate)
              console.log('结束月时间==>', endDate)
            } else {
              this.$message({ type: 'error', message: '请输入月', duration: 2000 })
            }
          }
        }
        this.tab.chart1.getdataListParm.parammaps.specificDate = this.tab.specificDate
        this.tab.chart1.getdataListParm.parammaps.startTime = startDate
        this.tab.chart1.getdataListParm.parammaps.stopTime = endDate
        this.tab.chart1.getdataListParm.parammaps.status = status
        this.tab.chart2.getdataListParm.parammaps.startTime = startDate
        this.tab.chart2.getdataListParm.parammaps.stopTime = endDate
        this.tab.chart2.getdataListParm.parammaps.status = status
        this.tab.chart2.getdataListParm.parammaps.specificDate = this.tab.specificDate
        this.tab.chart3.getdataListParm.parammaps.startTime = startDate
        this.tab.chart3.getdataListParm.parammaps.stopTime = endDate
        this.tab.chart3.getdataListParm.parammaps.status = status
        this.tab.chart3.getdataListParm.parammaps.specificDate = this.tab.specificDate
        this.tab.chart4.getdataListParm.parammaps.startTime = startDate
        this.tab.chart4.getdataListParm.parammaps.stopTime = endDate
        this.tab.chart4.getdataListParm.parammaps.status = status
        this.tab.chart4.getdataListParm.parammaps.specificDate = this.tab.specificDate
        this.tab.chart5.getdataListParm.parammaps.startTime = startDate
        this.tab.chart5.getdataListParm.parammaps.stopTime = endDate
        this.tab.chart5.getdataListParm.parammaps.status = status
        this.tab.chart5.getdataListParm.parammaps.specificDate = this.tab.specificDate
        this.tab.chart6.getdataListParm.parammaps.startTime = startDate
        this.tab.chart6.getdataListParm.parammaps.stopTime = endDate
        this.tab.chart6.getdataListParm.parammaps.status = status
        this.tab.chart6.getdataListParm.parammaps.specificDate = this.tab.specificDate
        this.tab.chart7.getdataListParm.parammaps.startTime = startDate
        this.tab.chart7.getdataListParm.parammaps.stopTime = endDate
        this.tab.chart7.getdataListParm.parammaps.status = status
        this.tab.chart7.getdataListParm.parammaps.specificDate = this.tab.specificDate
        this.getChart1()
        this.getChart2()
        this.getChart3()
        this.getChart4()
        this.getChart5()
        this.getChart6()
        this.getChart7()
      })
    },
    changeChartSpecificDate(item) {
      var start = ''
      var end = ''
      if (item == 'chart1') {
        if (this.tab.chart1.getdataListParm.parammaps.specificDate == '2') {
          this.tab.chart1.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
          this.changeChartYear(item)
        } else if (this.tab.chart1.getdataListParm.parammaps.specificDate == '3') {
          start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
          end = parseTime(new Date(), '{y}-{m}-{d}')
          this.tab.chart1.getdataListParm.parammaps.weekList = []
          this.tab.chart1.getdataListParm.parammaps.chartMonth = []
          this.tab.chart1.getdataListParm.parammaps.chartMonth.push(start, end)
        }
      } else if (item == 'chart2') {
        if (this.tab.chart2.getdataListParm.parammaps.specificDate == '2') {
          this.tab.chart2.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
          this.changeChartYear(item)
        } else if (this.tab.chart2.getdataListParm.parammaps.specificDate == '3') {
          start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
          end = parseTime(new Date(), '{y}-{m}-{d}')
          this.tab.chart2.getdataListParm.parammaps.weekList = []
          this.tab.chart2.getdataListParm.parammaps.chartMonth = []
          this.tab.chart2.getdataListParm.parammaps.chartMonth.push(start, end)
        }
      } else if (item == 'chart3') {
        if (this.tab.chart3.getdataListParm.parammaps.specificDate == '2') {
          this.tab.chart3.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
          this.changeChartYear(item)
        } else if (this.tab.chart3.getdataListParm.parammaps.specificDate == '3') {
          start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
          end = parseTime(new Date(), '{y}-{m}-{d}')
          this.tab.chart3.getdataListParm.parammaps.weekList = []
          this.tab.chart3.getdataListParm.parammaps.chartMonth = []
          this.tab.chart3.getdataListParm.parammaps.chartMonth.push(start, end)
        }
      } else if (item == 'chart4') {
        if (this.tab.chart4.getdataListParm.parammaps.specificDate == '2') {
          this.tab.chart4.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
          this.changeChartYear(item)
        } else if (this.tab.chart4.getdataListParm.parammaps.specificDate == '3') {
          start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
          end = parseTime(new Date(), '{y}-{m}-{d}')
          this.tab.chart4.getdataListParm.parammaps.weekList = []
          this.tab.chart4.getdataListParm.parammaps.chartMonth = []
          this.tab.chart4.getdataListParm.parammaps.chartMonth.push(start, end)
        }
      } else if (item == 'chart5') {
        if (this.tab.chart5.getdataListParm.parammaps.specificDate == '2') {
          this.tab.chart5.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
          this.changeChartYear(item)
        } else if (this.tab.chart5.getdataListParm.parammaps.specificDate == '3') {
          start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
          end = parseTime(new Date(), '{y}-{m}-{d}')
          this.tab.chart5.getdataListParm.parammaps.weekList = []
          this.tab.chart5.getdataListParm.parammaps.chartMonth = []
          this.tab.chart5.getdataListParm.parammaps.chartMonth.push(start, end)
        }
      } else if (item == 'chart6') {
        if (this.tab.chart6.getdataListParm.parammaps.specificDate == '2') {
          this.tab.chart6.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
          this.changeChartYear(item)
        } else if (this.tab.chart6.getdataListParm.parammaps.specificDate == '3') {
          start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
          end = parseTime(new Date(), '{y}-{m}-{d}')
          this.tab.chart6.getdataListParm.parammaps.weekList = []
          this.tab.chart6.getdataListParm.parammaps.chartMonth = []
          this.tab.chart6.getdataListParm.parammaps.chartMonth.push(start, end)
        }
      } else if (item == 'chart7') {
        if (this.tab.chart7.getdataListParm.parammaps.specificDate == '2') {
          this.tab.chart7.getdataListParm.parammaps.selectYear = parseTime(new Date(), '{y}')
          this.changeChartYear(item)
        } else if (this.tab.chart7.getdataListParm.parammaps.specificDate == '3') {
          start = parseTime(new Date().setTime(new Date().getTime() - 3600 * 1000 * 24 * 31 * 12), '{y}-{m}') + '-01'
          end = parseTime(new Date(), '{y}-{m}-{d}')
          this.tab.chart7.getdataListParm.parammaps.weekList = []
          this.tab.chart7.getdataListParm.parammaps.chartMonth = []
          this.tab.chart7.getdataListParm.parammaps.chartMonth.push(start, end)
        }
      }
    },
    changeChartYear(item) {
      var myWeekList = ''
      if (item == 'chart1') {
        this.tab.chart1.getdataListParm.parammaps.weekList = []
        this.tab.chart1.getdataListParm.parammaps.selectWeek = []
        myWeekList = whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)
        console.log(myWeekList)
        if(myWeekList !== null){
          for (let i = 0; i <= myWeekList.length; i++) {
            var obj = {}
            var a = i + 1
            obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
            obj.id = i
            this.tab.chart1.getdataListParm.parammaps.weekList.push(obj)
          }
        }
      } else if (item == 'chart2') {
        this.tab.chart2.getdataListParm.parammaps.selectWeek = []
        this.tab.chart2.getdataListParm.parammaps.weekList = []
        myWeekList = whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)
        console.log(myWeekList)
        if(myWeekList !== null){
          for (let i = 0; i <= myWeekList.length; i++) {
            var obj = {}
            var a = i + 1
            obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
            obj.id = i
            this.tab.chart2.getdataListParm.parammaps.weekList.push(obj)
          }
        }
      } else if (item == 'chart3') {
        this.tab.chart3.getdataListParm.parammaps.selectWeek = []
        this.tab.chart3.getdataListParm.parammaps.weekList = []
        myWeekList = whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)
        console.log(myWeekList)
        if(myWeekList !== null){
          for (let i = 0; i <= myWeekList.length; i++) {
            var obj = {}
            var a = i + 1
            obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
            obj.id = i
            this.tab.chart3.getdataListParm.parammaps.weekList.push(obj)
          }
        }
      } else if (item == 'chart4') {
        this.tab.chart4.getdataListParm.parammaps.selectWeek = []
        this.tab.chart4.getdataListParm.parammaps.weekList = []
        myWeekList = whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)
        console.log(myWeekList)
        if(myWeekList !== null){
          for (let i = 0; i <= myWeekList.length; i++) {
            var obj = {}
            var a = i + 1
            obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
            obj.id = i
            this.tab.chart4.getdataListParm.parammaps.weekList.push(obj)
          }
        }
      } else if (item == 'chart5') {
        this.tab.chart5.getdataListParm.parammaps.selectWeek = []
        this.tab.chart5.getdataListParm.parammaps.weekList = []
        myWeekList = whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)
        console.log(myWeekList)
        if(myWeekList !== null){
          for (let i = 0; i <= myWeekList.length; i++) {
            var obj = {}
            var a = i + 1
            obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
            obj.id = i
            this.tab.chart5.getdataListParm.parammaps.weekList.push(obj)
          }
        }
      } else if (item == 'chart6') {
        this.tab.chart6.getdataListParm.parammaps.selectWeek = []
        this.tab.chart6.getdataListParm.parammaps.weekList = []
        myWeekList = whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)
        console.log(myWeekList)
        if(myWeekList !== null){
          for (let i = 0; i <= myWeekList.length; i++) {
            var obj = {}
            var a = i + 1
            obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
            obj.id = i
            this.tab.chart6.getdataListParm.parammaps.weekList.push(obj)
          }
        }
      } else if (item == 'chart7') {
        this.tab.chart7.getdataListParm.parammaps.selectWeek = []
        this.tab.chart7.getdataListParm.parammaps.weekList = []
        myWeekList = whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)
        console.log(myWeekList)
        if(myWeekList !== null){
          for (let i = 0; i <= myWeekList.length; i++) {
            var obj = {}
            var a = i + 1
            obj.name = '第' + a + '周(' + myWeekList[i].month + '.' + myWeekList[i].date + '~' + myWeekList[i].last.month + '.' + myWeekList[i].last.date + ')'
            obj.id = i
            this.tab.chart7.getdataListParm.parammaps.weekList.push(obj)
          }
        }
      }
    },
    handleChartDate(item) {
      console.log(item)
      var startDate = ''
      var endDate = ''
      if (item == 'chart1') {
        if (this.tab.chart1.getdataListParm.parammaps.specificDate == '1') {
          startDate = parseTime(this.tab.chart1.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
          endDate = parseTime(this.tab.chart1.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
          console.log('配方准确率开始日期==>', startDate)
          console.log('配方准确率结束日期==>', endDate)
          this.tab.chart1.getdataListParm.parammaps.status = 0
        } else if (this.tab.chart1.getdataListParm.parammaps.specificDate == '2') {
          if (this.tab.chart1.getdataListParm.parammaps.selectYear == '') {
            this.$message({ type: 'error', message: '请输入年', duration: 2000 })
            return
          }
          if(this.tab.chart1.getdataListParm.parammaps.selectWeek !== null){
            if (this.tab.chart1.getdataListParm.parammaps.selectWeek.length !== 2) {
              this.$message({ type: 'error', message: '请输入查询开始周跟结束周', duration: 2000 })
              return
            }
          }
          startDate = this.tab.chart1.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)[this.tab.chart1.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)[this.tab.chart1.getdataListParm.parammaps.selectWeek[0]].date
          endDate = this.tab.chart1.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)[this.tab.chart1.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart1.getdataListParm.parammaps.selectYear)[this.tab.chart1.getdataListParm.parammaps.selectWeek[1]].last.date
          console.log('配方准确率开始周日期==>', startDate)
          console.log('配方准确率结束周日期==>', endDate)
          this.tab.chart1.getdataListParm.parammaps.status = 1
        } else if (this.tab.chart1.getdataListParm.parammaps.specificDate == '3') {
          startDate = this.tab.chart1.getdataListParm.parammaps.chartMonth[0]
          endDate = this.tab.chart1.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
          console.log('配方准确率开始月日期==>', startDate)
          console.log('配方准确率结束月日期==>', endDate)
          this.tab.chart1.getdataListParm.parammaps.status = 2
        }
        this.tab.chart1.getdataListParm.parammaps.startTime = startDate
        this.tab.chart1.getdataListParm.parammaps.stopTime = endDate
        this.getChart1()
      } else if (item == 'chart2') {
        if (this.tab.chart2.getdataListParm.parammaps.specificDate == '1') {
          startDate = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
          endDate = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
          this.tab.chart2.getdataListParm.parammaps.status = 0
          console.log('计划统计开始日期==>', startDate)
          console.log('计划统计结束日期==>', endDate)
        } else if (this.tab.chart2.getdataListParm.parammaps.specificDate == '2') {
          if (this.tab.chart2.getdataListParm.parammaps.selectYear == '') {
            this.$message({ type: 'error', message: '请输入年', duration: 2000 })
            return
          }
          if (this.tab.chart2.getdataListParm.parammaps.selectWeek !== null) {
            if (this.tab.chart2.getdataListParm.parammaps.selectWeek.length !== 2) {
              this.$message({ type: 'error', message: '请输入查询开始周跟结束周', duration: 2000 })
              return
            }
          }
          startDate = this.tab.chart2.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)[this.tab.chart2.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)[this.tab.chart2.getdataListParm.parammaps.selectWeek[0]].date
          endDate = this.tab.chart2.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)[this.tab.chart2.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart2.getdataListParm.parammaps.selectYear)[this.tab.chart2.getdataListParm.parammaps.selectWeek[1]].last.date
          this.tab.chart2.getdataListParm.parammaps.status = 1
          console.log('计划统计开始周日期==>', startDate)
          console.log('计划统计结束周日期==>', endDate)
        } else if (this.tab.chart2.getdataListParm.parammaps.specificDate == '3') {
          console.log('计划统计开始月日期==>', this.tab.chart2.getdataListParm.parammaps.chartMonth)
          startDate = this.tab.chart2.getdataListParm.parammaps.chartMonth[0]
          endDate = this.tab.chart2.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
          this.tab.chart2.getdataListParm.parammaps.status = 2
          console.log('计划统计开始月日期==>', startDate)
          console.log('计划统计结束月日期==>', endDate)
        }
        this.tab.chart2.getdataListParm.parammaps.startTime = startDate
        this.tab.chart2.getdataListParm.parammaps.stopTime = endDate
        this.getChart2()
      } else if (item == 'chart3') {
        if (this.tab.chart3.getdataListParm.parammaps.specificDate == '1') {
          startDate = parseTime(this.tab.chart3.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
          endDate = parseTime(this.tab.chart3.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
          this.tab.chart3.getdataListParm.parammaps.status = 0
          console.log('牛群准确率开始日期==>', startDate)
          console.log('牛群准确率结束日期==>', endDate)
        } else if (this.tab.chart3.getdataListParm.parammaps.specificDate == '2') {
          if (this.tab.chart3.getdataListParm.parammaps.selectYear == '') {
            this.$message({ type: 'error', message: '请输入年', duration: 2000 })
            return
          }
          if (this.tab.chart3.getdataListParm.parammaps.selectWeek !== null) {
            if (this.tab.chart3.getdataListParm.parammaps.selectWeek.length !== 2) {
              this.$message({ type: 'error', message: '请输入查询开始周跟结束周', duration: 2000 })
              return
            }
          }
          startDate = this.tab.chart3.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)[this.tab.chart3.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)[this.tab.chart3.getdataListParm.parammaps.selectWeek[0]].date
          endDate = this.tab.chart3.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)[this.tab.chart3.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart3.getdataListParm.parammaps.selectYear)[this.tab.chart3.getdataListParm.parammaps.selectWeek[1]].last.date
          this.tab.chart3.getdataListParm.parammaps.status = 1
          console.log('牛群准确率开始周日期==>', startDate)
          console.log('牛群准确率结束周日期==>', endDate)
        } else if (this.tab.chart3.getdataListParm.parammaps.specificDate == '3') {
          startDate = this.tab.chart3.getdataListParm.parammaps.chartMonth[0]
          endDate = this.tab.chart3.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
          this.tab.chart3.getdataListParm.parammaps.status = 2
          console.log('牛群准确率开始月日期==>', startDate)
          console.log('牛群准确率结束月日期==>', endDate)
        }
        this.tab.chart3.getdataListParm.parammaps.startTime = startDate
        this.tab.chart3.getdataListParm.parammaps.stopTime = endDate
        this.getChart3()
      } else if (item == 'chart4') {
        if (this.tab.chart4.getdataListParm.parammaps.specificDate == '1') {
          startDate = parseTime(this.tab.chart4.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
          endDate = parseTime(this.tab.chart4.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
          this.tab.chart4.getdataListParm.parammaps.status = 0
          console.log('车辆准确率（重量）开始日期==>', startDate)
          console.log('车辆准确率（重量）结束日期==>', endDate)
        } else if (this.tab.chart4.getdataListParm.parammaps.specificDate == '2') {
          if (this.tab.chart4.getdataListParm.parammaps.selectYear == '') {
            this.$message({ type: 'error', message: '请输入年', duration: 2000 })
            return
          }
          if (this.tab.chart4.getdataListParm.parammaps.selectWeek !== null) {
            if (this.tab.chart4.getdataListParm.parammaps.selectWeek.length !== 2) {
              this.$message({ type: 'error', message: '请输入查询开始周跟结束周', duration: 2000 })
              return
            }
          }
          startDate = this.tab.chart4.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)[this.tab.chart4.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)[this.tab.chart4.getdataListParm.parammaps.selectWeek[0]].date
          endDate = this.tab.chart4.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)[this.tab.chart4.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart4.getdataListParm.parammaps.selectYear)[this.tab.chart4.getdataListParm.parammaps.selectWeek[1]].last.date
          this.tab.chart4.getdataListParm.parammaps.status = 1
          console.log('车辆准确率（重量）开始周日期==>', startDate)
          console.log('车辆准确率（重量）结束周日期==>', endDate)
        } else if (this.tab.chart4.getdataListParm.parammaps.specificDate == '3') {
          startDate = this.tab.chart4.getdataListParm.parammaps.chartMonth[0]
          endDate = this.tab.chart4.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
          this.tab.chart4.getdataListParm.parammaps.status = 2
          console.log('车辆准确率（重量）开始月日期==>', startDate)
          console.log('车辆准确率（重量）结束月日期==>', endDate)
        }
        this.tab.chart4.getdataListParm.parammaps.startTime = startDate
        this.tab.chart4.getdataListParm.parammaps.stopTime = endDate
        this.getChart4()
      } else if (item == 'chart5') {
        if (this.tab.chart5.getdataListParm.parammaps.specificDate == '1') {
          startDate = parseTime(this.tab.chart5.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
          endDate = parseTime(this.tab.chart5.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
          this.tab.chart5.getdataListParm.parammaps.status = 0
          console.log('混料统计开始日期==>', startDate)
          console.log('混料统计结束日期==>', endDate)
        } else if (this.tab.chart5.getdataListParm.parammaps.specificDate == '2') {
          if (this.tab.chart5.getdataListParm.parammaps.selectYear == '') {
            this.$message({ type: 'error', message: '请输入年', duration: 2000 })
            return
          }
          if (this.tab.chart5.getdataListParm.parammaps.selectWeek !== null) {
            if (this.tab.chart5.getdataListParm.parammaps.selectWeek.length !== 2) {
              this.$message({ type: 'error', message: '请输入查询开始周跟结束周', duration: 2000 })
              return
            }
          }
          startDate = this.tab.chart5.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)[this.tab.chart5.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)[this.tab.chart5.getdataListParm.parammaps.selectWeek[0]].date
          endDate = this.tab.chart5.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)[this.tab.chart5.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart5.getdataListParm.parammaps.selectYear)[this.tab.chart5.getdataListParm.parammaps.selectWeek[1]].last.date
          this.tab.chart5.getdataListParm.parammaps.status = 1
          console.log('混料统计开始周日期==>', startDate)
          console.log('混料统计结束周日期==>', endDate)
        } else if (this.tab.chart5.getdataListParm.parammaps.specificDate == '3') {
          startDate = this.tab.chart5.getdataListParm.parammaps.chartMonth[0]
          endDate = this.tab.chart5.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
          this.tab.chart5.getdataListParm.parammaps.status = 2
          console.log('混料统计开始月日期==>', startDate)
          console.log('混料统计结束月日期==>', endDate)
        }
        this.tab.chart5.getdataListParm.parammaps.startTime = startDate
        this.tab.chart5.getdataListParm.parammaps.stopTime = endDate
        this.getChart5()
      } else if (item == 'chart6') {
        if (this.tab.chart6.getdataListParm.parammaps.specificDate == '1') {
          startDate = parseTime(this.tab.chart6.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
          endDate = parseTime(this.tab.chart6.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
          this.tab.chart6.getdataListParm.parammaps.status = 0
          console.log('混料计划取消次数开始日期==>', startDate)
          console.log('混料计划取消次数结束日期==>', endDate)
        } else if (this.tab.chart6.getdataListParm.parammaps.specificDate == '2') {
          if (this.tab.chart6.getdataListParm.parammaps.selectYear == '') {
            this.$message({ type: 'error', message: '请输入年', duration: 2000 })
            return
          }
          if (this.tab.chart6.getdataListParm.parammaps.selectWeek !== null) {
            if (this.tab.chart6.getdataListParm.parammaps.selectWeek.length !== 2) {
              this.$message({ type: 'error', message: '请输入查询开始周跟结束周', duration: 2000 })
              return
            }
          }
          startDate = this.tab.chart6.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)[this.tab.chart6.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)[this.tab.chart6.getdataListParm.parammaps.selectWeek[0]].date
          endDate = this.tab.chart6.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)[this.tab.chart6.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart6.getdataListParm.parammaps.selectYear)[this.tab.chart6.getdataListParm.parammaps.selectWeek[1]].last.date
          this.tab.chart6.getdataListParm.parammaps.status = 1
          console.log('混料计划取消次数开始周日期==>', startDate)
          console.log('混料计划取消次数结束周日期==>', endDate)
        } else if (this.tab.chart6.getdataListParm.parammaps.specificDate == '3') {
          startDate = this.tab.chart6.getdataListParm.parammaps.chartMonth[0]
          endDate = this.tab.chart6.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
          this.tab.chart6.getdataListParm.parammaps.status = 2
          console.log('混料计划取消次数开始月日期==>', startDate)
          console.log('混料计划取消次数结束月日期==>', endDate)
        }
        this.tab.chart6.getdataListParm.parammaps.startTime = startDate
        this.tab.chart6.getdataListParm.parammaps.stopTime = endDate
        this.getChart6()
      } else if (item == 'chart7') {
        if (this.tab.chart7.getdataListParm.parammaps.specificDate == '1') {
          startDate = parseTime(this.tab.chart7.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
          endDate = parseTime(this.tab.chart7.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
          this.tab.chart7.getdataListParm.parammaps.status = 0
          console.log('栏舍撒料时间统计开始日期==>', startDate)
          console.log('栏舍撒料时间统计结束日期==>', endDate)
        } else if (this.tab.chart7.getdataListParm.parammaps.specificDate == '2') {
          if (this.tab.chart7.getdataListParm.parammaps.selectYear == '') {
            this.$message({ type: 'error', message: '请输入年', duration: 2000 })
            return
          }
          if (this.tab.chart7.getdataListParm.parammaps.selectWeek !== null) {
            if (this.tab.chart7.getdataListParm.parammaps.selectWeek.length !== 2) {
              this.$message({ type: 'error', message: '请输入查询开始周跟结束周', duration: 2000 })
              return
            }
          }
          startDate = this.tab.chart7.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)[this.tab.chart7.getdataListParm.parammaps.selectWeek[0]].month + '-' + whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)[this.tab.chart7.getdataListParm.parammaps.selectWeek[0]].date
          endDate = this.tab.chart7.getdataListParm.parammaps.selectYear + '-' + whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)[this.tab.chart7.getdataListParm.parammaps.selectWeek[1]].last.month + '-' + whichWeek(this.tab.chart7.getdataListParm.parammaps.selectYear)[this.tab.chart7.getdataListParm.parammaps.selectWeek[1]].last.date
          this.tab.chart7.getdataListParm.parammaps.status = 1
          console.log('栏舍撒料时间统计开始周日期==>', startDate)
          console.log('栏舍撒料时间统计结束周日期==>', endDate)
        } else if (this.tab.chart7.getdataListParm.parammaps.specificDate == '3') {
          startDate = this.tab.chart7.getdataListParm.parammaps.chartMonth[0]
          endDate = this.tab.chart7.getdataListParm.parammaps.chartMonth[1].substring(0, 8) + '31'
          this.tab.chart7.getdataListParm.parammaps.status = 2
          console.log('栏舍撒料时间统计开始月日期==>', startDate)
          console.log('栏舍撒料时间统计结束月日期==>', endDate)
        }
        this.tab.chart7.getdataListParm.parammaps.startTime = startDate
        this.tab.chart7.getdataListParm.parammaps.stopTime = endDate
        this.getChart7()
      }
    },
    getTimeFn() {
      const that = this
      const start = new Date()
      const end = new Date()
      const start2 = new Date()
      const end2 = new Date()
      start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
      end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 1)
      // that.tab.table.getdataListParm.parammaps.inputDatetime[0] = parseTime(start2, '{y}-{m}-{d}')
      // that.tab.table.getdataListParm.parammaps.inputDatetime[1] = parseTime(end2, '{y}-{m}-{d}')
      that.tab.table.getdataListParm.parammaps.startTime = parseTime(start2, '{y}-{m}-{d}')
      that.tab.table.getdataListParm.parammaps.stopTime = parseTime(end2, '{y}-{m}-{d}')
      that.tab.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
      that.tab.table2.getdataListParm.parammaps.startTime = parseTime(start2, '{y}-{m}-{d}')
      that.tab.table2.getdataListParm.parammaps.stopTime = parseTime(end2, '{y}-{m}-{d}')
      that.tab2.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
      // that.tab2.table.getdataListParm.parammaps.inputDatetime[0] = parseTime(start2, '{y}-{m}-{d}')
      // that.tab2.table.getdataListParm.parammaps.inputDatetime[1] = parseTime(end2, '{y}-{m}-{d}')
      that.tab2.table.getdataListParm.parammaps.startTime = parseTime(start2, '{y}-{m}-{d}')
      that.tab2.table.getdataListParm.parammaps.stopTime = parseTime(end2, '{y}-{m}-{d}')
      that.tab3.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
      // that.tab3.table.getdataListParm.parammaps.inputDatetime[0] = parseTime(start2, '{y}-{m}-{d}')
      // that.tab3.table.getdataListParm.parammaps.inputDatetime[1] = parseTime(end2, '{y}-{m}-{d}')
      that.tab3.table.getdataListParm.parammaps.startTime = parseTime(start2, '{y}-{m}-{d}')
      that.tab3.table.getdataListParm.parammaps.stopTime = parseTime(end2, '{y}-{m}-{d}')

      // start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 10)
      end.setTime(end.getTime() - 3600 * 1000 * 24 * 1)
      that.tab.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
      that.tab.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
      that.tab.chart1.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart1.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
      that.tab.chart1.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart1.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
      that.tab.chart2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
      that.tab.chart2.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart2.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')

      that.tab.chart3.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart3.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
      that.tab.chart3.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart3.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')

      that.tab.chart4.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart4.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
      that.tab.chart4.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart4.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')

      that.tab.chart5.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart5.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
      that.tab.chart5.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart5.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')

      that.tab.chart6.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart6.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
      that.tab.chart6.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart6.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')

      that.tab.chart7.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart7.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
      that.tab.chart7.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
      that.tab.chart7.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
    },
    getIsDisplay() {
      GetDataByName(this.maxTime.getMaxTimesParm).then(response => {
        if (response.data.list[0].inforvalue == 1) {
          this.tab2.frequencyList = [{ id: '1', name: '第一班' }]
          this.tab3.frequencyList = [{ id: '1', name: '第一班' }]
        } else if (response.data.list[0].inforvalue == 2) {
          this.tab2.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }]
          this.tab3.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }]
        } else if (response.data.list[0].inforvalue == 3) {
          this.tab2.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }]
          this.tab3.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }]
          this.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }]
        } else if (response.data.list[0].inforvalue == 4) {
          this.tab2.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }, { id: '4', name: '第四班' }]
          this.tab3.frequencyList = [{ id: '1', name: '第一班' }, { id: '2', name: '第二班' }, { id: '3', name: '第三班' }, { id: '4', name: '第四班' }]
        }
      })
    },
    // 导出
    handleDownload() {
      console.log(this.tab.table.list,'this.tab.table.list')
      if(this.tab.table.list == null){
        this.tab.table.list = []
      }
      if(this.tab.table2.list == null){
        this.tab.table2.list = []
      }
      if (this.tab.checked == true) {
        if (this.tab.radio == '0') {
          var excelDatas0 = [
            {
              tHeader: ['日期', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数', '混料正确率', '去除取消正确率', '标准差'],
              filterVal: ['计划时间', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数', '混料正确率', '去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['日期', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数', '撒料正确率', '去除取消正确率', '标准差'],
              filterVal: ['计划时间', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数', '撒料正确率', '去除取消正确率', '方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas0, '汇总统计—驾驶员', true, 'xlsx')
        } else if (this.tab.radio == '1') {
          var excelDatas = [
            {
              tHeader: ['日期', '配方名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数', '混料正确率', '去除取消正确率', '标准差'],
              filterVal: ['计划时间', '配方名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数', '混料正确率', '去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['日期', '配方名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数', '撒料正确率', '去除取消正确率', '标准差'],
              filterVal: ['计划时间', '配方名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数', '撒料正确率', '去除取消正确率', '方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas, '汇总统计—配方名称', true, 'xlsx')
        } else if (this.tab.radio == '2') {
          var excelDatas2 = [
            {
              tHeader: ['日期','栏舍名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差'],
              filterVal: ['计划时间','栏舍名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['日期','栏舍名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '标准差'],
              filterVal: ['计划时间','栏舍名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas2, '汇总统计-栏舍名称', true, 'xlsx')
        } else if (this.tab.radio == '3') {
          var excelDatas3 = [
            {
              tHeader: ['日期', '牲畜类别', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率','标准差'],
              filterVal: ['计划时间', '牲畜类别', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['日期', '牲畜类别', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '标准差'],
              filterVal: ['计划时间', '牲畜类别', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas3, '汇总统计-牲畜类别', true, 'xlsx')
        } else if (this.tab.radio == '4') {
          var excelDatas4 = [
            {
              tHeader: ['日期', 'TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差'],
              filterVal: ['计划时间','TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['日期', 'TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差'],
              filterVal: ['计划时间', 'TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas4, '汇总统计-车次', true, 'xlsx')
        } else if (this.tab.radio == '5') {
          var excelDatas4 = [
            {
              tHeader: ['日期','TMR名称','班次','车次', '驾驶员','理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '标准差'],
              filterVal: ['计划时间','TMR名称', '班次', '车次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['日期','TMR名称', '班次', '车次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数','撒料正确率','去除取消正确率','标准差'],
              filterVal: ['计划时间','TMR名称','班次', '车次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数','撒料正确率','去除取消正确率','方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas4, '汇总统计-TMR名称', true, 'xlsx')
        } else if (this.tab.radio == '6') {
          var excelDatas5 = [
            {
              tHeader: ['日期','饲料','理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '标准差'],
              filterVal: ['计划时间','fname', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            }
          ]
          json2excel(excelDatas5, '汇总统计-饲料', true, 'xlsx')
        }else if (this.tab.radio == '7') {
          var excelDatas7 = [
            {
              tHeader: ['日期','理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '标准差'],
              filterVal: ['计划时间','理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['日期','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数','撒料正确率','去除取消正确率','标准差'],
              filterVal: ['计划时间','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数','撒料正确率','去除取消正确率','方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas7, '汇总统计-无分类', true, 'xlsx')
        }
      } else {
        if (this.tab.radio == '0') {
          var excelDatas0 = [
            {
              tHeader: ['驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数', '混料正确率', '去除取消正确率', '标准差'],
              filterVal: ['驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数', '混料正确率', '去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数', '撒料正确率', '去除取消正确率', '标准差'],
              filterVal: ['驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数', '撒料正确率', '去除取消正确率', '方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas0, '汇总统计—驾驶员', true, 'xlsx')
        } else if (this.tab.radio == '1') {
          var excelDatas = [
            {
              tHeader: ['配方名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数', '混料正确率', '去除取消正确率', '标准差'],
              filterVal: ['配方名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数', '混料正确率', '去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['配方名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数', '撒料正确率', '去除取消正确率', '标准差'],
              filterVal: ['配方名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数', '撒料正确率', '去除取消正确率', '方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas, '汇总统计—配方名称', true, 'xlsx')
        } else if (this.tab.radio == '2') {
          var excelDatas2 = [
            {
              tHeader: ['栏舍名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差'],
              filterVal: ['栏舍名称', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['栏舍名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '标准差'],
              filterVal: ['栏舍名称', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas2, '汇总统计-栏舍名称', true, 'xlsx')
        } else if (this.tab.radio == '3') {
          var excelDatas3 = [
            {
              tHeader: ['牲畜类别', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率','标准差'],
              filterVal: ['牲畜类别', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['牲畜类别', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '标准差'],
              filterVal: ['牲畜类别', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas3, '汇总统计-牲畜类别', true, 'xlsx')
        } else if (this.tab.radio == '4') {
          var excelDatas4 = [
            {
              tHeader: ['TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差'],
              filterVal: ['TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差'],
              filterVal: ['TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas4, '汇总统计-车次', true, 'xlsx')
        }else if (this.tab.radio == '5') {
          var excelDatas5 = [
            {
              tHeader: ['TMR名称','班次','车次', '驾驶员','理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '标准差'],
              filterVal: ['TMR名称', '班次', '车次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['TMR名称', '班次', '车次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数','撒料正确率','去除取消正确率','标准差'],
              filterVal: ['TMR名称','班次', '车次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数','撒料正确率','去除取消正确率','方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas5, '汇总统计-TMR名称', true, 'xlsx')
        }else if (this.tab.radio == '6') {
          var excelDatas6 = [
            {
              tHeader: ['饲料','理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '标准差'],
              filterVal: ['fname', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            }
          ]
          json2excel(excelDatas6, '汇总统计-饲料', true, 'xlsx')
        }else if (this.tab.radio == '7') {
          var excelDatas7 = [
            {
              tHeader: ['理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '标准差'],
              filterVal: ['理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率', '方差'],
              tableDatas: this.tab.table.list,
              sheetName: '混料'
            },
            {
              tHeader: ['理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数','撒料正确率','去除取消正确率','标准差'],
              filterVal: ['理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数', '撒料正确数','撒料正确率','去除取消正确率','方差'],
              tableDatas: this.tab.table2.list,
              sheetName: '撒料'
            }
          ]
          json2excel(excelDatas7, '汇总统计-无分类', true, 'xlsx')
        }
      }
    },
    // 切换Tab
    handleTabClick() {
      if (this.activeName == 'first') {
        const start = new Date()
        const end = new Date()
        start.setTime(start.getTime() - 3600 * 1000 * 24 * 1)
        end.setTime(end.getTime() - 3600 * 1000 * 24 * 1)
        this.tab.table.getdataListParm.parammaps.inputDatetime = [start, end]
        this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
        this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
        this.tab.table2.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
        this.tab.table2.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
        this.tab.table.getdataListParm.parammaps.fname = ''
        this.tab.table.getdataListParm.parammaps.sort = ''
        this.tab.table.getdataListParm.parammaps.times = ''

        this.tab.table2.getdataListParm.parammaps.fname = ''
        this.tab.table2.getdataListParm.parammaps.sort = ''
        this.tab.table2.getdataListParm.parammaps.times = ''
        this.getTabList()
        this.getTabList2()
        this.getChart1()
        this.getChart2()
        this.getChart3()
        this.getChart4()
        this.getChart5()
        this.getChart6()
        this.getChart7()
        this.$nextTick(() => {
          this.$refs.plTable3.doLayout()
          this.$refs.plTable3.doLayout()
        })
      } else if (this.activeName == 'second') {
        this.$nextTick(()=>{
            this.myHeightSecond = document.documentElement.clientHeight - 40 - this.$refs.myHeightSecond.offsetHeight - 150
            const start2 = new Date()
            start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
            this.tab2.table.getdataListParm.parammaps.inputDatetime2 = start2
            this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
            this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
            this.tab2.table.getdataListParm.parammaps.tmrtname = ''
            this.tab2.table.getdataListParm.parammaps.projname = ''
            this.tab2.table.getdataListParm.parammaps.times = ''
            this.tab2.table.getdataListParm.parammaps.buttontype = ''
            this.tab2.table.getdataListParm.parammaps.templetname = ''
            this.getTab2List()
            this.getTMRNameList2()
            this.$nextTick(() => {
              this.$refs.plTable3.doLayout()
            })
        })
      } else if (this.activeName == 'third') {
        this.$nextTick(()=>{
          console.log(this.$refs.myHeightThird.offsetHeight,'myHeightThird')
          this.myHeightThird = document.documentElement.clientHeight - 40 - this.$refs.myHeightThird.offsetHeight - 150
          const start3 = new Date()
          start3.setTime(start3.getTime() - 3600 * 1000 * 24 * 1)
          this.tab3.table.getdataListParm.parammaps.inputDatetime2 = start3
          this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
          this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
          this.tab3.table.getdataListParm.parammaps.tmrtname = ''
          this.tab3.table.getdataListParm.parammaps.projname = ''
          this.tab3.table.getdataListParm.parammaps.times = ''
          this.tab3.table.getdataListParm.parammaps.templetname = ''
          this.tab3.table.getdataListParm.parammaps.buttontype = ''
          this.getTab3List()
          this.getTMRNameList3()
          this.$nextTick(() => {
            this.$refs.plTable3.doLayout()
          })
        })
      }

      this.$forceUpdate()
    },
    // 切换统计类型
    changeRadio() {
      this.tab.table.getdataListParm.parammaps.sort = ''
      this.tab.table.getdataListParm.parammaps.times = ''
      this.tab.table.getdataListParm.parammaps.fname = ''
      this.tab.table2.getdataListParm.parammaps.sort = ''
      this.tab.table2.getdataListParm.parammaps.times = ''
      this.tab.table2.getdataListParm.parammaps.fname = ''
      if (this.tab.radio == '0') {
        console.log('驾驶员')
        this.tab.isDriver = true
        this.tab.isFormulaName = false
        this.tab.isHouseName = false
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = false
        this.tab.isTMRName = false
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
      } else if (this.tab.radio == '1') {
        console.log('配方名称')
        this.tab.isDriver = false
        this.tab.isFormulaName = true
        this.tab.isHouseName = false
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = false
        this.tab.isTMRName = false
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
      } else if (this.tab.radio == '2') {
        console.log('栏舍名称')
        this.tab.isDriver = false
        this.tab.isFormulaName = false
        this.tab.isHouseName = true
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = false
        this.tab.isTMRName = false
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
      } else if (this.tab.radio == '3') {
        console.log(' 牲畜类别')
        this.tab.isDriver = false
        this.tab.isFormulaName = false
        this.tab.isHouseName = false
        this.tab.isLivestockType = true
        this.tab.isTrainNumber = false
        this.tab.isTMRName = false
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
      } else if (this.tab.radio == '4') {
        console.log('车次')
        this.tab.isDriver = false
        this.tab.isFormulaName = false
        this.tab.isHouseName = false
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = true
        this.tab.isTMRName = false
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
      } else if (this.tab.radio == '5') {
        console.log('TMR名称')
        this.tab.isDriver = false
        this.tab.isFormulaName = false
        this.tab.isHouseName = false
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = false
        this.tab.isTMRName = true
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
        this.getTMRNameList()
      } else if (this.tab.radio == '6') {
        console.log('饲料')
        this.tab.isDriver = false
        this.tab.isFormulaName = false
        this.tab.isHouseName = false
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = false
        this.tab.isTMRName = false
        this.tab.isFeed = true
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
      } else if (this.tab.radio == '7') {
        console.log('无分类')
        this.tab.isDriver = false
        this.tab.isFormulaName = false
        this.tab.isHouseName = false
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = false
        this.tab.isTMRName = false
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()

      }
    },
    // 按日期统计
    changeChecked() {
      console.log(this.tab.checked)
      this.form_search()
    },
    // 汇总统计/混料
    getTabList() {
      this.tab.table.listLoading = true
      this.tab.table.getdataListParm.parammaps.status = this.tab.radio
      this.tab.table.getdataListParm.parammaps.genre = 0
      if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
        this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
        this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
      } else {
        this.tab.table.getdataListParm.parammaps.inputDatetime = ''
        this.tab.table.getdataListParm.parammaps.startTime = ''
        this.tab.table.getdataListParm.parammaps.stopTime = ''
      }
      let url = 'authdata/summary'
      let data = {}
      if(this.tab.checked ==false){
        this.tab.table.getdataListParm.parammaps.isdate = 0
      }else{
        this.tab.table.getdataListParm.parammaps.isdate = 1
      }
      data.parammaps = this.tab.table.getdataListParm.parammaps
      postJson(url, data).then(response => {
        if (response.data !== null) {
          console.log('汇总统计/混料table数据', response.data.list)
          this.tab.table.list = response.data.list
          this.tab.table.total = response.data.total
        } else {
          this.tab.table.list = []
          this.tab.table.total = 0
        }

        setTimeout(() => {
          this.tab.table.listLoading = false
        }, 100)
      })
    },
    // 汇总统计/撒料
    getTabList2() {
      this.tab.table2.listLoading = true
      this.tab.table2.getdataListParm.parammaps.status = this.tab.radio
      this.tab.table2.getdataListParm.parammaps.genre = 1
      this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
      this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
      this.tab.table2.getdataListParm.parammaps.hlwc1 = this.tab.table.getdataListParm.parammaps.hlwc1
      this.tab.table2.getdataListParm.parammaps.hlwc2 = this.tab.table.getdataListParm.parammaps.hlwc2
      this.tab.table2.getdataListParm.parammaps.hlzq1 = this.tab.table.getdataListParm.parammaps.hlzq1
      this.tab.table2.getdataListParm.parammaps.hlzq2 = this.tab.table.getdataListParm.parammaps.hlzq2
      this.tab.table2.getdataListParm.parammaps.hlzql1 = this.tab.table.getdataListParm.parammaps.hlzql1
      this.tab.table2.getdataListParm.parammaps.hlzql2 = this.tab.table.getdataListParm.parammaps.hlzql2
      this.tab.table2.getdataListParm.parammaps.slwc1 = this.tab.table.getdataListParm.parammaps.slwc1
      this.tab.table2.getdataListParm.parammaps.slwc2 = this.tab.table.getdataListParm.parammaps.slwc2
      this.tab.table2.getdataListParm.parammaps.slzq1 = this.tab.table.getdataListParm.parammaps.slzq1
      this.tab.table2.getdataListParm.parammaps.slzq2 = this.tab.table.getdataListParm.parammaps.slzq2
      this.tab.table2.getdataListParm.parammaps.slzql1 = this.tab.table.getdataListParm.parammaps.slzql1
      this.tab.table2.getdataListParm.parammaps.slzql2 = this.tab.table.getdataListParm.parammaps.slzql2
      this.tab.table2.getdataListParm.parammaps.error = this.tab.table.getdataListParm.parammaps.error
      let url = 'authdata/summary'
      let data = {}
      if(this.tab.checked ==false){
        this.tab.table2.getdataListParm.parammaps.isdate = 0
      }else{
        this.tab.table2.getdataListParm.parammaps.isdate = 1
      }
      data.parammaps = this.tab.table2.getdataListParm.parammaps
      postJson(url, data).then(response => {
        if (response.data !== null) {
          console.log('汇总统计/撒料table数据', response.data.list)
          this.tab.table2.list = response.data.list
          this.tab.table2.total = response.data.total
        } else {
          this.tab.table2.list = []
          this.tab.table2.total = 0
        }
        setTimeout(() => {
          this.tab.table2.listLoading = false
        }, 100)
      })
    },
    // 查询
    form_search() {
      if (this.tab.radio == '0') {
        console.log('驾驶员/查询111')
        this.tab.isDriver = true
        this.tab.isFormulaName = false
        this.tab.isHouseName = false
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = false
        this.tab.isTMRName = false
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
      } else if (this.tab.radio == '1') {
        console.log('配方名称/查询111')
        this.tab.isDriver = false
        this.tab.isFormulaName = true
        this.tab.isHouseName = false
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = false
        this.tab.isTMRName = false
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
      } else if (this.tab.radio == '2') {
        console.log('栏舍名称/查询')
        this.tab.isDriver = false
        this.tab.isFormulaName = false
        this.tab.isHouseName = true
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = false
        this.tab.isTMRName = false
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
      } else if (this.tab.radio == '3') {
        console.log(' 牲畜类别/查询')
        this.tab.isDriver = false
        this.tab.isFormulaName = false
        this.tab.isHouseName = false
        this.tab.isLivestockType = true
        this.tab.isTrainNumber = false
        this.tab.isTMRName = false
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
      } else if (this.tab.radio == '4') {
        console.log('车次/查询')
        this.tab.isDriver = false
        this.tab.isFormulaName = false
        this.tab.isHouseName = false
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = true
        this.tab.isTMRName = false
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
      } else if (this.tab.radio == '5') {
        console.log('TMR名称/查询')
        this.tab.isDriver = false
        this.tab.isFormulaName = false
        this.tab.isHouseName = false
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = false
        this.tab.isTMRName = true
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
        this.getTMRNameList()
      }else if(this.tab.radio == '6'){
        this.tab.isDriver = false
        this.tab.isFormulaName = false
        this.tab.isHouseName = false
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = false
        this.tab.isTMRName = false
        this.tab.isFeed = true
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
      }else if(this.tab.radio == '7'){
        this.tab.isDriver = false
        this.tab.isFormulaName = false
        this.tab.isHouseName = false
        this.tab.isLivestockType = false
        this.tab.isTrainNumber = false
        this.tab.isTMRName = false
        this.tab.isFeed = false
        this.tab.table.getdataListParm.offset = 1
        this.getTabList()
        this.tab.table2.getdataListParm.offset = 1
        this.getTabList2()
      }
      this.tab.table2.getdataListParm.parammaps.fname = this.tab.table.getdataListParm.parammaps.fname
    },
    handleRefresh1(){
      this.tab.table.getdataListParm.parammaps.fname = ''
      this.tab.table.getdataListParm.parammaps.projname = ''
      this.tab.table.getdataListParm.parammaps.times = ''
      this.tab.table.getdataListParm.parammaps.hlwc1 = undefined
      this.tab.table.getdataListParm.parammaps.hlwc2 = undefined
      this.tab.table.getdataListParm.parammaps.hlzq1 = undefined
      this.tab.table.getdataListParm.parammaps.hlzq2 = undefined
      this.tab.table.getdataListParm.parammaps.hlzql1 = undefined
      this.tab.table.getdataListParm.parammaps.hlzql2 = undefined
      this.tab.table.getdataListParm.parammaps.slwc1 = undefined
      this.tab.table.getdataListParm.parammaps.slwc2 = undefined
      this.tab.table.getdataListParm.parammaps.slzq1 = undefined
      this.tab.table.getdataListParm.parammaps.slzq2 = undefined
      this.tab.table.getdataListParm.parammaps.slzql1 = undefined
      this.tab.table.getdataListParm.parammaps.slzql2 = undefined
      this.tab.table.getdataListParm.parammaps.error = false
      this.form_search()
    },
    handleBefore() {
      this.$forceUpdate()
      if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
        var start = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
        var stop = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
        if (stop > Date.now() - 8.64e7) {
          this.Nextdisabled = true
          this.Beforedisabled = false
        } else {
          this.Nextdisabled = false
          this.Beforedisabled = false
        }
        this.tab.table.getdataListParm.parammaps.inputDatetime = []
        this.tab.table.getdataListParm.parammaps.inputDatetime.length = 0
        this.tab.table.getdataListParm.parammaps.inputDatetime.push(start, stop)
        this.$forceUpdate()
      }
      this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
      this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
      this.getTabList()
      this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
      this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
      this.getTabList2()
      this.getTMRNameList()
    },
    handleNext() {
      this.$forceUpdate()
      if (this.tab.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab.table.getdataListParm.parammaps.inputDatetime !== null) {
        var start2 = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
        var stop2 = new Date(this.tab.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
        if (stop2 > Date.now() - 8.64e7) {
          this.Nextdisabled = true
          this.Beforedisabled = false
        } else {
          this.Nextdisabled = false
          this.Beforedisabled = false
        }
        this.tab.table.getdataListParm.parammaps.inputDatetime = []
        this.tab.table.getdataListParm.parammaps.inputDatetime.length = 0
        this.tab.table.getdataListParm.parammaps.inputDatetime.push(start2, stop2)
        this.$forceUpdate()
      }
      this.tab.table.getdataListParm.parammaps.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
      this.tab.table.getdataListParm.parammaps.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
      this.getTabList()
      this.tab.table2.getdataListParm.parammaps.startTime = this.tab.table.getdataListParm.parammaps.startTime
      this.tab.table2.getdataListParm.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
      this.getTabList2()
      this.getTMRNameList()
    },
    handleBefore2() {
      this.$forceUpdate()
      if (this.tab2.table.getdataListParm.parammaps.inputDatetime2 !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime2 !== null) {
        var start3 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime2.setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime2.getDate() - 1))
        if (start3 > Date.now() - 8.64e7) {
          this.Nextdisabled2 = true
          this.Beforedisabled2 = false
        } else {
          this.Nextdisabled2 = false
          this.Beforedisabled2 = false
        }
        this.tab2.table.getdataListParm.parammaps.inputDatetime2 = start3
        this.$forceUpdate()
      }
      this.tab2.table.getdataListParm.parammaps.startTime = parseTime(start3, '{y}-{m}-{d}')
      this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(start3, '{y}-{m}-{d}')
      this.getTab2List()
      this.getTMRNameList2()
    },
    handleNext2() {
      if (this.tab2.table.getdataListParm.parammaps.inputDatetime2 !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime2 !== null) {
        var start4 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime2.setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime2.getDate() + 1))
        if (start4 > Date.now() - 8.64e7) {
          this.Nextdisabled2 = true
          this.Beforedisabled2 = false
        } else {
          this.Nextdisabled2 = false
          this.Beforedisabled2 = false
        }
        this.tab2.table.getdataListParm.parammaps.inputDatetime2 = start4
        this.$forceUpdate()
      }
      this.tab2.table.getdataListParm.parammaps.startTime = parseTime(start4, '{y}-{m}-{d}')
      this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(start4, '{y}-{m}-{d}')
      this.getTab2List()
      this.getTMRNameList2()
    },
    handleBefore3() {
      this.$forceUpdate()
      if (this.tab3.table.getdataListParm.parammaps.inputDatetime2 !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime2 !== null) {
      var start3 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime2.setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime2.getDate() - 1))
        if (start3 > Date.now() - 8.64e7) {
          this.Nextdisabled3 = true
          this.Beforedisabled3 = false
        } else {
          this.Nextdisabled3 = false
          this.Beforedisabled3 = false
        }
        this.tab3.table.getdataListParm.parammaps.inputDatetime2 = start3
        this.$forceUpdate()
      }
      this.tab3.table.getdataListParm.parammaps.startTime = parseTime(start3, '{y}-{m}-{d}')
      this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(start3, '{y}-{m}-{d}')
      this.getTab3List()
      this.getTMRNameList3()
    },
    handleNext3() {
      if (this.tab3.table.getdataListParm.parammaps.inputDatetime2 !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime2 !== null) {
        var start4 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime2.setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime2.getDate() + 1))
        if (start4 > Date.now() - 8.64e7) {
          this.Nextdisabled3 = true
          this.Beforedisabled3 = false
        } else {
          this.Nextdisabled3 = false
          this.Beforedisabled3 = false
        }
        this.tab3.table.getdataListParm.parammaps.inputDatetime2 = start4
        this.$forceUpdate()
      }
      this.tab3.table.getdataListParm.parammaps.startTime = parseTime(start4, '{y}-{m}-{d}')
      this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(start4, '{y}-{m}-{d}')
      this.getTab3List()
      this.getTMRNameList3()
    },
    // 快速跳转到图表
    handleQuickJumpChart() {
      var myHeight = document.getElementById('table').offsetHeight + 120
      window.scrollTo(myHeight, myHeight)
    },
    // 快速回到顶部
    handleQuickJumpTop() {
      window.scrollTo(0, 0)
    },
    // 配方准确率
    changeStatisticChart1(arr) {
      var arr1 = []
      if(arr !== null){
        for (let i = 0; i < arr.length; i++) {
          if (arr[i] !== 'all') {
            arr1.push(arr[i])
          }
        }
      }
      this.tab.chart1.getdataListParm.parammaps.statisticsList = arr1
      var arrData3 = []
      if(this.tab.chart1.getdataListParm.parammaps.statisticsList !== null){
        for (let i = 0; i < this.tab.chart1.getdataListParm.parammaps.statisticsList.length; i++) {
          const myId = this.tab.chart1.statisticsList.find(obj => obj.name == this.tab.chart1.getdataListParm.parammaps.statisticsList[i]).id
          if(this.tab.chart1.chart1Data3 !== null){
            for (let j = 0; j < this.tab.chart1.chart1Data3.length; j++) {
              if (j == myId) {
                arrData3.push(this.tab.chart1.chart1Data3[j])
              }
            }
          }
        }
      }
      this.tab.chart1.chartLine_data.data3 = arrData3
      this.tab.chart1.chartLine_data.data1 = this.tab.chart1.getdataListParm.parammaps.statisticsList
      this.roadChartLine1(this.tab.chart1.chartLine_data)
    },
    // 配方准确率
    getChart1() {
      this.tab.chart1.listLoading = true
      const url = 'authdata/chart/accuracyAllFT'
      const data = {}
      data.parammaps = {}
      if (this.tab.chart2.getdataListParm.parammaps.specificDate == '1') {
        data.parammaps.pastureid = this.tab.chart2.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
        data.parammaps.stopTime = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
        data.parammaps.status = this.tab.chart2.getdataListParm.parammaps.status
      } else {
        data.parammaps.pastureid = this.tab.chart2.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = this.tab.chart2.getdataListParm.parammaps.startTime
        data.parammaps.stopTime = this.tab.chart2.getdataListParm.parammaps.stopTime
        data.parammaps.status = this.tab.chart2.getdataListParm.parammaps.status
      }
      postJson(url, data).then(response => {
        if (response.data !== null && response.data.list !== null && response.data.data !== null) {
          for (let i = 0; i < response.data.data.length; i++) {
            for (let i = 0; i < response.data.data.length; i++) {
              if (response.data.data[i].准确率 !== '' && response.data.data[i].准确率 !== undefined) {
                response.data.data[i].准确率 = parseFloat(response.data.data[i].准确率) + '%'
              }
              if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
                response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
              }
              if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
                response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
              }
            }
          }
          this.tab.chart1.table.list = response.data.data
          this.tab.chart1.chartLine_data = response.data.list
          this.tab.chart1.statisticsList = []
          this.tab.chart1.getdataListParm.parammaps.statisticsList = []
          if(response.data.list.data1 !== null){
            for (let i = 0; i < response.data.list.data1.length; i++) {
              this.tab.chart1.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
              var obj = {}
              obj.id = i
              obj.name = response.data.list.data1[i]
              this.tab.chart1.statisticsList.push(obj)
            }
          }

          console.log(this.tab.chart1.statisticsList, '配方准确率下拉内容')
          this.tab.chart1.chart1Data3 = response.data.list.data3
          this.tab.chart1.total = response.data.total
          console.log('配方准确率表数据', this.tab.chart1.table.list)
          console.log('配方准确率图数据', this.tab.chart1.chartLine_data)
          var arrData3 = []
          if(this.tab.chart1.getdataListParm.parammaps.statisticsList !== null){
            for (let i = 0; i < this.tab.chart1.getdataListParm.parammaps.statisticsList.length; i++) {
              const myId = this.tab.chart1.statisticsList.find(obj => obj.name == this.tab.chart1.getdataListParm.parammaps.statisticsList[i]).id
              if(this.tab.chart1.chart1Data3 !== null){
                for (let j = 0; j < this.tab.chart1.chart1Data3.length; j++) {
                  if (j == myId) {
                    this.tab.chart1.chart1Data3[j].checkedState = true
                    arrData3.push(this.tab.chart1.chart1Data3[j])
                  }
                }
              }
            }
          }
          this.tab.chart1.chartLine_data.data3 = arrData3
          this.tab.chart1.chartLine_data.data1 = this.tab.chart1.getdataListParm.parammaps.statisticsList
          this.roadChartLine1(this.tab.chart1.chartLine_data)
        } else {
          this.tab.chart1.list = []
        }
        setTimeout(() => {
          this.tab.chart1.listLoading = false
        }, 100)
      })
    },
    roadChartLine1(chartLine_data) {
      if (this.tab.chart1.chartLine != null) {
        this.tab.chart1.chartLine.dispose()
      }
      this.tab.chart1.chartLine = echarts.init(document.getElementById('chartLine1'))
      var option = {
        title: {
          text: ''
        },
        tooltip: {
          trigger: 'axis'
        },
        legend: {
          data: chartLine_data.data1,
          right: 10, show: true, type: 'scroll'
        },
        grid: {
          top: '20%',
          left: '5%',
          right: '8%',
          containLabel: true
        },
        toolbox: {
          show: true,
          right: '2%',
          feature: {}
        },
        xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
        yAxis: {
          type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
        },
        series: (function() {
          var serie = []
          if(chartLine_data.data3 !== null){
            for (var i = 0; i < chartLine_data.data3.length; i++) {
              var item = {
                name: chartLine_data.data1[i],
                type: 'line',
                data: chartLine_data.data3[i].data
              }
              serie.push(item)
            }
          }
          return serie
        }())
      }
      this.tab.chart1.chartLine.setOption(option)
      window.onresize = ()=> {
        this.tab.chart1.chartLine.resize()
      }
    },

    // 计划统计
    getChart2() {
      this.tab.chart2.listLoading = true
      const url = 'authdata/chart/accuracyAllJH'
      const data = {}
      data.parammaps = {}
      if (this.tab.chart2.getdataListParm.parammaps.specificDate == '1') {
        data.parammaps.pastureid = this.tab.chart2.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
        data.parammaps.stopTime = parseTime(this.tab.chart2.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
        data.parammaps.status = this.tab.chart2.getdataListParm.parammaps.status
      } else {
        data.parammaps.pastureid = this.tab.chart2.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = this.tab.chart2.getdataListParm.parammaps.startTime
        data.parammaps.stopTime = this.tab.chart2.getdataListParm.parammaps.stopTime
        data.parammaps.status = this.tab.chart2.getdataListParm.parammaps.status
      }
      postJson(url, data).then(response => {
        if (response.data !== null && response.data.list !== null && response.data.data !== null) {
          for (let i = 0; i < response.data.data.length; i++) {
            if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
              response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
            }
            if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
              response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
            }
            if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
              response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
            }
            if (response.data.data[i].计划取消重量 !== '' && response.data.data[i].计划取消重量 !== undefined) {
              response.data.data[i].计划取消重量 = parseFloat(response.data.data[i].计划取消重量)
            }
            if (response.data.data[i].field3 !== '' && response.data.data[i].field3 !== undefined) {
              response.data.data[i].field3 = parseFloat(response.data.data[i].field3)
            }
            if (response.data.data[i].正确数 !== '' && response.data.data[i].正确数 !== undefined) {
              response.data.data[i].正确数 = parseFloat(response.data.data[i].正确数)
            }
            if (response.data.data[i].计划数 !== '' && response.data.data[i].计划数 !== undefined) {
              response.data.data[i].计划数 = parseFloat(response.data.data[i].计划数)
            }
            if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
              response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
            }
          }
          this.tab.chart2.table.list = response.data.data
          this.tab.chart2.chartLine_data = response.data.list
          this.tab.chart2.total = response.data.total
          console.log('计划统计图数据', this.tab.chart2.chartLine_data)
          console.log('计划统计表数据', this.tab.chart2.table.list)
          this.roadChartLine2(this.tab.chart2.chartLine_data)
        } else {
          this.tab.chart2.list = []
        }
        setTimeout(() => {
          this.tab.chart2.listLoading = false
        }, 100)
      })
    },
    roadChartLine2(chartLine_data) {
      if (this.tab.chart2.chartLine != null) {
        this.tab.chart2.chartLine.dispose()
      }
      this.tab.chart2.chartLine = echarts.init(document.getElementById('chartLine2'))
      var option = {
        title: {
          text: ''
        },
        tooltip: {
          trigger: 'axis'
        },
        legend: {
          data: ['计划准确率', '计划正确率', '计划准确率（去除取消重量）'],
          right: 10
        },
        grid: {
          top: '20%',
          left: '5%',
          right: '8%',
          containLabel: true
        },
        toolbox: {
          show: true,
          right: '2%',
          feature: {}
        },
        xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data1, name: '日期' },
        yAxis: {
          type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
        },
        series: [
          { name: '计划准确率', type: 'line', data: chartLine_data.data2 },
          { name: '计划正确率', type: 'line', data: chartLine_data.data3 },
          { name: '计划准确率（去除取消重量）', type: 'line', data: chartLine_data.data4 }
        ]
      }
      this.tab.chart2.chartLine.setOption(option)
      window.onresize = ()=> {
        this.tab.chart2.chartLine.resize()
      }
    },

    // 牛群准确率
    changeStatisticChart3(arr) {
      var arr1 = []
      for (let i = 0; i < arr.length; i++) {
        if (arr[i] !== 'all') {
          arr1.push(arr[i])
        }
      }
      this.tab.chart3.getdataListParm.parammaps.statisticsList = arr1
      var arrData3 = []
      for (let i = 0; i < this.tab.chart3.getdataListParm.parammaps.statisticsList.length; i++) {
        const myId = this.tab.chart3.statisticsList.find(obj => obj.name == this.tab.chart3.getdataListParm.parammaps.statisticsList[i]).id
        for (let j = 0; j < this.tab.chart3.chart3Data3.length; j++) {
          if (j == myId) {
            arrData3.push(this.tab.chart3.chart3Data3[j])
          }
        }
      }
      this.tab.chart3.chartLine_data.data3 = arrData3
      this.tab.chart3.chartLine_data.data1 = this.tab.chart3.getdataListParm.parammaps.statisticsList
      this.roadChartLine3(this.tab.chart3.chartLine_data)
    },
    // 牛群准确率
    getChart3() {
      this.tab.chart3.listLoading = true
      const url = 'authdata/chart/accuracyAllNQ'
      const data = {}
      data.parammaps = {}
      if (this.tab.chart3.getdataListParm.parammaps.specificDate == '1') {
        data.parammaps.pastureid = this.tab.chart3.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = parseTime(this.tab.chart3.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
        data.parammaps.stopTime = parseTime(this.tab.chart3.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
        data.parammaps.status = this.tab.chart3.getdataListParm.parammaps.status
      } else {
        data.parammaps.pastureid = this.tab.chart3.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = this.tab.chart3.getdataListParm.parammaps.startTime
        data.parammaps.stopTime = this.tab.chart3.getdataListParm.parammaps.stopTime
        data.parammaps.status = this.tab.chart3.getdataListParm.parammaps.status
      }
      postJson(url, data).then(response => {
        if (response.data !== null && response.data.list !== null && response.data.data !== null) {
          for (let i = 0; i < response.data.data.length; i++) {
            if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
              response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
            }
            if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
              response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
            }
            if (response.data.data[i].准确率 !== '' && response.data.data[i].准确率 !== undefined) {
              response.data.data[i].准确率 = parseFloat(response.data.data[i].准确率) + '%'
            }
          }
          this.tab.chart3.table.list = response.data.data
          this.tab.chart3.chartLine_data = response.data.list
          this.tab.chart3.total = response.data.total
          this.tab.chart3.statisticsList = []
          this.tab.chart3.getdataListParm.parammaps.statisticsList = []
          for (let i = 0; i < response.data.list.data1.length; i++) {
            // if (i < 10) {
              this.tab.chart3.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
            // }
            var obj = {}
            obj.id = i
            obj.name = response.data.list.data1[i]
            this.tab.chart3.statisticsList.push(obj)
          }
          this.tab.chart3.chart3Data3 = response.data.list.data3
          this.tab.chart3.total = response.data.total
          console.log('牛群准确率图数据', this.tab.chart3.chartLine_data)
          console.log('牛群准确率表数据', this.tab.chart3.table.list)
          var arrData3 = []
          for (let i = 0; i < this.tab.chart3.getdataListParm.parammaps.statisticsList.length; i++) {
            const myId = this.tab.chart3.statisticsList.find(obj => obj.name == this.tab.chart3.getdataListParm.parammaps.statisticsList[i]).id
            for (let j = 0; j < this.tab.chart3.chart3Data3.length; j++) {
              if (j == myId) {
                arrData3.push(this.tab.chart3.chart3Data3[j])
              }
            }
          }
          this.tab.chart3.chartLine_data.data3 = arrData3
          this.tab.chart3.chartLine_data.data1 = this.tab.chart3.getdataListParm.parammaps.statisticsList
          this.roadChartLine3(this.tab.chart3.chartLine_data)
        } else {
          this.tab.chart3.list = []
        }
        setTimeout(() => {
          this.tab.chart3.listLoading = false
        }, 100)
      })
    },
    roadChartLine3(chartLine_data) {
      if (this.tab.chart3.chartLine != null) {
        this.tab.chart3.chartLine.dispose()
      }
      this.tab.chart3.chartLine = echarts.init(document.getElementById('chartLine3'))
      var option = {
        title: {
          text: ''
        },
        tooltip: {
          trigger: 'axis'
        },
        legend: {
          data: chartLine_data.data1,
          right: 10, show: true, type: 'scroll'
        },
        grid: {
          top: '20%',
          left: '5%',
          right: '8%',
          containLabel: true
        },
        toolbox: {
          show: true,
          right: '2%',
          feature: {}
        },
        xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
        yAxis: {
          type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
        },
        series: (function() {
          var serie = []
          for (var i = 0; i < chartLine_data.data3.length; i++) {
            var item = {
              name: chartLine_data.data1[i],
              type: 'line',
              data: chartLine_data.data3[i].data
            }
            serie.push(item)
          }
          return serie
        }())
      }
      this.tab.chart3.chartLine.setOption(option)
      window.onresize = ()=> {
        this.tab.chart3.chartLine.resize()
      }
    },

    // 车辆准确率（重量）
    changeStatisticChart4(arr) {
      var arr1 = []
      for (let i = 0; i < arr.length; i++) {
        if (arr[i] !== 'all') {
          arr1.push(arr[i])
        }
      }
      this.tab.chart4.getdataListParm.parammaps.statisticsList = arr1
      var arrData3 = []
      for (let i = 0; i < this.tab.chart4.getdataListParm.parammaps.statisticsList.length; i++) {
        const myId = this.tab.chart4.statisticsList.find(obj => obj.name == this.tab.chart4.getdataListParm.parammaps.statisticsList[i]).id
        for (let j = 0; j < this.tab.chart4.chart4Data3.length; j++) {
          if (j == myId) {
            arrData3.push(this.tab.chart4.chart4Data3[j])
          }
        }
      }
      this.tab.chart4.chartLine_data.data3 = arrData3
      this.tab.chart4.chartLine_data.data1 = this.tab.chart4.getdataListParm.parammaps.statisticsList
      this.roadChartLine4(this.tab.chart4.chartLine_data)
    },
    // 车辆准确率
    getChart4() {
      this.tab.chart4.listLoading = true
      const url = 'authdata/chart/accuracyAllCC'
      const data = {}
      data.parammaps = {}
      if (this.tab.chart4.getdataListParm.parammaps.specificDate == '1') {
        data.parammaps.pastureid = this.tab.chart4.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = parseTime(this.tab.chart4.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
        data.parammaps.stopTime = parseTime(this.tab.chart4.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
        data.parammaps.status = this.tab.chart4.getdataListParm.parammaps.status
      } else {
        data.parammaps.pastureid = this.tab.chart4.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = this.tab.chart4.getdataListParm.parammaps.startTime
        data.parammaps.stopTime = this.tab.chart4.getdataListParm.parammaps.stopTime
        data.parammaps.status = this.tab.chart4.getdataListParm.parammaps.status
      }
      postJson(url, data).then(response => {
        if (response.data !== null && response.data.list !== null && response.data.data !== null) {
          for (let i = 0; i < response.data.data.length; i++) {
            if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
              response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
            }
            if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
              response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
            }
            if (response.data.data[i].准确率 !== '' && response.data.data[i].准确率 !== undefined) {
              response.data.data[i].准确率 = parseFloat(response.data.data[i].准确率) + '%'
            }
          }
          this.tab.chart4.table.list = response.data.data
          this.tab.chart4.chartLine_data = response.data.list
          this.tab.chart4.total = response.data.total
          this.tab.chart4.statisticsList = []
          this.tab.chart4.getdataListParm.parammaps.statisticsList = []
          for (let i = 0; i < response.data.list.data1.length; i++) {
            // if (i < 10) {
              this.tab.chart4.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
            // }
            var obj = {}
            obj.id = i
            obj.name = response.data.list.data1[i]
            this.tab.chart4.statisticsList.push(obj)
          }
          this.tab.chart4.chart4Data3 = response.data.list.data3
          this.tab.chart4.total = response.data.total
          console.log('车辆准确率（重量）图', this.tab.chart4.chartLine_data)
          console.log('车辆准确率（重量）表', this.tab.chart4.table.list)
          var arrData3 = []
          for (let i = 0; i < this.tab.chart4.getdataListParm.parammaps.statisticsList.length; i++) {
            const myId = this.tab.chart4.statisticsList.find(obj => obj.name == this.tab.chart4.getdataListParm.parammaps.statisticsList[i]).id
            for (let j = 0; j < this.tab.chart4.chart4Data3.length; j++) {
              if (j == myId) {
                arrData3.push(this.tab.chart4.chart4Data3[j])
              }
            }
          }
          this.tab.chart4.chartLine_data.data3 = arrData3
          this.tab.chart4.chartLine_data.data1 = this.tab.chart4.getdataListParm.parammaps.statisticsList
          this.roadChartLine4(this.tab.chart4.chartLine_data)
        } else {
          this.tab.chart4.list = []
        }
        setTimeout(() => {
          this.tab.chart4.listLoading = false
        }, 100)
      })
    },
    roadChartLine4(chartLine_data) {
      if (this.tab.chart4.chartLine != null) {
        this.tab.chart4.chartLine.dispose()
      }
      this.tab.chart4.chartLine = echarts.init(document.getElementById('chartLine4'))
      var option = {
        title: {
          text: ''
        },
        tooltip: {
          trigger: 'axis'
        },
        legend: {
          data: chartLine_data.data1,
          right: 10, show: true, type: 'scroll'
        },
        grid: {
          top: '20%',
          left: '5%',
          right: '8%',
          containLabel: true
        },
        toolbox: {
          show: true,
          right: '2%',
          feature: {}
        },
        xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
        yAxis: {
          type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
        },
        series: (function() {
          var serie = []
          for (var i = 0; i < chartLine_data.data3.length; i++) {
            var item = {
              name: chartLine_data.data1[i],
              type: 'line',
              data: chartLine_data.data3[i].data
            }
            serie.push(item)
          }
          return serie
        }())
      }
      this.tab.chart4.chartLine.setOption(option)
      window.onresize = ()=> {
        this.tab.chart4.chartLine.resize()
      }
    },

    // 混料统计
    getChart5() {
      this.tab.chart5.listLoading = true
      const url = 'authdata/chart/accuracyAllHL'
      const data = {}
      data.parammaps = {}
      if (this.tab.chart5.getdataListParm.parammaps.specificDate == '1') {
        data.parammaps.pastureid = this.tab.chart5.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = parseTime(this.tab.chart5.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
        data.parammaps.stopTime = parseTime(this.tab.chart5.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
        data.parammaps.status = this.tab.chart5.getdataListParm.parammaps.status
      } else {
        data.parammaps.pastureid = this.tab.chart5.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = this.tab.chart5.getdataListParm.parammaps.startTime
        data.parammaps.stopTime = this.tab.chart5.getdataListParm.parammaps.stopTime
        data.parammaps.status = this.tab.chart5.getdataListParm.parammaps.status
      }
      postJson(url, data).then(response => {
        if (response.data !== null && response.data.list !== null && response.data.data !== null) {
          for (let i = 0; i < response.data.data.length; i++) {
            if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
              response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
            }
            if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
              response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
            }
            if (response.data.data[i].理论自动 !== '' && response.data.data[i].理论自动 !== undefined) {
              response.data.data[i].理论自动 = parseFloat(response.data.data[i].理论自动)
            }
            if (response.data.data[i].实际自动 !== '' && response.data.data[i].实际自动 !== undefined) {
              response.data.data[i].实际自动 = parseFloat(response.data.data[i].实际自动)
            }
            if (response.data.data[i].field3 !== '' && response.data.data[i].field3 !== undefined) {
              response.data.data[i].field3 = parseFloat(response.data.data[i].field3)
            }
            if (response.data.data[i].理论手动 !== '' && response.data.data[i].理论手动 !== undefined) {
              response.data.data[i].理论手动 = parseFloat(response.data.data[i].理论手动)
            }
            if (response.data.data[i].实际手动 !== '' && response.data.data[i].实际手动 !== undefined) {
              response.data.data[i].实际手动 = parseFloat(response.data.data[i].实际手动)
            }
            if (response.data.data[i].field4 !== '' && response.data.data[i].field4 !== undefined) {
              response.data.data[i].field4 = parseFloat(response.data.data[i].field4)
            }
          }
          this.tab.chart5.table.list = response.data.data
          this.tab.chart5.chartLine_data = response.data.list
          this.tab.chart5.total = response.data.total
          console.log('混料统计图', this.tab.chart5.chartLine_data)
          console.log('混料统计表', this.tab.chart5.table.list)
          this.roadChartLine5(this.tab.chart5.chartLine_data)
        } else {
          this.tab.chart5.list = []
        }
        setTimeout(() => {
          this.tab.chart5.listLoading = false
        }, 100)
      })
    },
    roadChartLine5(chartLine_data) {
      if (this.tab.chart5.chartLine != null) {
        this.tab.chart5.chartLine.dispose()
      }
      this.tab.chart5.chartLine = echarts.init(document.getElementById('chartLine5'))
      var option = {
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'cross',
            crossStyle: {
              color: '#999'
            }
          }
        },
        toolbox: {
          feature: {}
        },
        legend: {
          data: ['自动跳转次数', '手动跳转次数', '自动跳转准确率', '手动跳转准确率']
        },
        grid: {
          top: '20%',
          left: '5%',
          right: '8%',
          containLabel: true
        },
        xAxis: [
          {
            type: 'category',
            data: chartLine_data.data1,
            axisPointer: {
              type: 'shadow'
            }
          }
        ],
        yAxis: [
          {
            splitLine: { show: false }, type: 'value',
            name: '跳转次数',
            axisLabel: {
              formatter: '{value}'
            }
          },
          {
            splitLine: { show: false }, type: 'value',
            name: '混料准确率',
            min: 0,
            max: 100,
            interval: 10,
            axisLabel: {
              formatter: '{value} %'
            }
          }
        ],
        series: [
          {
            name: '自动跳转次数',
            type: 'bar',
            data: chartLine_data.data2
          },
          {
            name: '手动跳转次数',
            type: 'bar',
            data: chartLine_data.data3
          },
          {
            name: '自动跳转准确率',
            type: 'line',
            yAxisIndex: 1,
            data: chartLine_data.data4
          },
          {
            name: '手动跳转准确率',
            type: 'line',
            yAxisIndex: 1,
            data: chartLine_data.data5
          }
        ]
      }
      this.tab.chart5.chartLine.setOption(option)
      window.onresize = ()=> {
        this.tab.chart5.chartLine.resize()
      }
    },

    // 混料计划取消次数
    getChart6() {
      this.tab.chart6.listLoading = true
      const url = 'authdata/chart/accuracyAllQX'
      const data = {}
      data.parammaps = {}
      if (this.tab.chart6.getdataListParm.parammaps.specificDate == '1') {
        data.parammaps.pastureid = this.tab.chart6.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = parseTime(this.tab.chart6.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
        data.parammaps.stopTime = parseTime(this.tab.chart6.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
        data.parammaps.status = this.tab.chart6.getdataListParm.parammaps.status
      } else {
        data.parammaps.pastureid = this.tab.chart6.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = this.tab.chart6.getdataListParm.parammaps.startTime
        data.parammaps.stopTime = this.tab.chart6.getdataListParm.parammaps.stopTime
        data.parammaps.status = this.tab.chart6.getdataListParm.parammaps.status
      }
      postJson(url, data).then(response => {
        if (response.data !== null && response.data.list !== null && response.data.data !== null) {
          for (let i = 0; i < response.data.data.length; i++) {
            if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
              response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
            }
          }
          this.tab.chart6.table.list = response.data.data
          this.tab.chart6.chartLine_data = response.data.list
          this.tab.chart6.total = response.data.total
          console.log('混料计划取消次数图', this.tab.chart6.chartLine_data)
          console.log('混料计划取消次数表', this.tab.chart6.table.list)
          this.roadChartLine6(this.tab.chart6.chartLine_data)
        } else {
          this.tab.chart6.list = []
        }
        setTimeout(() => {
          this.tab.chart6.listLoading = false
        }, 100)
      })
    },
    roadChartLine6(chartLine_data) {
      if (this.tab.chart6.chartLine != null) {
        this.tab.chart6.chartLine.dispose()
      }
      this.tab.chart6.chartLine = echarts.init(document.getElementById('chartLine6'))
      var option = {
        color: ['#3398DB'],
        tooltip: {
          trigger: 'axis',
          axisPointer: { // 坐标轴指示器，坐标轴触发有效
            type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
          }
        },
        legend: {
          data: ['取消次数'],
          right: 10, show: true, type: 'scroll'
        },
        grid: {
          top: '20%',
          left: '5%',
          right: '8%',
          containLabel: true
        },
        xAxis: [
          {
            name: '日期',
            type: 'category',
            data: chartLine_data.data1,
            axisTick: {
              alignWithLabel: true
            }
          }
        ],
        yAxis: [
          {
            name: '次数',
            interval: 1, // 会出现负数刻度
            min: 0,
            type: 'value'
          }
        ],
        series: [
          {
            name: '取消次数',
            type: 'bar',
            barWidth: '60%',
            data: chartLine_data.data2
          }
        ]
      }
      this.tab.chart6.chartLine.setOption(option)
      window.onresize = ()=> {
        this.tab.chart6.chartLine.resize()
      }
    },

    // 栏舍撒料时间统计
    changeStatisticChart7(arr) {
      console.log(arr,'arr')
      var arr1 = []
      for (let i = 0; i < arr.length; i++) {
        if (arr[i] !== 'all') {
          arr1.push(arr[i])
        }
      }
      this.tab.chart7.getdataListParm.parammaps.statisticsList = arr1
      var arrData3 = []
      for (let i = 0; i < this.tab.chart7.getdataListParm.parammaps.statisticsList.length; i++) {
        const myId = this.tab.chart7.statisticsList.find(obj => obj.name == this.tab.chart7.getdataListParm.parammaps.statisticsList[i]).id
        for (let j = 0; j < this.tab.chart7.chart7Data3.length; j++) {
          if (j == myId) {
            arrData3.push(this.tab.chart7.chart7Data3[j])
          }
        }
      }
      this.tab.chart7.chartLine_data.data3 = arrData3
      this.tab.chart7.chartLine_data.data1 = this.tab.chart7.getdataListParm.parammaps.statisticsList
      // console.log(this.tab.chart7.getdataListParm.parammaps.statisticsList,'我要看到v-model')
      // console.log(JSON.parse(this.tab.chart7.statisticsList),'我要看的下拉数据')
      // console.log(JSON.stringify(this.tab.chart7.statisticsList),'我要看的下拉数据')
      this.roadChartLine7(this.tab.chart7.chartLine_data)
    },
    getChart7() {
      this.tab.chart7.listLoading = true
      const url = 'authdata/chart/accuracyAllLS'
      const data = {}
      data.parammaps = {}
      if (this.tab.chart7.getdataListParm.parammaps.specificDate == '1') {
        data.parammaps.pastureid = this.tab.chart7.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = parseTime(this.tab.chart7.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
        data.parammaps.stopTime = parseTime(this.tab.chart7.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
        data.parammaps.status = this.tab.chart7.getdataListParm.parammaps.status
      } else {
        data.parammaps.pastureid = this.tab.chart7.getdataListParm.parammaps.pastureid
        data.parammaps.startTime = this.tab.chart7.getdataListParm.parammaps.startTime
        data.parammaps.stopTime = this.tab.chart7.getdataListParm.parammaps.stopTime
        data.parammaps.status = this.tab.chart7.getdataListParm.parammaps.status
      }
      postJson(url, data).then(response => {
        if (response.data !== null && response.data.list !== null && response.data.data !== null) {
          for (let i = 0; i < response.data.data.length; i++) {
            // 撒料时间
            var b = []
            for (let j = 0; j <= response.data.data[i].准确率.length; j++) {
              // console.log(response.data.data[i].准确率)
              if (response.data.data[i].准确率.charAt(j) == '.') {
                b[j] = response.data.data[i].准确率.replace('.', ':')
              }
            }
            response.data.data[i].准确率 = b[b.length - 1]
            response.data.data[i].撒料时间 = response.data.data[i].准确率
          }
          this.tab.chart7.table.list = response.data.data
          this.tab.chart7.chartLine_data = response.data.list
          this.tab.chart7.statisticsList = []
          this.tab.chart7.getdataListParm.parammaps.statisticsList = []
          for (let i = 0; i < response.data.list.data1.length; i++) {
            // if (i < 10) {
              this.tab.chart7.getdataListParm.parammaps.statisticsList.push(response.data.list.data1[i])
              var obj = {}
              obj.id = i
              obj.name = response.data.list.data1[i]
              this.tab.chart7.statisticsList.push(obj)
            // }
          }

          console.log("------->",this.tab.chart7)
          this.tab.chart7.chart7Data3 = response.data.list.data3
          this.tab.chart7.total = response.data.total
          console.log('栏舍撒料时间统计图', this.tab.chart7.chartLine_data)
          console.log('栏舍撒料时间统计表', this.tab.chart7.table.list)
          var arrData3 = []
          for (let i = 0; i < this.tab.chart7.getdataListParm.parammaps.statisticsList.length; i++) {
            const myId = this.tab.chart7.statisticsList.find(obj => obj.name == this.tab.chart7.getdataListParm.parammaps.statisticsList[i]).id
            for (let j = 0; j < this.tab.chart7.chart7Data3.length; j++) {
              if (j == myId) {
                arrData3.push(this.tab.chart7.chart7Data3[j])
              }
            }
          }
          this.tab.chart7.chartLine_data.data3 = arrData3
          this.tab.chart7.chartLine_data.data1 = this.tab.chart7.getdataListParm.parammaps.statisticsList
          // console.log(this.tab.chart7.getdataListParm.parammaps.statisticsList,'我要看到v-model')
          // console.log(JSON.stringify(this.tab.chart7.statisticsList),'我要看的下拉数据')
          this.roadChartLine7(this.tab.chart7.chartLine_data)
        } else {
          this.tab.chart7.list = []
        }
        setTimeout(() => {
          this.tab.chart7.listLoading = false
        }, 100)
      })
    },
    roadChartLine7(chartLine_data) {
      console.log(chartLine_data,'chartLine_data777')
      if (this.tab.chart7.chartLine != null) {
        this.tab.chart7.chartLine.dispose()
      }
      this.tab.chart7.chartLine = echarts.init(document.getElementById('chartLine7'))
      var option = {
        title: {
          text: ''
        },
        tooltip: {
          trigger: 'axis',
          formatter: function(params) {
            // console.log(params)
            var tip = params[0].name
            if(params !== null && params !== ''){
              for (let i = 0; i < params.length; i++) {
                var b = []
                // var str = params[i].value
                for (let j = 0; j <= params[i].value.length; j++) {
                  if (params[i].value !== '') {
                    if (params[i].value.charAt(j) == '.') {
                      b[j] = params[i].value.replace('.', ':')
                    }
                  } else {
                    b[j] = ''
                  }
                }
                tip += '<br>' + params[i].seriesName + ': ' + b[b.length - 1]
              }
            }
            return tip
          }
        },
        legend: {
          data: chartLine_data.data1,
          top:10,right: 10, show: true, type: 'scroll'
        },
        grid: {
          top: '15%',
          left: '5%',
          right: '8%',
          containLabel: true
        },
        toolbox: {
          show: true,
          right: '2%',
          feature: {}
        },
        xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
        yAxis: [{
          type: '',
          name: '时间',
          mix: 0,
          max: 24,
          interval: 2,
          axisLabel: {
            formatter: function(value) {
              var texts = []
              if (value < 10) {
                texts.push('0' + value + ':00')
              } else {
                texts.push(value + ':00')
              }
              return texts
            }
          }
        }],
        series: (function() {
          var serie = []
          for (var i = 0; i < chartLine_data.data3.length; i++) {
            var item = {
              name: chartLine_data.data1[i],
              type: 'line',
              data: chartLine_data.data3[i].data
            }
            serie.push(item)
          }
          return serie
        }())
      }
      this.tab.chart7.chartLine.setOption(option)
      if (this.tab.chart7.chartLine != null) {
        window.onresize = ()=> {
          this.tab.chart7.chartLine.resize()
        }
      }
    },
    // 导出
    handleExport(item) {
      if (item == 'chart1') {
        console.log('配方准确率导出')
        var excelDatasTabChart1 = [
          {
            tHeader: ['日期', '配方名称', '计划重量（kg）', '实际重量（kg）', '准确率'],
            filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
            tableDatas: this.tab.chart1.table.list,
            sheetName: '配方准确率'
          }
        ]
        json2excel(excelDatasTabChart1, '配方准确率', true, 'xlsx')
      } else if (item == 'chart2') {
        console.log('计划统计导出')
        var excelDatasTabChart2 = [
          {
            tHeader: ['日期', '计划执行重量（kg）', '配方理论重量（kg）', '计划准确率', '计划取消重量（kg）', '计划准确率（去除取消重量）', '计划正确数', '计划数', '计划正确率'],
            filterVal: ['日期', '实际量', '理论量', 'field1', '计划取消重量', 'field3', '正确数', '计划数', 'field2'],
            tableDatas: this.tab.chart2.table.list,
            sheetName: '计划统计'
          }
        ]
        json2excel(excelDatasTabChart2, '计划统计', true, 'xlsx')
      } else if (item == 'chart3') {
        console.log('牛群准确率导出')
        var excelDatasTabChart3 = [
          {
            tHeader: ['日期', '牲畜类别', '计划重量（kg）', '实际重量（kg）', '准确率'],
            filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
            tableDatas: this.tab.chart3.table.list,
            sheetName: '牛群准确率'
          }
        ]
        json2excel(excelDatasTabChart3, '牛群准确率', true, 'xlsx')
      } else if (item == 'chart4') {
        console.log('车辆准确率（重量）导出')
        var excelDatasTabChart4 = [
          {
            tHeader: ['日期', '车次', '计划重量（kg）', '实际重量（kg）', '准确率'],
            filterVal: ['日期', '名称', '理论量', '实际量', '准确率'],
            tableDatas: this.tab.chart4.table.list,
            sheetName: '车辆准确率（重量）'
          }
        ]
        json2excel(excelDatasTabChart4, '车辆准确率（重量）', true, 'xlsx')
      } else if (item == 'chart5') {
        console.log('混料统计导出')
        var excelDatasTabChart5 = [
          {
            tHeader: ['日期', '自动跳转次数', '手动跳转次数', '自动跳转理论重量', '自动跳转实际重量', '自动跳转准确率', '手动跳转理论重量', '手动跳转实际重量', '手动跳转准确率'],
            filterVal: ['日期', 'field1', 'field2', '理论自动', '实际自动', 'field3', '理论手动', '实际手动', 'field4'],
            tableDatas: this.tab.chart5.table.list,
            sheetName: '混料统计'
          }
        ]
        json2excel(excelDatasTabChart5, '混料统计', true, 'xlsx')
      } else if (item == 'chart6') {
        console.log('混料计划取消次数导出')
        var excelDatasTabChart6 = [
          {
            tHeader: ['日期', '混料计划取消次数'],
            filterVal: ['日期', 'field1'],
            tableDatas: this.tab.chart6.table.list,
            sheetName: '混料计划取消次数'
          }
        ]
        json2excel(excelDatasTabChart6, '混料计划取消次数', true, 'xlsx')
      } else if (item == 'chart7') {
        console.log('栏舍撒料时间统计导出')
        var excelDatasTabChart7 = [
          {
            tHeader: ['日期', '栏舍', '撒料时间'],
            filterVal: ['日期', 'fname', '准确率'],
            tableDatas: this.tab.chart7.table.list,
            sheetName: '栏舍撒料时间统计'
          }
        ]
        json2excel(excelDatasTabChart7, '栏舍撒料时间统计', true, 'xlsx')
      }
    },
    // 切换表格
    handleTable(item) {
      // 显示切换表格
      if (item == 'chart1') {
        console.log('配方准确率表格')
        this.tab.chart1.isTable = true
        this.tab.chart1.isChart = false
      } else if (item == 'chart2') {
        console.log('计划统计表格')
        this.tab.chart2.isTable = true
        this.tab.chart2.isChart = false
      } else if (item == 'chart3') {
        console.log('牛群准确率表格')
        this.tab.chart3.isTable = true
        this.tab.chart3.isChart = false
      } else if (item == 'chart4') {
        console.log('车辆准确率（重量）表格')
        this.tab.chart4.isTable = true
        this.tab.chart4.isChart = false
      } else if (item == 'chart5') {
        console.log('混料统计表格')
        this.tab.chart5.isTable = true
        this.tab.chart5.isChart = false
      } else if (item == 'chart6') {
        console.log('混料计划取消次数表格')
        this.tab.chart6.isTable = true
        this.tab.chart6.isChart = false
      } else if (item == 'chart7') {
        console.log('栏舍撒料时间统计表格')
        this.tab.chart7.isTable = true
        this.tab.chart7.isChart = false
      }
    },
    // 切换图表
    handleChart(item) {
      // 显示切换图表
      if (item == 'chart1') {
        console.log('配方准确率图表')
        this.tab.chart1.isTable = false
        this.tab.chart1.isChart = true
        this.getChart1()
      } else if (item == 'chart2') {
        console.log('计划统计图表')
        this.tab.chart2.isTable = false
        this.tab.chart2.isChart = true
        this.getChart2()
      } else if (item == 'chart3') {
        console.log('牛群准确率图表')
        this.tab.chart3.isTable = false
        this.tab.chart3.isChart = true
        this.getChart3()
      } else if (item == 'chart4') {
        console.log('车辆准确率（重量）图表')
        this.tab.chart4.isTable = false
        this.tab.chart4.isChart = true
        this.getChart4()
      } else if (item == 'chart5') {
        console.log('混料统计图表')
        this.tab.chart5.isTable = false
        this.tab.chart5.isChart = true
        this.getChart5()
      } else if (item == 'chart6') {
        console.log('混料计划取消次数图表')
        this.tab.chart6.isTable = false
        this.tab.chart6.isChart = true
        this.getChart6()
      } else if (item == 'chart7') {
        console.log('栏舍撒料时间统计图表')
        this.tab.chart7.isTable = false
        this.tab.chart7.isChart = true
        this.getChart7()
      }
    },

    // 混料统计
    getTab2List() {
      this.tab2.table.listLoading = true
      GetDataByName(this.tab2.table.getdataListParm).then(response => {
        if (response.data.list !== null) {
          console.log('混料统计table数据', response.data.list)
          // this.tab2.table.list = response.data.list
          this.$refs.plTable2.reloadData(response.data.list)
          this.tab2.table.total = response.data.total
        } else {
          this.$refs.plTable2.reloadData([])
          this.tab2.table.total = 0
          // this.tab2.table.list = []
        }
        setTimeout(() => {
          this.tab2.table.listLoading = false
        }, 100)
      })
    },
    form_search2() {
      this.tab2.table.getdataListParm.name = 'getStatisticsHL'
      if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
        console.log(this.tab2.table.getdataListParm.parammaps.inputDatetime)
        this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
        this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
      } else {
        this.tab2.table.getdataListParm.parammaps.inputDatetime = ''
        this.tab2.table.getdataListParm.parammaps.startTime = ''
        this.tab2.table.getdataListParm.parammaps.stopTime = ''
      }
      // this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
      // this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
      this.tab2.table.getdataListParm.offset = 1
      this.getTab2List()
      this.getTMRNameList2()
    },
    handleRefresh2() {
      this.tab2.table.getdataListParm.parammaps.tmrtname = ''
      this.tab2.table.getdataListParm.parammaps.projname = ''
      this.tab2.table.getdataListParm.parammaps.times = ''
      this.tab2.table.getdataListParm.parammaps.templetname = ''
      this.tab2.table.getdataListParm.parammaps.buttontype = ''
      this.tab2.table.getdataListParm.parammaps.hlwc1 = undefined
      this.tab2.table.getdataListParm.parammaps.hlwc2 = undefined
      this.tab2.table.getdataListParm.parammaps.hlzq1 = undefined
      this.tab2.table.getdataListParm.parammaps.hlzq2 = undefined
      this.tab2.table.getdataListParm.parammaps.hlzql1 = undefined
      this.tab2.table.getdataListParm.parammaps.hlzql2 = undefined
      this.tab2.table.getdataListParm.parammaps.error = false
      this.getTab2List()
    },
    handleExport2() {
      console.log('导出')
      this.exportList.dialogFormVisible = true
      this.exportList.dialogStatus = 'exportList'
      // var excelDatasTab2 = [
      //   {
      //     tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间'],
      //     filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
      //     tableDatas: this.tab2.table.list,
      //     sheetName: '混料统计'
      //   }
      // ]
      // json2excel(excelDatasTab2, '混料统计', true, 'xlsx')
    },
    exportList2(){
      this.isokDisable = true
      var url = 'authdata/GetDataByName'
      var data = {
        'name':"getStatisticsHL",
        "page":1,"offset":1,"pagecount":"","returntype":"Map",
        "parammaps":{"pastureid":Cookies.get('pastureid'),"startTime":"","stopTime":"","templetname":"","isuse":""}
      }
      data.parammaps.startTime = parseTime(this.exportList.inputDatetime[0],'{y}-{m}-{d}')
      data.parammaps.stopTime = parseTime(this.exportList.inputDatetime[1],'{y}-{m}-{d}')
      data.parammaps.tmrtname = this.tab2.table.getdataListParm.parammaps.tmrtname
      data.parammaps.projname = this.tab2.table.getdataListParm.parammaps.projname
      data.parammaps.times = this.tab2.table.getdataListParm.parammaps.times
      data.parammaps.buttontype = this.tab2.table.getdataListParm.parammaps.buttontype
      data.parammaps.templetname = this.tab2.table.getdataListParm.parammaps.templetname
      data.parammaps.isuse = this.tab2.table.getdataListParm.parammaps.isuse
      postJson(url,data).then(response => {
        var exportList = []
        if (response.data.list !== null) {
        console.log('混料统计table数据', response.data.list)
          exportList = response.data.list
        } else {
          exportList = []
        }
        var excelDatasTab2 = [
          {
            tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间'],
            filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
            tableDatas: exportList,
            sheetName: '混料统计'
          }
        ]
        json2excel(excelDatasTab2, '混料统计', true, 'xlsx')
        this.isokDisable = false
        this.exportList.dialogFormVisible = false
      })
    },
    // 撒料统计
    getTab3List() {
      this.tab3.table.listLoading = true
      GetDataByName(this.tab3.table.getdataListParm).then(response => {
        console.log('撒料统计table数据', response.data.list)
        if (response.data.list !== null) {
          // this.tab3.table.list = response.data.list
          this.$refs.plTable3.reloadData(response.data.list)
          this.tab3.table.total = response.data.total
        } else {
          // this.tab3.table.list = []
          this.$refs.plTable3.reloadData([])
          this.tab3.table.total = 0
        }
        setTimeout(() => {
          this.tab3.table.listLoading = false
        }, 100)
      })
    },
    form_search3() {
      this.tab3.table.getdataListParm.name = 'getStatisticsSL'
      if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime !== null) {
        this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
        this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
      } else {
        this.tab3.table.getdataListParm.parammaps.inputDatetime = ''
        this.tab3.table.getdataListParm.parammaps.startTime = ''
        this.tab3.table.getdataListParm.parammaps.stopTime = ''
      }
      // this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
      // this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
      this.tab3.table.getdataListParm.offset = 1
      this.getTab3List()
      this.getTMRNameList3()
    },
    handleRefresh3() {
      this.tab3.table.getdataListParm.parammaps.tmrtname = ''
      this.tab3.table.getdataListParm.parammaps.projname = ''
      this.tab3.table.getdataListParm.parammaps.times = ''
      this.tab3.table.getdataListParm.parammaps.templetname = ''
      this.tab3.table.getdataListParm.parammaps.buttontype = ''
      this.tab3.table.getdataListParm.parammaps.fname = ''
      this.tab3.table.getdataListParm.parammaps.slwc1 = undefined
      this.tab3.table.getdataListParm.parammaps.slwc2 = undefined
      this.tab3.table.getdataListParm.parammaps.slzq1 = undefined
      this.tab3.table.getdataListParm.parammaps.slzq2 = undefined
      this.tab3.table.getdataListParm.parammaps.slzql1 = undefined
      this.tab3.table.getdataListParm.parammaps.slzql2 = undefined
      this.tab3.table.getdataListParm.parammaps.error = false
      this.getTab3List()
    },
    handleExport3() {
      this.exportList.dialogFormVisible = true
      this.exportList.dialogStatus = 'exportList'
      // var excelDatasTab3 = [
      //   {
      //     tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
      //     filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
      //     tableDatas: this.tab3.table.list,
      //     sheetName: '撒料统计'
      //   }
      // ]
      // json2excel(excelDatasTab3, '撒料统计', true, 'xlsx')
    },
    exportList3(){
      this.isokDisable = true
      var url = 'authdata/GetDataByName'
      var data = {
        'name':"getStatisticsSL",
        "page":1,"offset":1,"pagecount":"","returntype":"Map",
        "parammaps":{"pastureid":Cookies.get('pastureid'),"startTime":"","stopTime":"","templetname":"","isuse":""}
      }
      data.parammaps.startTime = parseTime(this.exportList.inputDatetime[0],'{y}-{m}-{d}')
      data.parammaps.stopTime = parseTime(this.exportList.inputDatetime[1],'{y}-{m}-{d}')
      data.parammaps.tmrtname = this.tab3.table.getdataListParm.parammaps.tmrtname
      data.parammaps.projname = this.tab3.table.getdataListParm.parammaps.projname
      data.parammaps.times = this.tab3.table.getdataListParm.parammaps.times
      data.parammaps.buttontype = this.tab3.table.getdataListParm.parammaps.buttontype
      data.parammaps.templetname = this.tab3.table.getdataListParm.parammaps.templetname
      data.parammaps.isuse = this.tab3.table.getdataListParm.parammaps.isuse
      postJson(url,data).then(response => {
        console.log('混料统计table数据', response.data.list)
        var exportList = []
        if (response.data.list !== null) {
          exportList = response.data.list
        } else {
          exportList = []
        }
        var excelDatasTab3 = [
          {
            tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
            filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
            tableDatas: exportList,
            sheetName: '撒料统计'
          }
        ]
        json2excel(excelDatasTab3, '撒料统计', true, 'xlsx')
        this.isokDisable = false
        this.exportList.dialogFormVisible = false
      })
    },
    handleSee(item,row) {
      if(this.tab.table.getdataListParm.parammaps.error == true){
        this.error = true
      }else{
        this.error = ''
      }
      if(item == 1){
        // 混料
        if (this.tab.radio == 0) {
          this.methodName = 'getDownloadedplanByJsyHL'
          this.optdevice = row.驾驶员
          this.titlefname = '准确性详情——驾驶员：' + row.驾驶员
        }else if (this.tab.radio == 1) {
          this.methodName = 'getDownloadedplanByTemHL'
          this.optdevice = row.配方名称
          this.titlefname = '准确性详情——配方名称：' + row.配方名称
        } else if (this.tab.radio == 2) {
          this.methodName = 'getDownloadedplanByBarHL'
          this.optdevice = row.栏舍名称
          this.titlefname = '准确性详情——栏舍名称：' + row.栏舍名称
        } else if (this.tab.radio == 3) {
          this.methodName = 'getDownloadedplanBySCHL'
          this.optdevice = row.牲畜类别
          this.titlefname = '准确性详情——牲畜类别：' + row.牲畜类别
        } else if (this.tab.radio == 4) {
          this.methodName = 'getDownloadedplanByTrainsHL'
          this.optdevice = row.车次
          this.titlefname = '准确性详情——车次：' + row.车次
        } else if (this.tab.radio == 5) {
          this.methodName = 'getDownloadedplanByTmrHL'
          this.optdevice = row.TMR名称
          this.titlefname = '准确性详情——TMR名称：' + row.TMR名称
        } else if (this.tab.radio == 6) {
          this.methodName = 'getDownloadedplanByFeedHL'
          this.optdevice = row.fname
          this.titlefname = '准确性详情——饲料：' + row.fname
        } else if (this.tab.radio == 7) {
          this.methodName = 'getDownloadedplanByWflHL'
          this.optdevice = row.fname
          this.titlefname = '准确性详情'
        }
      }else{
        // 撒料
        if (this.tab.radio == 0) {
          this.methodName = 'getDownloadedplanByJsySL'
          this.optdevice = row.驾驶员
          this.titlefname = '准确性详情——驾驶员：' + row.驾驶员
        }else if (this.tab.radio == 1) {
          this.methodName = 'getDownloadedplanByTemSL'
          this.optdevice = row.配方名称
          this.titlefname = '准确性详情——配方名称：' + row.配方名称
        } else if (this.tab.radio == 2) {
          this.methodName = 'getDownloadedplanByBarSL'
          this.optdevice = row.栏舍名称
          this.titlefname = '准确性详情——栏舍名称：' + row.栏舍名称
        } else if (this.tab.radio == 3) {
          this.methodName = 'getDownloadedplanBySCSL'
          this.optdevice = row.牲畜类别
          this.titlefname = '准确性详情——牲畜类别：' + row.牲畜类别
        } else if (this.tab.radio == 4) {
          this.methodName = 'getDownloadedplanByTrainsSL'
          this.optdevice = row.车次
          this.titlefname = '准确性详情——车次：' + row.车次
        } else if (this.tab.radio == 5) {
          this.methodName = 'getDownloadedplanByTmrSL'
          this.optdevice = row.TMR名称
          this.titlefname = '准确性详情——TMR名称：' + row.TMR名称
        }else if (this.tab.radio == 7) {
          this.methodName = 'getDownloadedplanByWflSL'
          this.optdevice = row.fname
          this.titlefname = '准确性详情'
        }
      }

      console.log(row, 'row')
      // this.rowPid = row.pid
      this.startTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
      this.stopTime = parseTime(this.tab.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
      this.isShowDialog = true
    },
    getTMRNameList(){
      var data = {}
      data.name = 'getAccuracyMCTmrName'
      data.parammaps = {}
      data.parammaps.pastureid = Cookies.get('pastureid')
      data.parammaps.startTime =  this.tab.table.getdataListParm.parammaps.startTime
      data.parammaps.stopTime = this.tab.table.getdataListParm.parammaps.stopTime
      GetDataByName(data).then(response => {
        if(response.data.list !== null){
          this.tab.TMRNameList = response.data.list
        }else{
          this.tab.TMRNameList =  []
        }
      })
    },
    getTMRNameList2(){
      var data = {}
      data.name = 'getAccuracyMCTmrName'
      data.parammaps = {}
      data.parammaps.pastureid = Cookies.get('pastureid')
      data.parammaps.startTime = this.tab2.table.getdataListParm.parammaps.startTime
      data.parammaps.stopTime = this.tab2.table.getdataListParm.parammaps.stopTime
      GetDataByName(data).then(response => {
        if(response.data !== null){
          this.tab2.TMRNameList = response.data.list
        }else{
          this.tab2.TMRNameList =  []
        }
      })
    },
    getTMRNameList3(){
      var data = {}
      data.name = 'getAccuracyMCTmrName'
      data.parammaps = {}
      data.parammaps.pastureid = Cookies.get('pastureid')
      data.parammaps.startTime =  this.tab3.table.getdataListParm.parammaps.startTime
      data.parammaps.stopTime = this.tab3.table.getdataListParm.parammaps.stopTime
      GetDataByName(data).then(response => {
        if(response.data.list !== null){
          this.tab3.TMRNameList = response.data.list
        }else{
          this.tab3.TMRNameList =  []
        }
      })
    },
    clickRecipeName2(row) {
      console.log('点击了混料统计-配方名称',row)
      this.recipeNameTemp2.temp = Object.assign({}, row)
      this.recipeNameTemp2.dialogFormVisible = true
      this.textMap.recipeNameTxt = '配方修改记录——配方：' + row.配方名称
      this.recipeNameTemp2.dialogStatus = 'recipeNameTxt'
      this.recipeNameTemp2.getdataListParm.parammaps.pastureid = Cookies.get('pastureid')
      this.recipeNameTemp2.getdataListParm.parammaps.ftid = row.ftid
      this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime = []
      const start = new Date()
      const end = new Date()
      this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
      this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
      this.getRecipeNameList2()
    },
    getRecipeNameList2(){
      this.recipeNameTemp2.listLoading = true
      if (this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime == null) {
        this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime = ''
        this.recipeNameTemp2.getdataListParm.parammaps.startdate = ''
        this.recipeNameTemp2.getdataListParm.parammaps.enddate = ''
      } else {
        this.recipeNameTemp2.getdataListParm.parammaps.startdate = this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[0] + ' 00:00'
        this.recipeNameTemp2.getdataListParm.parammaps.enddate = this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[1] + ' 23:59'
      }
      const url = 'authdata/feedtemplet/history'
      const data = {
        pastureid:this.recipeNameTemp2.getdataListParm.parammaps.pastureid,
        ftid:this.recipeNameTemp2.getdataListParm.parammaps.ftid,
        startdate:this.recipeNameTemp2.getdataListParm.parammaps.startdate,
        enddate:this.recipeNameTemp2.getdataListParm.parammaps.enddate
      }
      postJson(url, data).then(response => {
        if (response.data !== null && response.data !=='') {
          this.recipeNameTemp2.list = response.data
        } else {
          this.recipeNameTemp2.list = []
          this.recipeNameTemp2.total = 0
        }
        console.log(response.data, 'response.data')
        setTimeout(() => {
          this.recipeNameTemp2.listLoading = false
        }, 100)
      })
    },
    handleRecipeNameSearch2(){
      this.getRecipeNameList2()
    },
    clickSeeFeed(row){
      this.recipeNameTemp3.listLoading = false
      this.recipeNameTemp3.list = row.fit
      this.recipeNameTemp3.temp = Object.assign({}, row)
      this.recipeNameTemp3.dialogFormVisible = true
      this.textMap.recipeNameTxt = '配方饲料修改记录'
      this.recipeNameTemp3.dialogStatus = 'recipeNameTxt'
      const start = new Date()
      const end = new Date()
      this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime = []
      this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
      this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
    },
    clickFeed2(row) {
      console.log('点击了混料统计-饲料',row)
      this.feedTemp.temp = Object.assign({}, row)
      this.feedTemp.dialogFormVisible = true
      this.textMap.feedTxt = '配方修改记录——饲料：' + row.饲料
      this.feedTemp.dialogStatus = 'feedTxt'
      this.feedTemp.getdataListParm.parammaps.pastureid = row.pastureid
      this.feedTemp.getdataListParm.parammaps.ftid = row.ftid
      this.feedTemp.getdataListParm.parammaps.name = row.饲料
      this.feedTemp.getdataListParm.parammaps.inputDatetime = []
      const start = new Date()
      const end = new Date()
      this.feedTemp.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
      this.feedTemp.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
      this.getFeedList()
    },
    getFeedList(){
      this.feedTemp.listLoading = true
      if (this.feedTemp.getdataListParm.parammaps.inputDatetime == null) {
        this.feedTemp.getdataListParm.parammaps.inputDatetime = ''
        this.feedTemp.getdataListParm.parammaps.startTime = ''
        this.feedTemp.getdataListParm.parammaps.stopTime = ''
      } else {
        this.feedTemp.getdataListParm.parammaps.startTime = this.feedTemp.getdataListParm.parammaps.inputDatetime[0] +' 00:00'
        this.feedTemp.getdataListParm.parammaps.stopTime = this.feedTemp.getdataListParm.parammaps.inputDatetime[1] +' 23:59'
      }
      const url = 'authdata/GetDataByName'
      const data = {
        name:'getFitistoryByName',
        page: this.feedTemp.getdataListParm.page,
        offset:  this.feedTemp.getdataListParm.offset,
        pagecount:  this.feedTemp.getdataListParm.pagecount,
        returntype:  this.feedTemp.getdataListParm.returntype,
        parammaps:  this.feedTemp.getdataListParm.parammaps
      }
      postJson(url, data).then(response => {
        if (response.data.list !== null && response.data.list !== '') {
          for (let i = 0; i < response.data.list.length; i++) {
            if (response.data.list[i].arrList == null) {
              this.$set(response.data.list[i], 'arrList', [])
            }
          }
          this.feedTemp.list = response.data.list
          this.feedTemp.pageNum = response.data.pageNum
          this.feedTemp.pageSize = response.data.pageSize
          this.feedTemp.total = response.data.total
        } else {
          this.feedTemp.list = []
          this.feedTemp.total = 0
        }
        console.log(response.data, 'response.data')
        setTimeout(() => {
          this.feedTemp.listLoading = false
        }, 100)
      })
    },
    handleFeedSearch(){
      this.getFeedList()
    },
    clickRecipeName3(row) {
      console.log('点击了撒料统计-配方名称',row)
      this.recipeNameTemp2.temp = Object.assign({}, row)
      this.recipeNameTemp2.dialogFormVisible = true
      this.textMap.recipeNameTxt = '配方修改记录——配方：' + row.配方名称
      this.recipeNameTemp2.dialogStatus = 'recipeNameTxt'
      this.recipeNameTemp2.getdataListParm.parammaps.pastureid = Cookies.get('pastureid')
      this.recipeNameTemp2.getdataListParm.parammaps.ftid = row.ftid
      const start = new Date()
      const end = new Date()
      this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime = []
      this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
      this.recipeNameTemp2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
      this.getRecipeNameList2()
    },
    getRecipeNameList3(){
      this.recipeNameTemp3.listLoading = true
      if (this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime == null) {
        this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime = ''
        this.recipeNameTemp3.getdataListParm.parammaps.startTime = ''
        this.recipeNameTemp3.getdataListParm.parammaps.stopTime = ''
      } else {
        this.recipeNameTemp3.getdataListParm.parammaps.startTime = this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime[0] + ' 00:00'
        this.recipeNameTemp3.getdataListParm.parammaps.stopTime = this.recipeNameTemp3.getdataListParm.parammaps.inputDatetime[1] + ' 23:59'
      }
      const url = 'authdata/GetArrList'
      const data = {
        name:'getFitHistory1',
        name1:'getFitHistory2',
        page:this.recipeNameTemp3.getdataListParm.page,
        offset:this.recipeNameTemp3.getdataListParm.offset,
        pagecount:this.recipeNameTemp3.getdataListParm.pagecount,
        returntype:this.recipeNameTemp3.getdataListParm.returntype,
        parammaps:this.recipeNameTemp3.getdataListParm.parammaps
      }
      postJson(url, data).then(response => {
        if (response.data.list !== null && response.data.list !=='') {
          for (let i = 0; i < response.data.list.length; i++) {
            if (response.data.list[i].arrList == null) {
              this.$set(response.data.list[i], 'arrList', [])
            }
          }
          this.recipeNameTemp3.list = response.data.list
          this.recipeNameTemp3.pageNum = response.data.pageNum
          this.recipeNameTemp3.pageSize = response.data.pageSize
          this.recipeNameTemp3.total = response.data.total
        } else {
          this.recipeNameTemp3.list = []
          this.recipeNameTemp3.total = 0
        }
        console.log(response.data, 'response.data')
        setTimeout(() => {
          this.recipeNameTemp3.listLoading = false
        }, 100)
      })
    },
    handleRecipeNameSearch3(){
      this.getRecipeNameList2()
    },
    clickFence3(row) {
      console.log('点击了撒料统计-栏舍',row)
      this.fenceTemp.temp = Object.assign({}, row)
      this.fenceTemp.dialogFormVisible = true
      this.textMap.fenceTxt = '配方修改记录——栏舍：' + row.栏舍
      this.fenceTemp.dialogStatus = 'fenceTxt'
      this.fenceTemp.activeName = 'first'
      this.fenceTemp.tab1.getdataListParm.parammaps.barname = row.栏舍
      this.fenceTemp.tab2.getdataListParm.parammaps.barname = row.栏舍
      this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime = []
      const start = new Date()
      const end = new Date()
      this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
      this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
      this.getFenceList1()
    },
    getFenceList1(){
      this.fenceTemp.tab1.listLoading = true
      this.fenceTemp.tab1.getdataListParm.parammaps.fitid = this.fenceTemp.temp.id
      if (this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime == null) {
        this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime = ''
        this.fenceTemp.tab1.getdataListParm.parammaps.startDate = ''
        this.fenceTemp.tab1.getdataListParm.parammaps.endDate = ''
      } else {
        this.fenceTemp.tab1.getdataListParm.parammaps.startDate = this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[0]+' 00:00'
        this.fenceTemp.tab1.getdataListParm.parammaps.endDate = this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[1]+' 23:59'
      }
      const url = 'authdata/feedp/history'
      // const data = this.fenceTemp.tab1.getdataListParm
      const data = {
          barname:this.fenceTemp.tab1.getdataListParm.parammaps.barname,
          startDate:this.fenceTemp.tab1.getdataListParm.parammaps.startDate,
          endDate:this.fenceTemp.tab1.getdataListParm.parammaps.endDate
      }
      postJson(url, data).then(response => {
        this.fenceTemp.tab1.listLoading = false
        if (response.data !== null && response.data !== '') {
          for (let i = 0; i < response.data.length; i++) {
            if (response.data[i].ptid == undefined || response.data[i].ptname == '') {
              this.$set(response.data[i], 'ptid', '')
              this.$set(response.data[i], 'ptname', '')
            }
          }
          this.fenceTemp.tab1.list = response.data
          this.handleSpan1()
        } else {
          this.fenceTemp.tab1.list = []
          this.fenceTemp.tab1.total = 0
        }
        console.log(response.data, 'response.data')
        setTimeout(() => {
          this.fenceTemp.tab1.listLoading = false
        }, 100)
      })
    },
    getFenceList2(){
      this.fenceTemp.tab2.listLoading = true
      this.fenceTemp.tab2.getdataListParm.parammaps.fitid = this.fenceTemp.temp.id
      if (this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime == null) {
        this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime = ''
        this.fenceTemp.tab2.getdataListParm.parammaps.startDate = ''
        this.fenceTemp.tab2.getdataListParm.parammaps.endDate = ''
      } else {
        this.fenceTemp.tab2.getdataListParm.parammaps.startDate = this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime[0]+' 00:00'
        this.fenceTemp.tab2.getdataListParm.parammaps.endDate = this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime[1]+' 23:59'
      }
      const url = 'authdata/spillageall/history'
      const data = {
        barname:this.fenceTemp.tab2.getdataListParm.parammaps.barname,
        pastureid:Cookies.get('pastureid'),
        startDate:this.fenceTemp.tab2.getdataListParm.parammaps.startDate,
        endDate:this.fenceTemp.tab2.getdataListParm.parammaps.endDate
      }
      postJson(url, data).then(response => {
        if (response.data.data !== null) {
          // 表数据
          this.fenceTemp.tab2.list = response.data.data
          this.fenceTemp.tab2.tableLabel = response.data.trains
          this.handleSpan2()
        } else {
          this.fenceTemp.tab2.list = []
          this.fenceTemp.tab2.total = 0
        }
        console.log(response.data, 'response.data')
        setTimeout(() => {
          this.fenceTemp.tab2.listLoading = false
        }, 100)
      })
    },

    handleFenceSearch(){
      if(this.fenceTemp.activeName == 'first'){
        this.getFenceList1()
      }else{
        this.getFenceList2()
      }
    },
    handleFenceTabClick(item){
      const start = new Date()
      const end = new Date()
      if(item == 'first'){
        this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime = []
        this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
        this.fenceTemp.tab1.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
        this.getFenceList1()
      }else{
        this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime = []
        this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start.setTime(start.getTime() - 3600 * 1000 * 24 * 7), '{y}-{m}-{d}')
        this.fenceTemp.tab2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end.setTime(end.getTime()), '{y}-{m}-{d}')
        this.getFenceList2()
      }
    },
    handleSpan1() {
      this.fenceTemp.mergekeys1.forEach(key => {
        this.fenceTemp.spanObj1[key] = []
        let position = 0
        this.fenceTemp.tab1.list.forEach((item, index) => {
          if (index === 0) {
            this.fenceTemp.spanObj1[key].push(1)
            position = 0
          } else {
            if (this.fenceTemp.tab1.list[index][key] === this.fenceTemp.tab1.list[index - 1][key]) {
              this.fenceTemp.spanObj1[key][position] += 1
              this.fenceTemp.spanObj1[key].push(0)
            } else {
              this.fenceTemp.spanObj1[key].push(1)
              position = index
            }
          }
        })
      })
    },
    handleSpan2() {
      this.fenceTemp.mergekeys2.forEach(key => {
        this.fenceTemp.spanObj2[key] = []
        let position = 0
        this.fenceTemp.tab2.list.forEach((item, index) => {
          if (index === 0) {
            this.fenceTemp.spanObj2[key].push(1)
            position = 0
          } else {
            if (this.fenceTemp.tab2.list[index][key] === this.fenceTemp.tab2.list[index - 1][key]) {
              this.fenceTemp.spanObj2[key][position] += 1
              this.fenceTemp.spanObj2[key].push(0)
            } else {
              this.fenceTemp.spanObj2[key].push(1)
              position = index
            }
          }
        })
      })
    },
    objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
      if(this.fenceTemp.mergekeys1 !== null && this.fenceTemp.mergekeys1 !== ''){
        for (let i = 0; i < this.fenceTemp.mergekeys1.length; i++) {
          if (column.property === this.fenceTemp.mergekeys1[i]) {
            const _row = this.fenceTemp.spanObj1[this.fenceTemp.mergekeys1[i]][rowIndex]
            const _col = _row > 0 ? 1 : 0
            return {
              rowspan: _row,
              colspan: _col
            }
          }
        }
      }
    },
    objectSpanMethod2({ row, column, rowIndex, columnIndex }) {
      if(this.fenceTemp.mergekeys2 !== null && this.fenceTemp.mergekeys2 !== ''){
        for (let i = 0; i < this.fenceTemp.mergekeys2.length; i++) {
          if (column.property === this.fenceTemp.mergekeys2[i]) {
            const _row = this.fenceTemp.spanObj2[this.fenceTemp.mergekeys2[i]][rowIndex]
            const _col = _row > 0 ? 1 : 0
            return {
              rowspan: _row,
              colspan: _col
            }
          }
        }
      }
    },
    clickRecipeTemplate3(row){
      this.modificationRecordTemp.temp1 = Object.assign({}, row)
      // setTimeout(()=>{
      //   this.modificationRecordTemp.dialogFormVisible = true
      // },500)
      this.modificationRecordTemp.dialogStatus = 'modificationRecord'
      this.getFTHisdryweightList()
      this.getRecipeTemplateList1()
    },
    getRecipeTemplateList1() {
      this.modificationRecordTemp.listLoading1 = true
      let url = 'authdata/recipetemplate/history'
      let data = {
        ftid: this.modificationRecordTemp.temp1.ftid,
        pastureid: Cookies.get('pastureid'),
        createdate: this.modificationRecordTemp.temp1.createdate,
        lastftid:this.modificationRecordTemp.temp1.lastftid
      }
      postJson(url, data).then(response => {
        if (response.data !== null) {
          this.modificationRecordTemp.list1 = response.data.current
          this.modificationRecordTemp.list2 = response.data.last
        } else {
          this.modificationRecordTemp.list1 = []
        }
          this.modificationRecordTemp.dialogFormVisible = true
        setTimeout(() => {
          this.modificationRecordTemp.listLoading1 = false
        }, 100)
      })
    },
    getFTHisdryweightList(){
      let url = 'authdata/GetDataByName'
      let data = {
        name:'getFTHisdryweight',
        parammaps:{
          ftid: this.modificationRecordTemp.temp1.ftid,
          pastureid: Cookies.get('pastureid'),
          createdate: this.modificationRecordTemp.temp1.createdate
        }
      }
      postJson(url, data).then(response => {
        console.log(response)
        if (response.data !== null) {
          this.modificationRecordTemp.lastdate = response.data.list.lastdate
          this.modificationRecordTemp.currentdate = response.data.list.currentdate
        } else {
          this.modificationRecordTemp.lastdate = ''
          this.modificationRecordTemp.currentdate = ''
        }
      })
    },
    changeccysChecked(item){
      if(item == false){
        this.tab.table.getdataListParm.parammaps.error = ''
      }
      this.getTabList()
      this.getTabList2()
    },
    getSummaries1(param) {
      const { columns, data } = param
      const sums = []
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = '合计'
          return
        }
        if (column.property !== undefined) {
          // 加了prop属性的el-table-column 才能找到column.property
          const values = data.map(item => Number(item[column.property]))
          if (!values.every(value => isNaN(value))) {
            sums[index] = values.reduce((prev, curr) => {
              const value = Number(curr)
              if (!isNaN(value)) {
                return prev + curr // 多行相加
              } else {
                return prev
              }
            }, 0)
            if(this.modificationRecordTemp.lastdate == undefined){
              this.modificationRecordTemp.lastdate = ''
            }
            sums[index] = sums[index].toFixed(4) + '(干物质量：' + this.modificationRecordTemp.lastdate + ')'
          } else {
            sums[index] = ''
          }
        }
      })
      // console.log(sums, 'sums[index]')
      return sums
    },
    getSummaries2(param) {
      const { columns, data } = param
      const sums = []
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = '合计'
          return
        }
        if (column.property !== undefined) {
          // 加了prop属性的el-table-column 才能找到column.property
          const values = data.map(item => Number(item[column.property]))
          if (!values.every(value => isNaN(value))) {
            sums[index] = values.reduce((prev, curr) => {
              const value = Number(curr)
              if (!isNaN(value)) {
                return prev + curr // 多行相加
              } else {
                return prev
              }
            }, 0)
            if(this.modificationRecordTemp.currentdate == undefined){
              this.modificationRecordTemp.currentdate = ''
            }
            sums[index] = sums[index].toFixed(4) + '(干物质量：' + this.modificationRecordTemp.currentdate + ')'
          } else {
            sums[index] = ''
          }
        }
      })
      // console.log(sums, 'sums[index]')
      return sums
    },
  }
}
</script>
<style lang="scss" scoped>
  .search{
    .el-radio{margin-right: 10px;}
  }
  .filter-item1{
    margin-top: 10px;
    span{margin-right: 5px;}
  }
  .button{
    height: 95px;
    .exportTable2{float: right;margin-right: 5px;margin-top: 5px;}
  }
  .app-container1{padding-left: 10px;background-color: #F4F4F4;}
  .dashboard-editor-container {
    background-color: #F4F4F4;
    .grid-content{
      background-color:#fff;padding: 0 10px;
      h4{text-align: center;line-height: 50px;}
    }
  }
  .table{margin-bottom: 10px;}
  /deep/ .el-table th>.cell{
    padding-left: 0 !important;;
    padding-right: 0 !important;;
  }
  /deep/ .el-table td>.cell{
    padding-left: 0 !important;;
    padding-right: 0 !important;;
  }
  /deep/ .specificDate .el-radio{margin-right: 0px;}
  /deep/ .el-radio-button__inner{padding: 7px 7px ;}
  /deep/ .el-range-editor.el-input__inner .el-input__icon{width: 0;}
  .modificationRecord .top{
    height: 300px;width: 100%;display: flex;flex-direction: row;
    .left{
      width: 200px;
      height: 100%;
      div{line-height: 35px;}
    }
    .right {
        height: 200px;
        flex: 1;
    }
  }
  .modificationRecord .bottom{
    height: 300px;width: 100%;display: flex;flex-direction: row;
    .left{
      width: 200px;
      height: 100%;
      div{line-height: 35px;}
    }
    .right {
        height: 200px;
        flex: 1;
    }
  }
</style>
