From f44a39eee549f01c2891f1dbe232b1265e54e6c8 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期一, 21 四月 2025 10:25:19 +0800 Subject: [PATCH] 修改大屏 --- src/views/hazardousChemicals/bigScreen/components/midTop.vue | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/views/hazardousChemicals/bigScreen/components/midTop.vue b/src/views/hazardousChemicals/bigScreen/components/midTop.vue index d9a5dd8..2895e47 100644 --- a/src/views/hazardousChemicals/bigScreen/components/midTop.vue +++ b/src/views/hazardousChemicals/bigScreen/components/midTop.vue @@ -37,8 +37,10 @@ </template> <script setup> import * as echarts from 'echarts'; -import {onMounted,onBeforeUnmount,ref,computed} from "vue"; +import {onMounted, onBeforeUnmount, ref, computed, reactive} from "vue"; import SUZHOU from './map.json' +import {getAvoidList} from "@/api/hazardousChemicals/avoid"; +import {ElMessage} from "element-plus"; // 表格数据 const companyData = [ { id: 1, rank: 1, company: '化工企业A', warehouse: '仓库1', warning: '相忌预警' }, @@ -54,7 +56,7 @@ { id: 11, rank: 11, company: '化工企业K', warehouse: '仓库11', warning: '' }, { id: 12, rank: 12, company: '化工企业L', warehouse: '仓库12', warning: '' }, ] - +// const companyData = ref([]) // 配置参数 const visibleRows = 8 // 显示的行数 const scrollSpeed = 1 // 每次滚动的像素数 @@ -64,6 +66,7 @@ let animationFrame = null onMounted(()=>{ + // getList() initChart() // 设置视口高度 if (viewport.value) { @@ -80,6 +83,16 @@ cancelAnimationFrame(animationFrame) } }) + +// const getList = async () => { +// const res = await getAvoidList({warningType: '', companyId: null}) +// if(res.code == 200){ +// companyData.value = res.data +// console.log(companyData.value,555) +// }else{ +// ElMessage.warning(res.message) +// } +// } // 复制前几行数据用于循环 const loopData = computed(() => { @@ -296,8 +309,12 @@ .scroll-content { will-change: transform; /* 优化性能 */ } + .danger { + color: #ff2f2f; + animation: blink 1s infinite; + } .warning { - color: #ff0000; + color: yellow; animation: blink 1s infinite; } } @@ -305,7 +322,7 @@ @keyframes blink { 0% { opacity: 1; } - 50% { opacity: 0.7; } + 50% { opacity: 0.8; } 100% { opacity: 1; } } -- Gitblit v1.9.2