| | |
| | | <div class="wraaper-box farming-detail-box"> |
| | | <div class="dd"> |
| | | <div class="da"> |
| | | <div class="land-img" @click="mod(usePolygons)"> |
| | | <!-- <div class="land-img" @click="mod(usePolygons)">--> |
| | | <div class="land-img"> |
| | | <img :src="url" class="landimg" /> |
| | | </div> |
| | | <div class="cent"> |
| | |
| | | <div class="edit"> |
| | | <el-button @click="btnGrounpShow = !btnGrounpShow" icon="el-icon-menu"></el-button> |
| | | |
| | | <div v-show="btnGrounpShow" class="btn-grounp" @click="DelLand(delId)"> |
| | | <el-button>删除地块</el-button> |
| | | <div v-show="btnGrounpShow" class="btn-grounp"> |
| | | <el-button @click="DelLand(delId)">删除地块</el-button> |
| | | <el-button size="small" @click="land">编辑地块</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <el-tab-pane label="采收记录" name="tab3"> |
| | | <recovery></recovery> |
| | | </el-tab-pane> |
| | | <!-- 农资记录 --> |
| | | <el-tab-pane label="农资使用记录" name="tab4"> |
| | | <stockUseInfo></stockUseInfo> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | title="地块位置" |
| | | class="current-map-box" |
| | | :visible.sync="gradeBoxVisible1" |
| | | :modal="true" |
| | | :modal-append-to-body="true" |
| | | :append-to-body="true" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :before-close="dialogBeforeClose" |
| | | > |
| | | <getMapDataInThere ref="getMapData" id="getMapData" @setMapData="setMapData"></getMapDataInThere> |
| | | <el-button class="save" type="success" @click="upLand()">保存</el-button> |
| | | </el-dialog> |
| | | <!-- <el-dialog--> |
| | | <!-- title="地块位置"--> |
| | | <!-- class="current-map-box"--> |
| | | <!-- :visible.sync="gradeBoxVisible1"--> |
| | | <!-- :modal="true"--> |
| | | <!-- :modal-append-to-body="true"--> |
| | | <!-- :append-to-body="true"--> |
| | | <!-- :close-on-click-modal="false"--> |
| | | <!-- :close-on-press-escape="false"--> |
| | | <!-- :before-close="dialogBeforeClose"--> |
| | | <!-- >--> |
| | | <!-- <getMapDataInThere ref="getMapData" id="getMapData" @setMapData="setMapData"></getMapDataInThere>--> |
| | | <!-- <el-button class="save" type="success" @click="upLand()">保存</el-button>--> |
| | | <!-- </el-dialog>--> |
| | | <landUpdate v-if="landVisible" ref="landUpdate" id="landUpdate"></landUpdate> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import farmplant from "@/views/farmplant/farmplant.vue" |
| | | import farming from "@/views/farm/farmingrecord.vue" |
| | | import recovery from "@/views/recovery/recovery.vue" |
| | | import stockUseInfo from "@/views/farm/stockUseInfo.vue" |
| | | import getMapDataInThere from "./getMapDataInThere.vue" |
| | | import { remove, update } from "@/api/land/land" |
| | | import {getList, remove, update} from "@/api/land/land" |
| | | import landUpdate from "./landUpdate" |
| | | |
| | | export default { |
| | | components: { |
| | | farmplant, |
| | | farming, |
| | | recovery, |
| | | stockUseInfo, |
| | | landUpdate, |
| | | getMapDataInThere |
| | | }, |
| | | data () { |
| | |
| | | dic: "", |
| | | formC: {}, |
| | | gradeBoxVisible1: false, |
| | | landVisible: false, |
| | | option2: { |
| | | index: true, |
| | | tip: false, |
| | |
| | | ...mapGetters(["userInfo", "permission", "polygons"]), |
| | | }, |
| | | created () { |
| | | this.url = this.$route.query.url |
| | | this.landName = this.$route.query.landName |
| | | this.dic = this.$route.query.dic |
| | | this.landArea = this.$route.query.landArea |
| | | this.dica = this.$route.query.dica |
| | | this.deptname = this.$route.query.deptname |
| | | this.delId = this.$route.query.id |
| | | this.landUnit = this.$route.query.landUnit |
| | | // this.form = res.data.data; |
| | | this.usePolygons = this.$route.query.landRange |
| | | .split("POLYGON((")[1] |
| | | .split("))")[0] |
| | | .split(",") |
| | | |
| | | }, |
| | | methods: { |
| | | //圈地 |
| | | land () { |
| | | this.landVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.landUpdate.init() |
| | | }) |
| | | }, |
| | | openLandUpdate (page, params = {}) { |
| | | console.log('11111111111refreshOnLoad') |
| | | // getList(1, 10, Object.assign(params, this.query)).then(res => { |
| | | // const data = res.data.data |
| | | // |
| | | // this.farmPlanList = data.records |
| | | // }) |
| | | }, |
| | | mod (usePolygons) { |
| | | this.gradeBoxVisible1 = true |
| | | this.$refs.getMapData.draw(usePolygons) |
| | |
| | | // }); |
| | | } |
| | | }, |
| | | watch: {}, |
| | | watch: { |
| | | '$route.query': { |
| | | immediate: true, |
| | | handler(newData, oldData) { |
| | | this.url = this.$route.query.url |
| | | this.landName = this.$route.query.landName |
| | | this.dic = this.$route.query.dic |
| | | this.landArea = this.$route.query.landArea |
| | | this.dica = this.$route.query.dica |
| | | this.deptname = this.$route.query.deptname |
| | | this.delId = this.$route.query.id |
| | | this.landUnit = this.$route.query.landUnit |
| | | // this.form = res.data.data; |
| | | this.usePolygons = this.$route.query.landRange |
| | | .split("POLYGON((")[1] |
| | | .split("))")[0] |
| | | .split(",") |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |