Browse Source

Merge branch 'feature/pasture-search' of duanxiaoduan/tmr-group-admin into release/v1.0.2

duanxiaoduan 1 year ago
parent
commit
1bbb64674e

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

@@ -3,7 +3,7 @@
     <el-tabs v-model="activeName" @tab-click="handleTabClick">
       <el-tab-pane label="汇总统计" name="first">
         <div class="search">
-          <el-select v-model="tab.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;">
+          <el-select v-model="tab.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePasture1()">
             <el-option v-for="item in pastureList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <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" />
@@ -641,7 +641,7 @@
       </el-tab-pane>
       <el-tab-pane label="混料统计" name="second">
         <div class="search" ref="myHeightSecond">
-          <el-select v-model="tab2.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;margin-right: 10px;">
+          <el-select v-model="tab2.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;margin-right: 10px;" @change="changePasture2()">
             <el-option v-for="item in pastureList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <el-date-picker v-model="tab2.table.getdataListParm.parammaps.inputDatetime2" :clearable="false" style="width: 140px;margin-top: 5px;" type="date" placeholder="选择日期"> </el-date-picker>
@@ -728,7 +728,7 @@
       </el-tab-pane>
       <el-tab-pane label="撒料统计" name="third">
         <div class="search" ref="myHeightThird">
-          <el-select v-model="tab3.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;margin-right: 10px;">
+          <el-select v-model="tab3.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;margin-right: 10px;" @change="changePasture3()">
             <el-option v-for="item in pastureList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <el-date-picker v-model="tab3.table.getdataListParm.parammaps.inputDatetime2" :clearable="false" style="margin-top: 5px;width:140px;" type="date" placeholder="选择日期"> </el-date-picker>
@@ -1819,6 +1819,16 @@ export default {
   },
   mounted() {},
   methods: {
+    changePasture1(){
+      this.getTabList()
+      this.getTabList2()
+    },
+    changePasture2(){
+      this.getTab2List()
+    },
+    changePasture3(){
+      this.getTab3List()
+    },
     getAllYear() {
       var myDate = new Date()
       var thisYear = myDate.getFullYear() // 获取当年年份

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

@@ -3,7 +3,7 @@
     <el-tabs v-model="activeName" @tab-click="handleTabClick">
       <el-tab-pane label="效率统计" name="first">
         <div class="search">
-          <el-select v-model="tab.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;float:left;margin-right: 10px;">
+          <el-select v-model="tab.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;float:left;margin-right: 10px;" @change="changePasture1()">
             <el-option v-for="item in pastureList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <el-date-picker v-model="tab.table.getdataListParm.parammaps.date" :clearable="false" style="float:left;width: 140px;" type="date" placeholder="选择日期" @change="changeTab1Date"> </el-date-picker>
@@ -394,7 +394,7 @@
       </el-tab-pane>
       <el-tab-pane label="牛群评估" name="second">
         <div class="search">
-          <el-select v-model="tab2.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;float:left;margin-right: 10px;">
+          <el-select v-model="tab2.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;float:left;margin-right: 10px;" @change="changePasture2()">
             <el-option v-for="item in pastureList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <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" />
@@ -964,6 +964,20 @@ export default {
     this.getIsDisplay()
   },
   methods: {
+    changePasture1(){
+      this.getTabList()
+      this.getChart1()
+      this.getChart2()
+      this.getChart3()
+      this.getChart4()
+      this.getChart5()
+    },
+    changePasture2(){
+      this.getTab2List()
+      this.getTab2List2()
+      this.getTab2List3()
+      this.getTab2List4()
+    },
     getIsDisplay() {
       let page = 1
       let page_size = 0

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

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <div class="operation">
-      <el-select v-model="table.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;float:left;margin-right: 10px;">
+      <el-select v-model="table.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;float:left;margin-right: 10px;" @change="changePasture1()">
         <el-option v-for="item in pastureList" :key="item.id" :label="item.name" :value="item.id" />
       </el-select>
       <el-date-picker v-model="table.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;margin-right: 10px;float: left;" @change="changeDate" />
@@ -661,6 +661,9 @@ export default {
   },
 
   methods: {
+    changePasture1(){
+      this.getList()
+    },
     getList() {
       this.table.listLoading = true
       let page = this.table.page

+ 13 - 4
src/views/statisticalAnalysis/inventoryManagement/index.vue

@@ -3,7 +3,7 @@
     <el-tabs v-model="activeName" @tab-click="handleTabClick">
       <el-tab-pane label="库存统计" name="first">
         <div class="search">
-          <el-select v-model="tab.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;float:left;margin-right: 10px;">
+          <el-select v-model="tab.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;float:left;margin-right: 10px;" @change="changePasture1()">
             <el-option v-for="item in pastureList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <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="float: left;width: 250px;margin-bottom:10px;" :picker-options="pickerOptions" />
@@ -52,7 +52,7 @@
       </el-tab-pane>
       <el-tab-pane label="用料分析" name="second">
         <div class="search">
-          <el-select v-model="tab2.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item filter-item1" style="width: 120px;float:left;margin-right: 10px;">
+          <el-select v-model="tab2.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item filter-item1" style="width: 120px;float:left;margin-right: 10px;" @change="changePasture2()">
             <el-option v-for="item in pastureList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <el-date-picker v-model="tab2.table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item1" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="float: left;width: 245px;margin-right: 10px;" :picker-options="pickerOptions" />
@@ -98,7 +98,7 @@
       </el-tab-pane>
       <el-tab-pane label="价格分析" name="third">
         <div class="search">
-          <el-select v-model="tab3.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;float:left;margin-right: 10px;">
+          <el-select v-model="tab3.table.getdataListParm.parammaps.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;float:left;margin-right: 10px;" @change="changePasture3()">
             <el-option v-for="item in pastureList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <el-date-picker v-model="tab3.table.getdataListParm.parammaps.inputDatetime" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :clearable="false" style="width: 250px;" :picker-options="pickerOptions" />
@@ -289,7 +289,16 @@ export default {
   created() {
     this.getTimeFn()
   },
-  methods: {
+  methods: {
+    changePasture1(){
+      this.getTabList()
+    },
+    changePasture2(){
+      this.getTab2List()
+    },
+    changePasture3(){
+      this.getTab3List()
+    },
     getTimeFn() {
       const that = this
       const start = new Date()

+ 4 - 1
src/views/statisticalAnalysis/processAnalysis/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <div class="search">
-      <el-select v-model="table.getdataListParm.parammaps.pastureid" placeholder="牧场" class="filter-item" style="width: 120px;">
+      <el-select v-model="table.getdataListParm.parammaps.pastureid" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePasture()">
         <el-option v-for="item in pastureList" :key="item.id" :label="item.name" :value="item.id" />
       </el-select>
       <el-date-picker v-model="table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" :picker-options="pickerOptions" @change="change_date"/>
@@ -697,6 +697,9 @@ export default {
     this.getList()
   },
   methods: {
+    changePasture(){
+      this.getList()
+    },
     change_date(e){
       console.log(e)
       this.getDownList()