From c518ffa02013402da032a18941f96ec2dcab9c8b Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Wed, 26 Oct 2022 09:08:17 +0800
Subject: [PATCH] 用户管理返回封禁状态

---
 src/views/mapPattern/index.vue |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/views/mapPattern/index.vue b/src/views/mapPattern/index.vue
index 7350218..b9d19aa 100644
--- a/src/views/mapPattern/index.vue
+++ b/src/views/mapPattern/index.vue
@@ -202,6 +202,14 @@
         ...mapGetters(["userInfo", "$farmId"]),
     },
     created () {
+        if (this.$farmId == 0){
+          if (sessionStorage.getItem("myFarmId")){
+            this.$store.commit("SET_FARMID",JSON.parse(sessionStorage.getItem("myFarmId")))
+          }
+        }
+        window.addEventListener('beforeunload', () => {
+          sessionStorage.setItem('myFarmId', JSON.stringify(this.$farmId))
+        })
         //获取种样品列表
         this.getFarmPlantList(this.page)
         //获取地块列表
@@ -290,7 +298,6 @@
                         arr.forEach(it => {
                             brr.push(it.split(' '))
                         })
-
                         this.$refs.plotMap.addPlotPolygon(brr, item)
                     }
                 })

--
Gitblit v1.9.3