独墅湖高教创新区危化品智慧管控平台(新危化品)
马宇豪
2025-04-28 e1d380a930e73d8355a4695ca5f5b91f471c2394
src/views/hazardousChemicals/bigScreen/components/midTop.vue
@@ -85,7 +85,7 @@
// 表格数据
const companyData = ref([])
// 配置参数
const visibleRows = 8 // 显示的行数
const visibleRows = 10 // 显示的行数
const scrollSpeed = 0.5 // 每次滚动的像素数
const rowHeight = 40 // 行高,与CSS一致
const viewport = ref(null)
@@ -94,7 +94,7 @@
onMounted(()=>{
  getList()
  initChart()
  // initChart()
  // 设置视口高度
  if (viewport.value) {
    viewport.value.style.height = `${visibleRows * rowHeight}px`
@@ -153,11 +153,10 @@
      companyData.value = res.data
      const mapData = companyData.value.map(i=>{
        return {
          name: i.companyName + '(' + i.warningCount + ')',
          name: i.companyName + '\n' + i.warningCount,
          value: [i.longitude,i.latitude]
        }
      })
      console.log(mapData,'mapData')
      initChart(mapData)
    }
@@ -202,6 +201,7 @@
    let option = {
      geo: {
        map: '苏州市',
        roam: 'scale',
        aspectScale: 0.8,
        layoutCenter: ['50%', '50%'], //地图位置
        layoutSize: '75%',
@@ -271,10 +271,10 @@
        {
          type: 'effectScatter',
          coordinateSystem: 'geo',
          symbolSize: 10,
          symbolSize: 4,
          rippleEffect: {
            period: 3,
            scale: 10,
            period: 2,
            scale: 6,
            brushType: 'fill'
          },
          label: {
@@ -283,7 +283,7 @@
              position: 'right',
              formatter: '{b}',
              color: 'yellow',
              fontSize: 12
              fontSize: 14
            }
          },
          data: mapData,
@@ -291,8 +291,8 @@
            //坐标点颜色
            normal: {
              show: true,
              color: 'skyblue',
              shadowBlur: 20,
              color: 'orange',
              shadowBlur: 6,
              shadowColor: '#fff'
            },
            emphasis: {
@@ -317,18 +317,18 @@
  height: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px
}
.container-left{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 300px;
}
.filter{
  width: 300px;
  margin-top: 50px;
  width: 100%;
  display: flex;
  align-items: center;
}
@@ -354,9 +354,11 @@
    }
  }
}
.table-wrapper {
  position: relative;
  width: 300px;
  width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 2px;
@@ -415,8 +417,14 @@
  100% { opacity: 1; }
}
  #areaMap{
    flex: 1;
    height: 500px;
  }
#areaMap{
  flex: 2;
  height: 100%;
}
:deep(.BMap_cpyCtrl) {
  display: none !important;
}
:deep(.anchorBL) {
  display: none !important;
}
</style>