From d5f572496c5fb12fec2fe346b847bf58331299c9 Mon Sep 17 00:00:00 2001
From: YM <479443481@qq.com>
Date: 星期三, 17 七月 2024 15:56:51 +0800
Subject: [PATCH] 1

---
 src/pages/characterMap/characterMap.vue | 1031 +++++++++++++++++++++++++++++++++------------------------
 1 files changed, 596 insertions(+), 435 deletions(-)

diff --git a/src/pages/characterMap/characterMap.vue b/src/pages/characterMap/characterMap.vue
index 17e3c8f..a4f33a5 100644
--- a/src/pages/characterMap/characterMap.vue
+++ b/src/pages/characterMap/characterMap.vue
@@ -1,465 +1,626 @@
 <template>
-	<view>
-		<headNav :idIndex="idIndex" text="涓尰浜虹墿鏁版嵁搴�" />
-		<el-button class="getBack" @click="getBack">杩斿洖</el-button>
-		<view class="" style="position: relative;">
-			<!-- 鍦板浘 -->
-			<view id="spaceTime" style="height: 90vh;width: 100%;position: relative;"></view>
-			<!-- 璇︽儏 -->
-			<el-dialog class="particulars" :visible.sync="menuNav" :modal="false">
-				<view class="font-family" style="font-size: .26rem;padding-top: .16rem;font-weight: bold;">鏉庢椂鐝�</view>
-				<ul
-					style="border-bottom: .01rem solid #D8D8D8; padding:  .16rem 0; font-size: .14rem;font-weight: 400;line-height: .28rem;">
-					<li>鍑虹敓浜庤暡宸�</li>
-					<li>1518骞�07鏈�03鏃� 钑插窞锛堜粖婀栧寳钑插窞闀囷級</li>
-				</ul>
-				<ul style="margin: .31rem 0 .11rem 0; font-size: .14rem;font-weight: 400;line-height: .28rem;">
-					<li>娲诲姩鍚嶇О锛氭挵鍐欍�婃湰鑽夌翰鐩��</li>
-					<li>娲诲姩鍦扮偣锛氭禉姹熺渷 </li>
-					<li>娲诲姩鍖洪棿锛氭禉姹熺渷鏉窞甯� </li>
-					<li>娲诲姩鎻忚堪锛氭挵鍐欍�婃湰鑽夌翰鐩�� </li>
-					<li>鍙備笌浜哄憳锛氭潕鏃剁弽 </li>
-					<li>鏉ユ簮缁勬垚锛氭挵鍐欍�婃湰鑽夌翰鐩��</li>
-				</ul>
-				<img style="width: 100%;height: 2rem;"
-					src="https://img0.baidu.com/it/u=1845740325,2917001370&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1711731600&t=0b208ab46e1d33aa81ac31dd6bf627be"
-					alt="" />
-				<div class="box" style="width: 80%;">
-					<span class="span" :style="{'marginLeft': spanML+'rem'}">{{span}}骞�</span>
-					<div class="scales">
-						<view v-for="(item,index) in yearArr" @click="scaleClick(index)" class="scale"
-							:data-index="index"></view>
-					</div>
-					<div class="MX"></div>
-					<div class="cursor" :style="{'marginLeft': cursorML+'rem'}"></div>
-				</div>
-			</el-dialog>
-		</view>
-	</view>
+  <view
+    style="width: 100%; height: 100%; display: flex; flex-direction: column"
+  >
+    <headNav :idIndex="1 + ''" text="鍘嗕唬浜虹墿" />
+    <el-button class="getBack" @click="goBack">杩斿洖</el-button>
+    <view style="flex: 1; overflow: hidden">
+      <!-- 鍦板浘 -->
+      <!-- <view id="spaceTime" style="height: 90vh;width: 100%;position: relative;"></view> -->
+      <div id="map"></div>
+
+      <!-- 璇︽儏 -->
+      <el-dialog class="particulars" :visible.sync="menuNav" :modal="false">
+        <view
+          class="font-family"
+          style="font-size: 0.26rem; padding-top: 0.16rem; font-weight: bold"
+          >{{ basicInfo.name }}</view
+        >
+        <ul
+          style="
+            border-bottom: 0.01rem solid #d8d8d8;
+            padding: 0.16rem 0;
+            font-size: 0.14rem;
+            font-weight: 400;
+            line-height: 0.28rem;
+          "
+        >
+          <li>鍑虹敓浜巤{ basicInfo.nativePlace || "-" }}</li>
+          <li>
+            <span v-if="basicInfo.birthYear">{{ basicInfo.birthYear }}</span>
+            <span v-if="basicInfo.nativePlace">{{
+              basicInfo.nativePlace
+            }}</span>
+            <span v-if="basicInfo.nowPlace"
+              >锛堜粖{{ basicInfo.nowPlace }}锛�</span
+            >
+          </li>
+        </ul>
+        <ul
+          style="
+            margin: 0.31rem 0 0.11rem 0;
+            font-size: 0.14rem;
+            font-weight: 400;
+            line-height: 0.28rem;
+          "
+        >
+          <li>娲诲姩鍚嶇О锛歿{ activityInfo.activityName || "-" }}</li>
+          <li>娲诲姩鍦扮偣锛歿{ activityInfo.activityAddr || "-" }}</li>
+          <li>娲诲姩鍖洪棿锛歿{ activityInfo.time || "-" }}</li>
+          <li>娲诲姩鎻忚堪锛歿{ activityInfo.desc || "-" }}</li>
+          <li>鍙備笌浜哄憳锛歿{ activityInfo.participants || "-" }}</li>
+        </ul>
+        <!-- <img
+          style="width: 100%; height: 2rem"
+          src="https://img0.baidu.com/it/u=1845740325,2917001370&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1711731600&t=0b208ab46e1d33aa81ac31dd6bf627be"
+          alt=""
+        /> -->
+        <!-- <div class="box" style="width: 80%">
+          <span class="span" :style="{ marginLeft: spanML + 'rem' }"
+            >{{ span }}骞�</span
+          >
+          <div class="scales">
+            <view
+              v-for="(item, index) in yearArr"
+              @click="scaleClick(index)"
+              class="scale"
+              :data-index="index"
+            ></view>
+          </div>
+          <div class="MX"></div>
+          <div class="cursor" :style="{ marginLeft: cursorML + 'rem' }"></div>
+        </div> -->
+      </el-dialog>
+    </view>
+  </view>
 </template>
 
 <script>
