Commit 3a321c1a authored by zhengjiangtao's avatar zhengjiangtao

fix bug

parent b2c4121e
......@@ -1205,6 +1205,39 @@ class View3D extends Component {
});
};
existData = (code, orgCode) => {
let xianshi = false;
if ( code ){
if (code.indexOf('#') !== -1) {
let split = code.split('#') || [];
split.map(item => {
if (item.indexOf('-') !== -1) {
let array = item.split('-') || [];
if (array.length > 0 && array[0] === orgCode) {
xianshi = true;
}
}else{
if ( item === orgCode){
xianshi = true;
}
}
});
} else {
let arr = code.split('-') || [];
if (arr.length > 0 && arr[0] === orgCode) {
xianshi = true;
}
}
}
return xianshi;
};
/**
* 加载告警数据
*
......@@ -1258,10 +1291,13 @@ class View3D extends Component {
if(city === 'xian' || city === 'xianyang' || city === '科技处西安' || city === '科技处咸阳' ){
if (alarmData && !utils.isEmpty(alarmData) && utils.isArray(alarmData)) {
//过滤该公司没有权限的设备(有则跑马灯显示,否则不显示)
//过滤该公司没有权限的设备(有则跑马灯显示,否则不显示)
let newData = [];
alarmData.map(e =>{
if(( e.code.indexOf(userOrgCode) !==-1) || ( e.authOrg && e.authOrg.indexOf(userOrgCode) !==-1 )){
alarmData.map(e => {
let xianshi = this.existData(e.code,userOrgCode);
let authOrgXianshi = this.existData(e.authOrg,userOrgCode);
if (xianshi || authOrgXianshi) {
newData.push(e);
}
});
......
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