forked from drone/command-center-dashboard

张含笑
2025-04-12 2cd5839cc3957b9443453409fc84402e11bbdfdf
src/views/Home/EventOverviewDetail/EventOverviewDetailLeft/EventTrendAnalysis.vue
@@ -1,9 +1,10 @@
<template>
   <common-title title="事件趋势分析" />
   <div class="chart" ref="echartsRef"></div>
   <div class="event-trend-analysis">
      <div class="little-title">事件趋势分析</div>
      <div class="chart" ref="echartsRef"></div>
   </div>
</template>
<script setup>
import CommonTitle from '@/components/CommonTitle.vue'
import { getEventTrend } from '@/api/home/event'
import * as echarts from 'echarts'
@@ -73,6 +74,18 @@
      emphasis: {
         focus: 'series',
      },
      areaStyle: {
         color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            {
               offset: 0,
               color: 'rgba(24, 141, 240, 0.4)', // 顶部颜色
            },
            {
               offset: 1,
               color: 'rgba(24, 141, 240, 0)', // 底部颜色
            },
         ]),
      },
      data: [], // 示例数据,根据实际完成率计算
   },
}
@@ -99,8 +112,19 @@
})
</script>
<style scoped lang="scss">
.event-trend-analysis {
   height: 280px;
}
.little-title {
      background: url('@/assets/images/little-title-bg.png') no-repeat center / 100% 100%;
      width: 372px;
      height: 28px;
      line-height: 28px;
      padding-left: 16px;
   }
.chart {
   margin-top: 10px;
   width: 356px;
   height: 190px;
   height: 240px;
}
</style>