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
cead3eea
Commit
cead3eea
authored
Jun 10, 2020
by
zhengjiangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改告警显示
parent
0e59e1ef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
114 additions
and
33 deletions
+114
-33
View3D.js
src/view/bank/3dview/View3D.js
+47
-19
indexMap.js
src/view/bank/3dview/indexMap.js
+67
-14
No files found.
src/view/bank/3dview/View3D.js
View file @
cead3eea
...
...
@@ -1213,6 +1213,9 @@ class View3D extends Component {
transferAlarmData
=
()
=>
{
let
{
alarmData
,
orgCode
}
=
this
.
state
;
//登录人的orgCode
let
userOrgCode
=
lsTool
.
read
(
'selectedCompanyOrg'
);
// alarmData = moniData;
const
{
isAllDone
,
alarms
,
markerType
}
=
this
.
state
;
if
(
!
isAllDone
||
this
.
city
.
isXidajie
)
{
...
...
@@ -1237,33 +1240,40 @@ class View3D extends Component {
let
dicCodeList
=
JSON
.
parse
(
dictionaryList
);
let
city
=
this
.
getSelectCityByOrgCode
(
orgCode
,
dicCodeList
);
if
(
city
===
'科技处'
||
city
===
'商业银行'
){
//暂时全部归属西安中心
// 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'
||
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
);
}
//过滤该公司没有权限的设备(有则跑马灯显示,否则不显示)
let
newData
=
[];
alarmData
.
map
(
e
=>
{
if
((
e
.
code
.
indexOf
(
userOrgCode
)
!==-
1
)
||
(
e
.
authOrg
.
indexOf
(
userOrgCode
)
!==-
1
)){
newData
.
push
(
e
);
}
});
}
}
if
(
city
===
'xian'
||
city
===
'xianyang'
){
if
(
alarmData
&&
!
utils
.
isEmpty
(
alarmData
)
&&
utils
.
isArray
(
alarmData
))
{
alarmData
.
forEach
(
item
=>
{
newData
.
forEach
(
item
=>
{
const
pointAttrs
=
JSON
.
parse
(
item
.
pointAttrs
);
if
(
city
===
'xian'
&&
(
item
.
code
.
startsWith
(
orgCode
)
||
item
.
authOrg
&&
item
.
authOrg
.
indexOf
(
orgCode
)
!==-
1
)
&&
pointAttrs
&&
pointAttrs
!==
''
&&
pointAttrs
!==
undefined
)
{
if
(
(
city
===
'xian'
||
city
===
'科技处西安'
)
&&
(
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
);
}
}
else
if
(
city
===
'xianyang'
&&
(
item
.
code
.
startsWith
(
orgCode
)
||
item
.
authOrg
&&
item
.
authOrg
.
indexOf
(
orgCode
)
!==-
1
))
{
// 咸阳数据
}
else
if
(
(
city
===
'xianyang'
||
city
===
'科技处咸阳'
)
&&
(
item
.
code
.
startsWith
(
orgCode
)
||
item
.
authOrg
&&
item
.
authOrg
.
indexOf
(
orgCode
)
!==-
1
))
{
// 咸阳数据
xyFloorAlarmData
.
push
(
item
);
}
});
...
...
@@ -1271,6 +1281,24 @@ class View3D extends Component {
}
// if(city === '科技处西安' || city === '科技处咸阳' ){
// if (alarmData && !utils.isEmpty(alarmData) && utils.isArray(alarmData)) {
// alarmData.forEach(item => {
// const pointAttrs = JSON.parse(item.pointAttrs);
// if ( && (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);
// }
// } else if (city === '科技处咸阳' && (item.authOrg && item.authOrg.indexOf(orgCode) !==-1)) {// 咸阳数据
// xyFloorAlarmData.push(item);
// }
// });
// }
// }
if
(
this
.
lensLevel
===
LENS_LEVEL
.
ROOT
)
{
...
...
@@ -1588,7 +1616,7 @@ class View3D extends Component {
alarmPoint
.
type
=
pointType
===
3
?
'patrol'
:
((
pointType
===
2
)
||
(
pointType
===
6
))
?
'dynamicRingData'
:
'impEquipment'
;
let
points
=
[];
points
.
push
(
alarmPoint
);
debugger
markers
[
alarmPoint
.
type
]
=
points
;
...
...
src/view/bank/3dview/indexMap.js
View file @
cead3eea
...
...
@@ -676,8 +676,25 @@ class IndexMap extends Component {
}
else
{
map
=
{
'is3DPage'
:
true
,
'city'
:
''
,
'orgCode'
:
''
};
}
}
else
{
map
=
{
'is3DPage'
:
true
,
'city'
:
''
,
'orgCode'
:
selectedCompanyOrg
};
}
else
if
(
companyName
&&
companyName
.
indexOf
(
"科技处"
)
!==
-
1
){
// map = { 'is3DPage': true, 'city': '', 'orgCode': selectedCompanyOrg };
let
newOrgCode
=
null
;
if
(
city
===
'xian'
){
newOrgCode
=
this
.
getSelectOrgCode
(
'科技处西安'
,
dicCodeList
);
}
;
if
(
city
===
'xianyang'
)
{
newOrgCode
=
this
.
getSelectOrgCode
(
'科技处咸阳'
,
dicCodeList
);
};
if
(
city
===
'xian'
||
city
===
'xianyang'
||
city
===
'xidajie'
){
map
=
{
'is3DPage'
:
true
,
'city'
:
city
,
'orgCode'
:
newOrgCode
};
}
else
{
map
=
{
'is3DPage'
:
true
,
'city'
:
''
,
'orgCode'
:
''
};
}
}
else
{
map
=
{
'is3DPage'
:
true
,
'city'
:
''
,
'orgCode'
:
''
};
}
this
.
props
.
indexViewChange
(
map
);
...
...
@@ -686,6 +703,7 @@ class IndexMap extends Component {
markerOnClick1
=
(
city
,
flag
,
id
,
pointName
,
pointAttrs
,
floor
,
pointtype
)
=>
{
this
.
state
.
isOnClickCity
=
true
;
let
selectedCompanyOrg
=
lsTool
.
read
(
'selectedCompanyOrg'
);
let
dictionaryList
=
lsTool
.
read
(
'dictionaryList'
);
let
dicCodeList
=
JSON
.
parse
(
dictionaryList
);
...
...
@@ -695,13 +713,29 @@ class IndexMap extends Component {
if
(
companyName
&&
companyName
.
indexOf
(
"清算中心"
)
!==
-
1
){
let
orgCode
=
this
.
getSelectOrgCode
(
city
,
dicCodeList
);
if
(
city
===
'xian'
||
city
===
'xianyang'
||
city
===
'xidajie'
){
//map = { 'is3DPage': true, 'city': city, 'orgCode': orgCode };
map
=
{
'is3DPage'
:
true
,
'city'
:
city
,
'orgCode'
:
orgCode
,
'flag'
:
flag
,
'pid'
:
id
,
'pointName'
:
pointName
,
'pointAttrs'
:
pointAttrs
,
'floor'
:
floor
,
'pointtype'
:
pointtype
};
}
else
{
map
=
{
'is3DPage'
:
true
,
'city'
:
city
,
'orgCode'
:
''
,
'flag'
:
flag
,
'pid'
:
id
,
'pointName'
:
pointName
,
'pointAttrs'
:
pointAttrs
,
'floor'
:
floor
,
'pointtype'
:
pointtype
};
map
=
{
'is3DPage'
:
true
,
'city'
:
''
,
'orgCode'
:
''
,
'flag'
:
flag
,
'pid'
:
id
,
'pointName'
:
pointName
,
'pointAttrs'
:
pointAttrs
,
'floor'
:
floor
,
'pointtype'
:
pointtype
};
}
}
else
{
map
=
{
'is3DPage'
:
true
,
'city'
:
city
,
'orgCode'
:
selectedCompanyOrg
,
'flag'
:
flag
,
'pid'
:
id
,
'pointName'
:
pointName
,
'pointAttrs'
:
pointAttrs
,
'floor'
:
floor
,
'pointtype'
:
pointtype
};
}
else
if
(
companyName
&&
companyName
.
indexOf
(
"科技处"
)
!==
-
1
){
// map = { 'is3DPage': true, 'city': '', 'orgCode': selectedCompanyOrg };
let
newOrgCode
=
null
;
if
(
city
===
'xian'
){
newOrgCode
=
this
.
getSelectOrgCode
(
'科技处西安'
,
dicCodeList
);
}
;
if
(
city
===
'xianyang'
)
{
newOrgCode
=
this
.
getSelectOrgCode
(
'科技处咸阳'
,
dicCodeList
);
};
if
(
city
===
'xian'
||
city
===
'xianyang'
||
city
===
'xidajie'
){
map
=
{
'is3DPage'
:
true
,
'city'
:
city
,
'orgCode'
:
newOrgCode
,
'flag'
:
flag
,
'pid'
:
id
,
'pointName'
:
pointName
,
'pointAttrs'
:
pointAttrs
,
'floor'
:
floor
,
'pointtype'
:
pointtype
};
}
else
{
map
=
{
'is3DPage'
:
true
,
'city'
:
''
,
'orgCode'
:
''
,
'flag'
:
flag
,
'pid'
:
id
,
'pointName'
:
pointName
,
'pointAttrs'
:
pointAttrs
,
'floor'
:
floor
,
'pointtype'
:
pointtype
};
}
}
else
{
map
=
{
'is3DPage'
:
true
,
'city'
:
''
,
'orgCode'
:
''
,
'flag'
:
flag
,
'pid'
:
id
,
'pointName'
:
pointName
,
'pointAttrs'
:
pointAttrs
,
'floor'
:
floor
,
'pointtype'
:
pointtype
};
}
this
.
props
.
indexViewChange
(
map
);
...
...
@@ -719,28 +753,44 @@ class IndexMap extends Component {
* 初始化告警数据
*/
queeryAlarms
=
()
=>
{
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
);
//登录的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
!==
''
)
{
getAlarms
().
then
(
data
=>
{
if
(
!
utils
.
isEmpty
(
data
)
&&
utils
.
isArray
(
data
))
{
const
xianFlag
=
data
.
some
(
e
=>
{
//过滤该公司没有权限的设备(有则跑马灯显示,否则不显示)
let
newData
=
[];
data
.
map
(
e
=>
{
if
((
e
.
code
.
indexOf
(
orgCode
)
!==-
1
)
||
(
e
.
authOrg
.
indexOf
(
orgCode
)
!==-
1
)){
newData
.
push
(
e
);
}
})
if
(
!
utils
.
isEmpty
(
newData
)
&&
utils
.
isArray
(
newData
))
{
const
xianFlag
=
newData
.
some
(
e
=>
{
// if (e.code === xianCode) {
if
(
e
.
code
.
startsWith
(
kejichuCode
)
||
e
.
code
.
startsWith
(
xianCode
)
||
e
.
authOrg
&&
e
.
authOrg
.
indexOf
(
xianCode
)
!==
-
1
)
{
if
(
e
.
code
.
startsWith
(
xianCode
)
||
(
e
.
authOrg
&&
e
.
authOrg
.
indexOf
(
xianCode
)
!==
-
1
||
(
e
.
authOrg
&&
e
.
authOrg
.
indexOf
(
kejichuxianCode
)
!==
-
1
))
)
{
return
true
;
}
});
const
xianyangFlag
=
d
ata
.
some
(
e
=>
{
if
(
e
.
code
.
startsWith
(
xianyangCode
)
||
e
.
authOrg
&&
e
.
authOrg
.
indexOf
(
xianyangCode
)
!==
-
1
)
{
const
xianyangFlag
=
newD
ata
.
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
:
d
ata
,
pmdList
:
newD
ata
,
xianVisible
:
xianFlag
,
xianyangVisible
:
xianyangFlag
});
...
...
@@ -751,6 +801,9 @@ class IndexMap extends Component {
});
}
}
/**
* 根据告警city或者eqpId的重构数据
*
...
...
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