From f440f5543b6fcb9c6a9dcf2554dee3301665ddaa Mon Sep 17 00:00:00 2001
From: xiebin <123456>
Date: Wed, 20 Jul 2022 10:18:18 +0800
Subject: [PATCH] 修复首页生产统计农事操作为0问题
---
src/views/wel/index.vue | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue
index 56b3a00..9bfd12c 100644
--- a/src/views/wel/index.vue
+++ b/src/views/wel/index.vue
@@ -255,15 +255,19 @@
farmChange(data) {
this.farm.id = data
//更新农场数据
- //农场概览
+ //农场概览 地块使用率
this.getCountStatis ()
//当前农场种养品种
this.onLoad()
+ //本年农事操作记录
+ getFarmingCount ()
+ //农资库存
+ StockCount ()
},
//本年农事操作记录
getFarmingCount () {
var that = this
- getFarmingCount(this.userInfo.farmId).then((res) => {
+ getFarmingCount(this.userInfo.dept_id).then((res) => {
that.total = res.data.data
// that.total = 0;
if (that.total > 0) {
@@ -274,13 +278,14 @@
//本年农事操作记录,分组统计
getFarmingStatis () {
var that = this
- getFarmingStatis(this.userInfo.farmId).then((res) => {
+ getFarmingStatis(this.farm.id).then((res) => {
that.farmingList = res.data.data
})
},
+ //农资库存
StockCount () {
var that = this
- StockCount(this.userInfo.farmId).then((res) => {
+ StockCount(this.farm.id).then((res) => {
that.stockList = res.data.data
console.log(that.stockList)
})
@@ -288,7 +293,6 @@
//地块使用率统计
getCountStatis () {
var that = this
- console.log('this.farm.id:',this.farm.id)
selectCount(this.farm.id).then((res) => {
var data = res.data.data
that.landInfo = data
--
Gitblit v1.9.3