2 Commits bd1b7d39e3 ... 535fdbf968

Autor SHA1 Mensaje Fecha
  0235624 535fdbf968 Merge branch 'master' of http://git.fmode.cn:3000/19323826807/travel-wed hace 1 semana
  0235624 470534b6c5 feat:new hace 1 semana

+ 16 - 0
travel-web/package-lock.json

@@ -15,6 +15,7 @@
         "@angular/platform-browser": "^20.0.0",
         "@angular/router": "^20.0.0",
         "@fortawesome/fontawesome-free": "^6.7.2",
+        "@types/echarts": "^4.9.22",
         "echarts": "^5.6.0",
         "rxjs": "~7.8.0",
         "swiper": "^11.2.10",
@@ -3255,6 +3256,15 @@
         "@types/node": "*"
       }
     },
+    "node_modules/@types/echarts": {
+      "version": "4.9.22",
+      "resolved": "https://registry.npmmirror.com/@types/echarts/-/echarts-4.9.22.tgz",
+      "integrity": "sha512-7Fo6XdWpoi8jxkwP7BARUOM7riq8bMhmsCtSG8gzUcJmFhLo387tihoBYS/y5j7jl3PENT5RxeWZdN9RiwO7HQ==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/zrender": "*"
+      }
+    },
     "node_modules/@types/estree": {
       "version": "1.0.7",
       "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.7.tgz",
@@ -3279,6 +3289,12 @@
         "undici-types": "~7.8.0"
       }
     },
+    "node_modules/@types/zrender": {
+      "version": "4.0.6",
+      "resolved": "https://registry.npmmirror.com/@types/zrender/-/zrender-4.0.6.tgz",
+      "integrity": "sha512-1jZ9bJn2BsfmYFPBHtl5o3uV+ILejAtGrDcYSpT4qaVKEI/0YY+arw3XHU04Ebd8Nca3SQ7uNcLaqiL+tTFVMg==",
+      "license": "MIT"
+    },
     "node_modules/@vitejs/plugin-basic-ssl": {
       "version": "2.0.0",
       "resolved": "https://registry.npmmirror.com/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-2.0.0.tgz",

+ 1 - 0
travel-web/package.json

@@ -27,6 +27,7 @@
     "@angular/platform-browser": "^20.0.0",
     "@angular/router": "^20.0.0",
     "@fortawesome/fontawesome-free": "^6.7.2",
+    "@types/echarts": "^4.9.22",
     "echarts": "^5.6.0",
     "rxjs": "~7.8.0",
     "swiper": "^11.2.10",

+ 1 - 1
travel-web/src/app/app.ts

@@ -9,5 +9,5 @@ import '@fortawesome/fontawesome-free/css/all.min.css';
   styleUrl: './app.scss'
 })
 export class App {
-  protected title = 'travel-web';
+  protected title = '赣鄱文化云';
 }

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
travel-web/src/assets/中华人民共和国.json


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
travel-web/src/assets/江西省.json


+ 0 - 1
travel-web/src/modules/pc-home/pages/page-co-creation/page-co-creation.html

@@ -163,7 +163,6 @@
     <h3 style="margin: 2rem 0 1rem; color: var(--primary-blue);">文物认领地图</h3>
     <p>江西考古遗址热力图,参与文物保护与文化传承</p>
     <div class="map-container" #archaeologyMap></div>
-    <img src="public/images/image.png" alt="文物认领地图相关图片" style="width: 100%; height:400px;">
   </div>
   
   <div class="dialect-feature">

+ 97 - 4
travel-web/src/modules/pc-home/pages/page-co-creation/page-co-creation.scss