-	import * as echarts from 'echarts';
-	import 'echarts/extension/bmap/bmap';
-	import {
-		loadBMap
-	} from "@/static/map.js"
+import * as echarts from "echarts";
+import "echarts/extension/bmap/bmap";
+import { loadBMap } from "@/static/map.js";
+import L from "leaflet";
+import "leaflet.chinatmsproviders";
+import { getPersonInfo } from "@/api/index.js";
+export default {
+  data() {
+    return {
+      menuNav: false,
+      sliderValue: 2024,
+      currentYear: 2024,
+      sliderValue: 50,
+      MX: document.querySelector(".MX"),
+      box: document.querySelector(".box"),
+      span: "",
+      yearArr: [],
+      yearIndex: 0,
+      spanML: 0,
+      cursorML: -0.05,
+      activityInfo: {},
+      basicInfo: {
+        name: "",
+        birthYear: "",
+        deathYear: "",
+        nativePlace: "",
+        nowPlace: "",
+      },
+    };
+  },
 
-	export default {
-		data() {
-			return {
-				menuNav: false,
-				sliderValue: 2024,
-				currentYear: 2024,
-				sliderValue: 50,
-				MX: document.querySelector(".MX"),
-				box: document.querySelector(".box"),
-				span: '',
-				yearArr: [],
-				yearIndex: 0,
-				spanML: 0,
-				cursorML: -.05
-			}
-		},
+  mounted() {
+    // // 鏃剁┖鍦板浘
+    // loadBMap("5USVDAhhS4ssz44HLq3gNPZai7naXf4Q").then(() => {
+    //   this.spaceTime();
+    // });
+    // this.$nextTick(() => {
+    //   this.aaa();
+    // });
+    this.$route;
+    this.getPersonInfoFun();
+    this.getBasicInfo();
+  },
+  methods: {
+    //鍒濆鍖栧湴鍥�
+    initMap(info) {
+      var map = L.map("map", {
+        attributionControl: false,
+        preferCanvas: true,
+      }).setView([35.91667, 110.41667], 5);
 
-		mounted() {
+      // L.tileLayer(
+      //   "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}"
+      // ).addTo(map);
 
-			// 鏃剁┖鍦板浘
-			loadBMap('5USVDAhhS4ssz44HLq3gNPZai7naXf4Q').then(() => {
-				this.spaceTime()
-			})
-			this.$nextTick(() => {
-				this.aaa()
-			})
-		},
-		methods: {
-			// 杩斿洖鎸夐挳
-			getBack() {
-				uni.navigateBack();
-			},
-			aaa() {
-				// 娓叉煋姣嶇嚎
-				this.addArr()
-			},
-			addArr(start = 894, end = 900) {
-				for (let i = start; i <= end; i++) {
-					this.yearArr.push(i)
-				}
-				this.span = this.yearArr[0]
-				this.$nextTick(() => {
-					// this.creatMX(this.yearArr.length - 1)
-					// this.creatScale(this.yearArr)
-				})
-			},
-			creatMX(len) {
-				console.log(len);
-				let width = len * 50 + 10
-				// this.MX.style.width = `${width}px`
-				// this.scales.style.width = `${width}px`
-				// console.log(this.box.style.width);
-			},
-			creatScale() {
-				// for (let i = 0; i < this.yearArr.length; i++) {
-				// 	let scale = document.createElement("div")
-				// 	scale.className = "scale"
-				// 	scale.setAttribute("index", i)
-				// 	scale.addEventListener("click", this.scaleClick)
-				// 	scales.appendChild(scale)
-				// }
-				// console.log(arr[0]);
+      L.tileLayer
+        .chinaProvider("TianDiTu.Normal.Map", {
+          key: "76bc34ead7e30e663a4eded8aeaf5860",
+          maxZoom: 18,
+          minZoom: 5,
+        })
+        .addTo(map);
+      L.tileLayer
+        .chinaProvider("TianDiTu.Normal.Annotion", {
+          key: "76bc34ead7e30e663a4eded8aeaf5860",
+          maxZoom: 18,
+          minZoom: 3,
+        })
+        .addTo(map);
+      let DefaultIcon1 = L.icon({
+        iconUrl: this.icoName,
+        iconSize: [24, 41], //  鍥炬爣鐨勫ぇ灏�    銆愬��1锛屽��2銆� 涓哄叿浣撲綘鑷畾涔夊浘鏍囩殑灏哄锛屾瘮濡傛垜鍥炬爣灏哄鏄�32脳52锛岃〃绀鸿鍥炬爣锛氬搴�32鍍忕礌锛岄珮搴︼細52鍍忕礌锛岄偅涔堝��1:灏辨槸32锛屽��2锛氬氨鏄�52
+        iconAnchor: [24, 41], //  鍥炬爣灏嗗搴旀爣璁扮偣鐨勪綅缃� 杩欎釜鏄噸鐐癸紝 銆愬��1锛屽��2銆戯紝鍊�1锛氫负鍥炬爣鍧愭爣绗竴涓��(鍗�32)鐨勪竴鍗婏紝鍊�2锛氫负鍥炬爣鍧愭爣绗簩涓��(鍗�52)
+        popupAnchor: [1, -24], // 璇ョ偣鏄浉瀵逛簬iconAnchor寮瑰嚭淇℃伅鐨勪綅缃�  杩欎釜鏄垜鎵嬪姩璋冨嚭鏉ョ殑锛屾枃妗i粯璁ゅ師濮嬪�兼槸[-1锛�-76]锛屾垜鏄幓涓�鍗婂�硷紝鍙栦竴鍗婂�艰皟鍑烘潵鐨�
+      });
+      let icon = L.divIcon({
+        html: "<div class='map-circle-name ripple'></div>",
+        iconSize: [80, 80],
+        className: "map-circle",
+      });
+      this.map = map;
+      if (info && info.length) {
+        for (let i = 0; i < info.length; i++) {
+          const item = info[i];
+          const marker1 = L.marker([item.ycoord, item.xcoord], {
+            icon: icon,
+          }).addTo(map);
+          marker1.on("click", (e) => {
+            this.menuNav = true;
+            this.activityInfo = item;
+          });
+        }
+      }
+    },
 
-			},
+    // 杩斿洖鎸夐挳
+    goBack() {
+      this.$router.go(-1);
+    },
+    aaa() {
+      // 娓叉煋姣嶇嚎
+      this.addArr();
+    },
+    addArr(start = 894, end = 900) {
+      for (let i = start; i <= end; i++) {
+        this.yearArr.push(i);
+      }
+      this.span = this.yearArr[0];
+      this.$nextTick(() => {
+        // this.creatMX(this.yearArr.length - 1)
+        // this.creatScale(this.yearArr)
+      });
+    },
 
-			handleSliderChange(value) {
-				this.currentYear = value;
-			},
-			scaleClick(i) {
-				// let i = Number(this.getAttribute("data-index"))
-				console.log(i, this.cursorML);
+    getPersonInfoFun() {
+      getPersonInfo({
+        id: this.$route.query.id,
+        type: "PERSON_SPACE_TIME",
+      }).then((res) => {
+        this.initMap(res.object.personSpaceTimeList);
+      });
+    },
 
-				if (i > this.yearIndex) {
+    getBasicInfo() {
+      getPersonInfo({
+        id: this.$route.query.id,
+        type: "PERSON_BASIC",
+      }).then((res) => {
+        this.basicInfo.name = res.object.personFieldList.find(
+          (f) => f.fieldName == "WEAK_NAME"
+        ).content1;
+        this.basicInfo.birthYear = res.object.personFieldList.find(
+          (f) => f.fieldName == "BIRTH_YEAR"
+        ).content1;
+        this.basicInfo.deathYear = res.object.personFieldList.find(
+          (f) => f.fieldName == "DEATH_YEAR"
+        ).content1;
+        this.basicInfo.nativePlace = res.object.personFieldList.find(
+          (f) => f.fieldName == "NATIVE_PLACE"
+        ).content1;
+        this.basicInfo.nowPlace = res.object.personFieldList.find(
+          (f) => f.fieldName == "NATIVE_PLACE"
+        ).content2;
+        console.log(this.basicInfo);
+      });
+    },
 
-					this.cursorML += (i - this.yearIndex + +('0.0' + this.yearIndex)) / 1.9
-					// this.spanML += 50 * (i - this.yearIndex)
-					console.log((i - this.yearIndex + 0.2), 'aaaa');
+    creatMX(len) {
+      let width = len * 50 + 10;
+      // this.MX.style.width = `${width}px`
+      // this.scales.style.width = `${width}px`
+    },
+    creatScale() {
+      // for (let i = 0; i < this.yearArr.length; i++) {
+      // 	let scale = document.createElement("div")
+      // 	scale.className = "scale"
+      // 	scale.setAttribute("index", i)
+      // 	scale.addEventListener("click", this.scaleClick)
+      // 	scales.appendChild(scale)
+      // }
+    },
 
-				} else {
-					this.cursorML -= (this.yearIndex - i) / 2 + 0.04
-					// this.spanML -= 50 * (this.yearIndex - i)
-					console.log(this.yearIndex, i, 'bbbb');
-				}
-				this.yearIndex = i
-			},
-			// ________________________
-			// 鏃剁┖鍦板浘
-			spaceTime() {
-				var chartDom = document.getElementById('spaceTime');
-				var myChart = echarts.init(chartDom);
-				var option;
+    handleSliderChange(value) {
+      this.currentYear = value;
+    },
+    scaleClick(i) {
+      // let i = Number(this.getAttribute("data-index"))
 
-				const data = [{
-						name: '娴烽棬',
-						value: 9
-					},
-					{
-						name: '閲戞槍',
-						value: 19
-					},
-					{
-						name: '娉夊窞',
-						value: 21
-					},
-					{
-						name: '琛㈠窞',
-						value: 177
-					},
-					{
-						name: '寤婂潑',
-						value: 193
-					},
-					{
-						name: '鑿忔辰',
-						value: 194
-					},
-					{
-						name: '鍚堣偉',
-						value: 229
-					},
-					{
-						name: '姝︽眽',
-						value: 273
-					},
-					{
-						name: '鍟婁笁澶х熆鍙婅鍒板簳鏄皝寤哄+澶уか澶у笀鍌呭氨',
-						value: 279
-					}
-				];
-				const geoCoordMap = {
-					娴烽棬: [121.15, 31.89],
-					閯傚皵澶氭柉: [109.781327, 39.608266],
-					鎷涜繙: [120.38, 37.35],
-					骞抽《灞�: [113.29, 33.75],
-					閭㈠彴: [114.48, 37.05],
-					寰峰窞: [116.29, 37.45],
-					娴庡畞: [116.59, 35.38],
-					鑽嗗窞: [112.239741, 30.335165],
-					瀹滄槍: [111.3, 30.7],
-					涔変箤: [120.06, 29.32],
-					涓芥按: [119.92, 28.45],
-					娲涢槼: [112.44, 34.7],
-					绉︾殗宀�: [119.57, 39.95],
-					鏍床: [113.16, 27.83],
-					鐭冲搴�: [114.48, 38.03],
-					鑾辫姕: [117.67, 36.19],
-					甯稿痉: [111.69, 29.05],
-					淇濆畾: [115.48, 38.85],
-					婀樻江: [112.91, 27.87],
-					閲戝崕: [119.64, 29.12],
-					宀抽槼: [113.09, 29.37],
-					闀挎矙: [113, 28.21],
-					琛㈠窞: [118.88, 28.97],
-					寤婂潑: [116.7, 39.53],
-					鑿忔辰: [115.480656, 35.23375],
-					鍚堣偉: [117.27, 31.86],
-					姝︽眽: ['浣犲ソ', 30.52],
-					鍟婁笁澶х熆鍙婅鍒板簳鏄皝寤哄+澶уか澶у笀鍌呭氨: [125.03, 46.58]
-				};
-				const convertData = function(data) {
-					var res = [];
-					for (var i = 0; i < data.length; i++) {
-						var geoCoord = geoCoordMap[data[i].name];
-						if (geoCoord) {
-							res.push({
-								name: data[i].name,
-								value: geoCoord.concat(data[i].value)
-							});
-						}
-					}
-					return res;
-				};
-				option = {
-					tooltip: {
-						trigger: 'item'
-					},
-					bmap: {
-						center: [104.114129, 37.550339], // 璋冩暣鍦板浘涓績鐐逛綅缃�
-						zoom: 6, // 璁剧疆鍦板浘缂╂斁绾у埆
-						roam: true,
-						mapStyle: {
-							styleJson: [{
-									featureType: 'water',
-									elementType: 'all',
-									stylers: {
-										color: '#d1d1d1'
-									}
-								},
-								{
-									featureType: 'land',
-									elementType: 'all',
-									stylers: {
-										color: '#f3f3f3'
-									}
-								},
-								{
-									featureType: 'manmade',
-									elementType: 'all',
-									stylers: {
-										color: '#d1d1d1'
-									}
-								},
-								{
-									featureType: 'local',
-									elementType: 'all',
-									stylers: {
-										color: '#d1d1d1'
-									}
-								},
-								{
-									featureType: 'arterial',
-									elementType: 'labels',
-									stylers: {
-										visibility: 'off'
-									}
-								},
-								{
-									featureType: 'boundary',
-									elementType: 'all',
-									stylers: {
-										color: '#fefefe'
-									}
-								},
-								{
-									featureType: 'building',
-									elementType: 'all',
-									stylers: {
-										color: '#d1d1d1'
-									}
-								},
-								{
-									featureType: 'label',
-									elementType: 'labels.text.fill',
-									stylers: {
-										color: '#999999'
-									}
-								}
-							]
-						}
-					},
-					series: [{
-						type: 'effectScatter',
-						coordinateSystem: 'bmap',
-						data: convertData(
-							data
-							.sort(function(a, b) {
-								return b.value - a.value;
-							})
-							.slice(0, 6)
-						),
-						symbolSize: function(val) {
-							return val[2] / 10;
-						},
-						encode: {
-							value: 2
-						},
-						showEffectOn: 'render',
-						rippleEffect: {
-							brushType: 'stroke'
-						},
-						label: {
-							formatter: '{b}',
-							position: 'bottom',
-							backgroundColor: 'rgba(255, 255, 255, 1)',
-							padding: [4, 8],
-							formatter: function(params) { // 浣跨敤鍑芥暟鍔ㄦ�佺敓鎴愭爣绛惧唴瀹�
-								// 璁剧疆鏂囧瓧澶氬皯涓悗闈㈡樉绀虹渷鐣ュ彿
-								if (params.data.name.length > 6) {
-									return params.data.name.substring(0, 6) + '...';
-								} else {
-									return params.data.name;
-								}
-							},
-							show: true,
-							fontSize: 12,
-							borderRadius: 30,
-						},
-						itemStyle: {
-							shadowBlur: 10,
-							shadowColor: '#333'
-						},
-						emphasis: {
-							scale: true
-						},
-						zlevel: 1
-					}]
-				};
-				let menuNav1 = this.menuNav
-				let menuNav2 = this.menuNav
-				// 璁剧疆鐐瑰嚮浜嬩欢鐩戝惉
-				myChart.on('click', (params) => {
-					// menuNav2 = !menuNav1
-					// console.log(menuNav);
-					if (params.componentType === 'series') {
+      if (i > this.yearIndex) {
+        this.cursorML += (i - this.yearIndex + +("0.0" + this.yearIndex)) / 1.9;
+        // this.spanML += 50 * (i - this.yearIndex)
+      } else {
+        this.cursorML -= (this.yearIndex - i) / 2 + 0.04;
+        // this.spanML -= 50 * (this.yearIndex - i)
+      }
+      this.yearIndex = i;
+    },
+    // ________________________
+    // 鏃剁┖鍦板浘
+    spaceTime() {
+      var chartDom = document.getElementById("spaceTime");
+      var myChart = echarts.init(chartDom);
+      var option;
 
-						var dataName = params.data.name; // 鑾峰彇鐐瑰嚮鐨勬暟鎹悕绉�
-						var dataValue = params.data.value; // 鑾峰彇鐐瑰嚮鐨勬暟鎹��
-						// 鍦ㄨ繖閲屽彲浠ユ牴鎹渶瑕佸鐞嗙偣鍑讳簨浠讹紝姣斿寮瑰嚭瀵瑰簲鏁版嵁鐨勮缁嗕俊鎭瓑鎿嶄綔
-						// console.log('鐐瑰嚮浜�', dataName, '鏁版嵁锛屾暟鍊间负', dataValue);
-						// 杩欓噷鍙互缂栧啓瑙﹀彂鏃堕棿鑾峰彇瀵瑰簲鏁版嵁淇℃伅鐨勯�昏緫
-						this.spaceTimeArr(params)
-					}
-				})
+      const data = [
+        {
+          name: "娴烽棬",
+          value: 9,
+        },
+        {
+          name: "閲戞槍",
+          value: 19,
+        },
+        {
+          name: "娉夊窞",
+          value: 21,
+        },
+        {
+          name: "琛㈠窞",
+          value: 177,
+        },
+        {
+          name: "寤婂潑",
+          value: 193,
+        },
+        {
+          name: "鑿忔辰",
+          value: 194,
+        },
+        {
+          name: "鍚堣偉",
+          value: 229,
+        },
+        {
+          name: "姝︽眽",
+          value: 273,
+        },
+        {
+          name: "鍟婁笁澶х熆鍙婅鍒板簳鏄皝寤哄+澶уか澶у笀鍌呭氨",
+          value: 279,
+        },
+      ];
+      const geoCoordMap = {
+        娴烽棬: [121.15, 31.89],
+        閯傚皵澶氭柉: [109.781327, 39.608266],
+        鎷涜繙: [120.38, 37.35],
+        骞抽《灞�: [113.29, 33.75],
+        閭㈠彴: [114.48, 37.05],
+        寰峰窞: [116.29, 37.45],
+        娴庡畞: [116.59, 35.38],
+        鑽嗗窞: [112.239741, 30.335165],
+        瀹滄槍: [111.3, 30.7],
+        涔変箤: [120.06, 29.32],
+        涓芥按: [119.92, 28.45],
+        娲涢槼: [112.44, 34.7],
+        绉︾殗宀�: [119.57, 39.95],
+        鏍床: [113.16, 27.83],
+        鐭冲搴�: [114.48, 38.03],
+        鑾辫姕: [117.67, 36.19],
+        甯稿痉: [111.69, 29.05],
+        淇濆畾: [115.48, 38.85],
+        婀樻江: [112.91, 27.87],
+        閲戝崕: [119.64, 29.12],
+        宀抽槼: [113.09, 29.37],
+        闀挎矙: [113, 28.21],
+        琛㈠窞: [118.88, 28.97],
+        寤婂潑: [116.7, 39.53],
+        鑿忔辰: [115.480656, 35.23375],
+        鍚堣偉: [117.27, 31.86],
+        姝︽眽: ["浣犲ソ", 30.52],
+        鍟婁笁澶х熆鍙婅鍒板簳鏄皝寤哄+澶уか澶у笀鍌呭氨: [125.03, 46.58],
+      };
+      const convertData = function (data) {
+        var res = [];
+        for (var i = 0; i < data.length; i++) {
+          var geoCoord = geoCoordMap[data[i].name];
+          if (geoCoord) {
+            res.push({
+              name: data[i].name,
+              value: geoCoord.concat(data[i].value),
+            });
+          }
+        }
+        return res;
+      };
+      option = {
+        tooltip: {
+          trigger: "item",
+        },
+        bmap: {
+          center: [104.114129, 37.550339], // 璋冩暣鍦板浘涓績鐐逛綅缃�
+          zoom: 6, // 璁剧疆鍦板浘缂╂斁绾у埆
+          roam: true,
+          mapStyle: {
+            styleJson: [
+              {
+                featureType: "water",
+                elementType: "all",
+                stylers: {
+                  color: "#d1d1d1",
+                },
+              },
+              {
+                featureType: "land",
+                elementType: "all",
+                stylers: {
+                  color: "#f3f3f3",
+                },
+              },
+              {
+                featureType: "manmade",
+                elementType: "all",
+                stylers: {
+                  color: "#d1d1d1",
+                },
+              },
+              {
+                featureType: "local",
+                elementType: "all",
+                stylers: {
+                  color: "#d1d1d1",
+                },
+              },
+              {
+                featureType: "arterial",
+                elementType: "labels",
+                stylers: {
+                  visibility: "off",
+                },
+              },
+              {
+                featureType: "boundary",
+                elementType: "all",
+                stylers: {
+                  color: "#fefefe",
+                },
+              },
+              {
+                featureType: "building",
+                elementType: "all",
+                stylers: {
+                  color: "#d1d1d1",
+                },
+              },
+              {
+                featureType: "label",
+                elementType: "labels.text.fill",
+                stylers: {
+                  color: "#999999",
+                },
+              },
+            ],
+          },
+        },
+        series: [
+          {
+            type: "effectScatter",
+            coordinateSystem: "bmap",
+            data: convertData(
+              data
+                .sort(function (a, b) {
+                  return b.value - a.value;
+                })
+                .slice(0, 6)
+            ),
+            symbolSize: function (val) {
+              return val[2] / 10;
+            },
+            encode: {
+              value: 2,
+            },
+            showEffectOn: "render",
+            rippleEffect: {
+              brushType: "stroke",
+            },
+            label: {
+              formatter: "{b}",
+              position: "bottom",
+              backgroundColor: "rgba(255, 255, 255, 1)",
+              padding: [4, 8],
+              formatter: function (params) {
+                // 浣跨敤鍑芥暟鍔ㄦ�佺敓鎴愭爣绛惧唴瀹�
+                // 璁剧疆鏂囧瓧澶氬皯涓悗闈㈡樉绀虹渷鐣ュ彿
+                if (params.data.name.length > 6) {
+                  return params.data.name.substring(0, 6) + "...";
+                } else {
+                  return params.data.name;
+                }
+              },
+              show: true,
+              fontSize: 12,
+              borderRadius: 30,
+            },
+            itemStyle: {
+              shadowBlur: 10,
+              shadowColor: "#333",
+            },
+            emphasis: {
+              scale: true,
+            },
+            zlevel: 1,
+          },
+        ],
+      };
+      let menuNav1 = this.menuNav;
+      let menuNav2 = this.menuNav;
+      // 璁剧疆鐐瑰嚮浜嬩欢鐩戝惉
+      myChart.on("click", (params) => {
+        // menuNav2 = !menuNav1
+        if (params.componentType === "series") {
+          var dataName = params.data.name; // 鑾峰彇鐐瑰嚮鐨勬暟鎹悕绉�
+          var dataValue = params.data.value; // 鑾峰彇鐐瑰嚮鐨勬暟鎹��
+          // 鍦ㄨ繖閲屽彲浠ユ牴鎹渶瑕佸鐞嗙偣鍑讳簨浠讹紝姣斿寮瑰嚭瀵瑰簲鏁版嵁鐨勮缁嗕俊鎭瓑鎿嶄綔
+          // 杩欓噷鍙互缂栧啓瑙﹀彂鏃堕棿鑾峰彇瀵瑰簲鏁版嵁淇℃伅鐨勯�昏緫
+          this.spaceTimeArr(params);
+        }
+      });
 
-				option && myChart.setOption(option);
-			},
-			// 鏃剁┖鍦板浘鐐瑰嚮鏃惰幏鍙栫殑鏁版嵁
-			spaceTimeArr(Arr) {
-				// 淇敼 Vue 缁勪欢鐨勬暟鎹紝渚嬪鏄剧ず鑿滃崟瀵艰埅
-				this.menuNav = !this.menuNav
-				// 鏃剁┖鍦板浘鐨勬暟鎹�
-				console.log(Arr);
-			}
-		}
-	}
+      option && myChart.setOption(option);
+    },
+    // 鏃剁┖鍦板浘鐐瑰嚮鏃惰幏鍙栫殑鏁版嵁
+    spaceTimeArr(Arr) {
+      // 淇敼 Vue 缁勪欢鐨勬暟鎹紝渚嬪鏄剧ず鑿滃崟瀵艰埅
+      this.menuNav = !this.menuNav;
+      // 鏃剁┖鍦板浘鐨勬暟鎹�
+    },
+  },
+};
 </script>
 
 <style scoped>
