Browse Source

3D环形图

hm 1 tháng trước cách đây
mục cha
commit
bc9c3f3e9e

src/assets/img/切换 1.png → src/assets/img/切换.png


+ 8 - 24
src/components/TitleHeader/index.vue

@@ -34,35 +34,19 @@ function btnClick (item, index) {
 
   .title {
     width: 100%;
-    font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
-    font-weight: 400;
+      margin-left: 50px;
+    font-family: YouSheBiaoTiHei;
     font-size: 26px;
+    // font-weight: bold;
     color: #f6f9fe;
-    line-height: 30px;
-    text-shadow: 0px 0px 7px rgba(75, 180, 229, 0.25), 0px 2px 8px rgba(5, 28, 55, 0.42);
+    font-style: italic;
+    text-shadow: 0px 0px 7px rgba(75, 180, 229, 0.25),
+      0px 2px 8px rgba(5, 28, 55, 0.42);
     text-align: left;
-    font-style: normal;
     text-transform: none;
-    font-weight: bold;
-    /* 加粗字体 */
-    margin-left: 40px;
-    /* 金属光泽渐变效果 */
-    background: linear-gradient(to top, #49ffff 4%, #e2ffff 100%);
+    background: linear-gradient(to bottom, #ffffff 4%, #49ffff 100%);
     -webkit-background-clip: text;
-    /* 文字应用渐变 */
-    background-clip: text;
-
-    /* 使文字透明,背景渐变会应用到文字 */
-    color: transparent;
-
-    /* 光泽效果:文本阴影 */
-    text-shadow: 2px 2px 5px rgba(255, 255, 255, 0.4), -2px -2px 5px rgba(0, 0, 0, 0.4);
-
-    /* 给文字加一些柔和的过渡效果 */
-    transition: all 0.3s ease;
-    font-style: italic;
-    transform: skewX(-5deg);
-    /* 自定义水平方向倾斜 */
+    -webkit-text-fill-color: transparent;
   }
 }
 

+ 10 - 26
src/components/TitleHeaderLong/index.vue

@@ -64,35 +64,19 @@ function getImgSrc (picName) {
 
   .title {
     width: 100%;
-    font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
-    font-weight: 400;
+    margin-left: 50px;
+    font-family: YouSheBiaoTiHei;
     font-size: 26px;
+    // font-weight: bold;
     color: #f6f9fe;
-    line-height: 30px;
-    text-shadow: 0px 0px 7px rgba(75, 180, 229, 0.25), 0px 2px 8px rgba(5, 28, 55, 0.42);
+    font-style: italic;
+    text-shadow: 0px 0px 7px rgba(75, 180, 229, 0.25),
+      0px 2px 8px rgba(5, 28, 55, 0.42);
     text-align: left;
-    font-style: normal;
     text-transform: none;
-    font-weight: bold;
-    /* 加粗字体 */
-    margin-left: 40px;
-    /* 金属光泽渐变效果 */
-    background: linear-gradient(to top, #49ffff 4%, #e2ffff 100%);
+    background: linear-gradient(to bottom, #ffffff 4%, #49ffff 100%);
     -webkit-background-clip: text;
-    /* 文字应用渐变 */
-    background-clip: text;
-
-    /* 使文字透明,背景渐变会应用到文字 */
-    color: transparent;
-
-    /* 光泽效果:文本阴影 */
-    text-shadow: 2px 2px 5px rgba(255, 255, 255, 0.4), -2px -2px 5px rgba(0, 0, 0, 0.4);
-
-    /* 给文字加一些柔和的过渡效果 */
-    transition: all 0.3s ease;
-    font-style: italic;
-    transform: skewX(-5deg);
-    /* 自定义水平方向倾斜 */
+    -webkit-text-fill-color: transparent;
   }
 }
 
@@ -109,7 +93,7 @@ function getImgSrc (picName) {
   height: 24px;
   border-radius: 4px 4px 4px 4px;
   border: 1px solid rgba(111, 229, 255, 0.3);
-  font-family: Alibaba PuHuiTi 3, Alibaba PuHuiTi 30;
+  font-family: Alibaba PuHuiTi 3;
   font-weight: normal;
   font-size: 14px;
   color: #ffffff;
@@ -125,7 +109,7 @@ function getImgSrc (picName) {
   background: linear-gradient(90deg, #59A7DA 0%, rgba(22, 116, 178, 0) 100%);
   border-radius: 4px 4px 4px 4px;
   border: 1px solid #6FE5FF;
-  font-family: Alibaba PuHuiTi 3.0, Alibaba PuHuiTi 30;
+  font-family: Alibaba PuHuiTi 3.0;
   font-weight: normal;
   font-size: 14px;
   color: #08FFE5;

+ 9 - 25
src/components/TitleHeadermini/index.vue

@@ -37,35 +37,19 @@ function btnClick (item, index) {
 
   .title {
     width: 100%;
-    font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
-    font-weight: 400;
+    margin-left: 50px;
+    font-family: YouSheBiaoTiHei;
     font-size: 26px;
+    // font-weight: bold;
     color: #f6f9fe;
-    line-height: 30px;
-    text-shadow: 0px 0px 7px rgba(75, 180, 229, 0.25), 0px 2px 8px rgba(5, 28, 55, 0.42);
+    font-style: italic;
+    text-shadow: 0px 0px 7px rgba(75, 180, 229, 0.25),
+      0px 2px 8px rgba(5, 28, 55, 0.42);
     text-align: left;
-    font-style: normal;
     text-transform: none;
-    font-weight: bold;
-    /* 加粗字体 */
-    margin-left: 40px;
-    /* 金属光泽渐变效果 */
-    background: linear-gradient(to top, #49ffff 4%, #e2ffff 100%);
+    background: linear-gradient(to bottom, #ffffff 4%, #49ffff 100%);
     -webkit-background-clip: text;
-    /* 文字应用渐变 */
-    background-clip: text;
-
-    /* 使文字透明,背景渐变会应用到文字 */
-    color: transparent;
-
-    /* 光泽效果:文本阴影 */
-    text-shadow: 2px 2px 5px rgba(255, 255, 255, 0.4), -2px -2px 5px rgba(0, 0, 0, 0.4);
-
-    /* 给文字加一些柔和的过渡效果 */
-    transition: all 0.3s ease;
-    font-style: italic;
-    transform: skewX(-5deg);
-    /* 自定义水平方向倾斜 */
+    -webkit-text-fill-color: transparent;
   }
 }
 
@@ -80,7 +64,7 @@ function btnClick (item, index) {
   height: 24px;
   border-radius: 4px 4px 4px 4px;
   border: 1px solid rgba(111, 229, 255, 0.3);
-  font-family: Alibaba PuHuiTi 3, Alibaba PuHuiTi 30;
+  font-family: Alibaba PuHuiTi 3;
   font-weight: normal;
   font-size: 14px;
   color: #ffffff;

+ 9 - 25
src/components/TitleHeadersmall/index.vue

@@ -37,35 +37,19 @@ function btnClick (item, index) {
 
   .title {
     width: 100%;
-    font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
-    font-weight: 400;
+    margin-left: 50px;
+    font-family: YouSheBiaoTiHei;
     font-size: 26px;
+    // font-weight: bold;
     color: #f6f9fe;
-    line-height: 30px;
-    text-shadow: 0px 0px 7px rgba(75, 180, 229, 0.25), 0px 2px 8px rgba(5, 28, 55, 0.42);
+    font-style: italic;
+    text-shadow: 0px 0px 7px rgba(75, 180, 229, 0.25),
+      0px 2px 8px rgba(5, 28, 55, 0.42);
     text-align: left;
-    font-style: normal;
     text-transform: none;
-    font-weight: bold;
-    /* 加粗字体 */
-    margin-left: 40px;
-    /* 金属光泽渐变效果 */
-    background: linear-gradient(to top, #49ffff 4%, #e2ffff 100%);
+    background: linear-gradient(to bottom, #ffffff 4%, #49ffff 100%);
     -webkit-background-clip: text;
-    /* 文字应用渐变 */
-    background-clip: text;
-
-    /* 使文字透明,背景渐变会应用到文字 */
-    color: transparent;
-
-    /* 光泽效果:文本阴影 */
-    text-shadow: 2px 2px 5px rgba(255, 255, 255, 0.4), -2px -2px 5px rgba(0, 0, 0, 0.4);
-
-    /* 给文字加一些柔和的过渡效果 */
-    transition: all 0.3s ease;
-    font-style: italic;
-    transform: skewX(-5deg);
-    /* 自定义水平方向倾斜 */
+    -webkit-text-fill-color: transparent;
   }
 }
 
@@ -80,7 +64,7 @@ function btnClick (item, index) {
   height: 24px;
   border-radius: 4px 4px 4px 4px;
   border: 1px solid rgba(111, 229, 255, 0.3);
-  font-family: Alibaba PuHuiTi 3, Alibaba PuHuiTi 30;
+  font-family: Alibaba PuHuiTi 30;
   font-weight: normal;
   font-size: 14px;
   color: #ffffff;

+ 0 - 181
src/views/left/comp/RingChart copy.vue

@@ -1,181 +0,0 @@
-<template>
-  <div ref="chartContainer" class="chart-container" ></div>
-</template>
-
-<script setup>
-import { onMounted, ref } from 'vue'
-import Highcharts from 'highcharts'
-import Highcharts3D from 'highcharts/highcharts-3d'
-
-// 注册Highcharts 3D模块
-// Highcharts3D(Highcharts);
-// 启用 highcharts-3d 插件
-// highcharts3d(Highcharts);
-
-// 数据
-const data = [
-  { name: '风险个案', count: 35, h:70},
-  { name: '风险事件', count: 30, h: 60 },
-  { name: '风险信息', count: 30, h: 60 }
-]
-const chartContainer = ref(null)
-onMounted(() => {
- initChart()
-
-  // const chart = Highcharts.chart(chartContainer.value, {
-  //   chart: {
-  //     type: 'pie', // 饼图类型
-  //     options3d: {
-  //       enabled: true, // 启用 3D
-  //       alpha: 45, // 3D 角度
-  //       beta: 0, // 旋转角度
-  //       depth: 50 // 深度
-  //     },
-  //      backgroundColor: '#f8f8f8' // 设置整体背景色
-  //   },
-  //   title: {
-  //     text: ''
-  //   },
-  //   plotOptions: {
-  //     pie: {
-  //       innerSize: '40%', // 环形图内圆的大小
-  //       depth: 45, // 环形图的 3D 深度
-  //       dataLabels: {
-  //         enabled: true,
-  //         format: '{point.name}: {point.percentage:.1f}%' // 显示数据标签
-  //       }
-  //     },
-  //     // 为每个环块设置不同的深度
-  //     point: {
-  //       events: {
-  //         mouseOver: function () {
-  //           this.update({
-  //             depth: this.h // 使用 h 值调整深度
-  //           });
-  //         }
-  //       }
-  //     }
-  //   },
-  //   series: [
-  //     {
-  //       name: '风险类型',
-  //       data: data.map(item => ({
-  //         name: item.name,
-  //         y: item.count,
-  //         h: item.h, // 将 h 值传递给每个数据项
-  //         depth: item.h // 设置环块的深度为 h 值
-  //       }))
-  //     }
-  //   ],
-  //   tooltip: {
-  //     pointFormat: '{series.name}: <b>{point.y}</b><br/>'
-  //   }
-  // })
-})
-
- function initChart() {
-   const highEcharts = chartContainer.value
-   HighCharts.chart(highEcharts, {
-    chart: {
-      type: 'pie',
-      animation: false,
-      backgroundColor: 'rgba(0,0,0,0)',  // 设置背景透明
-      events: {
-        load: function () {
-          const each = HighCharts.each
-          const points = this.series[0].points
-          each(points, function (p, i) {
-            p.graphic.attr({
-              translateY: -p.shapeArgs.ran  // 设置每个环块的深度
-            })
-            p.graphic.side1.attr({
-              translateY: -p.shapeArgs.ran
-            })
-            p.graphic.side2.attr({
-              translateY: -p.shapeArgs.ran
-            })
-          })
-        }
-      },
-      options3d: {
-        enabled: true,
-        alpha: 65  // 设置3D的视角角度
-      }
-    },
-    title: {
-      show: false,
-      text: null
-    },
-    subtitle: {
-      text: null
-    },
-    credits: {
-      enabled: false
-    },
-    legend: {
-      backgroundColor: 'rgba(0,0,0,0)',
-      shadow: false,
-      layout: 'vertical',
-      align: 'right',
-      verticalAlign: 'top',
-      x: 0,
-      y: 100,
-      symbolPadding: 10,
-      symbolHeight: 14,
-      itemStyle: {
-        lineHeight: '24px',
-        fontSize: '16px',
-        color: '#fff'
-      },
-      labelFormatter: function () {
-        return this.name + this.h + '%'
-      }
-    },
-    plotOptions: {
-      pie: {
-        allowPointSelect: true,
-        cursor: 'pointer',
-        depth: 35,
-        innerSize: 180,
-        dataLabels: {
-          enabled: false
-        },
-        showInLegend: false
-      }
-    },
-    series: [{
-      type: 'pie',
-      name: '占比',
-      colorByPoint: true,
-      colors: [
-        { // 自定义颜色(渐变)
-          linearGradient: { x1: 0, y1: 1, x2: 1, y2: 0 },
-          stops: [[0, '#19596d'], [1, '#2ea1b2']]
-        },
-        { // 自定义颜色(渐变)
-          linearGradient: { x1: 0, y1: 1, x2: 1, y2: 0 },
-          stops: [[0, '#ee7529'], [1, '#f5a86c']]
-        },
-        { // 自定义颜色(渐变)
-          linearGradient: { x1: 0, y1: 1, x2: 1, y2: 0 },
-          stops: [[0, '#f5c055'], [1, '#967b3d']]
-        },
-        { // 自定义颜色(渐变)
-          linearGradient: { x1: 0, y1: 1, x2: 1, y2: 0 },
-          stops: [[0, '#2d7bb5'], [1, '#1a5784']]
-        }
-      ],
-      data: this.peiData
-    }]
-  })
-}
-
-</script>
-
-<style scoped>
-.chart-container {
-  margin: 0 auto;
-  width: 444px;
-  height: 144px;
-}
-</style>

+ 250 - 237
src/views/left/comp/RingChart.vue

@@ -1,254 +1,267 @@
 <template>
-  <div ref="chartContainer" class="chart-container"></div>
+  <div id="echart-container" ref="chartContainer" class="chart-container"></div>
 </template>
 
-<script setup>
-import { onMounted, ref, nextTick } from 'vue'
-import Highcharts from "highcharts"; //为防止报错在页面上再次引入Highcharts
-// 引用所需外部资源
-import Highcharts3d from "highcharts/highcharts-3d";
+<script>
+// import Highcharts from "highcharts";
+import Highcharts from 'highcharts'
+import Highcharts3D from 'highcharts/highcharts-3d'
+import backgroundImg from '@/assets/img/底.png' // 修正图片路径
 
-// 注册Highcharts 3D模块
-// Highcharts3D(Highcharts);
-
-
-// 数据
-const data = [
-  { name: '风险个案', count: 35, h: 70 },
-  { name: '风险事件', count: 30, h: 60 },
-  { name: '风险信息', count: 30, h: 60 }
-]
-const chartContainer = ref(null)
-onMounted(() => {
-  const chart = Highcharts.chart(chartContainer.value, {
-    chart: {
-      type: 'pie', // 饼图类型
-      backgroundColor: 'transparent',
-      options3d: {
-        enabled: true, // 启用 3D
-        alpha: 65, // 3D 角度
-        beta: 0, // 旋转角度
-        depth: 50 // 深度
-      },
-   
-
-    },
-    title: {
-      text: ''
-    },
-    plotOptions: {
-      pie: {
-        innerSize: '60%', // 环形图内圆的大小
-        depth: 45, // 环形图的 3D 深度
-        dataLabels: {
-          enabled: true,
-          format: '{point.name}: {point.percentage:.1f}%' // 显示数据标签
+Highcharts3D(Highcharts)
+export default {
+  components: {},
+  data() {
+    return {
+      id: 'echart-container',
+      optionData: [
+        { name: '风险个案', y: 35, h: 22, color: '#27c3e8' },
+        { name: '风险事件', y: 30, h: 15, color: '#3b76f6' },
+        { name: '风险信息', y: 30, h: 15, color: '#26b99a' }
+      ]
+      // optionData: [
+      //   { name: "个人网银", y: 520, h: 40 }, //模块名和所占比,也可以{name: '测试1',y: 12}
+      //   { name: "个人手机银行", y: 140, h: 11 }, //模块名和所占比,也可以{name: '测试1',y: 12}
+      //   { name: "企业网银", y: 1, h: 17 }, //模块名和所占比,也可以{name: '测试1',y: 12}
+      //   { name: "企业手机银行", y: 350, h: 28 }, //模块名和所占比,也可以{name: '测试1',y: 12}
+      // ],
+      // optionData: [
+      //   { name: "个人网银", y: 1, h: 25 }, //模块名和所占比,也可以{name: '测试1',y: 12}
+      //   { name: "个人手机银行", y: 1, h: 25 }, //模块名和所占比,也可以{name: '测试1',y: 12}
+      //   { name: "企业网银", y: 1, h: 25 }, //模块名和所占比,也可以{name: '测试1',y: 12}
+      //   { name: "企业手机银行", y: 1, h: 25 }, //模块名和所占比,也可以{name: '测试1',y: 12}
+      // ],
+    }
+  },
+  mounted() {
+    this.init()
+  },
+  methods: {
+    init() {
+      // 修改3d饼图绘制过程
+      let each = Highcharts.each,
+        round = Math.round,
+        cos = Math.cos,
+        sin = Math.sin,
+        deg2rad = Math.deg2rad
+      Highcharts.wrap(Highcharts.seriesTypes.pie.prototype, 'translate', function (proceed) {
+        proceed.apply(this, [].slice.call(arguments, 1))
+        // Do not do this if the chart is not 3D
+        if (!this.chart.is3d()) {
+          return
         }
-      },
-      // 为每个环块设置不同的深度
-      point: {
-        events: {
-          mouseOver: function () {
-            this.update({
-              depth: this.h // 使用 h 值调整深度
-            });
-          }
+        console.log('this.chart.is3d', this.chart.is3d)
+        var series = this,
+          chart = series.chart,
+          options = chart.options,
+          seriesOptions = series.options,
+          depth = seriesOptions.depth || 0,
+          options3d = options.chart.options3d,
+          alpha = options3d.alpha,
+          beta = options3d.beta,
+          z = seriesOptions.stacking ? (seriesOptions.stack || 0) * depth : series._i * depth
+        z += depth / 2
+        console.log('@@@!', this)
+        if (seriesOptions.grouping !== false) {
+          z = 0
         }
-      }
-    },
-    series: [
-      // {
-      //   name: '风险类型',
-      //   data: data.map(item => ({
-      //     name: item.name,
-      //     y: item.count,
-      //     h: item.h, // 将 h 值传递给每个数据项
-      //     depth: item.h // 设置环块的深度为 h 值
-      //   }))
-      // },
-      {
-        name: '风险类型',
-        data: data.map(item => ({
-          name: item.name,
-          y: item.count,
-          h: item.h, // 将 h 值传递给每个数据项
-          depth: item.h // 设置环块的深度为 h 值
-        })),
-        // showInLegend: true,
-        dataLabels: {
-          padding: -10,
-          shadow: true,
-          style: {
-            fontWeight: 'bold',
-            fontSize: '14px',
-            color: "#fff",
-            textOutline: '1px 1px transparent',
-          },
-          formatter: function (params) {
-            return this.key + '<br/>' + '<p style="color:#00afff">' + (this.y / this.total * 100).toFixed(2) + '%</p>';
-          },
-        },
-      }
-    ],
-    tooltip: {
-      pointFormat: '{series.name}: <b>{point.y}</b><br/>'
-    },
-    credits: {
-      enabled: false,
-      //href: "http://www.hcharts.cn", //自定义链接
-      //text:"", //自定义内容
-    },
-
-  })
-
-  // nextTick(() => {
-  //   init()
-  // })
+        each(series.data, function (point) {
+          var shapeArgs = point.shapeArgs,
+            angle
+          point.shapeType = 'arc3d'
+          var ran = point.options.h
+          shapeArgs.z = z
+          shapeArgs.depth = depth * 0.75 + ran
+          shapeArgs.alpha = alpha
+          shapeArgs.beta = beta
+          shapeArgs.center = series.center
+          shapeArgs.ran = ran
+          angle = (shapeArgs.end + shapeArgs.start) / 2
+          point.slicedTranslation = {
+            translateX: round(cos(angle) * seriesOptions.slicedOffset * cos(alpha * deg2rad)),
+            translateY: round(sin(angle) * seriesOptions.slicedOffset * cos(alpha * deg2rad))
+          }
+        })
+      })
+      ;(function (H) {
+        H.wrap(Highcharts.SVGRenderer.prototype, 'arc3dPath', function (proceed) {
+          // Run original proceed method
+          var ret = proceed.apply(this, [].slice.call(arguments, 1))
+          ret.zTop = (ret.zOut + 1) / 100
+          return ret
+        })
+      })(Highcharts)
 
+      //日总存煤量
+      let mychart = Highcharts.chart('echart-container', {
+        chart: {
+          type: 'pie',
+          backgroundColor: 'transparent',
+          margin: [0, 0, 0, 0],
+          events: {
+            load: function () {
+              let each = Highcharts.each,
+                points = this.series[0].points
+              each(points, function (p) {
+                p.graphic.attr({
+                  translateY: -p.shapeArgs.ran
+                })
+                p.graphic.side1.attr({
+                  translateY: -p.shapeArgs.ran
+                })
+                p.graphic.side2.attr({
+                  translateY: -p.shapeArgs.ran
+                })
+              })
+              // 添加底部背景图(居中显示)
+              // const centerX = this.plotLeft + this.plotWidth / 2
+              // const centerY = this.plotTop + this.plotHeight / 2
+              // const radius = 140 // 与innerSize一致
+              // this.renderer
+              //   .image(
+              //     backgroundImg, // 使用导入的图片路径
+              //     centerX - radius,
+              //     // centerY - radius + maxHeight, // 向下偏移maxHeight实现底部对齐
+              //     centerY - radius-50, // 向下偏移maxHeight实现底部对齐
+              //     radius * 2,
+              //     radius * 2
+              //   )
+              //   .add()
 
-})
+              const chart = this
+              const options3d = chart.options.chart.options3d
+              const alpha = options3d.alpha
+              const radius = 180 // 外半径 = size/2 = 180/2
 
+              // 计算3D倾斜导致的垂直偏移量
+              const deltaY = radius * Math.sin(alpha * Math.PI / 180) * 0.5
 
-// function init () {
-//   // 修改3d饼图绘制过程
-//   // let each = HighCharts.each,
-//   let  round = Math.round,
-//     cos = Math.cos,
-//     sin = Math.sin,
-//     deg2rad = Math.deg2rad;
-//   HighCharts.wrap(HighCharts.seriesTypes.pie.prototype, 'translate', function (proceed) {
-//     proceed.apply(this, [].slice.call(arguments, 1));
-//     // Do not do this if the chart is not 3D
-//     if (!this.chart.is3d()) {
-//       return;
-//     }
-//     var series = this,
-//       chart = series.chart,
-//       options = chart.options,
-//       seriesOptions = series.options,
-//       depth = seriesOptions.depth || 0,
-//       options3d = options.chart.options3d,
-//       alpha = options3d.alpha,
-//       beta = options3d.beta,
-//       z = seriesOptions.stacking ? (seriesOptions.stack || 0) * depth : series._i * depth;
-//     z += depth / 2;
-//     if (seriesOptions.grouping !== false) {
-//       z = 0;
-//     }
-//     each(series.data, function (point) {
-//       var shapeArgs = point.shapeArgs,
-//         angle;
-//       point.shapeType = 'arc3d';
-//       var ran = point.options.h;
-//       shapeArgs.z = z;
-//       shapeArgs.depth = depth * 0.75 + ran;
-//       shapeArgs.alpha = alpha;
-//       shapeArgs.beta = beta;
-//       shapeArgs.center = series.center;
-//       shapeArgs.ran = ran;
-//       angle = (shapeArgs.end + shapeArgs.start) / 2;
-//       point.slicedTranslation = {
-//         translateX: round(cos(angle) * seriesOptions.slicedOffset * cos(alpha * deg2rad)),
-//         translateY: round(sin(angle) * seriesOptions.slicedOffset * cos(alpha * deg2rad))
-//       };
-//     });
-//   });
-//   (function (H) {
-//     H.wrap(HighCharts.SVGRenderer.prototype, 'arc3dPath', function (proceed) {
-//       // Run original proceed method
-//       var ret = proceed.apply(this, [].slice.call(arguments, 1));
-//       console.log(ret);
-//       ret.zTop = (ret.zOut + 1) / 100;
-//       return ret;
-//     });
-//   }(HighCharts));
+              // 获取图表中心坐标
+              const centerX = chart.plotLeft + chart.plotWidth / 2 -10
+              const centerY = chart.plotTop + chart.plotHeight  - deltaY - 20
 
-//   //日总存煤量
-//   HighCharts.chart(chartContainer.value, {
-//     chart: {
-//       type: 'pie',
-//       backgroundColor: 'transparent',
-//       events: {
-//         load: function () {
-//           let each = HighCharts.each, points = this.series[0].points;
-//           each(points, function (p, i) {
-//             p.graphic.attr({
-//               translateY: -p.shapeArgs.ran
-//             });
-//             p.graphic.side1.attr({
-//               translateY: -p.shapeArgs.ran
-//             });
-//             p.graphic.side2.attr({
-//               translateY: -p.shapeArgs.ran
-//             });
-//           });
-//         }
-//       },
-//       options3d: {
-//         enabled: true,
-//         alpha: 65
-//       },
-//     },
-//     title: {
-//       text: ''
-//     },
-//     legend: { //图例
-//       layout: "horizontal",
-//       verticalAlign: "bottom",
-//       align: "center",
-//       y: 15,
-//       x: 0,
-//       useHTML: true,
-//       symbolWidth: 10,
-//       symbolHeight: 10,
-//       labelFormatter: function () {
-//         return this.name + '<span style="margin-left: 10px">' + this.y + '</span>吨';
-//       },
-//       itemStyle: {
-//         color: '#fff',
-//         fontSize: '14px',
-//       }
-//     },
-//     tooltip: {
-//       enabled: false,
-//     },
-//     credits: {
-//       enabled: false,
-//     },
-//     plotOptions: {
-//       pie: {
-//         center: ['50%', '68%'],
-//         size: 250,
-//         innerSize: 140,
-//         colors: ['#249ba5', '#2765b0', '#78c5ef', '#f6c155', '#ef8036', '#be30ff']
-//       }
-//     },
-//     series: [
-//       {
-//         name: '青磁窑矿',
-//         data: this.optionData,
-//         showInLegend: true,
-//         dataLabels: {
-//           padding: -10,
-//           shadow: true,
-//           style: {
-//             fontWeight: 'bold',
-//             fontSize: '14px',
-//             color: "#fff",
-//             textOutline: '1px 1px transparent',
-//           },
-//           formatter: function () {
-//             return this.key + '<br/>' + '<p style="color:#00afff">' + (this.y / this.total * 100).toFixed(2) + '%</p>';
-//           },
-//         },
-//       }
-//     ]
-//   })
-// }
+              // 添加背景图(自动对齐)
+              chart.renderer
+                .image(
+                  backgroundImg,
+                  centerX - radius * 0.8,  // 宽度缩放80%
+                  centerY - radius * 0.6,  // 高度缩放60%
+                  radius * 1.6,            // 宽度
+                  radius * 1.2             // 高度
+                )
+                .attr({
+                  // opacity: 0.8  // 添加透明度
+                })
+                .add()
+            }
+          },
+          options3d: {
+            enabled: true,
+            alpha: 65
+          }
+        },
+        title: {
+          text: ''
+        },
+        legend: {
+          //图例
+          enabled: false,
+          layout: 'horizontal',
+          verticalAlign: 'bottom',
+          align: 'center',
+          y: 15,
+          x: 0,
+          useHTML: true,
+          symbolWidth: 10,
+          symbolHeight: 10,
+          labelFormatter: function () {
+            return this.name
+          },
+          itemStyle: {
+            color: 'black',
+            fontSize: '14px'
+          }
+        },
+        tooltip: {
+          enabled: false
+        },
+        credits: {
+          enabled: false
+        },
+        plotOptions: {
+          pie: {
+            // dataLabels: {
+            //   enabled: false,
+            // },
+            allowPointSelect: false,
+            center: ['50%', '50%'],
+            size: 180,
+            innerSize: 120,
+            colors: ['#21B1C4', '#7343D1', '#28A429', '#C6B031', '#9B2020', '#2862D7']
+          },
+          // series: {
+          //   events: {
+          //     //控制图标的图例legend不允许切换
 
+          //     // eslint-disable-next-line
+          //     legendItemClick: function (event) {
+          //       console.log("@", 1111);
+          //       return false; //return  true 则表示允许切换
+          //     },
+          //   },
+          // },
+          series: {
+            events: {
+              legendItemClick: function () {
+                return false
+              }
+            }
+          }
+        },
+        series: [
+          {
+            name: '风险分布图',
+            data: this.optionData,
+            showInLegend: true,
+            dataLabels: {
+              padding: -10 ,
+              shadow: true,
+              style: {
+                fontWeight: 'bold',
+                fontSize: '14px',
+                color: '#fff',
+                textOutline: '1px 1px transparent'
+              },
+              formatter: function () {
+                return `<span style="color:#ffffff;font-weight: bold;">${this.point.name}:</span>
+                        <span style="color: ${this.point.color}; font-weight: bold;">${this.y}</span>`
+              }
+            }
+          }
+        ]
+      })
+      // 解决圆环高度上下颠倒问题 !!!!
+      Highcharts.addEvent(mychart, 'redraw', function () {
+        var each = Highcharts.each,
+          points = mychart.series[0].points
+        each(points, function (p) {
+          p.graphic.attr({
+            translateY: -p.shapeArgs.ran
+          })
+          p.graphic.side1.attr({
+            translateY: -p.shapeArgs.ran
+          })
+          p.graphic.side2.attr({
+            translateY: -p.shapeArgs.ran
+          })
+        })
+      })
+    }
+  }
+}
 </script>
 
-<style scoped>
+<style scoped lang="scss">
 .chart-container {
   margin: 0 auto;
   width: 444px;

+ 338 - 0
src/views/left/comp/dispose/InformationReport.vue

@@ -0,0 +1,338 @@
+<template>
+  <div class="risk_profile_container">
+    <!-- 1.==================== -->
+    <div class="risk_profile_header">
+      <div class="risk_profile_title">
+        <!-- <img src="../../../../assets/img/levelA.png" alt="">
+      <img src="../../../../assets/img/levelB.png" alt=""> -->
+        <img src="../../../../assets/img/levelC.png" alt="" />
+        <!-- <img src="../../../../assets/img/levelD.png" alt=""> -->
+        <div class="risk_profile_name">05-2024-1210-01-不明原因肺炎</div>
+        <!-- <div class="risk_profile_type">风险个案</div> -->
+      </div>
+      <div class="risk_profile_change_btn">
+        <!-- 切换风险 -->
+        <img src="../../../../assets/img/切换.png" alt="" />
+        <div>切换事件</div>
+      </div>
+    </div>
+  </div>
+</template>
+<script setup>
+import * as echarts from 'echarts'
+import { ref, watch, computed, reactive, toRefs, onBeforeMount, onMounted } from 'vue'
+import TowLevelTitle from '@/components/TowLevelTitle'
+
+const infoList = ref([
+  { lable: '报告时间', value: '2024-10-01 12:12', icon: '1' },
+  { lable: '报告单位', value: '长宁区疾控中心', icon: '2' },
+  { lable: '信息来源', value: '上海市瑞金医院', icon: '3' },
+  { lable: '状态', value: '处置中', icon: '4' }
+])
+
+function getImgSrc(picName) {
+  return new URL(`../../../../assets/img/risk_info_icon-${picName}.png`, import.meta.url).href
+}
+
+const infoList2 = ref([
+  { lable: '病例数', value: 3, icon: '10' },
+  { lable: '重症数', value: 0, icon: '11' },
+  { lable: '死亡数', value: 0, icon: '12' }
+])
+
+const timeButtons = ref([
+  { id: 1, name: '发布时间', active: false },
+  { id: 2, name: '报告时间', active: true }
+])
+
+//4.时间分布 地区分布
+// 初始化时间分布图(蓝色渐变)
+const initTimeChart = () => {
+  if (!timeChart.value) return
+  const chart = echarts.init(timeChart.value)
+  chart.setOption({
+    tooltip: { trigger: 'axis' },
+    grid: { left: '10%', right: '5%', top: '15%', bottom: '18%' }, // 调整四周距离
+    xAxis: {
+      type: 'category',
+      data: ['12/04', '12/05', '12/06', '12/07', '12/08', '12/09', '12/10'],
+      axisLine: { lineStyle: { color: '#4A90E2' } } // X 轴颜色
+    },
+    yAxis: {
+      type: 'value',
+      axisLine: { lineStyle: { color: '#4A90E2' } }, // Y 轴颜色
+      splitLine: { lineStyle: { type: 'dashed', color: '#ccc' } } // Y 轴背景横线虚线
+    },
+    series: [
+      {
+        type: 'bar',
+        data: [3, 6, 2, 9, 5, 8, 10],
+        barWidth: 30,
+        itemStyle: {
+          color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
+            { offset: 0, color: 'rgba(63, 174, 253, 0)' },
+            { offset: 1, color: '#3FAEFD' }
+          ])
+        },
+        barBackgroundStyle: { color: 'rgba(74, 144, 226, 0.2)' } // 背景透明色
+      }
+    ]
+  })
+}
+
+// 初始化地区分布图(黄色渐变)
+const initAreaChart = () => {
+  if (!areaChart.value) return
+  const chart = echarts.init(areaChart.value)
+  chart.setOption({
+    tooltip: { trigger: 'axis' },
+    grid: { left: '10%', right: '5%', top: '15%', bottom: '18%' }, // 调整四周距离
+    xAxis: {
+      type: 'category',
+      data: ['长宁区', '闵行区'],
+      axisLine: { lineStyle: { color: '#FBA541' } } // X 轴颜色
+    },
+    yAxis: {
+      type: 'value',
+      axisLine: { lineStyle: { color: '#FBA541' } }, // Y 轴颜色
+      splitLine: { lineStyle: { type: 'dashed', color: '#ccc' } } // Y 轴背景横线虚线
+    },
+    series: [
+      {
+        type: 'bar',
+        data: [5, 9],
+        barWidth: 30,
+        itemStyle: {
+          color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
+            { offset: 0, color: 'rgba(251,165,65,0)' },
+            { offset: 1, color: '#FBA541' }
+          ])
+        }
+      }
+    ]
+  })
+}
+
+// 绑定 ECharts 容器
+const timeChart = ref(null)
+const areaChart = ref(null)
+
+// 5.核心流调
+const flowData = ref([
+  { lable: '外出外来史', list: [{ value: '李梦康:2024-10-01从杭州回来' }, { value: '李梦康:2024-10-01从杭州回来' }] },
+  { lable: '疑似病例接触史', value: 0, list: [{ value: '李梦康:2024-10-01接触病例张三' }] },
+  { lable: '可疑动物接触史', value: 0, list: [{ value: '毛超:2024-10-01接触活禽' }] }
+])
+
+// 风险人员
+const riskPersonnelData = ref([
+  { lable: '密接', value: 5 },
+  { lable: '共同暴露者', value: 0 },
+  { lable: '其它风险人员', value: 0 }
+])
+
+const riskLocationData = ref([
+  { lable: '场所数', value: 2 },
+  { lable: '已完成消杀', value: 2 }
+])
+
+// 检测情况
+const testBottons = ref([
+  { id: 1, name: '全部', active: true },
+  { id: 2, name: '病例', active: false },
+  { id: 2, name: '密接', active: false },
+  { id: 2, name: '共同暴露者', active: false },
+  { id: 2, name: '其它风险人员', active: false },
+  { id: 2, name: '其它', active: false }
+])
+
+const testData = ref([
+  { lable: '采样数', value: 7 },
+  { lable: '检测数', value: 7 },
+  { lable: '阳性数', value: 2 },
+  { lable: '阴性数', value: 5 },
+  { lable: '检测中', value: 0 }
+])
+
+// 在组件挂载后初始化 ECharts
+onMounted(() => {
+  initTimeChart()
+  initAreaChart()
+})
+</script>
+<style lang="scss" scoped>
+* {
+  box-sizing: border-box;
+}
+
+.risk_profile_container {
+  position: absolute;
+  top: 42px;
+  left: 0px;
+  width: 700px;
+  height: 892px;
+  padding: 10px 12px;
+  box-sizing: border-box;
+  background: linear-gradient(180deg, #244d86 2%, #0a121e 100%);
+  box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.5);
+  border: 1px solid;
+  border-image: linear-gradient(180deg, rgba(0, 150, 255, 1), rgba(7, 108, 208, 1)) 1 1;
+
+  .risk_profile_header {
+    width: 100%;
+    height: 50px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin-bottom: 16px;
+
+    .risk_profile_title {
+      display: flex;
+      align-items: center;
+      gap: 20px;
+
+      > img {
+        width: 40px;
+        height: 37px;
+      }
+
+      .risk_profile_name {
+        // width: 352px;
+        font-family: Alibaba PuHuiTi 3, Alibaba PuHuiTi 30;
+        font-weight: normal;
+        font-size: 24px;
+        color: #e2ffff;
+        line-height: 24px;
+        text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
+        text-align: left;
+        font-style: normal;
+        text-transform: none;
+
+        /* 金属光泽渐变效果 */
+        background: linear-gradient(to top, #49ffff 4%, #ffffff 100%);
+        -webkit-background-clip: text;
+        /* 文字应用渐变 */
+        background-clip: text;
+
+        /* 使文字透明,背景渐变会应用到文字 */
+        color: transparent;
+
+        /* 光泽效果:文本阴影 */
+        text-shadow: 2px 2px 5px rgba(255, 255, 255, 0.4), -2px -2px 5px rgba(0, 0, 0, 0.4);
+
+        /* 给文字加一些柔和的过渡效果 */
+        transition: all 0.3s ease;
+        font-style: italic;
+        transform: skewX(-5deg);
+      }
+
+      .risk_profile_type {
+        height: 24px;
+        width: 158px;
+        background: url(../../../../assets/img/待核实.png) no-repeat;
+        background-size: 100% 100%;
+        font-family: Alibaba PuHuiTi 3, Alibaba PuHuiTi 30;
+        font-weight: normal;
+        font-size: 14px;
+        color: #ffd15c;
+        line-height: 24px;
+        text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
+        text-align: center;
+        font-style: normal;
+        text-transform: none;
+      }
+    }
+
+    .risk_profile_change_btn {
+      border-radius: 2px 2px 2px 2px;
+      // border: 1px solid rgba(47, 154, 255, 0.82);
+      background: rgba(8,255,229,0.1);
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      // justify-content: space-between;
+      padding: 5px 5px;
+      box-sizing: border-box;
+      > img {
+        width: 26px;
+        height: 26px;
+      }
+      > div {
+        font-family: Alibaba PuHuiTi 3, Alibaba PuHuiTi 30;
+        font-weight: normal;
+        font-size: 16px;
+        color: #50e0ff;
+        text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
+        font-style: normal;
+        text-transform: none;
+      }
+    }
+  }
+}
+
+// .tag {
+//   font-size: 16px;
+//   padding: 0px 12px;
+//   box-sizing: border-box;
+//   // border-radius: 6px;
+//   font-weight: bold;
+//   width: fit-content;
+//   height: 24px;
+//   line-height: 24px;
+//   text-align: center;
+//   // p
+// }
+// /* 已流调 */
+// .investigated {
+//   color: #50e0ff;
+//   background: linear-gradient(270deg, rgba(62, 174, 255, 0.1) 0%, rgba(27, 129, 203, 0.3) 51%, rgba(27, 129, 203, 0.1) 100%);
+// }
+
+// /* 待流调 */
+// .pending {
+//   color: #ff9950;
+//   background: linear-gradient(270deg, rgba(255, 153, 80, 0.1) 0%, rgba(255, 153, 80, 0.3) 51%, rgba(255, 153, 80, 0.1) 100%);
+// }
+
+// /* 可疑感染来源 */
+// .suspicious {
+//   color: #ffd43c;
+//   background: linear-gradient(270deg, rgba(62, 174, 255, 0.1) 0%, rgba(255, 218, 123, 0.3) 51%, rgba(255, 218, 123, 0.1) 100%);
+// }
+
+// /* 本地感染 */
+// .local {
+//   color: #ffffff;
+// }
+
+// .text {
+//   font-family: Alibaba PuHuiTi 3, Alibaba PuHuiTi 30;
+//   font-weight: normal;
+//   font-size: 16px;
+//   color: rgba(255, 255, 255, 0.7);
+//   text-align: left;
+//   text-transform: none;
+// }
+
+// .text1 {
+//   font-family: Alibaba PuHuiTi 3, Alibaba PuHuiTi 30;
+//   font-weight: normal;
+//   font-size: 16px;
+//   color: #04fafe;
+//   text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
+//   font-style: normal;
+//   text-transform: none;
+// }
+.risk_bg_color {
+  background: rgba(0, 170, 255, 0.08);
+  border-radius: 0px 0px 0px 0px;
+}
+
+.line {
+  height: 24px;
+  width: 2px;
+  background: #88eaff;
+  background: linear-gradient(0deg, rgba(34, 73, 127, 0) 0%, rgba(136, 234, 255, 0.6) 50%, rgba(34, 73, 127, 0) 100%);
+  margin: 0 10px;
+}
+</style>

+ 1 - 1
src/views/left/index.vue

@@ -135,7 +135,7 @@ function openRiskBigTable (params) {
       background-size: 100% 100%;
       text-align: center;
       line-height: 30px;
-      font-family: PingFang SC, PingFang SC;
+      font-family: PingFang SC;
       font-weight: 600;
       font-size: 16px;
       line-height: 30px;

+ 3 - 2
src/views/left/modules/ProgressInDisposal.vue

@@ -14,9 +14,9 @@
     <!-- 2.个案处置 -->
     <CaseHandling v-if="currentBackground === 2"></CaseHandling>
 
-    <!-- 2.个案处置 -->
-
     <!-- 3.信息报告 -->
+    <InformationReport v-if="currentBackground === 3"></InformationReport>
+
     <!-- 弹窗 -->
     <ProgressInDisposalDialog></ProgressInDisposalDialog>
   </div>
@@ -24,6 +24,7 @@
 <script setup>
 import CaseHandling from '../comp/dispose/CaseHandling'
 import RiskProfile from '../comp/dispose/RiskProfile'
+import InformationReport from '../comp/dispose/InformationReport'
 import ProgressInDisposalDialog from '../dialog/ProgressInDisposalDialog.vue'
 
 import { ref, reactive, toRefs, onBeforeMount, onMounted } from 'vue'

+ 1 - 1
src/views/left/modules/ReportDisposal.vue

@@ -270,7 +270,7 @@ function openRiskBigTable () {
 .modules_bg_color {
   background: linear-gradient(180deg, rgba(32, 70, 121, 0) 2%, rgba(32, 70, 121, 0.6) 100%);
   border-radius: 0px 0px 0px 0px;
-  border: 1px solid;
+  // border: 1px solid;
   border-image: linear-gradient(180deg, rgba(7, 108, 208, 0), rgba(168, 212, 235, 1)) 1 1;
 }