@@ -384,13 +384,106 @@ body {
 }
 
 .map-container {
-  height: 5px;
+  height: 300px;
   background: white;
-  border-radius: 10px;
+  border-radius: 12px;
   margin-top: 1rem;
-  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
-  position: relative;
+  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
   overflow: hidden;
+  
+  .map {
+    width: 100%;
+    height: 100%;
+  }
+  
+  .map-controls {
+    position: absolute;
+    top: 15px;
+    right: 15px;
+    z-index: 10;
+    display: flex;
+    flex-direction: column;
+    gap: 8px;
+    background: rgba(255,255,255,0.8);
+    padding: 8px;
+    border-radius: 20px;
+    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
+    
+    button {
+      width: 36px;
+      height: 36px;
+      border-radius: 50%;
+      background: white;
+      border: 1px solid #ddd;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      cursor: pointer;
+      box-shadow: 0 3px 6px rgba(0,0,0,0.1);
+      transition: all 0.2s ease;
+      
+      &:hover {
+        background: var(--primary-blue);
+        color: white;
+        transform: scale(1.1);
+      }
+    }
+  }
+}
+
+// 热力图提示框增强
+.echarts-tooltip {
+  background: rgba(255,255,255,0.98) !important;
+  border: 2px solid var(--gold-yellow) !important;
+  border-radius: 12px !important;
+  box-shadow: 0 5px 30px rgba(0,0,0,0.2) !important;
+  padding: 20px !important;
+  backdrop-filter: blur(5px);
+  
+  .tooltip-title {
+    font-weight: bold;
+    color: var(--primary-blue);
+    margin-bottom: 12px;
+    padding-bottom: 8px;
+    border-bottom: 1px solid #eee;
+    font-size: 18px;
+  }
+  
+  .tooltip-content {
+    display: flex;
+    flex-direction: column;
+    gap: 8px;
+    
+    div {
+      display: flex;
+      justify-content: space-between;
+      font-size: 15px;
+      
+      span:first-child {
+        font-weight: 500;
+        color: #666;
+      }
+      
+      span:last-child {
+        font-weight: bold;
+        color: var(--gold-yellow);
+      }
+    }
+  }
+}
+
+// 地图标题增强
+.map-title {
+  position: absolute;
+  top: 15px;
+  left: 20px;
+  z-index: 10;
+  background: rgba(255,255,255,0.8);
+  padding: 8px 15px;
+  border-radius: 20px;
+  font-weight: bold;
+  color: var(--primary-blue);
+  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
 }
 
 .dialect-feature {

+ 162 - 34
travel-web/src/modules/pc-home/pages/page-co-creation/page-co-creation.ts

@@ -1,6 +1,7 @@
 import { Component, AfterViewInit, ElementRef, ViewChild } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import * as echarts from 'echarts';
+import * as jiangxiMap from '../../../../assets/中华人民共和国.json';
 
 @Component({
   selector: 'app-page-co-creation',
@@ -135,42 +136,169 @@ export class PageCoCreation implements AfterViewInit {
     });
   }
 
-  private initArchaeologyMap(): void {
-    const chart = echarts.init(this.archaeologyMap.nativeElement);
-    chart.setOption({
-      tooltip: { trigger: 'item' },
-      visualMap: {
-        min: 0,
-        max: 100,
-        calculable: true,
-        inRange: { color: ['#f6efa6', '#d88273', '#bf444c'] }
+ private initArchaeologyMap(): void {
+  echarts.registerMap('江西', jiangxiMap as any);
+  const chart = echarts.init(this.archaeologyMap.nativeElement);
+  
+  // 更精准的考古遗址数据(含经纬度)
+  const siteData = [
+    {name: '海昏侯墓', value: 95, lng: 115.92, lat: 28.82, period: '汉代', level: '国家级'},
+    {name: '滕王阁遗址', value: 88, lng: 115.88, lat: 28.68, period: '唐代', level: '省级'},
+    {name: '湖田古窑址', value: 92, lng: 117.22, lat: 29.32, period: '宋代', level: '国家级'},
+    {name: '庐山石刻群', value: 85, lng: 115.98, lat: 29.52, period: '唐宋时期', level: '国家级'},
+    {name: '通天岩石窟', value: 82, lng: 114.95, lat: 25.82, period: '唐宋时期', level: '省级'},
+    {name: '龙虎山悬棺', value: 90, lng: 116.98, lat: 28.12, period: '春秋战国', level: '国家级'},
+    {name: '吉州窑遗址', value: 78, lng: 114.97, lat: 27.12, period: '宋代', level: '国家级'},
+    {name: '婺源古村落', value: 82, lng: 117.85, lat: 29.25, period: '明清时期', level: '省级'},
+    {name: '安源煤矿遗址', value: 75, lng: 113.85, lat: 27.63, period: '近代', level: '省级'},
+    {name: '瑞昌铜矿遗址', value: 70, lng: 115.65, lat: 29.68, period: '商周时期', level: '省级'}
+  ];
+
+  // 生成热力数据(含涟漪效果)
+  const heatData = siteData.map(item => ({
+    ...item,
+    ripple: {
+      period: Math.random() * 4 + 4,
+      scale: Math.random() * 0.5 + 1.2
+    }
+  }));
+
+  const option = {
+    title: {
+      text: '江西考古遗址热力图',
+      left: 'center',
+      textStyle: {
+        color: '#2a5daa',
+        fontSize: 16
+      }
+    },
+    tooltip: {
+      trigger: 'item',
+      formatter: function(params: any) {
+        const data = params.data;
+        return `<div class="tooltip-title">${data.name}</div>
+                <div class="tooltip-content">
+                  <div><span>历史时期:</span><span>${data.period}</span></div>
+                  <div><span>保护等级:</span><span>${data.level}</span></div>
+                  <div><span>遗址热度:</span><span>${data.value}</span></div>
+                </div>`;
       },
-      series: [{
-        name: '考古遗址',
-        type: 'map',
-        map: 'china',
-        roam: true,
-        zoom: 7,
-        center: [115.8, 28.5], // 江西中心坐标
-        label: { show: true },
-        data: [
-          { name: '樟树市', value: 95 },
-          { name: '南昌市', value: 85 },
-          { name: '九江市', value: 78 },
-          { name: '景德镇市', value: 90 },
-          { name: '鹰潭市', value: 65 },
-          { name: '新余市', value: 50 },
-          { name: '萍乡市', value: 60 },
-          { name: '赣州市', value: 82 },
-          { name: '吉安市', value: 75 },
-          { name: '宜春市', value: 70 },
-          { name: '抚州市', value: 68 },
-          { name: '上饶市', value: 80 }
-        ],
-        emphasis: { label: { show: true } }
-      }]
+      backgroundColor: 'rgba(255,255,255,0.95)',
+      borderColor: '#e8c34d',
+      textStyle: { color: '#333' }
+    },
+    visualMap: {
+      min: 70,
+      max: 100,
+      calculable: true,
+      realtime: false,
+      inRange: {
+        color: ['#f6efa6', '#e8c34d', '#d88273', '#bf444c']
+      },
+      textStyle: { color: '#333' },
+      left: 'left',
+      bottom: '30px',
+      orient: 'horizontal'
+    },
+    geo: {
+      map: '江西',
+      roam: true,
+      zoom: 6.5,
+      center: [116.3, 27.5],
+      label: {
+        show: true,
+        color: '#2a5daa',
+        fontWeight: 'bold'
+      },
+      itemStyle: {
+        areaColor: 'rgba(42, 93, 170, 0.05)',
+        borderColor: '#2a5daa',
+        borderWidth: 1
+      },
+      emphasis: {
+        itemStyle: {
+          areaColor: 'rgba(232, 195, 77, 0.2)'
+        },
+        label: {
+          color: '#c1272d',
+          fontWeight: 'bold'
+        }
+      }
+    },
+    series: [
+      {
+        name: '热力分布',
+        type: 'heatmap',
+        coordinateSystem: 'geo',
+        data: heatData.map(item => [item.lng, item.lat, item.value]),
+        pointSize: 15,
+        blurSize: 25,
+        minOpacity: 0.4,
+        maxOpacity: 0.8
+      },
+      {
+        name: '遗址标记',
+        type: 'effectScatter',
+        coordinateSystem: 'geo',
+        data: heatData,
+        symbolSize: function(val: any) {
+          return val[2] / 4;
+        },
+        showEffectOn: 'render',
+        rippleEffect: {
+          period: function(index: number) {
+            return heatData[index].ripple.period;
+          },
+          scale: function(index: number) {
+            return heatData[index].ripple.scale;
+          },
+          brushType: 'fill'
+        },
+        itemStyle: {
+          color: {
+            type: 'radial',
+            x: 0.5,
+            y: 0.5,
+            r: 0.5,
+            colorStops: [
+              {offset: 0, color: 'rgba(232, 195, 77, 0.8)'},
+              {offset: 1, color: 'rgba(191, 68, 76, 0.3)'}
+            ]
+          },
+          shadowBlur: 10,
+          shadowColor: '#e8c34d'
+        },
+        zlevel: 1
+      }
+    ]
+  };
+
+  chart.setOption(option);
+
+  // 添加地图控制功能
+  document.getElementById('zoom-in')?.addEventListener('click', () => {
+    chart.dispatchAction({ type: 'geoRoam', zoom: 0.2 });
+  });
+
+  document.getElementById('zoom-out')?.addEventListener('click', () => {
+    chart.dispatchAction({ type: 'geoRoam', zoom: -0.2 });
+  });
+
+  document.getElementById('reset-view')?.addEventListener('click', () => {
+    chart.setOption({
+      geo: { center: [116.3, 27.5], zoom: 6.5 }
     });
-  }
+  });
+  
+  // 添加鼠标滚轮缩放
+  this.archaeologyMap.nativeElement.addEventListener('wheel', (e: WheelEvent) => {
+    e.preventDefault();
+    chart.dispatchAction({
+      type: 'geoRoam',
+      zoom: e.deltaY < 0 ? 0.1 : -0.1
+    });
+  });
+}
 
   private resizeCharts(): void {
     [this.redCultureChart, this.waterCultureChart, this.heritageChart, this.archaeologyMap].forEach(chart => {

+ 3 - 0
travel-web/tsconfig.doc.json

@@ -0,0 +1,3 @@
+{
+    "include": ["src/**/*.ts"]
+}

+ 5 - 1
travel-web/tsconfig.json

@@ -13,7 +13,9 @@
     "experimentalDecorators": true,
     "importHelpers": true,
     "target": "ES2022",
-    "module": "preserve"
+    "module": "preserve",
+    "resolveJsonModule": true,
+    "esModuleInterop": true
   },
   "angularCompilerOptions": {
     "enableI18nLegacyMessageIdFormat": false,
@@ -31,4 +33,6 @@
       "path": "./tsconfig.spec.json"
     }
   ]
+
+  
 }

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio