智慧农业后台管理页面
Administrator
2022-05-11 28bf18ec90ae478a81bb0741cdc6d6a2c8ee045a
src/views/farm/farm.vue
@@ -1,5 +1,4 @@
<template>
  <div class="dispatch">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <!-- 基本信息 -->
      <el-tab-pane label="基本信息" name="tab1">
@@ -34,7 +33,6 @@
        ></farmPaper>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
@@ -169,7 +167,7 @@
                  res: "data",
                  url: "url"
                },
                action: "/api/blade-resource/oss/endpoint/put-file"
                action: "/api/blade-resource/oss/endpoint/put-files"
              },
              {
                label: "农场位置",
@@ -186,7 +184,7 @@
    };
  },
  computed: {
    ...mapGetters(["userInfo", "permission", "polygons"]),
    ...mapGetters(["userInfo", "permission", "polygonsFarm"]),
  },
  mounted() {
    var that = this;
@@ -213,14 +211,14 @@
  methods: {
    //农场基本信息提交
    submitBase(form, loading, done) {
      if (this.polygons.length == 0) {
      if (this.polygonsFarm.length == 0) {
        //没有面的数据
        this.$refs.getMapData.isCheck = true;
        loading();
      } else {
        //如果有值,空间坐标转换
        let pol = this.polygons;
        let polLength = this.polygons.length - 1;
        let pol = this.polygonsFarm;
        let polLength = this.polygonsFarm.length - 1;
        let usePolygons = "";
        for (let k in pol) {
          usePolygons += pol[k].lng + "," + pol[k].lat;