Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AmosBankView
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bank
AmosBankView
Commits
ad7b2c8f
Commit
ad7b2c8f
authored
Jun 11, 2020
by
zhengjiangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pmd bug
parent
28c3a66d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
81 deletions
+66
-81
indexMap.js
src/view/bank/3dview/indexMap.js
+66
-81
No files found.
src/view/bank/3dview/indexMap.js
View file @
ad7b2c8f
...
...
@@ -851,66 +851,79 @@ class IndexMap extends Component {
return
xianshi
;
};
/**
* 初始化告警数据
*/
queeryAlarms
=
()
=>
{
let
dictionaryList
=
lsTool
.
read
(
'dictionaryList'
);
let
dicCodeList
=
JSON
.
parse
(
dictionaryList
);
let
xianCode
=
this
.
getSelectOrgCode
(
'xian'
,
dicCodeList
);
let
xianyangCode
=
this
.
getSelectOrgCode
(
'xianyang'
,
dicCodeList
);
//登录的orgCode
let
{
orgCode
}
=
this
.
state
;
// let kejichuCode = this.getSelectOrgCode('科技处', dicCodeList);
// let qingsuanzhongxin = this.getSelectOrgCode('清算中心', dicCodeList);
let
kejichuxianCode
=
this
.
getSelectOrgCode
(
'科技处西安'
,
dicCodeList
);
let
kejichuxianyangCode
=
this
.
getSelectOrgCode
(
'科技处咸阳'
,
dicCodeList
);
if
(
orgCode
!==
''
)
{
//处理告警数据
handleAlarmData
=
realTimedata
=>
{
let
data
=
realTimedata
||
[];
if
(
data
&&
data
.
length
>
0
)
{
this
.
processingAlarmData
(
data
);
}
else
{
getAlarms
().
then
(
data
=>
{
//过滤该公司没有权限的设备(有则跑马灯显示,否则不显示)
let
newData
=
[];
data
.
map
(
e
=>
{
let
xianshi
=
this
.
existData
(
e
.
code
,
orgCode
);
let
authOrgXianshi
=
this
.
existData
(
e
.
authOrg
,
orgCode
);
if
(
xianshi
||
authOrgXianshi
)
{
newData
.
push
(
e
);
this
.
processingAlarmData
(
data
);
});
}
}
//过滤告警列表
processingAlarmData
=
data
=>
{
let
{
orgCode
}
=
this
.
state
;
if
(
orgCode
!==
''
)
{
let
dictionaryList
=
lsTool
.
read
(
'dictionaryList'
);
let
dicCodeList
=
JSON
.
parse
(
dictionaryList
);
let
xianCode
=
this
.
getSelectOrgCode
(
'xian'
,
dicCodeList
);
let
xianyangCode
=
this
.
getSelectOrgCode
(
'xianyang'
,
dicCodeList
);
// let kejichuCode = this.getSelectOrgCode('科技处', dicCodeList);
// let qingsuanzhongxin = this.getSelectOrgCode('清算中心', dicCodeList);
let
kejichuxianCode
=
this
.
getSelectOrgCode
(
'科技处西安'
,
dicCodeList
);
let
kejichuxianyangCode
=
this
.
getSelectOrgCode
(
'科技处咸阳'
,
dicCodeList
);
//过滤该公司没有权限的设备(有则跑马灯显示,否则不显示)
let
newData
=
[];
data
.
map
(
e
=>
{
let
xianshi
=
this
.
existData
(
e
.
code
,
orgCode
);
let
authOrgXianshi
=
this
.
existData
(
e
.
authOrg
,
orgCode
);
if
(
xianshi
||
authOrgXianshi
)
{
newData
.
push
(
e
);
}
});
if
(
!
utils
.
isEmpty
(
newData
)
&&
utils
.
isArray
(
newData
))
{
const
xianFlag
=
newData
.
some
(
e
=>
{
// if (e.code === xianCode) {
if
(
e
.
code
.
startsWith
(
xianCode
)
||
((
e
.
authOrg
&&
e
.
authOrg
.
indexOf
(
xianCode
)
!==
-
1
)
||
(
e
.
authOrg
&&
e
.
authOrg
.
indexOf
(
kejichuxianCode
)
!==
-
1
)))
{
return
true
;
}
});
const
xianyangFlag
=
newData
.
some
(
e
=>
{
if
(
e
.
code
.
startsWith
(
xianyangCode
)
||
((
e
.
authOrg
&&
e
.
authOrg
.
indexOf
(
xianyangCode
)
!==
-
1
)
||
(
e
.
authOrg
&&
e
.
authOrg
.
indexOf
(
kejichuxianyangCode
)
!==
-
1
))
)
{
return
true
;
}
});
if
(
!
utils
.
isEmpty
(
newData
)
&&
utils
.
isArray
(
newData
))
{
const
xianFlag
=
newData
.
some
(
e
=>
{
// if (e.code === xianCode) {
if
(
e
.
code
.
startsWith
(
xianCode
)
||
((
e
.
authOrg
&&
e
.
authOrg
.
indexOf
(
xianCode
)
!==
-
1
)
||
(
e
.
authOrg
&&
e
.
authOrg
.
indexOf
(
kejichuxianCode
)
!==
-
1
))
)
{
return
true
;
}
});
const
xianyangFlag
=
newData
.
some
(
e
=>
{
if
(
e
.
code
.
startsWith
(
xianyangCode
)
||
((
e
.
authOrg
&&
e
.
authOrg
.
indexOf
(
xianyangCode
)
!==
-
1
)
||
(
e
.
authOrg
&&
e
.
authOrg
.
indexOf
(
kejichuxianyangCode
)
!==
-
1
))
)
{
return
true
;
}
});
this
.
setState
({
pmdList
:
newData
,
xianVisible
:
xianFlag
,
xianyangVisible
:
xianyangFlag
});
this
.
setState
({
pmdList
:
newData
,
xianVisible
:
xianFlag
,
xianyangVisible
:
xianyangFlag
});
this
.
initBankInfoList
(
'xian'
,
null
,
xianFlag
);
this
.
initBankInfoList
(
'xianyang'
,
null
,
xianyangFlag
);
}
});
this
.
initBankInfoList
(
'xian'
,
null
,
xianFlag
);
this
.
initBankInfoList
(
'xianyang'
,
null
,
xianyangFlag
);
}
}
};
/**
* 初始化告警数据
*/
queeryAlarms
=
()
=>
{
this
.
handleAlarmData
();
};
/**
* 根据告警city或者eqpId的重构数据
*
...
...
@@ -932,39 +945,11 @@ class IndexMap extends Component {
};
/**
* webSocket接收
轨迹
数据
* webSocket接收数据
*/
handleData
=
data
=>
{
let
dictionaryList
=
lsTool
.
read
(
'dictionaryList'
);
let
dicCodeList
=
JSON
.
parse
(
dictionaryList
);
let
xianCode
=
this
.
getSelectOrgCode
(
'xian'
,
dicCodeList
);
let
xianyangCode
=
this
.
getSelectOrgCode
(
'xianyang'
,
dicCodeList
);
console
.
log
(
'alarmMarquee'
,
data
);
let
handleXianFlag
=
false
;
let
handleXianyangFlag
=
false
;
if
(
!
utils
.
isEmpty
(
data
)
&&
utils
.
isArray
(
data
))
{
const
xianFlag
=
data
.
some
(
e
=>
{
//item.authOrg && item.authOrg.indexOf(xianCode)!==-1
if
(
e
.
code
&&
e
.
code
.
indexOf
(
xianCode
)
!==
-
1
)
{
return
true
;
}
});
const
xianyangFlag
=
data
.
some
(
e
=>
{
//xianyangCode
if
(
e
.
code
&&
e
.
code
.
indexOf
(
xianyangCode
)
!==
-
1
)
{
return
true
;
}
});
handleXianFlag
=
xianFlag
;
handleXianyangFlag
=
xianyangFlag
;
}
this
.
initBankInfoList
(
'xian'
,
null
,
handleXianFlag
);
this
.
initBankInfoList
(
'xianyang'
,
null
,
handleXianyangFlag
);
this
.
setState
({
pmdList
:
data
,
xianVisible
:
handleXianFlag
,
xianyangVisible
:
handleXianyangFlag
});
this
.
handleAlarmData
(
data
);
};
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment