From 31b792bb4abe27ae876952f412d4d9ef5b12193d Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 29 Aug 2022 10:47:31 +0800
Subject: [PATCH] 首页秧苗独立显示
---
src/views/wel/index.vue | 33 ++++++++++++++++++++++++++++++---
1 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue
index cf012de..1a7e925 100644
--- a/src/views/wel/index.vue
+++ b/src/views/wel/index.vue
@@ -79,6 +79,24 @@
<el-button plain size="small" @click="over(item)">结束</el-button>
</div>
</div>
+ <!-- 秧苗 -->
+ <div class="farm" v-for="(item, index) in farmPlanListYM" :key="index">
+ <div class="farm-img" @click="recoveryDetail(item)">
+ <img :src="item.url" class="img" />
+ </div>
+ <div class="cai">{{ item.strainName }}(秧苗)</div>
+ <div class="area">
+ 种植面积:
+ <span>{{ item.area }}</span>亩
+ </div>
+ <div class="btn">
+ <el-button plain size="small" @click="plant(item)">
+ <span style="color: #5abf78">移栽</span>
+ </el-button>
+ <!-- <el-button plain size="small" @click="over(item.id)">结束</el-button> -->
+ <el-button plain size="small" @click="over(item)">结束</el-button>
+ </div>
+ </div>
</div>
</div>
<div class="farm-bottom"></div>
@@ -184,7 +202,7 @@
<script>
import { mapGetters } from "vuex"
-import { getList, update,getStrainCount } from "@/api/farmplant/farmplant"
+import { getList, update,getStrainCount,getStrainCountYM } from "@/api/farmplant/farmplant"
import { getFarmingCount, getFarmingStatis } from "@/api/farm/farmingrecord"
import { selectCount } from "@/api/land/land"
import { StockCount } from "@/api/stock/stock"
@@ -219,6 +237,7 @@
total: 0,
farmingCount: 0,
farmPlanList: [],
+ farmPlanListYM:[],
recoveryVisible: false,
overVisible:false,
landVisible: false,
@@ -356,6 +375,14 @@
e.area = fixed.fixedNum(e.area)
})
})
+
+ getStrainCountYM(1, 100, Object.assign(params)).then((res) => {
+ const data = res.data.data.records
+ this.farmPlanListYM = data
+ this.farmPlanListYM.forEach((e)=>{
+ e.area = fixed.fixedNum(e.area)
+ })
+ })
},
//采收
recovery (data) {
@@ -402,10 +429,10 @@
})
},
//种植
- plant () {
+ plant (item) {
this.plantVisible = true
this.$nextTick(() => {
- this.$refs.plant.init()
+ this.$refs.plant.init(item)
})
},
//农事操作
--
Gitblit v1.9.3