| | |
| | | //初始化 |
| | | init(item) { |
| | | var that = this; |
| | | console.log("item",item) |
| | | this.form['operator'] = this.userInfo.user_id; |
| | | //计算当前时间 |
| | | this.getNowTime(); |
| | | var strainColumn = that.findObject(that.option.column,"strainId"); |
| | | // var otherLandColumn = that.findObject(that.option.column,"otherLandId"); |
| | | var otherLandColumn = that.findObject(that.option.column,"otherLandId"); |
| | | if(item.strainId){ |
| | | that.form.strainId = item.strainId |
| | | strainColumn.disabled = true |
| | | var params = {} |
| | | |
| | | }else{ |
| | | strainColumn.disabled = false |
| | | that.form.farmId = that.$farmId |
| | | } |
| | | var params = {} |
| | | params['tenantId'] = this.userInfo.tenant_id |
| | | params['farmId'] = this.$farmId |
| | | params['strainId'] = item.strainId |
| | | // params['plantingWay'] = "2" |
| | | getLandListNoPage(params).then((res)=>{ |
| | | var landArr = [] |
| | | res.data.data.records.forEach(e => { |
| | | res.data.data.forEach(e => { |
| | | landArr.push({ |
| | | id:e.landId, |
| | | landName:e.landName |
| | |
| | | }); |
| | | otherLandColumn.dicData = landArr |
| | | }) |
| | | }else{ |
| | | strainColumn.disabled = false |
| | | that.form.farmId = "" |
| | | } |
| | | this.visible = true; |
| | | //获取农地数据 |
| | | getLandList(this.$farmId).then((res)=>{ |