智慧农业后台管理页面
guoshilong
2022-08-30 d0c05096374565228d277e93c56c55d10d93bd1b
src/views/land/cs.vue
@@ -143,14 +143,19 @@
    watch: {
        '$farmId': {
            handler (newName, oldName) {
                this.farm.id = newName
                // this.farm.id = newName
                //地块页面
                this.onLoad()
            }
        }
    },
    created () {
        this.farm.id = this.$farmId
        // this.farm.id = this.$farmId
        this.$EventBus.$on('getFarmObj', (farmObj)=>{
            this.$nextTick(() => {
                this.$EventBus.$emit("setFarmId", farmObj.id);
            });
        })
        this.onLoad(this.page)
    },
    methods: {
@@ -204,7 +209,7 @@
            if (typeof (page) == "undefined") {
                page = this.page
            }
            Object.assign(params, { farmId: this.farm.id })
            Object.assign(params, { farmId: this.$farmId })
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                const data = res.data.data
                this.page.total = data.total