From 2c7eff567461cbbc95179e0bb86254e576dc7698 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Sat, 03 Sep 2022 16:07:57 +0800
Subject: [PATCH] 取消农场地图显示,划分地块根据农场经纬度定位
---
src/views/farm/farmInfoDetail.vue | 20 +++++-----
src/views/wel/land.vue | 6 +++
src/views/land/landAdd.vue | 15 ++++++-
src/views/farm/farm.vue | 26 ++++++------
4 files changed, 41 insertions(+), 26 deletions(-)
diff --git a/src/views/farm/farm.vue b/src/views/farm/farm.vue
index 15762ba..5a6ce90 100644
--- a/src/views/farm/farm.vue
+++ b/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
+ // }
],
}
}
diff --git a/src/views/farm/farmInfoDetail.vue b/src/views/farm/farmInfoDetail.vue
index b098c3c..6cc383b 100644
--- a/src/views/farm/farmInfoDetail.vue
+++ b/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,
+ // },
],
},
],
diff --git a/src/views/land/landAdd.vue b/src/views/land/landAdd.vue
index 949b46c..6664737 100644
--- a/src/views/land/landAdd.vue
+++ b/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) {
diff --git a/src/views/wel/land.vue b/src/views/wel/land.vue
index aba0460..204f4bc 100644
--- a/src/views/wel/land.vue
+++ b/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) {
--
Gitblit v1.9.3