智慧农业后台管理页面
guoshilong
2022-08-12 c6a2875daf7935bc03360c16efac5d04be405b60
Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhny_web
1 files modified
18 ■■■■■ changed files
src/page/index/top/top-search2.vue 18 ●●●●● patch | view | raw | blame | history
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'])