Commit 54d97155 authored by suhuiguang's avatar suhuiguang

1.修改

parent f639f934
...@@ -1286,7 +1286,10 @@ class View3D extends Component { ...@@ -1286,7 +1286,10 @@ class View3D extends Component {
getExceptionAreasList = () => { getExceptionAreasList = () => {
exceptionRegionListAction().then(data=>{ exceptionRegionListAction().then(data=>{
this.setState({ exceptionAreas: data }); const exceptionAreas = data.filter(e=>{
return e.routePath && e.routePath.routePath && e.routePath.routePath.length > 0;
});
this.setState({ exceptionAreas });
}); });
} }
...@@ -1304,7 +1307,7 @@ class View3D extends Component { ...@@ -1304,7 +1307,7 @@ class View3D extends Component {
}; };
return exceptionAreas.map((area,index) =>{ return exceptionAreas.map((area,index) =>{
const { routePath: points = [] } = area.routePath; const { routePath: points = [] } = area.routePath;
return points.length > 0 && <PolygonRegion key={area.id} {...regionConf} points={points} onCreated={e=>this.onRectCreated(e,area,index)} />; return <PolygonRegion key={area.id} {...regionConf} points={points} onCreated={e=>this.onRectCreated(e,area,index)} />;
}); });
} }
......
...@@ -7,6 +7,7 @@ import { warnController } from './conf'; ...@@ -7,6 +7,7 @@ import { warnController } from './conf';
import { getIcon } from './../../../utils/request'; import { getIcon } from './../../../utils/request';
const panoramicIcon = imgStatic.panoramicIcon; const panoramicIcon = imgStatic.panoramicIcon;
const colorLevel = { 1: 'red',2: 'yellow',3: 'blue', 4: 'blue' };
/** /**
* 今日安全指数 * 今日安全指数
...@@ -82,12 +83,15 @@ export default class SafetyIndex extends Component { ...@@ -82,12 +83,15 @@ export default class SafetyIndex extends Component {
width: 5 width: 5
}, },
title: { title: {
show: false show: true,
offsetCenter: ['5%','55%'],
color: colorLevel[safetyIndexData.level] || 'yellow',
fontSize: 15
}, },
detail: { detail: {
show: false show: false
}, },
data: [{ value: safetyIndexData.safetyIndex, name: '今日安全指数' }] data: [{ value: safetyIndexData.safetyIndex, name: safetyIndexData.safetyTips }]
} }
] ]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment