Commit 0e59e1ef authored by zhengjiangtao's avatar zhengjiangtao

科技处轮播图和首页闪烁修改

parent 5b4aa026
...@@ -59,6 +59,31 @@ const createPanel = (text) => { ...@@ -59,6 +59,31 @@ const createPanel = (text) => {
return div; return div;
}; };
const moniData = [
{ authOrg: null,
code: "1*13",
content: "-11.45.0.18-423-通讯状态",
id: 176,
isAlarm: 1,
pointId: 221,
pointName: "",
pointType: "1",
sourceId: null,
updateDate: "2020-06-09 09:48:15"},
{
authOrg: null,
code: "1*13",
content: "-11.44.12.83-424-通讯状态",
id: 175,
isAlarm: 1,
pointId: 222,
pointName: "",
pointType: "1",
sourceId: null,
updateDate: "2020-06-09 09:48:12"
}
]
/** /**
* 展示三维模型 * 展示三维模型
* *
...@@ -1188,6 +1213,7 @@ class View3D extends Component { ...@@ -1188,6 +1213,7 @@ class View3D extends Component {
transferAlarmData = () => { transferAlarmData = () => {
let { alarmData, orgCode } = this.state; let { alarmData, orgCode } = this.state;
// alarmData = moniData;
const { isAllDone, alarms, markerType } = this.state; const { isAllDone, alarms, markerType } = this.state;
if (!isAllDone || this.city.isXidajie) { if (!isAllDone || this.city.isXidajie) {
return; return;
...@@ -1211,6 +1237,23 @@ class View3D extends Component { ...@@ -1211,6 +1237,23 @@ class View3D extends Component {
let dicCodeList = JSON.parse(dictionaryList); let dicCodeList = JSON.parse(dictionaryList);
let city = this.getSelectCityByOrgCode(orgCode,dicCodeList); let city = this.getSelectCityByOrgCode(orgCode,dicCodeList);
if( city === '科技处' || city === '商业银行'){
//暂时全部归属西安中心
if (alarmData && !utils.isEmpty(alarmData) && utils.isArray(alarmData)) {
alarmData.forEach(item => {
const pointAttrs = JSON.parse(item.pointAttrs);
if ((item.code.startsWith(orgCode) || item.authOrg && item.authOrg.indexOf(orgCode)!==-1) && pointAttrs && pointAttrs !== '' && pointAttrs !== undefined) {
if (pointAttrs.storey === '3' || pointAttrs.storey === 'floor_3') {// 三楼数据
thirdFloorAlarmData.push(item);
} else if (pointAttrs.storey === '6' || pointAttrs.storey === 'floor_6') {// 六楼数据
sixthFloorAlarmData.push(item);
}
}
});
}
}
if(city === 'xian' || city === 'xianyang' ){
if (alarmData && !utils.isEmpty(alarmData) && utils.isArray(alarmData)) { if (alarmData && !utils.isEmpty(alarmData) && utils.isArray(alarmData)) {
alarmData.forEach(item => { alarmData.forEach(item => {
const pointAttrs = JSON.parse(item.pointAttrs); const pointAttrs = JSON.parse(item.pointAttrs);
...@@ -1225,6 +1268,9 @@ class View3D extends Component { ...@@ -1225,6 +1268,9 @@ class View3D extends Component {
} }
}); });
} }
}
if (this.lensLevel === LENS_LEVEL.ROOT) { if (this.lensLevel === LENS_LEVEL.ROOT) {
...@@ -1300,6 +1346,19 @@ class View3D extends Component { ...@@ -1300,6 +1346,19 @@ class View3D extends Component {
return city; return city;
} }
/**
* 根据城市返回字典中配置的组织orgCode
*/
getSelectOrgCode = (city, dictionaryList) => {
let orgCode = null;
dictionaryList.map(item => {
if (item.dictDataKey === city) {
orgCode = item.dictDataValue;
}
});
return orgCode;
}
/** /**
* 告警信息点击事件 * 告警信息点击事件
......
...@@ -723,12 +723,13 @@ class IndexMap extends Component { ...@@ -723,12 +723,13 @@ class IndexMap extends Component {
let dicCodeList = JSON.parse(dictionaryList); let dicCodeList = JSON.parse(dictionaryList);
let xianCode = this.getSelectOrgCode('xian', dicCodeList); let xianCode = this.getSelectOrgCode('xian', dicCodeList);
let xianyangCode = this.getSelectOrgCode('xianyang', dicCodeList); let xianyangCode = this.getSelectOrgCode('xianyang', dicCodeList);
let kejichuCode = this.getSelectOrgCode('科技处', dicCodeList);
getAlarms().then(data => { getAlarms().then(data => {
if (!utils.isEmpty(data) && utils.isArray(data)) { if (!utils.isEmpty(data) && utils.isArray(data)) {
const xianFlag = data.some(e => { const xianFlag = data.some(e => {
// if (e.code === xianCode) { // if (e.code === xianCode) {
if (e.code.startsWith(xianCode) || e.authOrg && e.authOrg.indexOf(xianCode) !== -1) { if (e.code.startsWith(kejichuCode) || e.code.startsWith(xianCode) || e.authOrg && e.authOrg.indexOf(xianCode) !== -1) {
return true; return true;
} }
}); });
......
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