Przeglądaj źródła

Merge branch 'feature/DailyExecutionPlan-modify' of duanxiaoduan/tmr-admin into release/v1.0.2

duanxiaoduan 1 rok temu
rodzic
commit
466e39008c

+ 1 - 1
src/utils/request.js

@@ -15,7 +15,7 @@ var reg =  /(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}
 var browserUrl = window.location.hostname
 console.log("========url===",reg.test(browserUrl))
 if (reg.test(browserUrl)){
-  URL = window.location.protocol +"//"+ browserUrl + ":8082/"
+  URL = window.location.protocol +"//"+ browserUrl + ":80/"
 }
 
 Cookies.set('url',URL)

+ 15 - 6
src/views/dashboard/pasture/index.vue

@@ -88,10 +88,14 @@
           <div class="title">
             <div class="img-title" />
             <span class="content">今日计划统计</span>
-          </div>
+          </div>
+          <b style="margin-left: 20px;">统计类型:</b>
+          <el-select v-model="row2.value" size="mini" placeholder="请选择" style="width: 100px;" @change="changeType">
+            <el-option v-for="item in row2.typeList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
           <div class="todayPlan">
             <div>
-              <div id="row2chartLine1" style="height: 185px;" />
+              <div id="row2chartLine1" style="height: 185px;" v-loading="row1.listLoading" />
               <div class="bottom">
                 <div class="bottom-l">
                   <div class="bottom-l-t">
@@ -112,7 +116,7 @@
               </div>
             </div>
             <div>
-              <div id="row2chartLine2" style="height: 185px;" />
+              <div id="row2chartLine2" style="height: 185px;" v-loading="row1.listLoading"  />
               <div class="bottom">
                 <div class="bottom-l">
                   <div class="bottom-l-t">
@@ -446,7 +450,9 @@ export default {
         listLoading: true,
         list: ''
       },
