智慧农业后台管理页面
shuishen
2022-07-18 aa5616320569c996e9b050a4f5fb16ad59f84711
更新
2 files modified
75 ■■■■■ changed files
src/views/land/LandDetail.vue 59 ●●●●● patch | view | raw | blame | history
vue.config.js 16 ●●●● patch | view | raw | blame | history
src/views/land/LandDetail.vue
@@ -3,7 +3,7 @@
      <div class="dd">
        <div class="da">
          <div class="land-img" @click="mod()">
            <img :src=url class="landimg"/>
                    <img :src="url" class="landimg" />
          </div>
          <div class="cent">
            <div class="l">{{ landName }}</div>
@@ -16,18 +16,15 @@
          <el-tabs v-model="activeName" @tab-click="handleClick">
            <!-- 种植记录 -->
            <el-tab-pane label="种养品种" name="tab1">
              <farmplant
              ></farmplant>
                        <farmplant></farmplant>
            </el-tab-pane>
            <!-- 农事记录 -->
            <el-tab-pane label="农事记录" name="tab2">
              <farming
              ></farming>
                        <farming></farming>
            </el-tab-pane>
            <!-- 采收记录 -->
            <el-tab-pane label="采收记录" name="tab3">
              <recovery
              ></recovery>
                        <recovery></recovery>
            </el-tab-pane>
          </el-tabs>
        </div>
@@ -44,25 +41,18 @@
        :close-on-press-escape="false"
        :before-close="dialogBeforeClose"
      >
        <getMapDataInThere
          ref="getMapData"
          id="getMapData"
          @setMapData="setMapData"
        ></getMapDataInThere>
            <getMapDataInThere ref="getMapData" id="getMapData" @setMapData="setMapData"></getMapDataInThere>
        <el-button>54654</el-button>
      </el-dialog>
    </div>
</template>
<script>
import {mapGetters} from "vuex";
import farmplant from "@/views/farmplant/farmplant.vue";
import farming from "@/views/farm/farmingrecord.vue";
import recovery from "@/views/recovery/recovery.vue";
import getMapDataInThere from "./getMapDataInThere.vue";
import { mapGetters } from "vuex"
import farmplant from "@/views/farmplant/farmplant.vue"
import farming from "@/views/farm/farmingrecord.vue"
import recovery from "@/views/recovery/recovery.vue"
import getMapDataInThere from "./getMapDataInThere.vue"
export default {
  components: {
@@ -105,35 +95,35 @@
          }
        ],
      }
    };
        }
  },
  computed: {
    ...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.form = res.data.data;
        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.form = res.data.data;
    let usePolygons = this.$route.query.landRange
      .split("POLYGON((")[1]
      .split("))")[0]
      .split(",");
            .split(",")
    for (let k in usePolygons) {
      usePolygons[k] = {
        lng: +usePolygons[k].split(" ")[0],
        lat: +usePolygons[k].split(" ")[1],
      };
    }
    this.$refs.getMapData.draw(usePolygons);
        }
        this.$refs.getMapData.draw(usePolygons)
  },
  methods: {
    mod() {
      this.formC = {};
      this.gradeBoxVisible1 = true;
            this.formC = {}
            this.gradeBoxVisible1 = true
    },
  },
  watch: {},
@@ -165,7 +155,7 @@
  height: 200px;
  margin-top: 25px;
  margin-left: 60px;
  float: left
    float: left;
}
.cent {
@@ -237,5 +227,4 @@
  width: 100%;
  overflow: hidden;
}
</style>
vue.config.js
@@ -11,11 +11,11 @@
            'vuex': 'Vuex',
            'axios': 'axios',
            'element-ui': 'ELEMENT',
        });
        const entry = config.entry('app');
        entry.add('babel-polyfill').end();
        entry.add('classlist-polyfill').end();
        entry.add('@/mock').end();
        })
        const entry = config.entry('app')
        entry.add('babel-polyfill').end()
        entry.add('classlist-polyfill').end()
        entry.add('@/mock').end()
    },
    css: {
        extract: { ignoreOrder: true }
@@ -26,9 +26,9 @@
        proxy: {
            '/api': {
                //本地服务接口地址
                target: 'http://localhost:89',
                // target: 'http://localhost:89',
                //远程演示服务地址,可用于直接启动项目
                //target: 'https://saber.bladex.vip/api',
                target: 'http://182.106.212.58:8013/api',
                ws: true,
                pathRewrite: {
                    '^/api': '/'
@@ -36,4 +36,4 @@
            }
        }
    }
};
}