锚点关注话题刷新按钮
This commit is contained in:
		
							parent
							
								
									b6163e3f75
								
							
						
					
					
						commit
						188ce22bcf
					
				
							
								
								
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| 
						 | 
				
			
			@ -2789,7 +2789,7 @@
 | 
			
		|||
    },
 | 
			
		||||
    "node_modules/sass": {
 | 
			
		||||
      "version": "1.90.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/sass/-/sass-1.90.0.tgz",
 | 
			
		||||
      "resolved": "https://registry.npmmirror.com/sass/-/sass-1.90.0.tgz",
 | 
			
		||||
      "integrity": "sha512-9GUyuksjw70uNpb1MTYWsH9MQHOHY6kwfnkafC24+7aOMZn9+rVMBxRbLvw756mrBFbIsFg6Xw9IkR2Fnn3k+Q==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										
											BIN
										
									
								
								src/assets/images/icon/refresh.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/assets/images/icon/refresh.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div class="attentionTopic-component">
 | 
			
		||||
    <img src="@/assets/images/head/anchorTopicTitle.png" alt="" class="headerImage" />
 | 
			
		||||
 | 
			
		||||
    <div class="attentionTopic-content">
 | 
			
		||||
      <div class="topic-list">
 | 
			
		||||
        <div class="topic-item" v-for="item in currentTopicList" :key="item.id">
 | 
			
		||||
| 
						 | 
				
			
			@ -13,6 +14,7 @@
 | 
			
		|||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="refresh-btn" @click="handleRefresh"></div>
 | 
			
		||||
      <div id="topicChart" class="topic-chart"></div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -20,6 +22,7 @@
 | 
			
		|||
 | 
			
		||||
<script setup>
 | 
			
		||||
import { ref, onMounted, onUnmounted } from "vue"
 | 
			
		||||
 | 
			
		||||
import * as echarts from "echarts"
 | 
			
		||||
import { useKeyNodeRecognitionStore } from "@/store/keyNodeRecognition/index"
 | 
			
		||||
const keyNodeStore = useKeyNodeRecognitionStore()
 | 
			
		||||
| 
						 | 
				
			
			@ -241,10 +244,22 @@ const initTopicChart = () => {
 | 
			
		|||
// 刷新按钮的点击事件
 | 
			
		||||
const handleRefresh = () => {
 | 
			
		||||
  if (myChart) {
 | 
			
		||||
    // 清除当前定时器
 | 
			
		||||
    clearInterval(timer)
 | 
			
		||||
    // 重置风险事件索引
 | 
			
		||||
    keyNodeStore.riskEventIndex = -1
 | 
			
		||||
    // 重置当前列表项
 | 
			
		||||
    currentTopicList.value = []
 | 
			
		||||
    // 初始化关系图中间的统计项
 | 
			
		||||
    keyNodeStore.statisticsList[3].number = 0
 | 
			
		||||
    keyNodeStore.statisticsList[4].number = 0
 | 
			
		||||
 | 
			
		||||
    // 清除当前图表
 | 
			
		||||
    myChart.dispose()
 | 
			
		||||
    // 重新初始化图表
 | 
			
		||||
    initTopicChart()
 | 
			
		||||
    // 重新启动动态事件列表展示
 | 
			
		||||
    dynamicShowEventList()
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -275,6 +290,7 @@ onUnmounted(() => {
 | 
			
		|||
    margin-top: vh(-8);
 | 
			
		||||
  }
 | 
			
		||||
  .attentionTopic-content {
 | 
			
		||||
    position: relative;
 | 
			
		||||
    padding: vh(10) vw(10);
 | 
			
		||||
    color: #fff;
 | 
			
		||||
    .topic-list {
 | 
			
		||||
| 
						 | 
				
			
			@ -322,6 +338,18 @@ onUnmounted(() => {
 | 
			
		|||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    .refresh-btn {
 | 
			
		||||
      position: absolute;
 | 
			
		||||
      width: vw(30);
 | 
			
		||||
      height: vw(30);
 | 
			
		||||
      right: vw(20);
 | 
			
		||||
      top: vh(300);
 | 
			
		||||
      background-image: url("@/assets/images/icon/refresh.png");
 | 
			
		||||
      background-size: 100% 100%;
 | 
			
		||||
      border-radius: vw(5);
 | 
			
		||||
      cursor: pointer;
 | 
			
		||||
      z-index: 2;
 | 
			
		||||
    }
 | 
			
		||||
    .topic-chart {
 | 
			
		||||
      width: 100%;
 | 
			
		||||
      height: vh(200);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user