-      row2: {
+      row2: {
+        value:0,
+        typeList:[{id:0,name:'全部'},{id:1,name:'固定式'},{id:2,name:'抛料车'}],
         chart1: {
           chartLine: null,
           chartLine_data: {}
@@ -700,7 +706,8 @@ export default {
       that.row4.chart2.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
     },
     getList() {
-      this.row1.listLoading = true
+      this.row1.listLoading = true
+      this.row1.getdataListParm.parammaps.lpplantype = this.row2.value
       GetDataByName(this.row1.getdataListParm).then(response => {
         if (response.data !== null && response.data.list !== null) {
           console.log('row1数据', response.data.list)
@@ -718,7 +725,6 @@ export default {
           this.row2.chart1.chartLine_data.data2 = parseFloat(response.data.list[0].planTimes)
           this.row2.chart2.chartLine_data.data1 = parseFloat(response.data.list[0].doneWeight)
           this.row2.chart2.chartLine_data.data2 = parseFloat(response.data.list[0].planWeight)
-
           this.roadChartLine1(this.row2.chart1.chartLine_data)
           this.roadChartLine2(this.row2.chart2.chartLine_data)
         } else {
@@ -739,6 +745,9 @@ export default {
           this.row1.listLoading = false
         }, 100)
       })
+    },
+    changeType(){
+      this.getList()
     },
     // 今日计划统计-完成车次
     roadChartLine1(chartLine_data) {

+ 54 - 8
src/views/formulationPlan/dailyExecutionPlan/index.vue

@@ -73,7 +73,7 @@
           :cell-style="cellStyle"
           class="elTable table-fixed"
           :row-class-name="tableRowClassName"
-          :height="370"
+          :height="myheight"
           @row-click="tableRowClick"
           @selection-change="handleSelect"
         >
@@ -101,7 +101,7 @@
           <el-table-column label="已执行" min-width="70px" align="center">
             <template slot-scope="scope">
               <div v-if="scope.row.havebutton == 0" style="background: #009A69;color:#fff;line-height:30px;">否</div>
-              <div v-else style="background: #c7c7ca ;line-height:30px;">是</div>
+              <div v-else style="background: #FC2323;color:#000 ;line-height:30px;">是</div>
             </template>
           </el-table-column>
           <el-table-column label="班次" min-width="80px" align="center">
@@ -127,7 +127,7 @@
           </el-table-column>
           <el-table-column label="配方名称" min-width="100px" align="center">
             <template slot-scope="scope">
-              <b style="font-size: 28px;line-height: 30px;">{{ scope.row.ftname }}</b>
+              <b style="font-size: 26px;line-height: 30px;">{{ scope.row.ftname }}</b>
             </template>
           </el-table-column>
           <el-table-column label="牛头数" min-width="80px" align="center">
@@ -148,13 +148,16 @@
           <el-table-column align="center" width="100" label="操作" class-name="small-padding fixed-width" fixed="right">
             <template slot-scope="{row}">
               <el-button class="miniDanger" icon="el-icon-delete" @click="handleRowDelete(row)" />
+              <el-button class="miniDanger" icon="el-icon-sort" @click="handleRowSort(row)" />
             </template>
           </el-table-column>
         </el-table>
         <span v-if="table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ table.total }}条</span>
       </div>
     </div>
-
+<!-- maxHeight="enlargeHeight -->
+  <div v-if="isDetail" style="position: relative;">
+    <el-button class="hide" @click="handleCloseTable2" style="position: absolute;right: 0;top: -20px;">隐藏</el-button>
     <!-- 预混料 -->
     <div v-if="table3.getdataListParm.parammaps.lpplantype == 4" class="content">
       <el-row :gutter="20">
@@ -219,7 +222,6 @@
         </el-col>
       </el-row>
     </div>
-
     <!-- 撒料 -->
     <div v-if="table3.getdataListParm.parammaps.lpplantype == 0" class="content">
       <el-row :gutter="20">
@@ -650,7 +652,7 @@
         </el-col>
       </el-row>
     </div>
-
+  </div>
     <!-- 新生成 -->
     <el-dialog :title="textMap[newGeneration.dialogStatus]" :destroy-on-close="true" :visible.sync="newGeneration.dialogFormVisible" :close-on-click-modal="false" width="30%">
       <div class="newGeneration" v-loading="newGenerationLoading" >
@@ -907,7 +909,11 @@ export default {
     RevisePlan
   },
   data() {
-    return {
+    return {
+      myheight: document.documentElement.clientHeight - 280,
+      // myheight: 500,
+      enlargeHeight: document.documentElement.clientHeight - 85 - 165 + 50,
+      isDetail:false,
       newGenerationLoading:false,
       dialogFull: false,
       isRoleEdit: [],
@@ -1582,6 +1588,14 @@ export default {
     tableRowClick(row, column, event) {
       console.log(row, column, event)
       console.log('点击计划类型', row.lpplantype)
+      if (this.isOrder == false) {
+        this.$message({ type: 'error', message: '请保存或取消当前更改顺序操作', duration: 2000 })
+      } else {
+        if (column.label !== '操作') {
+          this.isDetail = true // 点击行显示详情
+          this.myheight = document.documentElement.clientHeight - 85 - 265 - 230
+        }
+      }
       this.table2.getdataListParm.parammaps.havebutton = row.havebutton
       this.table3.getdataListParm.parammaps.havebutton = row.havebutton
       // 撒料计划0/撒料计划-混料1/撒料计划-撒料2/剩料计划3/预混计划4/预称重计划5
@@ -1663,7 +1677,10 @@ export default {
       }
       this.$forceUpdate()
     },
-
+    handleCloseTable2() {
+      this.isDetail = false
+      this.myheight = document.documentElement.clientHeight - 280
+    },
     // 计划内容操作详情
     getList2() {
       this.table2.listLoading = true
@@ -2489,6 +2506,35 @@ export default {
       }).catch(() => {
         this.$message({ type: 'info', message: '已取消删除' })
       })
+    },
+    handleRowSort(row){
+      this.$prompt('由于混料车和撒料车是一体的,插入顺序不能隔开', '排序', {
+        inputPlaceholder:'请输入您要插入的位置',
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputPattern: /^\d+$/ ,
+        inputErrorMessage: '请检查插入位置序号是否正确'
+      }).then(({ value }) => {
+        const url = 'authdata/plan/sort/edit'
+        const data = {
+          planId:row.id,
+          mydate:row.mydate,
+          sort:value
+        }
+        postJson(url, data).then(response => {
+          if (response.msg === 'fail') {
+            this.$notify({ title: '失败', message: response.data, type: 'error', duration: 2000 })
+          } else {
+            this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
+            this.getList()
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消排序'
+        });
+      });
     },
     handleSpan() {
       this.mergekeys.forEach(key => {

+ 75 - 1
src/views/formulationPlan/dhedFormula/index.vue

@@ -318,12 +318,17 @@
             <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-column :key="18" label="操作"  prop="sumweight" align="center" width="80" class-name="small-padding fixed-width" fixed="right">
+              <template slot-scope="scope">
+                <span style="color: blue;" @click="handleRestore(scope.row)">恢复</span>
+              </template>
+            </u-table-column>
           </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;">
-        <el-button class="cancelClose cancelClose1" @click="history.dialogFormVisible = false; ">关闭</el-button>
+        <el-button class="cancelClose cancelClose1" @click="history.dialogFormVisible = false;getList() ">关闭</el-button>
       </div>
     </el-dialog>
 
@@ -3414,6 +3419,75 @@ export default {
       this.getList()
       this.isproportion = false
     },
+    handleRestore(row){
+      // 恢复
+      MessageBox.confirm('是否进行恢复?', {
+        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
+      }).then(() => {
+      const dataList = this.history.list
+      const result = dataList.filter(obj => obj.barname === row.barname);
+      console.log(result,'result')
+       const barList = []
+       result.forEach((item)=>{
+         console.log(item,'item')
+         let obj = {}
+         obj.barname = item.barname
+         obj.ccount = item.ccount
+         obj.ratio = item.ratio
+         obj.ftname = item.ptname
+         // obj.ptsfname = item.ptsfname
+         if(item.timesin == '1'){ obj.times1 = item.tratio }else{ obj.times1 = 0 }
+         if(item.timesin == '2'){ obj.times2 = item.tratio }else{ obj.times2 = 0 }
+         if(item.timesin == '3'){ obj.times3 = item.tratio }else{ obj.times3 = 0 }
+         if(item.timesin == '4'){ obj.times4 = item.tratio }else{ obj.times4 = 0 }
+         if(item.timesin == '5'){ obj.times5 = item.tratio }else{ obj.times5 = 0 }
+         if(item.timesin == '6'){ obj.times6 = item.tratio }else{ obj.times6 = 0 }
+         barList.push(obj)
+       })
+       // 根据 "barname" 属性进行分组
+       const groupedData = barList.reduce((acc, obj) => {
+           const key = obj.barname;
+           if (!acc[key]) {
+               acc[key] = [obj];
+           } else {
+               acc[key].push(obj);
+           }
+           return acc;
+       }, {});
+       console.log(groupedData,'groupedData')
+       console.log(Object.keys(groupedData),'groupedData')
+       // 合并相同 "barname" 值的对象
+       const consolidatedData = groupedData[Object.keys(groupedData)[0]].reduce((acc, item) => {
+           for (const key in item) {
+               if (key.startsWith('times')) {
+                   acc[key] = (acc[key] || 0) + parseFloat(item[key]);
+               } else {
+                   acc[key] = item[key];
+               }
+           }
+           return acc;
+       }, {});
+
+       console.log(consolidatedData);
+       const url = 'authdata/fpdetail/batch/edit'
+       let data = {
+         pastureId:Cookies.get('pastureid'),
+         barList:[consolidatedData]
+       }
+       postJson(url, data).then(response => {
+         if(response.msg !== 'fail'){
+           this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
+           this.getDateList()
+         }else{
+           this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
+         }
+         this.isproportion = false
+       })
+      }).catch(() => {
+        this.$message({ type: 'info', message: '已取消恢复' })
+      })
+    }
+
   }
 }
 </script>

+ 37 - 3
src/views/formulationPlan/materialIssuancePlan/index.vue

@@ -4,7 +4,8 @@
       <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" style="float:left;" @click="handleCreate">新增车次
       </el-button>
       <el-button v-if="isRoleEdit" class="danger" icon="el-icon-delete" style="float:left;" @click="handleReduceTrains">减少车次</el-button>
-      <el-button v-if="isRoleEdit" class="success" style="float: left;" @click="handleCheck">校验</el-button>
+      <el-button v-if="isRoleEdit && ischeck" class="danger" style="float: left;" @click="handleCheck">校验</el-button>
+      <el-button v-else-if="isRoleEdit && !ischeck" class="success" style="float: left;" @click="handleCheck">校验</el-button>
       <el-button v-if="isRoleEdit" class="success" icon="el-icon-download" style="float:left;" @click="handleAutomaticGeneration">自动生成</el-button>
       <el-button v-if="isOrder && isRoleEdit" icon="el-icon-sort" style="float: left;" class="success" @click="handleChangeOrder">更改顺序</el-button>
       <div v-else style="float: left;margin-left: 10px;">
@@ -424,7 +425,7 @@
           <b v-if="item.arrList !== null && item.arrList !== undefined && item.arrList.length>0">{{item.ftname}}:</b>
           <span v-if="item.arrList !== null && item.arrList !== undefined && item.arrList.length>0">
             <span v-for="(item2,index2) in item.arrList" :key="index2">
-              {{item2.barname}}
+              {{item2.barname}}({{item2.weight}}kg)
             </span>
           </span>
         </div>
@@ -613,15 +614,47 @@ export default {
           listLoading: false,
         }
       },
-      allEmptySelect:[]
+      allEmptySelect:[],
+      ischeck:false
     }
   },
   created() {
     this.getButtons()
     this.getIsDisplay()
     this.getList()
+    this.getIsCheck()
   },
   methods: {
+    getIsCheck(){
+      const url = 'authdata/GetDataByName'
+      const data = {
+        name:'getSpillageCount',
+        page: 1,
+        offset: 1,
+        pagecount: 0,
+        returntype: 'Map',
+        parammaps: {
+          pastureid: Cookies.get('pastureid'),
+          times: this.table.getdataListParm.parammaps.times,
+          // refresh: 2
+        }
+      }
+      postJson(url, data).then(response => {
+        if (response.data.list !== null) {
+          if(response.data.list[0].count){
+            if(parseFloat(response.data.list[0].count) > 0){
+              this.ischeck = true
+            }else{
+              this.ischeck = false
+            }
+          }else{
+            this.ischeck = false
+          }
+        } else {
+          this.ischeck = false
+        }
+      })
+    },
     getButtons() {
       const Edit = 'MaterialIssuancePlan'
       const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
@@ -794,6 +827,7 @@ export default {
           }
         }
         this.table.listLoading = false
+        this.getIsCheck()
       })
     },
     changeFrequency(val) {

+ 39 - 23
src/views/statisticalAnalysis/errorAnalysis/pasture/index.vue

@@ -55,6 +55,12 @@
             <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-input v-if="tab.isTrainNumber" v-model="tab.table.getdataListParm.parammaps.templetname" class="filter-item" style="width: 140px;" placeholder="配方名称" />
+          <div style="display: inline-block;" class="filter-item1">
+            <el-input-number :controls="false" :precision="0" v-model="tab.table.getdataListParm.parammaps.startdate" placeholder="混料开始时间" :min="0" :max="100" style="width: 120px;"  class="filter-item" clearable />
+            <span>-</span>
+            <el-input-number :controls="false" :precision="0" v-model="tab.table.getdataListParm.parammaps.enddate" 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>
@@ -114,12 +120,13 @@
             <u-table-column :key="28" sortable label="混料正确率" min-width="70px" align="center" prop="混料正确率" />
             <u-table-column :key="29" sortable label="去除取消正确率" min-width="60px" align="center" prop="去除取消正确率" />
             <u-table-column :key="30" sortable label="标准差" min-width="60px" align="center" prop="方差" />
-            <u-table-column v-if="activeName=='first' && tab.table.list !== null" :key="31" align="center" width="70" label="操作" class-name="small-padding fixed-width" fixed="right">
+            <u-table-column :key="31" v-if="tab.isTrainNumber" sortable label="区域" min-width="60px" align="center" prop="barname" />
+            <u-table-column v-if="activeName=='first' && tab.table.list !== null" :key="33" 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>
             </u-table-column>
-            <u-table-column v-else :key="31" align="center" width="70" label="操作" class-name="small-padding fixed-width">
+            <u-table-column v-else :key="33" 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>
@@ -171,15 +178,16 @@
               <u-table-column :key="20" sortable label="撒料准确率" min-width="60px" align="center" prop="撒料准确率" />
               <u-table-column v-if="tab.isTrainNumber" :key="21" sortable label="撒料时间" min-width="70px" align="center" prop="撒料时间" />
               <u-table-column v-if="tab.isTrainNumber" :key="22" sortable label="发料开始时间" min-width="70px" align="center" prop="startMaterialTime" />
-              <u-table-column v-if="tab.isTrainNumber" :key="22" sortable label="等待时间" min-width="70px" align="center" prop="等待时间" />
-              <u-table-column :key="23" sortable label="撒料自动跳转次数" width="65px" align="center" prop="撒料自动跳转次数" />
-              <u-table-column :key="24" sortable label="撒料手动跳转次数" width="65px" align="center" prop="撒料手动跳转次数" />
-              <u-table-column :key="25" sortable label="取消次数" min-width="70px" align="center" prop="取消次数" />
-              <u-table-column :key="26" sortable label="撒料正确数" min-width="70px" align="center" prop="撒料正确数" />
-              <u-table-column :key="27" sortable label="撒料正确率" min-width="70px" align="center" prop="撒料正确率" />
-              <u-table-column :key="28" sortable label="去除取消正确率" min-width="65px" align="center" prop="去除取消正确率" />
-              <u-table-column :key="29" sortable label="标准差" min-width="60px" align="center" prop="方差" />
-              <u-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">
+              <u-table-column v-if="tab.isTrainNumber" :key="23" sortable label="等待时间" min-width="70px" align="center" prop="等待时间" />
+              <u-table-column :key="24" sortable label="撒料自动跳转次数" width="65px" align="center" prop="撒料自动跳转次数" />
+              <u-table-column :key="25" sortable label="撒料手动跳转次数" width="65px" align="center" prop="撒料手动跳转次数" />
+              <u-table-column :key="26" sortable label="取消次数" min-width="70px" align="center" prop="取消次数" />
+              <u-table-column :key="27" sortable label="撒料正确数" min-width="70px" align="center" prop="撒料正确数" />
+              <u-table-column :key="28" sortable label="撒料正确率" min-width="70px" align="center" prop="撒料正确率" />
+              <u-table-column :key="29" sortable label="去除取消正确率" min-width="65px" align="center" prop="去除取消正确率" />
+              <u-table-column :key="30" sortable label="标准差" min-width="60px" align="center" prop="方差" />
+              <u-table-column :key="31" v-if="tab.isTrainNumber" sortable label="区域" min-width="60px" align="center" prop="barname" />
+              <u-table-column v-if="activeName=='first' && tab.table2.list !== null" :key="32" 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>
@@ -745,6 +753,7 @@
             <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-column sortable label="是否达标" min-width="70px" align="center" prop="standard" />
+            <u-table-column sortable label="区域" min-width="70px" align="center" prop="barname" />
           </u-table>
           <span v-if="tab2.table.listLoading == false" style="margin-right: 30px;margin-top: 10px;font-size: 14px;">共{{ tab2.table.total }}条</span>
         </div>
@@ -1409,6 +1418,7 @@ export default {
               startTime: parseTime(new Date(), '{y}-{m}-{d}'),
               stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
               inputDatetime: [new Date(), new Date()],
+              inputDate:null,
               fname: '',
               sort: '',
               times: ''
@@ -2653,14 +2663,14 @@ export default {
         } else if (this.tab.radio == '4') {
           var excelDatas4 = [
             {
-              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间', 'TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','发料开始时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差'],
-              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','startMaterialTime','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差'],
+              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间', 'TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','发料开始时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差','区域'],
+              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','startMaterialTime','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差','barname'],
               tableDatas: this.tab.table.list,
               sheetName: '混料'
             },
             {
-              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间', 'TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','发料开始时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差'],
-              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime', 'TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','startMaterialTime','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差'],
+              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间', 'TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','发料开始时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差','区域'],
+              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime', 'TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','startMaterialTime','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差','barname'],
               tableDatas: this.tab.table2.list,
               sheetName: '撒料'
             }
@@ -2777,14 +2787,14 @@ export default {
         } else if (this.tab.radio == '4') {
           var excelDatas4 = [
             {
-              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间','TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','发料开始时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差'],
-              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','startMaterialTime','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差'],
+              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间','TMR名称', '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','发料开始时间','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数','混料正确数','混料正确率','去除取消正确率',  '标准差','区域'],
+              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称',  '车次', '班次', '驾驶员', '理论重量', '实际重量', '计划混料操作数', '已混料操作数', '混料操作率', '混料误差值', '混料准确率', '混料时间','startMaterialTime','等待时间','混料自动跳转次数', '混料手动跳转次数', '取消次数', '混料正确数','混料正确率','去除取消正确率', '方差','barname'],
               tableDatas: this.tab.table.list,
               sheetName: '混料'
             },
             {
-              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间','TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','发料开始时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差'],
-              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','startMaterialTime','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差'],
+              tHeader: ['日期','配方名称','车辆名称','开始加料时间','结束加料时间','TMR名称', '车次','班次', '驾驶员','理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率', '撒料时间','发料开始时间','等待时间','撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '标准差','区域'],
+              filterVal: ['计划时间1','templetname','TMR名称','startTime','endTime','TMR名称', '车次','班次', '驾驶员', '理论重量', '实际重量', '计划撒料操作数', '已撒料操作数', '撒料操作率', '撒料误差值', '撒料准确率','撒料时间','startMaterialTime','等待时间', '撒料自动跳转次数', '撒料手动跳转次数', '取消次数','撒料正确数','撒料正确率','去除取消正确率',  '方差','barname'],
               tableDatas: this.tab.table2.list,
               sheetName: '撒料'
             }
@@ -3050,7 +3060,7 @@ export default {
       }
       data.parammaps = this.tab.table.getdataListParm.parammaps
       postJson(url, data).then(response => {
-        if (response.data !== null) {
+        if (response.data !== null && response.data.list !== null) {
           console.log('汇总统计/混料table数据', response.data.list)
           this.$refs.plTable1.reloadData(response.data.list)
           this.tab.table.list = response.data.list
@@ -3085,6 +3095,9 @@ export default {
       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.templetname = this.tab.table.getdataListParm.parammaps.templetname
+      this.tab.table2.getdataListParm.parammaps.startdate = this.tab.table.getdataListParm.parammaps.startdate
+      this.tab.table2.getdataListParm.parammaps.enddate = this.tab.table.getdataListParm.parammaps.enddate
       this.tab.table2.getdataListParm.parammaps.error = this.tab.table.getdataListParm.parammaps.error
       let url = 'authdata/summary'
       let data = {}
@@ -3095,7 +3108,7 @@ export default {
       }
       data.parammaps = this.tab.table2.getdataListParm.parammaps
       postJson(url, data).then(response => {
-        if (response.data !== null) {
+        if (response.data !== null && response.data.list !== null) {
           console.log('汇总统计/撒料table数据', response.data.list)
           this.$refs.plTable22.reloadData(response.data.list)
           this.tab.table2.list = response.data.list
@@ -3232,6 +3245,9 @@ export default {
       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.templetname = ''
+      this.tab.table.getdataListParm.parammaps.startdate = undefined
+      this.tab.table.getdataListParm.parammaps.enddate = undefined
       this.tab.table.getdataListParm.parammaps.error = false
       this.form_search()
     },
@@ -4649,8 +4665,8 @@ export default {
         }
         var excelDatasTab2 = [
           {
-            tHeader: ['日期', 'TMR名称', '操作编号','车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间','是否达标',],
-            filterVal: ['日期', 'TMR名称','sort', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间','standard'],
+            tHeader: ['日期', 'TMR名称', '操作编号','车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间','是否达标','区域'],
+            filterVal: ['日期', 'TMR名称','sort', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间','standard','barname'],
             tableDatas: exportList,
             sheetName: '混料统计'
           }

+ 2 - 2
src/views/statisticalAnalysis/feedingEfficiency/pasture/index.vue

@@ -271,7 +271,7 @@
                   >
                     <el-table-column sortable label="日期" min-width="110px" align="center" prop="日期" />
                     <el-table-column sortable label="配方名称" min-width="110px" align="center" prop="名称" />
-                    <el-table-column sortable label="准确率" min-width="110px" align="center" prop="准确率" />
+                    <el-table-column sortable label="时间(分钟)" min-width="110px" align="center" prop="准确率" />
                   </el-table>
                 </div>
               </div>
@@ -2659,7 +2659,7 @@ export default {
         console.log('混料时间统计导出')
         var excelDatasTabChart3 = [
           {
-            tHeader: ['日期', '配方名称','准确率'],
+            tHeader: ['日期', '配方名称','时间(分钟)'],
             filterVal: ['日期', '名称','准确率'],
             tableDatas: this.tab.chart3.table.list,
             sheetName: '混料时间统计'