From 08cbb8e6fd626d16a45deeebc252e925f0d0b0da Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Fri, 05 Aug 2022 11:55:58 +0800
Subject: [PATCH] 修复首页选择了农场后,对特定品种进行采收还能选择到其他地块
---
src/views/wel/recovery.vue | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/views/wel/recovery.vue b/src/views/wel/recovery.vue
index d5ddaf4..cb0da12 100644
--- a/src/views/wel/recovery.vue
+++ b/src/views/wel/recovery.vue
@@ -15,7 +15,7 @@
<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";
@@ -221,6 +221,11 @@
visible: false,
};
},
+ props:{
+ farmDetail:{
+ type:Object
+ }
+ },
computed: {
...mapState({
userInfo: (state) => state.user.userInfo,
@@ -271,14 +276,20 @@
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,
--
Gitblit v1.9.3