Browse Source

水务大屏-视频及水位gis高度展示优化

master
liujiangyong 2 years ago
parent
commit
d002f8d2b2
  1. 6
      super-screen/client/src/sections/water-prevention/components/style.less
  2. 16
      super-screen/client/src/sections/water-prevention/containers/gis.js

6
super-screen/client/src/sections/water-prevention/components/style.less

@ -369,9 +369,9 @@
justify-content: start; justify-content: start;
._item { ._item {
width: 46%; width: 98%;
margin: 0.5% 2%; margin: 4% 1%;
height: 32%; height: 90%;
background: url('/assets/images/homepage/fire/videobg.png') no-repeat; background: url('/assets/images/homepage/fire/videobg.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
position: relative; position: relative;

16
super-screen/client/src/sections/water-prevention/containers/gis.js

@ -470,12 +470,12 @@ function Map(props) {
// } // }
height: function (index, feature) { height: function (index, feature) {
const baseHeigh = 1200 const baseHeigh = 1200
return feature.coordinates[0].properties.x.waterLevel > 30 ? baseHeigh * 6 : return feature.coordinates[0].properties.x.waterLevel > 30 ? baseHeigh * 14 :
feature.coordinates[0].properties.x.waterLevel > 25 ? baseHeigh * 5 : feature.coordinates[0].properties.x.waterLevel > 25 ? baseHeigh * 13 :
feature.coordinates[0].properties.x.waterLevel > 20 ? baseHeigh * 4 : feature.coordinates[0].properties.x.waterLevel > 20 ? baseHeigh * 12 :
feature.coordinates[0].properties.x.waterLevel > 15 ? baseHeigh * 3 : feature.coordinates[0].properties.x.waterLevel > 15 ? baseHeigh * 11 :
feature.coordinates[0].properties.x.waterLevel > 10 ? baseHeigh * 2 : feature.coordinates[0].properties.x.waterLevel > 10 ? baseHeigh * 10 :
feature.coordinates[0].properties.x.waterLevel > 0 ? baseHeigh * 1 : 0 feature.coordinates[0].properties.x.waterLevel > 0 ? baseHeigh * 9 : 0
}, },
topColor: function (index, feature) { topColor: function (index, feature) {
@ -505,7 +505,7 @@ function Map(props) {
// visible: false, // visible: false,
offset: [0, -s.waterLevel], offset: [0, -s.waterLevel],
style: { style: {
'padding': '5px 10px', 'padding': '2px 4px',
'margin-bottom': '1rem', 'margin-bottom': '1rem',
'border-radius': '.25rem', 'border-radius': '.25rem',
'background-color': '#143857', 'background-color': '#143857',
@ -513,7 +513,7 @@ function Map(props) {
'border-width': 0, 'border-width': 0,
'box-shadow': '0 2px 6px 0 rgba(255, 255, 255, .3)', 'box-shadow': '0 2px 6px 0 rgba(255, 255, 255, .3)',
'text-align': 'center', 'text-align': 'center',
'font-size': '16px', 'font-size': '14px',
'color': '#DCF2FD', 'color': '#DCF2FD',
}, },
}); });

Loading…
Cancel
Save