From 20a90d7ceccbaa8600fce74a6435b7b19cf19926 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 15 Aug 2022 11:36:28 +0800
Subject: [PATCH] 地块获取列表跟随农场选择变化

---
 src/views/wel/plant.vue |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/views/wel/plant.vue b/src/views/wel/plant.vue
index 51a3fbd..a76bef1 100644
--- a/src/views/wel/plant.vue
+++ b/src/views/wel/plant.vue
@@ -246,6 +246,7 @@
   computed: {
     ...mapState({
       userInfo: (state) => state.user.userInfo,
+      $farmId: state => state.user.$farmId,
     }),
   },
   methods: {
@@ -283,7 +284,7 @@
       this.visible = true;
       var that = this;
       //获取农地数据
-      getLandList(this.userInfo.dept_id).then((res)=>{
+      getLandList(this.$farmId).then((res)=>{
           if(res.data.code==200){
               var landIdcolumn = that.findObject(that.option.column,"landId");
               that.landList = res.data.data;
@@ -304,7 +305,7 @@
       row['farmType'] = 0;
       row['createUser'] = this.userInfo.user_id;
       row['tenantId'] = this.userInfo.tenant_id;
-      row['deptId'] = this.userInfo.dept_id;
+      row['deptId'] = this.$farmId;
       save(row).then(
         () => {
           that.$emit("refreshOnLoad")

--
Gitblit v1.9.3