From 332cb84f4e7dad39dc4d7e8a2d2a0717dcf72588 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Thu, 01 Sep 2022 11:57:23 +0800
Subject: [PATCH] 添加返回引导页

---
 src/views/mapPattern/index.vue |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/src/views/mapPattern/index.vue b/src/views/mapPattern/index.vue
index 485ce09..ffa60d6 100644
--- a/src/views/mapPattern/index.vue
+++ b/src/views/mapPattern/index.vue
@@ -59,7 +59,7 @@
 
         <div class="farm-land">
             <div class="title">
-                <span>地块 · {{ this.pageLand.total }}种</span>
+                <span>地块 · {{ this.pageLand.total }}个</span>
             </div>
             <div class="content">
                 <div
@@ -162,12 +162,12 @@
     data () {
         return {
             page: {
-                pageSize: 10,
+                pageSize: 100,
                 currentPage: 1,
                 total: 0,
             },
             pageLand: {
-                pageSize: 10,
+                pageSize: 100,
                 currentPage: 1,
                 total: 0,
             },
@@ -199,7 +199,7 @@
 
     },
     computed: {
-        ...mapGetters(["userInfo"]),
+        ...mapGetters(["userInfo", "$farmId"]),
     },
     created () {
         //获取种样品列表
@@ -216,7 +216,8 @@
     methods: {
         //获取种养品列表
         getFarmPlantList (page, params = {}) {
-            params['farmId'] = this.userInfo.farmId
+            params['farmId'] = this.$farmId
+            params['status'] = 1
             this.loading = true
             getList(
                 page.currentPage,
@@ -254,8 +255,11 @@
                     }
                 })
 
-                this.plotPlantBreed = arr
+                arr.forEach((e)=>{
+                    e.area = e.area.toFixed(3)
+                })
 
+                this.plotPlantBreed = arr
 
                 this.loading = false
 
@@ -266,7 +270,7 @@
         },
         //获取地块列表
         getLandList (page, params = {}) {
-            params['farmId'] = this.userInfo.farmId
+            params['farmId'] = this.$farmId
             params['tenantId'] = this.userInfo.tenant_id
             this.loading = true
             getLandList(
@@ -299,24 +303,25 @@
         },
         //返回上一页
         goToBack () {
+            this.$EventBus.$emit("getFarmObj", this.farmInfo);
             this.$router.go(-1)
         },
         //获取农场信息
         getFarmInfo () {
             var that = this
-            getDetails(this.userInfo.farmId).then(res => {
+            getDetails(this.$farmId).then(res => {
                 that.farmInfo = res.data.data
             })
         },
         //获取统计面积信息
         getLandCount () {
-            selectCount(this.userInfo.farmId).then(res => {
+            selectCount(this.$farmId).then(res => {
                 this.landAreaInfo = res.data.data
             })
         },
         //获取地块轮廓统计信息
         getLandIsAreaStatistic () {
-            getLandIsAreaStatistic(this.userInfo.farmId).then(res => {
+            getLandIsAreaStatistic(this.$farmId).then(res => {
                 console.log(res)
                 this.landIsAreaStatistic = res.data.data
             })
@@ -324,7 +329,7 @@
 
         // 地块定位
         setCenter (item) {
-            this.$refs.plotMap.setPlotCenter(item.landName)
+            this.$refs.plotMap.setPlotCenter(item)
         },
 
         plotDetailsPopupShow (params) {
@@ -351,7 +356,6 @@
             }
 
             if (this.$refs.showCP) {
-                console.log(1)
                 let isSelf = this.$refs.showCP.contains(e.target)
                 if (!isSelf) {
                     this.plotClickNum = 0

--
Gitblit v1.9.3