| | |
| | | // 表格数据 |
| | | const companyData = ref([]) |
| | | // 配置参数 |
| | | const visibleRows = 8 // 显示的行数 |
| | | const visibleRows = 10 // 显示的行数 |
| | | const scrollSpeed = 0.5 // 每次滚动的像素数 |
| | | const rowHeight = 40 // 行高,与CSS一致 |
| | | const viewport = ref(null) |
| | |
| | | |
| | | onMounted(()=>{ |
| | | getList() |
| | | initChart() |
| | | // initChart() |
| | | // 设置视口高度 |
| | | if (viewport.value) { |
| | | viewport.value.style.height = `${visibleRows * rowHeight}px` |
| | |
| | | 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) |
| | | } |
| | | |
| | |
| | | let option = { |
| | | geo: { |
| | | map: '苏州市', |
| | | roam: 'scale', |
| | | aspectScale: 0.8, |
| | | layoutCenter: ['50%', '50%'], //地图位置 |
| | | layoutSize: '75%', |
| | |
| | | { |
| | | type: 'effectScatter', |
| | | coordinateSystem: 'geo', |
| | | symbolSize: 10, |
| | | symbolSize: 4, |
| | | rippleEffect: { |
| | | period: 3, |
| | | scale: 10, |
| | | period: 2, |
| | | scale: 6, |
| | | brushType: 'fill' |
| | | }, |
| | | label: { |
| | |
| | | position: 'right', |
| | | formatter: '{b}', |
| | | color: 'yellow', |
| | | fontSize: 12 |
| | | fontSize: 14 |
| | | } |
| | | }, |
| | | data: mapData, |
| | |
| | | //坐标点颜色 |
| | | normal: { |
| | | show: true, |
| | | color: 'skyblue', |
| | | shadowBlur: 20, |
| | | color: 'orange', |
| | | shadowBlur: 6, |
| | | shadowColor: '#fff' |
| | | }, |
| | | emphasis: { |
| | |
| | | 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; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | .table-wrapper { |
| | | position: relative; |
| | | width: 300px; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | border: 1px solid rgba(255,255,255,.1); |
| | | border-radius: 2px; |
| | |
| | | 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> |