| | |
| | | watch: { |
| | | '$farmId': { |
| | | handler (newName, oldName) { |
| | | this.farm.id = newName |
| | | // this.farm.id = newName |
| | | //地块页面 |
| | | this.onLoad() |
| | | setTimeout(() => { |
| | | this.onLoad() |
| | | }, 100); |
| | | |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.farm.id = this.$farmId |
| | | this.$EventBus.$on('getFarmObj', (farmObj)=>{ |
| | | // this.$nextTick(() => { |
| | | // this.$EventBus.$emit("setFarmId", farmObj.id); |
| | | // }); |
| | | setTimeout(() => { |
| | | this.$EventBus.$emit("setFarmId", farmObj.id); |
| | | }, 100); |
| | | }) |
| | | this.onLoad(this.page) |
| | | }, |
| | | methods: { |
| | |
| | | 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 |
| | |
| | | left: 1; |
| | | bottom: 0; |
| | | margin: auto; |
| | | width: 80px; |
| | | width: 120px; |
| | | height: 24px; |
| | | line-height: 24px; |
| | | border: 1px solid #64c3a4; |