duanxiaoduan 2 gadi atpakaļ
vecāks
revīzija
a7336c0c3e

+ 12 - 20
src/views/basicData/feedTable/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <div class="search">
+    <div class="search" ref="search">
       <el-input v-model="table.getdataListParm.parammaps.fname" placeholder="饲料名称" style="width: 130px;" class="filter-item" clearable />
       <el-select v-model="table.getdataListParm.parammaps.fclassid" filterable placeholder="饲料类别" class="filter-item" style="width: 150px;" clearable>
         <el-option v-for="item in feedTypeList" :key="item.id" :label="item.mixname" :value="item.id" />
@@ -35,20 +35,15 @@
       <el-button class="successBorder" @click="handleSearch">查询</el-button>
       <el-button class="successBorder" @click="handleRefresh">重置</el-button>
     </div>
-
-
-    <div class="operation">
-      <el-button v-if="isRoleEdit" style="float:left;" class="success" icon="el-icon-plus" @click="handleCreate">新增</el-button>
-      <el-button v-if="isRoleEdit" style="float:left;" class="danger" icon="el-icon-delete" @click="handleDelete">删除</el-button>
-      <el-button class="success" style="float:left;" icon="el-icon-receiving" @click="handleFeedBank">饲料库</el-button>
-      <el-button v-if="isOrder && isRoleEdit" style="float:left;" icon="el-icon-sort" class="success" @click="handleChangeOrder">更改顺序</el-button>
-       <div v-else style="float:left;margin-left: 10px;">
+    <div class="operation" ref="operation">
+      <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="handleCreate">新增</el-button>
+      <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" @click="handleDelete">删除</el-button>
+      <el-button class="success" icon="el-icon-receiving" @click="handleFeedBank">饲料库</el-button>
+      <el-button v-if="isOrder && isRoleEdit" icon="el-icon-sort" class="success" @click="handleChangeOrder">更改顺序</el-button>
+       <div v-else style="display: inline-block;">
         <el-button v-if="isRoleEdit" icon="el-icon-folder-checked" class="success" @click="saveChangeOrder">保存</el-button>
         <el-button v-if="isRoleEdit" icon="el-icon-close" class="sortCancel" @click="cancelChangeOrder">取消</el-button>
       </div>
-
-
-
       <el-upload style="float: right;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImport" :on-success="handleImportSuccess">
         <el-button v-if="isRoleEdit" class="import" icon="el-icon-download" style="float: right;">导入</el-button>
       </el-upload>
@@ -59,9 +54,6 @@
           <el-dropdown-item @click.native="handleExport(2)">导出数据</el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
-
-
-
     </div>
 
     <div class="table">
@@ -79,10 +71,11 @@
         :cell-style="cellStyle"
         class="elTable table-fixed"
         row-key="id"
-        @selection-change="handleSelectionChange"
+        @selection-change="handleSelectionChange"
+        :max-height="myHeight"
       >
         <u-table-column type="selection" align="center" width="50" fixed="left" />
-        <u-table-column label="序号" type="index" align="center" width="50" fixed="left" />
+        <u-table-column label="序号" type="index" align="center" width="50" fixed="left"/>
         <u-table-column label="饲料名称" min-width="80px" align="center" fixed="left">
           <template slot-scope="scope">
             <span>{{ scope.row.fname }}</span>
@@ -886,8 +879,8 @@ export default {
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       dropState: false,
-      isOrder: true
-
+      isOrder: true,
+      myHeight:document.documentElement.clientHeight - 85- 150
     }
   },
 
@@ -1775,7 +1768,6 @@ export default {
 </script>
 <style lang="scss" scoped>
   .search{margin-top:10px;}
-  .table{margin-top:10px;}
   $width:350px;
   $left:325px;
   .selectInput{

+ 84 - 10
src/views/formulationPlan/dailyExecutionPlan/index.vue

@@ -159,7 +159,8 @@
                 height="450"
                 :row-style="rowStyle"
                 :cell-style="cellStyle"
-                class="elTable table-fixed"
+                class="elTable table-fixed"
+                :span-method="objectSpanMethod"
               >
                 <el-table-column label="操作序号" min-width="130px" align="center">
                   <template slot-scope="scope">
@@ -175,6 +176,11 @@
                   <template slot-scope="scope">
                     <span>{{ scope.row.weight }}</span>
                   </template>
+                </el-table-column>
+                <el-table-column label="描述" prop="description" min-width="130px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.description }}</span>
+                  </template>
                 </el-table-column>
               </el-table>
             </div>
@@ -204,7 +210,8 @@
                 height="450"
                 :row-style="rowStyle"
                 :cell-style="cellStyle"
-                class="elTable table-fixed"
+                class="elTable table-fixed"
+                :span-method="objectSpanMethod"
               >
                 <el-table-column label="操作序号" min-width="130px" align="center">
                   <template slot-scope="scope">
@@ -220,6 +227,11 @@
                   <template slot-scope="scope">
                     <span>{{ scope.row.weight }}</span>
                   </template>
+                </el-table-column>
+                <el-table-column label="描述" prop="description" min-width="130px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.description }}</span>
+                  </template>
                 </el-table-column>
               </el-table>
             </div>
@@ -287,7 +299,8 @@
               height="450"
               :row-style="rowStyle"
               :cell-style="cellStyle"
-              class="elTable table-fixed"
+              class="elTable table-fixed"
+              :span-method="objectSpanMethod"
             >
               <el-table-column label="操作序号" min-width="130px" align="center">
                 <template slot-scope="scope">
@@ -303,6 +316,11 @@
                 <template slot-scope="scope">
                   <span>{{ scope.row.useinbar }}</span>
                 </template>
+              </el-table-column>
+              <el-table-column label="描述" prop="description" min-width="130px" align="center">
+                <template slot-scope="scope">
+                  <span>{{ scope.row.description }}</span>
+                </template>
               </el-table-column>
             </el-table>
           </div>
@@ -366,7 +384,8 @@
                 height="450"
                 :row-style="rowStyle"
                 :cell-style="cellStyle"
-                class="elTable table-fixed"
+                class="elTable table-fixed"
+                :span-method="objectSpanMethod"
               >
                 <el-table-column label="操作序号" min-width="130px" align="center">
                   <template slot-scope="scope">
@@ -382,6 +401,11 @@
                   <template slot-scope="scope">
                     <span>{{ scope.row.weight }}</span>
                   </template>
+                </el-table-column>
+                <el-table-column label="描述" prop="description" min-width="130px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.description }}</span>
+                  </template>
                 </el-table-column>
               </el-table>
             </div>
@@ -466,6 +490,11 @@
                   <template slot-scope="scope">
                     <span>{{ scope.row.weight }}</span>
                   </template>
+                </el-table-column>
+                <el-table-column label="描述" prop="description" min-width="130px" align="center">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.description }}</span>
+                  </template>
                 </el-table-column>
               </el-table>
             </div>
