| | |
| | | <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> |
| | |
| | | </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> |
| | | <!-- 种养品 --> |
| | |
| | | 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" |
| | |
| | | export default { |
| | | components: { |
| | | recovery, |
| | | over, |
| | | land, |
| | | plant, |
| | | farming, |
| | |
| | | farmingCount: 0, |
| | | farmPlanList: [], |
| | | recoveryVisible: false, |
| | | overVisible:false, |
| | | landVisible: false, |
| | | plantVisible: false, |
| | | farmingVisible: false, |
| | |
| | | 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 |