Bläddra i källkod

点位数据展示逻辑优化

任一存 1 år sedan
förälder
incheckning
812b364229
1 ändrade filer med 1 tillägg och 4 borttagningar
  1. 1 4
      src/App.vue

+ 1 - 4
src/App.vue

@@ -544,9 +544,6 @@ export default {
         .attr('initial-fill', (d) => {
         .attr('initial-fill', (d) => {
           return `rgba(${Math.round((d[2] -zMin) / zLength * 255)}, 0, 0, ${d[3] ? '0.7' : '1'})`
           return `rgba(${Math.round((d[2] -zMin) / zLength * 255)}, 0, 0, ${d[3] ? '0.7' : '1'})`
         })
         })
-        .attr('raw-data', (d) => {
-          return d[4]
-        })
 
 
       gNode.selectAll('rect').on('mouseenter', function(e, d) {
       gNode.selectAll('rect').on('mouseenter', function(e, d) {
         const id = d[d.length - 1]
         const id = d[d.length - 1]
@@ -555,7 +552,7 @@ export default {
         })) {
         })) {
           d3.select(this).attr('fill', 'orange')
           d3.select(this).attr('fill', 'orange')
         }
         }
-        that.infoText = e.target.attributes['raw-data'].value
+        that.infoText = d[4]
       }).on('mouseleave', function (e, d) {
       }).on('mouseleave', function (e, d) {
         const id = d[d.length - 1]
         const id = d[d.length - 1]
         if (id !== activeRect?.datum()[activeRect?.datum().length - 1] && !activeRectNeighbourList?.some((item) => {
         if (id !== activeRect?.datum()[activeRect?.datum().length - 1] && !activeRectNeighbourList?.some((item) => {