@@ -683,7 +712,7 @@
 <script>
 import { GetDataByName, GetDataByNames, ExecDataByConfig, PostDataByName, getDorm, GetReportform, checkButtons,postJson } from '@/api/common'
 import RevisePlan from './revisePlan.vue'
-import { parseTime, json2excel } from '@/utils/index.js'
+import { parseTime, json2excel,handleTableSpan, handleObjectSpanMethod } from '@/utils/index.js'
 import Cookies from 'js-cookie'
 import Sortable from 'sortablejs'
 import { MessageBox } from 'element-ui'
@@ -907,7 +936,9 @@ export default {
         }
       },
       myMaxTimes:'',
-      tipsList:[]
+      tipsList:[],
+      spanObj: {},
+      mergekeys: ['sort', 'description'],
     }
   },
 
@@ -1318,14 +1349,14 @@ export default {
             for (let i = 0; i < this.table2.list.length; i++) {
               if (b !== parseInt(this.table2.list[i].sort)) {
                 b = this.table2.list[i].sort
-                arr.push({ 'sort': '小计', 'weight': a.toFixed(parseInt(Cookies.get('decimal'))) })
+                // arr.push({ 'sort': '小计', 'weight': a.toFixed(parseInt(Cookies.get('decimal'))) })
                 a = 0
               }
               a = a + parseFloat(this.table2.list[i].weight)
               c = c + parseFloat(this.table2.list[i].weight)
               arr.push(this.table2.list[i])
             }
-            arr.push({ 'sort': '小计', 'weight': a.toFixed(parseInt(Cookies.get('decimal'))) })
+            // arr.push({ 'sort': '小计', 'weight': a.toFixed(parseInt(Cookies.get('decimal'))) })
             arr.push({ 'sort': '总计', 'weight': c.toFixed(parseInt(Cookies.get('decimal'))) })
             this.table2.list = arr
           }
@@ -1355,7 +1386,8 @@ export default {
           this.table2.total = response.data.total
         } else {
           this.table2.list = []
-        }
+        }
+        this.handleSpan()
         setTimeout(() => {
           this.table2.listLoading = false
         }, 100)
@@ -2110,7 +2142,49 @@ export default {
       }).catch(() => {
         this.$message({ type: 'info', message: '已取消删除' })
       })
-    }
+    },
+    handleSpan() {
+      this.mergekeys.forEach(key => {
+        this.spanObj[key] = []
+        let position = 0
+        this.table2.list.forEach((item, index) => {
+          if (index === 0) {
+            this.spanObj[key].push(1)
+            position = 0
+          } else {
+            if (key == 'description') {
+              if (this.table2.list[index][key] === this.table2.list[index - 1][key] && this.table2.list[index]['sort'] === this.table2.list[index - 1]['sort']) {
+                this.spanObj[key][position] += 1
+                this.spanObj[key].push(0)
+              } else {
+                this.spanObj[key].push(1)
+                position = index
+              }
+            } else {
+              if (this.table2.list[index][key] === this.table2.list[index - 1][key]) {
+                this.spanObj[key][position] += 1
+                this.spanObj[key].push(0)
+              } else {
+                this.spanObj[key].push(1)
+                position = index
+              }
+            }
+          }
+        })
+      })
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      for (let i = 0; i < this.mergekeys.length; i++) {
+        if (column.property === this.mergekeys[i]) {
+          const _row = this.spanObj[this.mergekeys[i]][rowIndex]
+          const _col = _row > 0 ? 1 : 0
+          return {
+            rowspan: _row,
+            colspan: _col
+          }
+        }
+      }
+    },
 
   }
 }

+ 37 - 34
src/views/formulationPlan/dhedFormula/index.vue

@@ -13,19 +13,19 @@
         </el-select>
         <!-- <el-input v-model="table.getdataListParm.parammaps.tname" placeholder="请输入配方名称" style="width: 180px;" class="filter-item" /> -->
         <el-button class="successBorder" @click="handleSearch">查询</el-button>
+        <el-button v-if="isRoleEdit" class="successBorder" @click="handleDryMatterRegulation">干物质调节</el-button>
+        <el-upload style="float: right;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImport" :on-success="handleImportSuccess">
+          <el-button v-if="isRoleEdit" class="import" icon="el-icon-download" style="float: right;">导入</el-button>
+        </el-upload>
+        <el-dropdown style="float: right;margin-right: 10px;">
+          <el-button class="export" icon="el-icon-upload2">导出</el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item @click.native="handleExport(1)">导出模板</el-dropdown-item>
+            <el-dropdown-item @click.native="handleExport(2)">导出数据</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-button class="export" style="float: right;margin-right: 10px;" @click="handleHistoryRecords">历史记录</el-button>
       </div>
-      <el-button v-if="isRoleEdit" class="successBorder" style="float: left;" @click="handleDryMatterRegulation">干物质调节</el-button>
-      <el-upload style="float: right;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImport" :on-success="handleImportSuccess">
-        <el-button v-if="isRoleEdit" class="import" icon="el-icon-download" style="float: right;">导入</el-button>
-      </el-upload>
-      <el-dropdown style="float: right;margin-right: 10px;">
-        <el-button class="export" icon="el-icon-upload2">导出</el-button>
-        <el-dropdown-menu slot="dropdown">
-          <el-dropdown-item @click.native="handleExport(1)">导出模板</el-dropdown-item>
-          <el-dropdown-item @click.native="handleExport(2)">导出数据</el-dropdown-item>
-        </el-dropdown-menu>
-      </el-dropdown>
-      <el-button class="export" style="float: right;margin-right: 10px;" @click="handleHistoryRecords">历史记录</el-button>
     </div>
     <div class="search" />
     <div class="table">
@@ -242,7 +242,7 @@
           <!-- <el-button class="successBorder" @click="handleApplication">应用</el-button> -->
         </div>
         <div class="table">
-          <el-table
+          <u-table
             :key="history.tableKey"
             v-loading="history.listLoading"
             element-loading-text="给我一点时间"
