智慧农业后台管理页面
guoshilong
2022-09-03 2c7eff567461cbbc95179e0bb86254e576dc7698
取消农场地图显示,划分地块根据农场经纬度定位
4 files modified
67 ■■■■■ changed files
src/views/farm/farm.vue 26 ●●●● patch | view | raw | blame | history
src/views/farm/farmInfoDetail.vue 20 ●●●● patch | view | raw | blame | history
src/views/land/landAdd.vue 15 ●●●● patch | view | raw | blame | history
src/views/wel/land.vue 6 ●●●●● patch | view | raw | blame | history
src/views/farm/farm.vue
@@ -31,9 +31,9 @@
                >删 除</el-button>
            </template>
            <!-- 地图插入 -->
            <template slot-scope="{ type, disabled }" slot="lineForm">
            <!-- <template slot-scope="{ type, disabled }" slot="lineForm">
                <getMapDataInThere ref="getMapData" id="getMapData" @setMapData="setMapData"></getMapDataInThere>
            </template>
            </template> -->
            <template slot-scope="{ type, size, row }" slot="menu">
                <el-button
                    icon="el-icon-view"
@@ -236,17 +236,17 @@
                        },
                        action: "/api/blade-resource/oss/endpoint/put-files"
                    },
                    {
                        label: "路线展示",
                        labelWidth: 145,
                        prop: "line",
                        className: "mapClass",
                        hide: true,
                        display: true,
                        span: 24,
                        formslot: true,
                        addDisplay: true
                    }
                    // {
                    //     label: "路线展示",
                    //     labelWidth: 145,
                    //     prop: "line",
                    //     className: "mapClass",
                    //     hide: true,
                    //     display: true,
                    //     span: 24,
                    //     formslot: true,
                    //     addDisplay: true
                    // }
                ],
            }
        }
src/views/farm/farmInfoDetail.vue
@@ -5,13 +5,13 @@
            <basic-container>
                <avue-form ref="form" v-model="objBase" :option="optionBase" @submit="submitBase">
                    <!-- 地图插入 -->
                    <template slot-scope="{}" slot="position">
                    <!-- <template slot-scope="{}" slot="position">
                        <getMapDataInThere
                            ref="getMapData"
                            id="getMapData"
                            @setMapData="setMapData"
                        ></getMapDataInThere>
                    </template>
                    </template> -->
                </avue-form>
            </basic-container>
        </el-tab-pane>
@@ -160,14 +160,14 @@
                                },
                                action: "/api/blade-resource/oss/endpoint/put-files"
                            },
                            {
                                label: "农场位置",
                                prop: "position",
                                className: "mapClass",
                                span: 24,
                                formslot: true,
                                labelWidth: 145,
                            },
                            // {
                            //     label: "农场位置",
                            //     prop: "position",
                            //     className: "mapClass",
                            //     span: 24,
                            //     formslot: true,
                            //     labelWidth: 145,
                            // },
                        ],
                    },
                ],
src/views/land/landAdd.vue
@@ -22,7 +22,7 @@
<script>
import { mapGetters } from "vuex";
import { getFarmList } from "@/api/farm/farm";
import { getFarmList,getDetail } from "@/api/farm/farm";
import { getDeptTree } from "@/api/system/dept";
import { add } from "@/api/land/land";
import website from "@/config/website";
@@ -143,12 +143,12 @@
      landUrl: "",
      polygon: [],
      area: "",
      farmInfo:{},
      visible: false,
    };
  },
  created() {
    this.url =
      this.drawMapUrlBase + "/base?type=1&lng=112&lat=24&status=manage";
  },
  computed: {
    ...mapGetters([
@@ -217,6 +217,15 @@
      this.form.landArea = 0
      this.visible = true;
      this.form.farmId = this.$farmId;
        getDetail(this.form.farmId).then(res=>{
            this.farmInfo = res.data.data
            this.url = this.drawMapUrlBase + "/base?type=1&lng=112&lat=24&status=manage&longitude="+this.farmInfo.longitude+"&latitude="+this.farmInfo.latitude;
        })
    },
    // 表单提交
    submit(row, done) {
src/views/wel/land.vue
@@ -28,6 +28,7 @@
<script>
import { mapGetters } from "vuex";
import { getLandList } from "@/api/land/land";
import { getDetail } from "@/api/farm/farm";
import { getStrainList } from "@/api/farmplant/strain";
import { add } from "@/api/land/land";
import getMapDataInThere from "./getMapDataInThere.vue";
@@ -211,6 +212,11 @@
      this.form.landArea = 0
      this.visible = true;
      this.form.farmId = this.$farmId;
      getDetail(this.form.farmId).then(res=>{
        this.farmInfo = res.data.data
        this.url = this.drawMapUrlBase + "/base?type=1&lng=112&lat=24&status=manage&longitude="+this.farmInfo.longitude+"&latitude="+this.farmInfo.latitude;
      })
    },
    // 表单提交
    submit(row, done) {