-	.getBack {
-		position: fixed;
-		width: .6rem;
-		height: .24rem;
-		top: 1rem;
-		left: .24rem;
-		z-index: 99999;
-		font-size: .12rem;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		color: #2C2C2C;
-		border-color: #9E9E9E;
-		border-radius: 0;
-		font-weight: 700;
-	}
+.getBack {
+  position: fixed;
+  width: 0.6rem;
+  height: 0.24rem;
+  top: 1rem;
+  left: 0.6rem;
+  z-index: 99999;
+  font-size: 0.12rem;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: #2c2c2c;
+  border-color: #9e9e9e;
+  border-radius: 0;
+  font-weight: 700;
+}
 
-	.box {
-		position: absolute;
-		bottom: 10%;
-		left: 50%;
-		height: .3rem;
-		transform: translate(-50%, -50%);
-	}
+.box {
+  position: absolute;
+  bottom: 10%;
+  left: 50%;
+  height: 0.3rem;
+  transform: translate(-50%, -50%);
+}
 
-	.MX {
-		height: 20px;
-		background-color: #ccc;
-	}
+.MX {
+  height: 20px;
+  background-color: #ccc;
+}
 
-	.scale {
-		width: 3px;
-		height: 50px;
-		background-color: #ccc;
-		cursor: pointer;
-	}
+.scale {
+  width: 3px;
+  height: 50px;
+  background-color: #ccc;
+  cursor: pointer;
+}
 
