智慧农业后台管理页面
xiebin
2022-08-11 7ae4b4b6679ba419cfd92d2a60ed603c2c8a446d
src/views/land/cs.vue
@@ -105,6 +105,7 @@
                keyword: "",
            },
            query: {},
            farm:{},
            value: true,
            farmingCount: 0,
            landVisible: false,
@@ -128,9 +129,19 @@
        }
    },
    computed: {
        ...mapGetters(["userInfo"]),
        ...mapGetters(["userInfo","$farmId"]),
    },
    watch: {
    '$farmId':{
      handler (newName, oldName) {
        this.farm.id = newName
        //地块页面
        this.onLoad()
      }
    }
  },
    created () {
        this.farm.id = this.$farmId
        this.onLoad(this.page)
    },
    methods: {
@@ -184,6 +195,7 @@
            if(typeof(page) == "undefined" ){
                page = this.page
            }
            Object.assign(params,{farmId:this.farm.id})
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                const data = res.data.data
                this.page.total = data.total