From c40973b0eade692732f19f0394fa68fcfa9332c4 Mon Sep 17 00:00:00 2001
From: xiebin <123456>
Date: Fri, 26 Aug 2022 09:07:30 +0800
Subject: [PATCH] 经营概况-农产品监管添加筛选

---
 src/components/date-select/index.vue |    4 ++++
 src/views/manage/index.vue           |   12 +++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/components/date-select/index.vue b/src/components/date-select/index.vue
index 4d58db9..3018cf7 100644
--- a/src/components/date-select/index.vue
+++ b/src/components/date-select/index.vue
@@ -57,6 +57,8 @@
                     this.$parent.getCltjTime(currentTime)
                 } else if (this.type == 'symSelect') {
                     this.$parent.getSymTime(currentTime)
+                } else if (this.type == 'ncpjgSelect') {
+                    this.$parent.productsSupervise(currentTime)
                 }
             },
             selectChange (e) {
@@ -71,6 +73,8 @@
                     this.$parent.getCltjTime(currentTime)
                 } else if (this.type == 'symSelect') {
                     this.$parent.getSymTime(currentTime)
+                } else if (this.type == 'ncpjgSelect') {
+                    this.$parent.productsSupervise(currentTime)
                 }
             },
             gettime (data) {
diff --git a/src/views/manage/index.vue b/src/views/manage/index.vue
index c11cbb7..bd10cd9 100644
--- a/src/views/manage/index.vue
+++ b/src/views/manage/index.vue
@@ -182,7 +182,7 @@
                             </div>
                         </div>
                         <div class="dataChoose">
-                            <date-select :type="'nztrSelect'" v-if="trpOrNcp == 'ncp'"></date-select>
+                            <date-select :type="'ncpjgSelect'" v-if="trpOrNcp == 'ncp'"></date-select>
                         </div>
                         <div class="more" @click="popDetailedSupervise">
                             明细
@@ -735,7 +735,7 @@
             // 农事操作
             this.farmingRecords()
             // 农产品监管
-            this.productsSupervise(n)
+            this.productsSupervise(y)
             // 农资出入库记录
             this.pageCountNzCrk()
             // 溯源次数统计
@@ -1415,6 +1415,9 @@
             params.year = year
             productsSupervise(Object.assign(params)).then((res) => {
                 this.NcpJg = res.data.data
+                if (this.trpOrNcp == 'ncp') {
+                    this.initNcpBar("TrpEcharts")
+                }
             })
         },
         // 农产品投入
@@ -1438,7 +1441,10 @@
                 this.nztr = res.data.data.records
                 this.nztrAll = res.data.data.records
                 // 投入品监管图表
-                this.initTrpBar("TrpEcharts")
+                // this.initTrpBar("TrpEcharts")
+                if (this.trpOrNcp == "trp") {
+                    this.initTrpBar("TrpEcharts")
+                }
             })
         },
         // 统计市场流通/去年流通量/本月流通量

--
Gitblit v1.9.3