From c6a2875daf7935bc03360c16efac5d04be405b60 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Fri, 12 Aug 2022 10:33:10 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhny_web
---
src/page/index/top/top-search2.vue | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/page/index/top/top-search2.vue b/src/page/index/top/top-search2.vue
index 3e60515..7022fbd 100644
--- a/src/page/index/top/top-search2.vue
+++ b/src/page/index/top/top-search2.vue
@@ -24,22 +24,20 @@
};
},
created() {
-
- getFarmList().then(res => {
+ let ids = ''
+ if (!this.userInfo.role_name === "administrator") {
+ ids = this.userInfo.farmId
+ }
+ let params = {
+ ids : ids
+ }
+ getFarmList(params).then(res => {
this.farmList = res.data.data
})
this.$nextTick(() => {
this.farm.id = parseInt(this.userInfo.farmId.split(',')[0])
this.$store.commit("SET_FARMID", this.farm.id )
})
- },
-
- watch: {
- // 'farm.id':{
- // handler (newName, oldName) {
- // console.log('obj.a changed',newName,oldName)
- // }
- // }
},
computed: {
...mapGetters(['userInfo', '$farmId'])
--
Gitblit v1.9.3