From f0614eae87c06eedf0b11070a9e3a1ad3289f974 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 08 Aug 2022 19:25:46 +0800
Subject: [PATCH] 结束种养可选择结束时间,首页结束种养按钮点击后列表
---
src/views/wel/index.vue | 57 +++++++++++++++++++++++++++++++++++----------------------
1 files changed, 35 insertions(+), 22 deletions(-)
diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue
index 20fe223..16a1134 100644
--- a/src/views/wel/index.vue
+++ b/src/views/wel/index.vue
@@ -75,7 +75,8 @@
<el-button plain size="small" @click="recovery(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.id)">结束</el-button> -->
+ <el-button plain size="small" @click="over(item)">结束</el-button>
</div>
</div>
</div>
@@ -168,6 +169,8 @@
</div>
<!-- 弹窗, 采收 -->
<recovery v-if="recoveryVisible" ref="recovery" :farmDetail="farm"></recovery>
+ <!-- 弹窗,结束种养-->
+ <over v-if="overVisible" ref="over" :farmDetail="farm"></over>
<!-- 圈地 -->
<land v-if="landVisible" ref="land"></land>
<!-- 种养品 -->
@@ -187,6 +190,7 @@
import { StockCount } from "@/api/stock/stock"
import {getFarmList} from "@/api/farm/farm";
import recovery from "./recovery.vue"
+import over from "./over.vue"
import land from "./land.vue"
import plant from "./plant.vue"
import farming from "./farming.vue"
@@ -194,6 +198,7 @@
export default {
components: {
recovery,
+ over,
land,
plant,
farming,
@@ -213,6 +218,7 @@
farmingCount: 0,
farmPlanList: [],
recoveryVisible: false,
+ overVisible:false,
landVisible: false,
plantVisible: false,
farmingVisible: false,
@@ -321,29 +327,36 @@
this.$refs.recovery.init(data)
})
},
- //结束种植
- over (id) {
- var that = this
- this.$confirm("确定结束当前种植的农产品?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
+ //结束种养
+ over(data) {
+ this.overVisible = true
+ this.$nextTick(() => {
+ this.$refs.over.initData(data)
})
- .then(() => {
- const data = {
- id: id,
- status: 2,
- }
- return update(data)
- })
- .then(() => {
- that.onLoad()
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- })
},
+ //结束种植
+ // over (id) {
+ // var that = this
+ // this.$confirm("确定结束当前种植的农产品?", {
+ // confirmButtonText: "确定",
+ // cancelButtonText: "取消",
+ // type: "warning",
+ // })
+ // .then(() => {
+ // const data = {
+ // id: id,
+ // status: 2,
+ // }
+ // return update(data)
+ // })
+ // .then(() => {
+ // that.onLoad()
+ // this.$message({
+ // type: "success",
+ // message: "操作成功!",
+ // })
+ // })
+ // },
//圈地
land () {
this.landVisible = true
--
Gitblit v1.9.3