| | |
| | | <script> |
| | | |
| | | import { mapState } from "vuex"; |
| | | import { getLandList } from "@/api/land/land"; |
| | | import { getLandList,getByStrainIdFarmId } from "@/api/land/land"; |
| | | import { getUserList } from "@/api/system/user"; |
| | | import { getStrainList } from "@/api/farmplant/strain"; |
| | | import { save } from "@/api/farmplant/recovery"; |
| | |
| | | visible: false, |
| | | }; |
| | | }, |
| | | props:{ |
| | | farmDetail:{ |
| | | type:Object |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState({ |
| | | userInfo: (state) => state.user.userInfo, |
| | |
| | | this.visible = true; |
| | | var that = this; |
| | | //获取农地数据 |
| | | getLandList(this.userInfo.dept_id).then((res) => { |
| | | // getLandList(this.userInfo.dept_id).then((res) => { |
| | | // if (res.data.code == 200) { |
| | | // var landIdcolumn = that.findObject(that.option.column, "landId"); |
| | | // that.landList = res.data.data; |
| | | // landIdcolumn.dicData = res.data.data; |
| | | // } |
| | | // }); |
| | | getByStrainIdFarmId(this.form.strainId,this.farmDetail.id).then((res) => { |
| | | if (res.data.code == 200) { |
| | | var landIdcolumn = that.findObject(that.option.column, "landId"); |
| | | that.landList = res.data.data; |
| | | landIdcolumn.dicData = res.data.data; |
| | | } |
| | | }); |
| | | |
| | | //获取操作人 |
| | | const user = { |
| | | tenantId: this.userInfo.tenant_id, |