| | |
| | | >删 除</el-button> |
| | | </template> |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button icon="el-icon-check" :size="size" :type="type" @click="recovery(row)">采 收</el-button> |
| | | <el-button icon="el-icon-error" :size="size" :type="type" @click="over(row.id)">结 束</el-button> |
| | | <el-button |
| | | :type="type" |
| | | :size="size" |
| | |
| | | </avue-crud> |
| | | <!-- 检测报告 --> |
| | | <detection v-if="detectionVisible" ref="detection"></detection> |
| | | <!-- 弹窗, 采收 --> |
| | | <recovery v-if="recoveryVisible" ref="recovery"></recovery> |
| | | </basic-container> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | import { getLandList } from "@/api/land/land" |
| | | import { mapGetters } from "vuex" |
| | | import detection from "./detection.vue" |
| | | import recovery from "../wel/recovery.vue" |
| | | export default { |
| | | components: { |
| | | recovery, |
| | | detection |
| | | }, |
| | | props: [ |
| | |
| | | ], |
| | | data () { |
| | | return { |
| | | recoveryVisible: false, |
| | | detectionVisible: false, |
| | | visible: true, |
| | | form: {}, |
| | |
| | | delBtn: true, |
| | | viewBtn: true, |
| | | header:false, |
| | | menuWidth: 280, |
| | | menuWidth: 580, |
| | | menuAlign: "center", |
| | | align: "center", |
| | | selection: true, |
| | |
| | | hide: true, |
| | | labelWidth: 110, |
| | | type: "tree", |
| | | // dicUrl: `/api/strain/strain-tree?strainType=0`, |
| | | dicData: [], |
| | | props: { |
| | | label: "strainName", |
| | |
| | | this.$refs.detection.init(row.id) |
| | | }) |
| | | }, |
| | | //采收 |
| | | recovery (data) { |
| | | this.recoveryVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.recovery.init(data) |
| | | }) |
| | | }, |
| | | //结束种植 |
| | | over (id) { |
| | | var that = this |
| | | that.$confirm("确定结束当前种植的农产品?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | const data = { |
| | | id: id, |
| | | status: 2, |
| | | } |
| | | return update(data) |
| | | }) |
| | | .then(() => { |
| | | that.onLoad(this.page, this.query) |
| | | that.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }) |
| | | }) |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <el-button @click="btnGrounpShow = !btnGrounpShow" icon="el-icon-menu"></el-button> |
| | | |
| | | <div v-show="btnGrounpShow" class="btn-grounp"> |
| | | <el-button @click="DelLand(delId)">删除地块</el-button> |
| | | <el-button size="small" @click="DelLand(delId)">删除地块</el-button> |
| | | <el-button size="small" @click="land">编辑地块</el-button> |
| | | </div> |
| | | </div> |