| | |
| | | import {getList, getDetail, add, update, remove, updatechuli} from "@/api/task/task"; |
| | | import {mapGetters} from "vuex"; |
| | | import {getLandList} from "@/api/land/land"; |
| | | import {selectStockFa} from "@/api/stockfactory/stockfactory"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | prop: "stockId", |
| | | hide: true, |
| | | type: "tree", |
| | | dicUrl: `/api/soldr/soldr/selectSol`, |
| | | dicData:[], |
| | | // dicUrl: `/api/soldr/soldr/selectSol`, |
| | | props: { |
| | | label: "spn", |
| | | value: "id" |
| | |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | '$farmId':{ |
| | | '$farmId':{ |
| | | handler (newName, oldName) { |
| | | //获取农地数据 |
| | | getLandList(this.$farmId).then((res) => { |
| | | if (res.data.code == 200) { |
| | | var landIdcolumn = this.findObject(this.option.column, "landId") |
| | | this.landList = res.data.data |
| | | landIdcolumn.dicData = res.data.data |
| | | } |
| | | }) |
| | | this.getLandList() |
| | | this.getSoldrList() |
| | | this.query={} |
| | | this.onLoad(this.page) |
| | | } |
| | |
| | | this.gradeBoxVisiblechuli = true; |
| | | }, |
| | | initData() { |
| | | this.getLandList() |
| | | this.getSoldrList() |
| | | }, |
| | | getLandList(){ |
| | | var that = this; |
| | | //获取农地数据 |
| | | getLandList(this.$farmId).then((res) => { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | getSoldrList(){ |
| | | var that = this; |
| | | //获取农资 |
| | | selectStockFa(this.$farmId).then((res) => { |
| | | if (res.data.code == 200) { |
| | | console.log(res,1111111111111) |
| | | var stockIdcolumn = that.findObject(that.option.column, "stockId"); |
| | | stockIdcolumn.dicData = res.data.data; |
| | | } |
| | | }); |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | if(row.tp.length<=0){ |
| | | row.tp="" |