独墅湖高教创新区危化品智慧管控平台(新危化品)
马宇豪
2025-04-21 f44a39eee549f01c2891f1dbe232b1265e54e6c8
修改大屏
已修改2个文件
27 ■■■■ 文件已修改
src/views/hazardousChemicals/bigScreen/components/midTop.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hazardousChemicals/bigScreen/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
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; }
}
src/views/hazardousChemicals/bigScreen/index.vue
@@ -6,7 +6,7 @@
        <div class="current-date">{{ currentDate }}</div>
      </div>
      <div class="header-center">
        <h1 class="dashboard-title">独墅湖高教创新区危化品智慧管控平台</h1>
        <h1 class="dashboard-title">独墅湖科教创新区危化品智慧管控平台</h1>
      </div>
      <div class="header-right">
        <div class="weather-info">