Browse Source

feat:添加品种确权地图影像

wangsisi 3 weeks ago
parent
commit
2aaf803c92
3 changed files with 28 additions and 9 deletions
  1. 1 0
      src/api/config.js
  2. 9 9
      src/components/charts/options/oneLineOption.js
  3. 18 0
      src/views/varietyMap/map.vue

+ 1 - 0
src/api/config.js

@@ -12,6 +12,7 @@ module.exports = {
     dji_cloud_base :djiCloudBase,
     mini_key:"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9",
     image_url:server+"images/",
+    base_img_url : "https://img.sysuimars.com/",
     base_img_url2 : "https://birdseye-img-ali-cdn.sysuimars.com/",
     base_img_url3 : "https://birdseye-img.sysuimars.com/",
     base_video_url : "https://minio.sysuimars.com/sysuimars/",

+ 9 - 9
src/components/charts/options/oneLineOption.js

@@ -21,7 +21,7 @@ function getCurrentDateAndNextSixDaysMMDD() {
 }
 
 const list = getCurrentDateAndNextSixDaysMMDD();
-const arr = [16, 17, 18, 20, 29, 21, 22]
+const arr = [29, 28, 27, 26, 16, 15, 22]
 
 export const oneLine = {
     tooltip: {
@@ -107,8 +107,8 @@ export const oneLine = {
                     {
                         name: "text",
                         value: "最高",
-                        xAxis: list[4],
-                        yAxis: arr[4],
+                        xAxis: list[1],
+                        yAxis: arr[1],
                         symbolOffset: [0, "-50%"],
                         label: {
                             offset: [0, 15],
@@ -119,8 +119,8 @@ export const oneLine = {
                     },
                     {
                         name: "mark",
-                        xAxis: list[4],
-                        yAxis: arr[4],
+                        xAxis: list[1],
+                        yAxis: arr[1],
                         value: "",
                         label: {
                             backgroundColor: "#fff",
@@ -134,8 +134,8 @@ export const oneLine = {
                     {
                         name: "text",
                         value: "最低",
-                        xAxis: list[2],
-                        yAxis: arr[2],
+                        xAxis: list[5],
+                        yAxis: arr[5],
                         symbolOffset: [0, "-50%"],
                         label: {
                             offset: [0, 15],
@@ -146,8 +146,8 @@ export const oneLine = {
                     },
                     {
                         name: "mark",
-                        xAxis: list[2],
-                        yAxis: arr[2],
+                        xAxis: list[5],
+                        yAxis: arr[5],
                         value: "",
                         label: {
                             backgroundColor: "#fff",

+ 18 - 0
src/views/varietyMap/map.vue

@@ -8,6 +8,7 @@ import AMapLoader from "@amap/amap-jsapi-loader";
 import eventBus from "@/api/eventBus";
 import { convertPointToArray } from "@/utils/index";
 import { deepClone } from "@/common/commonFun";
+import {base_img_url,base_img_url3} from "@/api/config";
 
 const map = ref(null);
 const mouseTool = ref(null);
@@ -57,6 +58,23 @@ const initMap = async () => {
                 ],
             });
 
+            //创建自定义切片图层,指定 getTileUrl 属性
+            var googleLayer = new AMap.TileLayer({
+                tileUrl: base_img_url + 'map/lby/[z]/[x]/[y].png',
+                zIndex:2
+            });
+
+            //将自定义图层添加到地图
+            map.value.add(googleLayer);
+
+            var googleLayer1 = new AMap.TileLayer({
+                tileUrl: base_img_url3 + 'map/lby/[z]/[x]/[y].png',
+                zIndex:2
+            });
+
+            //将自定义图层添加到地图
+            map.value.add(googleLayer1);
+
             // 初始化 MouseTool
             mouseTool.value = new AMap.MouseTool(map.value);