From 5e0b78cb60332234ff6074dd8dba6c5694885dde Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Fri, 12 Aug 2022 16:49:15 +0800
Subject: [PATCH] 溯源码显示页面随农场切换,添加溯源码时机构id更改为存储农场id
---
src/views/traceability/traceability.vue | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/views/traceability/traceability.vue b/src/views/traceability/traceability.vue
index 4ffed82..c7ec1d7 100644
--- a/src/views/traceability/traceability.vue
+++ b/src/views/traceability/traceability.vue
@@ -215,8 +215,16 @@
created() {
this.initData();
},
+ watch: {
+ '$farmId':{
+ handler (newName, oldName) {
+ this.query={}
+ this.onLoad(this.page)
+ }
+ }
+ },
computed: {
- ...mapGetters(["permission", "userInfo"]),
+ ...mapGetters(["permission", "userInfo","$farmId"]),
// permissionList() {
// return {
// addBtn: this.vaildData(this.permission.social_add, true),
@@ -384,11 +392,12 @@
this.onLoad(this.page, this.query);
},
onLoads(){
- this.onLoad(this.page, this.query);
+ // this.onLoad(this.page, this.query);
+ this.onLoad(this.page);
},
onLoad(page, params = {}) {
params['tenantId'] = this.userInfo.tenant_id;
- params['deptId'] = this.userInfo.dept_id;
+ params.deptId = this.$farmId
this.loading = true;
getList(
page.currentPage,
--
Gitblit v1.9.3