-	.scales {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-	}
+.scales {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
 
-	.span {
-		font-size: 25px;
-		color: rgb(0, 68, 255);
-		margin-left: -34px;
-	}
+.span {
+  font-size: 25px;
+  color: rgb(0, 68, 255);
+  margin-left: -34px;
+}
 
-	.cursor {
-		position: relative;
-		width: 25px;
-		height: 30px;
-		background-color: rgb(0, 68, 255);
-		margin-top: 30px;
-		margin-left: -12.5px;
-	}
+.cursor {
+  position: relative;
+  width: 25px;
+  height: 30px;
+  background-color: rgb(0, 68, 255);
+  margin-top: 30px;
+  margin-left: -12.5px;
+}
 
-	.cursor:before {
-		content: "";
-		position: absolute;
-		top: -20px;
-		width: 0;
-		height: 0;
-		border-left: 13px solid transparent;
-		border-right: 13px solid transparent;
-		border-bottom: 20px solid rgb(0, 68, 255);
-	}
+.cursor:before {
+  content: "";
+  position: absolute;
+  top: -20px;
+  width: 0;
+  height: 0;
+  border-left: 13px solid transparent;
+  border-right: 13px solid transparent;
+  border-bottom: 20px solid rgb(0, 68, 255);
+}
 
-	::v-deep .particulars {
-		position: absolute !important;
-		top: 0;
-		right: 0;
-		bottom: 0;
-		left: 0;
-		overflow: auto;
-		margin: 0;
-	}
+::v-deep .particulars {
+  position: absolute !important;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  overflow: auto;
+  margin: 0;
+}
 
-	.particulars ::v-deep .el-dialog {
-		margin: 0 !important;
-		position: absolute;
-		right: 0;
-		top: 0;
-		width: 4rem;
-		height: 100%;
+.particulars ::v-deep .el-dialog {
+  margin: 0 !important;
+  position: absolute;
+  right: 0;
+  top: 86px;
+  bottom: 0;
+  width: 4rem;
+}
 
-	}
+.particulars ::v-deep .el-dialog__header {
+  display: none;
+}
 
-	.particulars ::v-deep .el-dialog__header {
-		display: none;
-	}
+.particulars ::v-deep .el-dialog__body {
+  padding: 0.26rem 0.23rem 0.26rem 0.27rem;
+  color: #2c2c2c !important;
+  position: relative;
+  height: 100%;
+}
+#map {
+  height: 100%;
+  width: 100%;
+  margin: 0 auto;
+  font-size: 14px !important;
+}
+::v-deep .map-circle-name {
+  width: 20px;
+  height: 20px;
+  border-radius: 50%;
+  background-color: rgb(222, 142, 102);
+}
 
-	.particulars ::v-deep .el-dialog__body {
-		padding: .26rem .23rem .26rem .27rem;
-		color: #2C2C2C !important;
-		position: relative;
-		height: 100%;
-	}
-</style>
\ No newline at end of file
+::v-deep .ripple {
+  border-radius: 50%;
+  position: relative;
+  overflow: hidden;
+}
+
+::v-deep .ripple::before {
+  content: "";
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  width: 150%; /* Ensure it covers the entire parent */
+  height: 150%;
+  background: rgba(255, 255, 255, 0.5);
+  border-radius: 50%;
+  transform: translate(-50%, -50%) scale(1);
+  animation: ripple-animation 1s infinite linear;
+}
+
+@keyframes ripple-animation {
+  to {
+    transform: translate(-50%, -50%) scale(0);
+    opacity: 0;
+  }
+}
+</style>

--
Gitblit v1.9.1