@@ -255,30 +255,32 @@
             :cell-style="cellStyle"
             class="elTable table-fixed"
             :span-method="objectSpanMethod"
+            :max-height="500"
           >
-            <el-table-column :key="1" label="序号" align="center" type="index" width="50px" class-name="small-padding fixed-width" fixed="left">
+            <u-table-column :key="1" label="序号" align="center" type="index" width="50px" class-name="small-padding fixed-width" fixed="left" />
+            <!-- <u-table-column :key="1" label="序号" align="center" type="index" width="50px" class-name="small-padding fixed-width" fixed="left">
               <template slot-scope="scope">
                 <span>{{ scope.$index + (history.pageNum-1) * history.pageSize + 1 }}</span>
               </template>
-            </el-table-column>
-            <el-table-column :key="2" label="栏舍名称" prop="barname" min-width="90px" align="center" class-name="small-padding fixed-width" fixed="left" />
-            <el-table-column :key="3" label="班次" prop="times" min-width="90px" align="center" class-name="small-padding fixed-width" fixed="left" />
-            <el-table-column :key="4" label="软件牛头数" prop="softccount" min-width="70px" align="center" />
-            <el-table-column :key="5" label="实际牛头数" prop="ccount" min-width="70px" align="center" />
-            <el-table-column :key="6" label="系数(%)" prop="ratio" min-width="70px" align="center" />
-            <el-table-column :key="7" label="系数头数" prop="ccountratio" min-width="70px" align="center" />
-            <el-table-column :key="8" label="配方模板" prop="ptname" min-width="70px" align="center" />
-            <el-table-column v-if="table.isPtsfname" :key="9" label="补料配方" prop="ptsname" min-width="70px" align="center" />
-            <el-table-column :key="10" label="班次比例" prop="tratio" min-width="70px" align="center" />
-            <el-table-column :key="11" label="班次重量" prop="weight" min-width="70px" align="center" />
-            <el-table-column :key="12" label="配方重量" prop="pweight" min-width="70px" align="center" />
-            <el-table-column v-if="table.isPtsfname" :key="13" label="补料重量" prop="ptweight" min-width="70px" align="center" />
-            <el-table-column :key="14" label="配方干物质量" prop="dryweight" min-width="70px" align="center" />
-            <el-table-column :key="15" label="饲喂干物质量" prop="swdryw" min-width="70px" align="center" />
-            <el-table-column :key="16" label="采样干物质量" prop="cydryw" min-width="70px" align="center" />
-            <el-table-column :key="17" label="日投喂量" prop="sumweight" min-width="70px" align="center" />
-          </el-table>
-          <pagination2 v-show="history.total>0" :total="history.total" :page.sync="history.getdataListParm.offset" :limit.sync="history.getdataListParm.pagecount" @pagination="getHistoryList" />
+            </u-table-column> -->
+            <u-table-column :key="2" label="栏舍名称" prop="barname" min-width="90px" align="center" class-name="small-padding fixed-width" fixed="left" />
+            <u-table-column :key="3" label="班次" prop="times" min-width="90px" align="center" class-name="small-padding fixed-width" fixed="left" />
+            <u-table-column :key="4" label="软件牛头数" prop="softccount" min-width="70px" align="center" />
+            <u-table-column :key="5" label="实际牛头数" prop="ccount" min-width="70px" align="center" />
+            <u-table-column :key="6" label="系数(%)" prop="ratio" min-width="70px" align="center" />
+            <u-table-column :key="7" label="系数头数" prop="ccountratio" min-width="70px" align="center" />
+            <u-table-column :key="8" label="配方模板" prop="ptname" min-width="70px" align="center" />
+            <u-table-column v-if="table.isPtsfname" :key="9" label="补料配方" prop="ptsname" min-width="70px" align="center" />
+            <u-table-column :key="10" label="班次比例" prop="tratio" min-width="70px" align="center" />
+            <u-table-column :key="11" label="班次重量" prop="weight" min-width="70px" align="center" />
+            <u-table-column :key="12" label="配方重量" prop="pweight" min-width="70px" align="center" />
+            <u-table-column v-if="table.isPtsfname" :key="13" label="补料重量" prop="ptweight" min-width="70px" align="center" />
+            <u-table-column :key="14" label="配方干物质量" prop="dryweight" min-width="70px" align="center" />
+            <u-table-column :key="15" label="饲喂干物质量" prop="swdryw" min-width="70px" align="center" />
+            <u-table-column :key="16" label="采样干物质量" prop="cydryw" min-width="70px" align="center" />
+            <u-table-column :key="17" label="日投喂量" prop="sumweight" min-width="70px" align="center" />
+          </u-table>
+          <!-- <pagination2 v-show="history.total>0" :total="history.total" :page.sync="history.getdataListParm.offset" :limit.sync="history.getdataListParm.pagecount" @pagination="getHistoryList" /> -->
         </div>
       </div>
       <div slot="footer" class="dialog-footer" style="bottom: 10px;">
