智慧农业后台管理页面
guoshilong
2022-09-03 2c7eff567461cbbc95179e0bb86254e576dc7698
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) {