From 3558e9f2b0cb9f9e899eec4a33c37174ac97f7e2 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Thu, 11 Aug 2022 17:32:18 +0800
Subject: [PATCH] 数据统计随农场选择变换,dept_id更换成farmId
---
src/views/statistics/stock.vue | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/views/statistics/stock.vue b/src/views/statistics/stock.vue
index 46f97d1..c8de5a4 100644
--- a/src/views/statistics/stock.vue
+++ b/src/views/statistics/stock.vue
@@ -40,6 +40,7 @@
return {
visible: true,
form: {},
+ farm:{},
query: {},
loading: true,
excelBox: false,
@@ -153,7 +154,7 @@
,
computed: {
...
- mapGetters(["permission", "userInfo"]),
+ mapGetters(["permission", "userInfo","$farmId"]),
// permissionList() {
// return {
// addBtn: this.vaildData(this.permission.social_add, true),
@@ -172,6 +173,17 @@
,
}
,
+ watch: {
+ '$farmId':{
+ handler (newName, oldName) {
+ this.farm.id = newName
+ this.onLoad(this.page)
+ }
+ }
+ },
+ created () {
+ this.farm.id = this.$farmId
+ },
mounted() {
var params = {
startTime: this.getStartTime(),
@@ -382,7 +394,7 @@
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
- params.deptId= this.userInfo.dept_id;
+ params.deptId= this.farm.id;
this.loading = true;
const {releaseTimeRange} = this.query;
let values = {
@@ -402,6 +414,9 @@
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
+ // this.data = this.data.filter((e)=>{
+ // return !(e.bfcknum == e.cgnum == e.dbcknum == e.dbrknum == e.lycknum == e.rknum == 0)
+ // })
this.loading = false;
this.selectionClear();
});
--
Gitblit v1.9.3