@@ -978,7 +980,8 @@ export default {
           name: 'getPlanModifyFPlist',
           page: 1,
           offset: 1,
-          pagecount: 12,
+          // pagecount: 12,
+          pagecount: '',
           returntype: 'Map',
           parammaps: {
             pastureid: Cookies.get('pastureid'),

+ 4 - 4
src/views/formulationPlan/recipeTemplate/index.vue

@@ -768,15 +768,15 @@
             <el-table-column label="修改时间" width="100px" align="center" prop="datetime1" />
             <el-table-column label="饲料名称(单位:kg)" min-width="800px" align="center">
               <template slot-scope="scope">
-                <div v-for="element in scope.row.arrList" :key="element.name" class="list-group-item2 item" style="width:150px;float: left;margin: 5px 5px;padding: 0;height: 30px;">
-                  <el-tooltip v-if="element.change== 'red'" placement="top">
+                <div v-for="element in scope.row.arrList" :key="element.name" class="list-group-item2 item" style="width:150px;float: left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin: 5px 5px;padding: 0;height: 30px;">
+                  <el-tooltip v-if="element.change== 'red'" placement="top" :open-delay="1000">
                     <div slot="content">{{ element.name }}( {{ element.weight }} / {{ element.Eweight }} )</div>
                     <span :style="{'color':element.change}" style="display: block;height:30px;line-height: 30px;">
                       {{ element.name }}( {{ element.weight }} / {{ element.Eweight }} )
                     </span>
                   </el-tooltip>
-                  <el-tooltip v-else placement="top">
-                    <div slot="content">{{ element.name }}( {{ element.weight }} )</div>
+                  <el-tooltip v-else placement="top" :open-delay="1000">
+                    <div slot="content">{{ element.name }}( {{ element.weight }})</div>
                     <span :style="{'color':element.change}" style="display: block;height:30px;line-height: 30px;">
                       {{ element.name }}( {{ element.weight }})
                     </span>

+ 2 - 1
src/views/formulationPlan/surplusMaterialPlan/index.vue

@@ -1228,7 +1228,8 @@ console.log('点击了栏舍1', barSortList)
       this.create.dialogStatus = 'update'
       this.dialogFull = false
       this.create.dialogFormVisible = true
-
+      this.getCarFollowParm.parammaps.times = row.times
+      this.getCarFollowList()
 
       row.temp = {}
       row.temp2 = {}

+ 3 - 3
src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue

@@ -732,11 +732,11 @@
     <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;float: left;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" />
+      <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="pickerOptions" />
     </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=='first'" :disabled="isokDisable" @click="exportList2()">确认2</el-button>
+      <el-button  class="save" v-if="activeName=='first'" :disabled="isokDisable" @click="exportList2()">确认</el-button>
       <el-button  class="save" v-else :disabled="isokDisable" @click="exportList3()">确认</el-button>
     </div>
     </el-dialog>
@@ -3762,7 +3762,7 @@ export default {
       var data = {
         'name':"getStatisticsHL",
         "page":1,"offset":1,"pagecount":"","returntype":"Map",
-        "parammaps":{"pastureid":"1647917519","startTime":"","stopTime":"","templetname":"","isuse":""}
+        "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}')

+ 1 - 1
src/views/statisticalAnalysis/errorAnalysis/pasture/see.vue

@@ -399,7 +399,7 @@ export default {
     },
     rowStyle({ row, rowIndex }) {
         let stylejson = {};
-        if (row.lweight !== row.actualweightminus) {
+        if (row.labnormal == 1) {
             stylejson.background = "#fb8072";// 背景颜色
             stylejson.maxHeight = '30px';// 背景颜色
             stylejson.height = '30px';// 背景颜色

+ 281 - 48
src/views/statisticalAnalysis/feedingEfficiency/pasture/index.vue

@@ -3,9 +3,9 @@
     <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.date" :clearable="false" type="date" placeholder="选择日期" style="width: 150px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
-          <el-button class="el-icon-arrow-left elIconArrowLeft" @click="handleBefore" />
-          <el-button class="el-icon-arrow-right elIconArrowRight" @click="handleNext" />
+          <el-date-picker v-model="tab.table.getdataListParm.parammaps.date" :clearable="false" style="width: 140px;margin-top: 5px;" type="date" placeholder="选择日期"> </el-date-picker>
+          <el-button class="el-icon-arrow-left elIconArrowLeft" :disabled="Beforedisabled1" @click="handleBefore" />
+          <el-button class="el-icon-arrow-right elIconArrowRight" :disabled="Nextdisabled1" @click="handleNext" />
           <span style="margin-left: 10px;">统计类型:</span>
           <el-radio v-model="tab.radio" label="1" @change="changeRadio">配方</el-radio>
           <el-radio v-model="tab.radio" label="2" @change="changeRadio">栏舍</el-radio>
@@ -389,9 +389,10 @@
       </el-tab-pane>
       <el-tab-pane label="牛群评估" name="second">
         <div class="search">
-          <el-date-picker v-model="tab2.table.getdataListParm.parammaps.date" :clearable="false" type="date" placeholder="选择日期" style="width: 150px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeTab2Date" />
-          <!-- <el-button class="el-icon-arrow-left elIconArrowLeft" @click="handleBefore2" />
-          <el-button class="el-icon-arrow-right elIconArrowRight" @click="handleNext2" /> -->
+          <el-date-picker v-model="tab2.date" :clearable="false" type="date" placeholder="选择日期" style="width: 150px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeTab2Date" />
+          <el-button class="export" style="float: right;" icon="el-icon-upload2" @click="handleDownload2">导出</el-button>
+          <!-- <el-button class="el-icon-arrow-left elIconArrowLeft" :disabled="Beforedisabled2" @click="handleBefore2" />
+          <el-button class="el-icon-arrow-right elIconArrowRight" :disabled="Nextdisabled2" @click="handleNext2" /> -->
         </div>
         <div class="table">
           <el-row :gutter="10">
@@ -516,8 +517,19 @@
         </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="pickerOptions" />
+    </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=='first'" :disabled="isokDisable" @click="exportList1()">确认</el-button>
+      <el-button  class="save" v-else :disabled="isokDisable" @click="exportList2()">确认</el-button>
+    </div>
+    </el-dialog>
   </div>
-
 </template>
 
 <script>
@@ -537,6 +549,31 @@ export default {
   components: { Pagination, mySelect },
   data() {
     return {
+      Beforedisabled1: false,
+      Nextdisabled1: false,
+      Beforedisabled2: false,
+      Nextdisabled2: 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()
+        }
+      },
       pickerMinMonth: '',
       pickerOptionsMonth: {
         onPick: ({ maxDate, minDate }) => {
@@ -604,7 +641,8 @@ export default {
             returntype: 'Map',
             parammaps: {
               pastureid: Cookies.get('pastureid'),
-              date: parseTime(new Date(), '{y}-{m}-{d}'),
+              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
+              stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
               ftname: '',
               barname: '',
               cowclass: ''
@@ -809,6 +847,7 @@ export default {
       },
 
       tab2: {
+        date:parseTime(new Date(), '{y}-{m}-{d}'),
         table: {
           getdataListParm: {
             name: 'getAssessCowPenn',
@@ -818,7 +857,8 @@ export default {
             returntype: 'Map',
             parammaps: {
               pastureid: Cookies.get('pastureid'),
-              date: parseTime(new Date(), '{y}-{m}-{d}')
+              startTime: parseTime(new Date(), '{y}-{m}-{d}'),
+              stopTime: parseTime(new Date(), '{y}-{m}-{d}')
             }
           },
           tableKey: 1,
@@ -882,6 +922,18 @@ export default {
           temp: {}
         }
       },
+      exportList:{
+        dialogFormVisible:false,
+        inputDatetime: [new Date(), new Date()]
+      },
+      textMap: {
+        exportList: '导出',
+      },
+      isokDisable:false,
+      tab2Download2List1:[],
+      tab2Download2List2:[],
+      tab2Download2List3:[],
+      tab2Download2List4:[],
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
       myHeight: document.documentElement.clientHeight - 85 - 210
@@ -1355,37 +1407,178 @@ export default {
     },
     // 导出
     handleDownload() {
-      if (this.tab.radio == '1') {
-        var excelDatas = [
+      this.exportList.dialogFormVisible = true
+      this.exportList.dialogStatus = 'exportList'
+    },
+    exportList1(){
+      this.isokDisable = true
+      var url = 'authdata/GetDataByName'
+      var data = {
+        'name':"getFeedEfficiencyFT",
+        "page":1,"offset":1,"pagecount":"","returntype":"Map",
+        "parammaps":{"pastureid":Cookies.get('pastureid'),"startTime":"","stopTime":"","barname":"","cowclass":"",'ftname':''}
+      }
+      data.parammaps.startTime = parseTime(this.exportList.inputDatetime[0],'{y}-{m}-{d}')
+      data.parammaps.stopTime = parseTime(this.exportList.inputDatetime[1],'{y}-{m}-{d}')
+      data.parammaps.barname = this.tab.table.getdataListParm.parammaps.barname
+      data.parammaps.ftname = this.tab.table.getdataListParm.parammaps.ftname
+      data.parammaps.cowclass = this.tab.table.getdataListParm.parammaps.cowclass
+      postJson(url,data).then(response => {
+        var exportList = []
+        if (response.data.list !== null) {
+          exportList = response.data.list
+        } else {
+          exportList = []
+        }
+        if (this.tab.radio == '1') {
+          var excelDatas = [
+            {
+              tHeader: ['配方模板', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方干物质采食量(kg/头)', '实际干物质采食量(kg/头)', '采食率(%)', '配方成本(元/头 )', '实际成本(元/ 头)', '产奶量(kg /头)', '饲料转化率', '公斤奶饲料成本'],
+              filterVal: ['配方模板', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', '采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
+              tableDatas: this.tab.table.list,
+              sheetName: '配方'
+            }
+          ]
+          json2excel(excelDatas, '效率统计-配方', true, 'xlsx')
+        } else if (this.tab.radio == '2') {
+          var excelDatas2 = [
+            {
+              tHeader: ['栏舍', '配方模板', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方干物质采食量(kg/头)', ' 实际干物质采食量( kg/头)', '采食率 (%)', '配方成本( 元/头)', '实际成本 (元/头)', '产奶量(kg/头)', '饲料转化率', '公斤奶饲料成本'],
+              filterVal: ['栏舍', '配方模板', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', '采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
+              tableDatas: this.tab.table.list,
+              sheetName: '栏舍'
+            }
+          ]
+          json2excel(excelDatas2, '效率统计-栏舍', true, 'xlsx')
+        } else if (this.tab.radio == '3') {
+          var excelDatas3 = [
+            {
+              tHeader: ['牲畜类别', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方 物质采食量(kg/ 头)', '实际干物质采 食量(kg/头)', ' 采食率(%)', '配方 成本(元/头)', '实际成本(元/头)', '产奶量(kg/头)', '饲料转化率', '公斤奶饲料成本'],
+              filterVal: ['牲畜类别', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', ' 采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
+              tableDatas: this.tab.table.list,
+              sheetName: '牲畜类别'
+            }
+          ]
+          json2excel(excelDatas3, '效率统计-牲畜类别', true, 'xlsx')
+        }
+        this.isokDisable = false
+        this.exportList.dialogFormVisible = false
+      })
+    },
+    handleDownload2(){
+      this.exportList.dialogFormVisible = true
+      this.exportList.dialogStatus = 'exportList'
+    },
+    exportList2(){
+      this.isokDisable = true
+      this.getTab2Download2List()
+    },
+    // 宾州筛分析
+    getTab2Download2List() {
+      var url = 'authdata/GetDataByName'
+      var data = {
+        'name':"getAssessCowPenn",
+        "page":1,"offset":1,"pagecount":"","returntype":"Map",
+        "parammaps":{"pastureid":Cookies.get('pastureid'),"startTime":"","stopTime":""}
+      }
+      data.parammaps.startTime = parseTime(this.exportList.inputDatetime[0],'{y}-{m}-{d}')
+      data.parammaps.stopTime = parseTime(this.exportList.inputDatetime[1],'{y}-{m}-{d}')
+      postJson(url,data).then(response => {
+        if (response.data.list !== null) {
+          this.tab2Download2List1 = response.data.list
+        } else {
+          this.tab2Download2List1 = []
+        }
+        this.getTab2Download2List2()
+      })
+    },
+
+    // 粪便筛分析
+    getTab2Download2List2() {
+      var url = 'authdata/GetDataByName'
+      var data = {
+        'name':"getAssessCowDung",
+        "page":1,"offset":1,"pagecount":"","returntype":"Map",
+        "parammaps":{"pastureid":Cookies.get('pastureid'),"startTime":"","stopTime":""}
+      }
+      data.parammaps.startTime = parseTime(this.exportList.inputDatetime[0],'{y}-{m}-{d}')
+      data.parammaps.stopTime = parseTime(this.exportList.inputDatetime[1],'{y}-{m}-{d}')
+      postJson(url,data).then(response => {
+        if (response.data.list !== null) {
+          this.tab2Download2List2 = response.data.list
+        } else {
+          this.tab2Download2List2 = []
+        }
+        this.getTab2Download2List3()
+      })
+    },
+
+    // BCS评分
+    getTab2Download2List3() {
+      var url = 'authdata/GetDataByName'
+      var data = {
+        'name':"getAssessBodyscore",
+        "page":1,"offset":1,"pagecount":"","returntype":"Map",
+        "parammaps":{"pastureid":Cookies.get('pastureid'),"startTime":"","stopTime":""}
+      }
+      data.parammaps.startTime = parseTime(this.exportList.inputDatetime[0],'{y}-{m}-{d}')
+      data.parammaps.stopTime = parseTime(this.exportList.inputDatetime[1],'{y}-{m}-{d}')
+      postJson(url,data).then(response => {
+        if (response.data.list !== null) {
+          this.tab2Download2List3 = response.data.list
+        } else {
+          this.tab2Download2List3 = []
+        }
+        this.getTab2Download2List4()
+      })
+    },
+
+    // 粪便评分
+    getTab2Download2List4() {
+      var url = 'authdata/GetDataByName'
+      var data = {
+        'name':"getAssessDungscore",
+        "page":1,"offset":1,"pagecount":"","returntype":"Map",
+        "parammaps":{"pastureid":Cookies.get('pastureid'),"startTime":"","stopTime":""}
+      }
+      data.parammaps.startTime = parseTime(this.exportList.inputDatetime[0],'{y}-{m}-{d}')
+      data.parammaps.stopTime = parseTime(this.exportList.inputDatetime[1],'{y}-{m}-{d}')
+      postJson(url,data).then(response => {
+        if (response.data.list !== null) {
+          this.tab2Download2List4 = response.data.list
+        } else {
+          this.tab2Download2List4 = []
+        }
+        var excelDatas0 = [
           {
-            tHeader: ['配方模板', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方干物质采食量(kg/头)', '实际干物质采食量(kg/头)', '采食率(%)', '配方成本(元/头 )', '实际成本(元/ 头)', '产奶量(kg /头)', '饲料转化率', '公斤奶饲料成本'],
-            filterVal: ['配方模板', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', '采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
-            tableDatas: this.tab.table.list,
-            sheetName: '配方'
-          }
-        ]
-        json2excel(excelDatas, '效率统计-配方', true, 'xlsx')
-      } else if (this.tab.radio == '2') {
-        var excelDatas2 = [
+            tHeader: ['宾州筛','第一层重量','第一层百分比','第二层重量','第二层百分比','第三层重量','第三层百分比','第四层重量','第四层百分比','参考标准'],
+            filterVal: ['barname','oneweight','onerate','twoweight','tworate','threeweight','threerate','fourweight','fourrate','standard'],
+            tableDatas: this.tab2Download2List1,
+            sheetName: '宾州筛分析'
+          },
           {
-            tHeader: ['栏舍', '配方模板', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方干物质采食量(kg/头)', ' 实际干物质采食量( kg/头)', '采食率 (%)', '配方成本( 元/头)', '实际成本 (元/头)', '产奶量(kg/头)', '饲料转化率', '公斤奶饲料成本'],
-            filterVal: ['栏舍', '配方模板', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', '采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
-            tableDatas: this.tab.table.list,
-            sheetName: '栏舍'
-          }
-        ]
-        json2excel(excelDatas2, '效率统计-栏舍', true, 'xlsx')
-      } else if (this.tab.radio == '3') {
-        var excelDatas3 = [
+            tHeader: ['粪便筛','第一层重量','第一层百分比','第二层重量','第二层百分比','第三层重量','第三层百分比','参考标准'],
+            filterVal: ['barname','oneweight','onerate','twoweight','tworate','threeweight','threerate','standard'],
+            tableDatas: this.tab2Download2List2,
+            sheetName: '粪便筛分析'
+          },
+          {
+            tHeader: ['栏舍','抽查样本数','单产','干物质采食量','泌乳天数','标准分数','2.5-分(数量、百分比)','2.75分(数量、百分比)','3分(数量、百分比)','3.25分(数量、百分比)','3.5分(数量、百分比)','3.75分(数量、百分比)','4+分(数量、百分比)'],
+            filterVal: ['barname','sumcowcount','product','dryweight','avgdim','standardscore','score25','score275','score3','score325','score35','score375','score4'],
+            tableDatas: this.tab2Download2List3,
+            sheetName: '体况评分'
+          },
           {
-            tHeader: ['牲畜类别', '实际牛头数', '应混料量(kg)', '实际混料量(kg)', '撒料量(kg)', '平均混料时间(min)', '转投剩料量(kg)', '今日剩料量(kg)', '剩料率(%)', 'TMR干物质(%)', '配方 物质采食量(kg/ 头)', '实际干物质采 食量(kg/头)', ' 采食率(%)', '配方 成本(元/头)', '实际成本(元/头)', '产奶量(kg/头)', '饲料转化率', '公斤奶饲料成本'],
-            filterVal: ['牲畜类别', '实际牛头数', '应混料量', '实际混料量', '撒料量', '混料时间', '转投剩料量', '今日剩料量', '剩料率', 'TMR干物质', '配方干物质采食量', '实际干物质采食量', ' 采食率', '配方成本', '实际成本', '产奶量', '饲料转化率', '公斤奶饲料成本'],
-            tableDatas: this.tab.table.list,
-            sheetName: '牲畜类别'
+            tHeader: ['栏舍','抽查样本数','单产','干物质采食量','泌乳天数','标准分数','1分(数量、百分比)','2分(数量、百分比)','3分(数量、百分比)','4分(数量、百分比)','5分(数量、百分比)'],
+            filterVal: ['barname','sumcowcount','product','dryweight','avgdim','standardscore','score1','score2','score3','score4','score5',],
+            tableDatas: this.tab2Download2List4,
+            sheetName: '粪便评分'
           }
         ]
-        json2excel(excelDatas3, '效率统计-牲畜类别', true, 'xlsx')
-      }
+        json2excel(excelDatas0, '饲喂效率—牛群评估', true, 'xlsx')
+        this.exportList.dialogFormVisible = false
+        this.isokDisable = false
+      })
     },
     // Tab切换
     handleTabClick() {
@@ -1402,7 +1595,7 @@ export default {
       } else if (this.activeName == 'second') {
         const start2 = new Date()
         start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
-        this.tab2.table.getdataListParm.parammaps.date = parseTime(start2, '{y}-{m}-{d}')
+        this.tab2.date = parseTime(start2, '{y}-{m}-{d}')
         this.getTab2List()
         this.getTab2List2()
         this.getTab2List3()
@@ -1508,7 +1701,15 @@ export default {
       if (this.tab.table.getdataListParm.parammaps.date !== '' && this.tab.table.getdataListParm.parammaps.date !== null) {
         this.tab.table.getdataListParm.parammaps.date = new Date(this.tab.table.getdataListParm.parammaps.date)
         var start = new Date(this.tab.table.getdataListParm.parammaps.date.setDate(this.tab.table.getdataListParm.parammaps.date.getDate() - 1))
-        this.tab.table.getdataListParm.parammaps.date = parseTime(start, '{y}-{m}-{d}')
+        if (start > Date.now() - 8.64e7) {
+          this.Nextdisabled1 = true
+          this.Beforedisabled1 = false
+        } else {
+          this.Nextdisabled1 = false
+          this.Beforedisabled1 = false
+        }
+        this.tab.table.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
+        this.tab.table.getdataListParm.parammaps.stopTime = parseTime(start, '{y}-{m}-{d}')
         this.getTabList()
       }
     },
@@ -1516,15 +1717,33 @@ export default {
       if (this.tab.table.getdataListParm.parammaps.date !== '' && this.tab.table.getdataListParm.parammaps.date !== null) {
         this.tab.table.getdataListParm.parammaps.date = new Date(this.tab.table.getdataListParm.parammaps.date)
         var stop = new Date(this.tab.table.getdataListParm.parammaps.date.setDate(this.tab.table.getdataListParm.parammaps.date.getDate() + 1))
+        if (stop > Date.now() - 8.64e7) {
+          this.Nextdisabled1 = true
+          this.Beforedisabled1 = false
+        } else {
+          this.Nextdisabled1 = false
+          this.Beforedisabled1 = false
+        }
         this.tab.table.getdataListParm.parammaps.date = parseTime(stop, '{y}-{m}-{d}')
+        this.tab.table.getdataListParm.parammaps.startTime = parseTime(stop, '{y}-{m}-{d}')
+        this.tab.table.getdataListParm.parammaps.stopTime = parseTime(stop, '{y}-{m}-{d}')
         this.getTabList()
       }
     },
     handleBefore2() {
-      if (this.tab2.table.getdataListParm.parammaps.date !== '' && this.tab2.table.getdataListParm.parammaps.date !== null) {
-        this.tab2.table.getdataListParm.parammaps.date = new Date(this.tab2.table.getdataListParm.parammaps.date)
-        var start = new Date(this.tab2.table.getdataListParm.parammaps.date.setDate(this.tab2.table.getdataListParm.parammaps.date.getDate() - 1))
-        this.tab2.table.getdataListParm.parammaps.date = parseTime(start, '{y}-{m}-{d}')
+      if (this.tab2.date !== '' && this.tab2.date !== null) {
+        this.tab2.date = new Date(this.tab2.date)
+        var start = new Date(this.tab2.date.setDate(this.tab2.date.getDate() - 1))
+        if (start > Date.now() - 8.64e7) {
+          this.Nextdisabled2 = true
+          this.Beforedisabled2 = false
+        } else {
+          this.Nextdisabled2 = false
+          this.Beforedisabled2 = false
+        }
+        this.tab2.date = parseTime(start, '{y}-{m}-{d}')
+        this.tab2.table.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
+        this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(start, '{y}-{m}-{d}')
         this.getTab2List()
         this.getTab2List2()
         this.getTab2List3()
@@ -1532,10 +1751,19 @@ export default {
       }
     },
     handleNext2() {
-      if (this.tab2.table.getdataListParm.parammaps.date !== '' && this.tab2.table.getdataListParm.parammaps.date !== null) {
-        this.tab2.table.getdataListParm.parammaps.date = new Date(this.tab2.table.getdataListParm.parammaps.date)
-        var stop = new Date(this.tab2.table.getdataListParm.parammaps.date.setDate(this.tab2.table.getdataListParm.parammaps.date.getDate() + 1))
-        this.tab2.table.getdataListParm.parammaps.date = parseTime(stop, '{y}-{m}-{d}')
+      if (this.tab2.date !== '' && this.tab2.date !== null) {
+        this.tab2.date = new Date(this.tab2.date)
+        var stop = new Date(this.tab2.date.setDate(this.tab2.date.getDate() + 1))
+        if (stop > Date.now() - 8.64e7) {
+          this.Nextdisabled2 = true
+          this.Beforedisabled2 = false
+        } else {
+          this.Nextdisabled2 = false
+          this.Beforedisabled2 = false
+        }
+        this.tab2.date = parseTime(stop, '{y}-{m}-{d}')
+        this.tab2.table.getdataListParm.parammaps.startTime = parseTime(stop, '{y}-{m}-{d}')
+        this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(stop, '{y}-{m}-{d}')
         this.getTab2List()
         this.getTab2List2()
         this.getTab2List3()
@@ -2225,6 +2453,8 @@ export default {
     // 宾州筛分析
     getTab2List() {
       this.tab2.table.listLoading = true
+      this.tab2.table.getdataListParm.parammaps.startTime = this.tab2.date
+      this.tab2.table.getdataListParm.parammaps.stopTime = this.tab2.date
       GetDataByName(this.tab2.table.getdataListParm).then(response => {
         console.log('宾州筛分析table数据', response.data.list)
         if (response.data.list !== null) {
@@ -2242,7 +2472,8 @@ export default {
     // 粪便筛分析
     getTab2List2() {
       this.tab2.table2.listLoading = true
-      this.tab2.table2.getdataListParm.parammaps.date = this.tab2.table.getdataListParm.parammaps.date
+      this.tab2.table2.getdataListParm.parammaps.startTime = this.tab2.date
+      this.tab2.table2.getdataListParm.parammaps.stopTime = this.tab2.date
       GetDataByName(this.tab2.table2.getdataListParm).then(response => {
         console.log('粪便筛分析table数据', response.data.list)
         if (response.data.list !== null) {
@@ -2260,7 +2491,8 @@ export default {
     // BCS评分
     getTab2List3() {
       this.tab2.table3.listLoading = true
-      this.tab2.table3.getdataListParm.parammaps.date = this.tab2.table.getdataListParm.parammaps.date
+      this.tab2.table3.getdataListParm.parammaps.startTime = this.tab2.date
+      this.tab2.table3.getdataListParm.parammaps.stopTime = this.tab2.date
       GetDataByName(this.tab2.table3.getdataListParm).then(response => {
         console.log('BCS评分table数据', response.data.list)
         if (response.data.list !== null) {
@@ -2278,7 +2510,8 @@ export default {
     // 粪便评分
     getTab2List4() {
       this.tab2.table4.listLoading = true
-      this.tab2.table4.getdataListParm.parammaps.date = this.tab2.table.getdataListParm.parammaps.date
+      this.tab2.table4.getdataListParm.parammaps.startTime = this.tab2.date
+      this.tab2.table4.getdataListParm.parammaps.stopTime = this.tab2.date
       GetDataByName(this.tab2.table4.getdataListParm).then(response => {
         console.log('成本分析table数据', response.data.list)
         if (response.data.list !== null) {

+ 1 - 1
src/views/statisticalAnalysis/formulationEvaluation/index.vue

@@ -887,5 +887,5 @@ export default {
   .tableSee .el-table__footer-wrapper { overflow: visible; }
   .tableSee .el-table::after { position: relative; }
   .tableSee .el-table--scrollable-x .el-table__body-wrapper { overflow: visible; }
-
+  .app-main{background: #fff;}
 </style>

+ 30 - 10
src/views/statisticalAnalysis/inventoryManagement/pasture/index.vue

@@ -56,12 +56,6 @@
           <el-select v-model="tab2.radio" placeholder="统计类型" class="filter-item" style="width: 120px;" @change="changeRadio2">
             <el-option v-for="item in statisticalTypeList2" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
-          <!-- <el-radio v-model="tab2.radio" label="1" @change="changeRadio2">牲畜类别</el-radio>
-          <el-radio v-model="tab2.radio" label="2" @change="changeRadio2">栏舍名称</el-radio>
-          <el-radio v-model="tab2.radio" label="3" @change="changeRadio2">日期</el-radio>
-          <el-radio v-model="tab2.radio" label="4" @change="changeRadio2">TMR设备编号</el-radio>
-          <el-radio v-model="tab2.radio" label="5" @change="changeRadio2">班次</el-radio>
-          <el-radio v-model="tab2.radio" label="6" @change="changeRadio2">车次</el-radio> -->
           <el-checkbox v-model="tab2.table.getdataListParm.checked" :true-label="1" :false-label="0" style="margin-right:10px;" @change="changeChecked">误差</el-checkbox>
           <el-input v-if="tab2.isRadio1" v-model="tab2.table.getdataListParm.parammaps.fname" class="filter-item filter-item1" style="width: 200px;" placeholder="牲畜类别" />
           <el-input v-if="tab2.isRadio2" v-model="tab2.table.getdataListParm.parammaps.fname" class="filter-item filter-item1" style="width: 200px;" placeholder="栏舍名称" />
@@ -269,7 +263,7 @@ export default {
       downLoad: {},
       rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
       cellStyle: { padding: 0 + 'px' },
-      myHeight2: document.documentElement.clientHeight -85 -200,
+      myHeight2: document.documentElement.clientHeight - 95 - 150,
       rowHeight: 30,
       isDispayTable2:false,
       isDispayTable3:false,
@@ -314,13 +308,19 @@ export default {
         start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
         end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 1)
         this.tab2.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
+        this.tab2.radio = '1'
+        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}')
         this.getTab2List()
       } else if (this.activeName == 'third') {
         const start3 = new Date()
         const end3 = new Date()
         start3.setTime(start3.getTime() - 3600 * 1000 * 24 * 1)
         end3.setTime(end3.getTime() - 3600 * 1000 * 24 * 1)
-        this.tab3.table.getdataListParm.parammaps.inputDatetime = [start3, end3]
+        this.tab3.table.getdataListParm.parammaps.inputDatetime = [start3, end3]
+        this.tab3.radio = '1'
+        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}')
         this.getTab3List()
       }
     },
@@ -436,7 +436,9 @@ export default {
         this.tab2.isRadio5 = false,
         this.tab2.isRadio6 = false,
         this.tab2.table.getdataListParm.name = 'getMaterialAnalysisSC'
-        this.tab2.table.getdataListParm.offset = 1
+        this.tab2.table.getdataListParm.offset = 1
+        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}')
         this.getTab2List()
       } else if (this.tab2.radio == '2') {
         this.tab2.isRadio1 = false,
@@ -446,7 +448,9 @@ export default {
         this.tab2.isRadio5 = false,
         this.tab2.isRadio6 = false,
         this.tab2.table.getdataListParm.name = 'getMaterialAnalysisLS'
-        this.tab2.table.getdataListParm.offset = 1
+        this.tab2.table.getdataListParm.offset = 1
+        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}')
         this.getTab2List()
       } else if (this.tab2.radio == '3') {
         this.tab2.isRadio1 = false,
@@ -457,6 +461,8 @@ export default {
         this.tab2.isRadio6 = false,
         this.tab2.table.getdataListParm.name = 'getMaterialAnalysisRQ'
         this.tab2.table.getdataListParm.offset = 1
+        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}')
         this.getTab2List()
       } else if (this.tab2.radio == '4') {
         this.tab2.isRadio1 = false,
@@ -467,6 +473,8 @@ export default {
         this.tab2.isRadio6 = false,
         this.tab2.table.getdataListParm.name = 'getMaterialAnalysisTMR'
         this.tab2.table.getdataListParm.offset = 1
+        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}')
         this.getTab2List()
       } else if (this.tab2.radio == '5') {
         this.tab2.isRadio1 = false,
@@ -477,6 +485,8 @@ export default {
         this.tab2.isRadio6 = false,
         this.tab2.table.getdataListParm.name = 'getMaterialAnalysisBC'
         this.tab2.table.getdataListParm.offset = 1
+        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}')
         this.getTab2List()
       } else if (this.tab2.radio == '6') {
         this.tab2.isRadio1 = false,
@@ -487,6 +497,8 @@ export default {
         this.tab2.isRadio6 = true,
         this.tab2.table.getdataListParm.name = 'getMaterialAnalysisCC'
         this.tab2.table.getdataListParm.offset = 1
+        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}')
         this.getTab2List()
       }
     },
@@ -661,6 +673,8 @@ export default {
         this.tab3.isRadio4 = false,
         this.tab3.table.getdataListParm.name = 'getPriceAnalysisSC'
         this.tab3.table.getdataListParm.offset = 1
+        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}')
         this.getTab3List()
       } else if (this.tab3.radio == '2') {
         this.tab3.isRadio1 = false,
@@ -669,6 +683,8 @@ export default {
         this.tab3.isRadio4 = false,
         this.tab3.table.getdataListParm.name = 'getPriceAnalysisLS'
         this.tab3.table.getdataListParm.offset = 1
+        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}')
         this.getTab3List()
       } else if (this.tab3.radio == '3') {
         this.tab3.isRadio1 = false,
@@ -677,6 +693,8 @@ export default {
         this.tab3.isRadio4 = false,
         this.tab3.table.getdataListParm.name = 'getPriceAnalysisRQ'
         this.tab3.table.getdataListParm.offset = 1
+        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}')
         this.getTab3List()
       } else if (this.tab3.radio == '4') {
         this.tab3.isRadio1 = false,
@@ -685,6 +703,8 @@ export default {
         this.tab3.isRadio4 = true,
         this.tab3.table.getdataListParm.name = 'getPriceAnalysisTMR'
         this.tab3.table.getdataListParm.offset = 1
+        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}')
         this.getTab3List()
       }
     },