Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-station-module-view
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
station
amos-station-module-view
Commits
619ddce8
Commit
619ddce8
authored
Oct 20, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.王珂动态预案调整为mqtt
parent
ddd1d79e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
156 additions
and
65 deletions
+156
-65
amos.config.js
amos.config.js
+1
-1
urlConsts.js
mods/components/3dviewConvertor/consts/urlConsts.js
+4
-1
wsUrlConsts.js
mods/components/3dviewConvertor/consts/wsUrlConsts.js
+1
-0
ruleService.js
mods/components/3dviewConvertor/services/ruleService.js
+8
-0
MaskContent.js
mods/components/3dviewConvertor/view/MaskContent.js
+13
-3
MessageEvent.js
mods/components/3dviewConvertor/view/MessageEvent.js
+61
-0
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+0
-0
consts.js
mods/components/3dviewConvertor/view/consts.js
+2
-0
AssistCard.js
mods/components/3dviewConvertor/view/plan/AssistCard.js
+3
-2
MonitorView.js
...ts/3dviewConvertor/view/preControl/monitor/MonitorView.js
+1
-1
StepView.js
...ponents/3dviewConvertor/view/preControl/steps/StepView.js
+8
-10
TopView.js
...onents/3dviewConvertor/view/preControl/topNews/TopView.js
+11
-10
Water.js
...components/3dviewConvertor/view/preControl/water/Water.js
+1
-1
EmptyPage.js
.../components/3dviewConvertor/view/reservePlan/EmptyPage.js
+1
-1
OperateButton.js
...ponents/3dviewConvertor/view/reservePlan/OperateButton.js
+10
-10
index.js
mods/components/3dviewConvertor/view/reservePlan/index.js
+19
-13
ruleActionView.js
mods/components/3dviewConvertor/view/ruleActionView.js
+11
-11
TopMsg.js
mods/components/3dviewConvertor/view/sideControl/TopMsg.js
+1
-1
No files found.
amos.config.js
View file @
619ddce8
...
...
@@ -13,7 +13,7 @@
// websocket 地址
wsURI
:
{
baseURI
:
'ws://172.16.11.40:10600/'
,
ruleURI
:
'ws://172.16.
3.77:8083/
'
ruleURI
:
'ws://172.16.
10.85:8083/mqtt
'
},
// 外部链接地址
outterURI
:
{
...
...
mods/components/3dviewConvertor/consts/urlConsts.js
View file @
619ddce8
...
...
@@ -62,7 +62,10 @@ export const FscSerUrl = {
statisticsDutyUrl
:
completePrefix
(
convertorURI
,
'api/view3d/statistics/duty'
),
//今日值班统计
onlineDayUrl
:
completePrefix
(
convertorURI
,
'api/view3d/online/date'
),
//消防安全执行天数
exceptionRegionListUrl
:
completePrefix
(
baseURI
,
'api/view3d/region/exception/list'
),
//异常区域查询
listPointsByRegionIdUrl
:
completePrefix
(
baseURI
,
'api/view3d/point/list/{regionId}'
)
//查询区域下点
listPointsByRegionIdUrl
:
completePrefix
(
baseURI
,
'api/view3d/point/list/{regionId}'
),
//查询区域下点
// completePrefix(FscSerUrl.planCloseUrl,`${rUrl}?batchNo=${content.batchNo}&stepCode=${content.stepCode}&=${content.code}&confirm=${confirm}&stepState=${content.stepState}`);
// 关闭预案
planCloseUrl
:
completePrefix
(
baseURI
,
'api/timeline/fire/exit/?batchNo={batchNo}&stepCode={stepCode}&buttonCode={buttonCode}&confirm={confirm}&stepState={stepState}'
)
};
export
const
FasSerUrl
=
{
...
...
mods/components/3dviewConvertor/consts/wsUrlConsts.js
View file @
619ddce8
...
...
@@ -17,6 +17,7 @@ const getToken = () => {
export
default
{
rulews
:
completePrefix
(
ruleURI
,
'rule.ws?token={token}'
),
mqttUrl
:
ruleURI
,
convertorView3d
:
completePrefix
(
convertorView3dURI
,
'3dViewMessage'
)
};
...
...
mods/components/3dviewConvertor/services/ruleService.js
View file @
619ddce8
...
...
@@ -25,3 +25,11 @@ export const ruleAction = (content,confirm) => {
export
const
ruleRePlayAction
=
(
batchNo
)
=>
{
return
commonGet
(
formatUrl
(
FscSerUrl
.
ruleRePlayUrl
,{
batchNo
}));
};
/**
* 关闭预案
*/
export
const
planCloseAction
=
(
batchNo
,
stepCode
,
buttonCode
,
confirm
,
stepState
)
=>
{
return
commonPut
(
formatUrl
(
FscSerUrl
.
planCloseUrl
,
{
batchNo
,
stepCode
,
buttonCode
,
confirm
,
stepState
}));
};
mods/components/3dviewConvertor/view/MaskContent.js
View file @
619ddce8
...
...
@@ -2,8 +2,10 @@ import React, { Component } from 'react';
import
PropTypes
from
'prop-types'
;
import
{
Connect
}
from
'amos-framework'
;
import
AmosWebSocket
from
'amos-websocket'
;
import
{
MQTTProvider
}
from
'amos-mqtt'
;
import
SysWsURL
,
{
completeToken
}
from
'./../consts/wsUrlConsts'
;
import
SideControl
from
'./sideControl'
;
import
MessageEvent
from
'./MessageEvent'
;
import
globalMsg
from
'./pagefactory/msgFactory'
;
import
{
eventTopics
,
rulesDataFactory
}
from
'./consts'
;
import
LayerPool
from
'./LayerPool'
;
...
...
@@ -96,10 +98,12 @@ class MaskContent extends Component {
isPermissionControl
,
bizPerActionBars
,
isInitModel
,
isPanoramic
isPanoramic
,
hiddenScreenSaver
,
trigger
}
=
this
.
props
;
alarmStarted
&&
this
.
props
.
editModelChange
(
true
);
const
wsURL
=
completeToken
(
SysWsURL
.
rulews
)
;
const
wsURL
=
SysWsURL
.
mqttUrl
;
const
controlAnimation
=
{
animateName
:
'zoom-comb-left'
,
visible
:
!
planStarted
,
...
...
@@ -118,9 +122,15 @@ class MaskContent extends Component {
transitionAppear
:
true
}
};
const
messageEvent
=
{
hiddenScreenSaver
,
trigger
}
return
(
<
div
className
=
"mask-content"
>
<
AmosWebSocket
ref
=
{
node
=>
this
.
aws
=
node
}
url
=
{
wsURL
}
onMessage
=
{
this
.
handleData
}
reconnect
debug
/>
<
MQTTProvider
url
=
{
wsURL
}
>
<
MessageEvent
{...
messageEvent
}
/
>
<
/MQTTProvider
>
{
!
alarmStarted
&&
sideControlShow
&&
<
SideControl
multiple
=
{
multiple
}
errorAreaId
=
{
errorAreaId
}
onItemClick
=
{
onItemClick
}
layerConfig
=
{
layerConfig
}
animationProps
=
{
controlAnimation
}
activeAction
=
{
activeAction
}
/>
}
{
!
alarmStarted
&&
isShowActionBar
&&
<
SearchPane
visible
=
{
searchPaneVisible
}
focusPosition
=
{
focusPosition
}
changeSearchPaneVisible
=
{
this
.
changeSearchPaneVisible
}
/>
}
<
TopMsg
alarmStart
=
{
alarmStart
}
/
>
...
...
mods/components/3dviewConvertor/view/MessageEvent.js
0 → 100644
View file @
619ddce8
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
_amosTool
,
{
fastDeepEqual
}
from
'amos-tool'
;
import
globalMsg
from
'./pagefactory/msgFactory'
;
import
{
eventTopics
,
rulesDataFactory
}
from
'./consts'
;
import
{
withSubscribeMQTT
}
from
'amos-mqtt'
;
let
oldData
;
/**
* 订阅主题
*/
@
withSubscribeMQTT
({
topic
:
'/Amos-autosys/yinan/plan'
})
/**
* 消息组件
*
* @class MessageEvent
* @extends {Basic}
*/
class
MessageEvent
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{};
}
/**
* 获取订阅信息并修改
* @param {*} nextProps
*/
componentWillReceiveProps
({
data
})
{
if
(
data
)
{
const
{
msgType
,
msgContext
}
=
data
;
const
context
=
this
.
props
.
data
?
this
.
props
.
data
.
msgContext
:
null
;
const
{
hiddenScreenSaver
,
trigger
}
=
this
.
props
;
if
(
!
fastDeepEqual
(
msgContext
,
context
))
{
// 去掉全局消息 待规则调整后进行调试
// if (msgType === eventTopics.global_msg) {
// hiddenScreenSaver();
// globalMsg(msgContext);
// return;
// }
trigger
(
`
${
eventTopics
.
MQTT
}
.
${
msgType
}
`
,
data
);
}
}
}
render
()
{
return
(
<
div
/>
);
}
}
MessageEvent
.
propTypes
=
{
data
:
PropTypes
.
array
,
hiddenScreenSaver
:
PropTypes
.
func
,
trigger
:
PropTypes
.
func
};
export
default
MessageEvent
;
mods/components/3dviewConvertor/view/View3D.js
View file @
619ddce8
This diff is collapsed.
Click to expand it.
mods/components/3dviewConvertor/view/consts.js
View file @
619ddce8
...
...
@@ -36,6 +36,8 @@ export const pointTopicMapping = {
};
export
const
eventTopics
=
{
// mqtt 消息前缀
MQTT
:
'MQTT'
,
// 双屏通信主题
transtopic
:
'transtopic'
,
...
...
mods/components/3dviewConvertor/view/plan/AssistCard.js
View file @
619ddce8
...
...
@@ -33,12 +33,13 @@ class AssistCard extends Component{
render
()
{
const
{
display
,
data
}
=
this
.
state
;
let
titleStyle
=
`detailCardTitle-
${
data
.
icon
}
`
;
let
cls
=
pointIcon
[
data
.
icon
]
?
data
.
icon
:
'zhuyi'
;
let
titleStyle
=
`detailCardTitle-
${
cls
}
`
;
return
(
<
div
className
=
"detailCard"
>
<
div
className
=
{
titleStyle
}
>
<
Row
className
=
"cardRow"
>
<
Col
span
=
{
24
}
className
=
"cardCol"
><
img
src
=
{
pointIcon
[
data
.
icon
]}
className
=
"precontrol-assist-card-img"
/><
span
title
=
{
data
.
title
||
''
}
className
=
"cardTitleName"
>
{
data
.
title
||
''
}
<
/span></
Col
>
<
Col
span
=
{
24
}
className
=
"cardCol"
><
img
src
=
{
pointIcon
[
data
.
icon
]
||
pointIcon
[
'zhuyi'
]
}
className
=
"precontrol-assist-card-img"
/><
span
title
=
{
data
.
title
||
''
}
className
=
"cardTitleName"
>
{
data
.
title
||
''
}
<
/span></
Col
>
<
/Row
>
<
/div
>
<
div
className
=
{
display
?
"detailAssistCardContxt"
:
"detailAssistCardContxt-notDisplay"
}
>
...
...
mods/components/3dviewConvertor/view/preControl/monitor/MonitorView.js
View file @
619ddce8
...
...
@@ -116,7 +116,7 @@ class MonitorView extends Component {
}
MonitorView
.
propTypes
=
{
planStart
:
PropTypes
.
bool
,
//
planStart: PropTypes.bool,
// fireResourceData: PropTypes.object
};
...
...
mods/components/3dviewConvertor/view/preControl/steps/StepView.js
View file @
619ddce8
...
...
@@ -11,38 +11,36 @@ class StepView extends Component {
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
stepName
:
''
,
nextStepName
:
''
,
step
:
[],
display
:
'none'
};
}
componentDidMount
()
{
this
.
props
.
subscribe
(
eventTopics
.
stepArea_view
,
(
topic
,
content
)
=>
{
const
{
data
}
=
content
;
const
{
stepName
,
nextStepName
}
=
data
;
this
.
setState
({
stepName
,
nextStepName
,
display
:
''
});
const
{
preStep
,
step
}
=
content
;
this
.
setState
({
preStep
,
step
,
display
:
''
});
});
}
render
()
{
let
{
stepName
,
nextStepName
,
display
}
=
this
.
state
;
let
planEnd
=
step
Name
&&
!
nextStepNam
e
;
let
{
display
,
step
}
=
this
.
state
;
let
planEnd
=
step
.
length
>
1
?
false
:
tru
e
;
return
(
<
div
className
=
"precontrol-step-view"
style
=
{{
display
}}
>
{
!
planEnd
?
(
<
div
style
=
{{
height
:
'100%'
}}
>
<
Item
/>
<
Item
className
=
"previous-step"
dot
=
{
<
img
src
=
{
require
(
'./../../../assets/convertor/3dview/prePlan/buzhouqu-dangqianbu.png'
)}
alt
=
""
/>
}
><
p
>
{
stepName
}
<
/p></
Item
>
<
Item
className
=
"next-step"
dot
=
{
<
img
src
=
{
require
(
'./../../../assets/convertor/3dview/prePlan/buzhouqu-xiayibu.png'
)}
alt
=
""
/>
}
>
{
nextS
tepName
}
<
/Item
>
<
Item
className
=
"previous-step"
dot
=
{
<
img
src
=
{
require
(
'./../../../assets/convertor/3dview/prePlan/buzhouqu-dangqianbu.png'
)}
alt
=
""
/>
}
><
p
>
{
step
[
0
]
&&
step
[
0
].
stepName
}
<
/p></
Item
>
<
Item
className
=
"next-step"
dot
=
{
<
img
src
=
{
require
(
'./../../../assets/convertor/3dview/prePlan/buzhouqu-xiayibu.png'
)}
alt
=
""
/>
}
>
{
step
[
1
]
&&
step
[
1
].
s
tepName
}
<
/Item
>
<
/div
>
)
:
(
<
div
style
=
{{
height
:
'100%'
}}
>
<
Item
/>
<
Item
className
=
"previous-step"
dot
=
{
<
img
src
=
{
require
(
'../../../assets/convertor/3dview/prePlan/buzhouqu-dangqianbu.png'
)}
alt
=
""
/>
}
><
p
>
{
stepName
}
<
/p></
Item
>
<
Item
className
=
"previous-step"
dot
=
{
<
img
src
=
{
require
(
'../../../assets/convertor/3dview/prePlan/buzhouqu-dangqianbu.png'
)}
alt
=
""
/>
}
><
p
>
{
step
[
0
]
&&
step
[
0
].
stepName
}
<
/p></
Item
>
<
/div
>
)
}
...
...
mods/components/3dviewConvertor/view/preControl/topNews/TopView.js
View file @
619ddce8
...
...
@@ -4,7 +4,7 @@ import { Connect, Modal } from 'amos-framework';
import
{
CONSTS
}
from
'./../../../consts/storageConsts'
;
import
{
eventTopics
}
from
'../../consts'
;
import
{
tirggerTransTopic
}
from
'../../dataProcessor'
;
import
{
rul
eAction
}
from
'./../../../services/ruleService'
;
import
{
planClos
eAction
}
from
'./../../../services/ruleService'
;
const
eventConnect
=
Connect
.
eventConnect
;
const
closeImgPath
=
require
(
'./../../../assets/convertor/3dview/prePlan/dingbu-tuichu.png'
);
...
...
@@ -25,9 +25,9 @@ class TopView extends Component {
componentDidMount
()
{
this
.
props
.
subscribe
(
eventTopics
.
top_ae_msg
,
(
topic
,
data
)
=>
{
const
{
content
,
batchNo
,
contingencyPlanId
}
=
data
;
const
{
content
,
batchNo
}
=
data
;
this
.
props
.
planStart
(
data
);
this
.
setState
(
{
content
,
showContent
:
'block'
,
batchNo
,
contingencyPlanId
}
);
this
.
setState
(
{
content
,
showContent
:
'block'
,
batchNo
}
);
let
{
planStart
}
=
this
.
props
;
this
.
prepareChangeTimeText
(
planStart
);
});
...
...
@@ -50,13 +50,14 @@ class TopView extends Component {
// 执行删除逻辑
tirggerTransTopic
(
CONSTS
.
forward
,
{
details
:
{
type
:
'prePlan'
,
show
:
false
}
});
_this
.
props
.
planQuit
();
let
content
=
{
batchNo
:
_this
.
state
.
batchNo
,
stepCode
:
0
,
code
:
'FIRE_CANCEL'
,
requestUrl
:
'/api/timeline/fire'
,
contingencyPlanId
:
_this
.
state
.
contingencyPlanId
,
stepState
:
'B'
};
ruleAction
(
content
,
'CONFIRM'
).
then
(
e
=>
{
// let content = { batchNo: _this.state.batchNo,
// stepCode: 0,
// code: 'FIRE_CANCEL',
// requestUrl: '/api/timeline/fire',
// contingencyPlanId: _this.state.contingencyPlanId,
// stepState: 'B' };
const
{
batchNo
}
=
_this
.
state
;
planCloseAction
(
batchNo
,
0
,
'FIRE_CANCEL'
,
'CONFIRM'
,
'B'
).
then
(
e
=>
{
});
},
onCancel
()
{}
...
...
mods/components/3dviewConvertor/view/preControl/water/Water.js
View file @
619ddce8
...
...
@@ -209,7 +209,7 @@ class MonitorView extends Component {
}
MonitorView
.
propTypes
=
{
planStart
:
PropTypes
.
bool
,
// planStarted
: PropTypes.bool,
fireResourceData
:
PropTypes
.
object
};
...
...
mods/components/3dviewConvertor/view/reservePlan/EmptyPage.js
View file @
619ddce8
...
...
@@ -10,7 +10,7 @@ class EmptyPage extends Component {
onOpenButtonList
=
()
=>
{
const
{
openStepCxt
,
batchNo
}
=
this
.
props
;
batchNo
&&
openStepCxt
(
batchNo
);
openStepCxt
(
);
}
render
()
{
...
...
mods/components/3dviewConvertor/view/reservePlan/OperateButton.js
View file @
619ddce8
...
...
@@ -46,10 +46,10 @@ class OperateButton extends Component {
registerTimer
=
()
=>
{
this
.
timer
&&
clearTimeout
(
this
.
timer
);
const
{
message
=
{}
}
=
this
.
props
;
let
json
=
message
.
button
Json
?
JSON
.
parse
(
message
.
buttonJs
on
)
:
{};
let
json
=
message
.
button
?
JSON
.
parse
(
message
.
butt
on
)
:
{};
let
button
=
json
.
operate
[
0
]
||
[];
button
.
batchNo
=
message
.
batchNo
;
button
.
contingencyPlanId
=
message
.
c
ontingencyPlan
Id
;
button
.
contingencyPlanId
=
message
.
c
ase
Id
;
button
.
stepCode
=
json
.
stepCode
;
let
delayedArry
=
button
.
delayed
||
[];
if
(
delayedArry
.
includes
(
count
))
{
...
...
@@ -63,10 +63,10 @@ class OperateButton extends Component {
autoClick
=
()
=>
{
const
{
message
=
{}
}
=
this
.
props
;
let
json
=
message
.
button
Json
?
JSON
.
parse
(
message
.
buttonJs
on
)
:
{};
let
json
=
message
.
button
?
JSON
.
parse
(
message
.
butt
on
)
:
{};
let
button
=
json
.
operate
[
0
]
||
[];
button
.
batchNo
=
message
.
batchNo
;
button
.
contingencyPlanId
=
message
.
c
ontingencyPlan
Id
;
button
.
contingencyPlanId
=
message
.
c
ase
Id
;
button
.
stepCode
=
json
.
stepCode
;
this
.
props
.
onAutoClick
(
button
,
'CANCEL_'
+
button
.
hide
);
}
...
...
@@ -77,11 +77,11 @@ class OperateButton extends Component {
}
renderBtn
=
(
message
)
=>
{
let
json
=
message
.
button
Json
?
JSON
.
parse
(
message
.
buttonJs
on
)
:
{};
let
json
=
message
.
button
?
JSON
.
parse
(
message
.
butt
on
)
:
{};
let
btnList
=
json
.
operate
||
[];
if
(
btnList
&&
btnList
.
length
===
1
)
{
btnList
[
0
].
batchNo
=
message
.
batchNo
;
btnList
[
0
].
contingencyPlanId
=
message
.
c
ontingencyPlan
Id
;
btnList
[
0
].
contingencyPlanId
=
message
.
c
ase
Id
;
btnList
[
0
].
stepCode
=
json
.
stepCode
;
return
(
<
Button
className
=
"operate-button-button"
...
...
@@ -94,7 +94,7 @@ class OperateButton extends Component {
}
else
if
(
btnList
&&
btnList
.
length
===
2
)
{
return
(
btnList
||
[]).
map
(
btn
=>
{
btn
.
batchNo
=
message
.
batchNo
;
btn
.
contingencyPlanId
=
message
.
c
ontingencyPlan
Id
;
btn
.
contingencyPlanId
=
message
.
c
ase
Id
;
btn
.
stepCode
=
json
.
stepCode
;
return
<
Button
className
=
"operate-button-button"
...
...
@@ -110,8 +110,8 @@ class OperateButton extends Component {
render
()
{
const
{
message
=
{}
}
=
this
.
props
;
let
display
=
message
.
hiddPlanButton
?
'none'
:
''
;
let
url
=
opeateIcon
[
message
.
icon
];
let
json
=
message
.
button
Json
?
JSON
.
parse
(
message
.
buttonJs
on
)
:
{};
let
url
=
opeateIcon
[
message
.
icon
]
||
opeateIcon
[
'jiaohuqu-zhihuiquan'
]
;
let
json
=
message
.
button
?
JSON
.
parse
(
message
.
butt
on
)
:
{};
let
btnJsonArry
=
json
.
operate
||
[];
return
(
<
div
className
=
{
display
?
'operate-button-display-root'
:
'operate-button-root'
}
onClick
=
{
this
.
onOpenButtonList
}
style
=
{{
display
}}
>
...
...
@@ -120,7 +120,7 @@ class OperateButton extends Component {
<
div
className
=
'operate-button-content'
>
<
div
className
=
"button-name"
>
{
message
.
actionName
}
{
btnJsonArry
.
length
>
0
&&
btnJsonArry
[
0
].
hide
?
<
TimerTool
ref
=
{
timer
=>
this
[
message
.
c
ontingencyPlan
Id
]
=
timer
}
autoClick
=
{()
=>
this
.
hiddenButtonRoot
(
message
)}
delayed
=
{
btnJsonArry
[
0
].
hide
}
/> : ''
}
{
btnJsonArry
.
length
>
0
&&
btnJsonArry
[
0
].
hide
?
<
TimerTool
ref
=
{
timer
=>
this
[
message
.
c
ase
Id
]
=
timer
}
autoClick
=
{()
=>
this
.
hiddenButtonRoot
(
message
)}
delayed
=
{
btnJsonArry
[
0
].
hide
}
/> : ''
}
<
/div
>
<
div
className
=
"button-desc"
>
{
message
.
tips
}
<
/div
>
<
/div
>
...
...
mods/components/3dviewConvertor/view/reservePlan/index.js
View file @
619ddce8
...
...
@@ -15,6 +15,7 @@ const eventConnect = Connect.eventConnect;
const
recordType
=
'OPERATE'
;
const
confirmState
=
'CONFIRM'
;
let
batchNo
;
/**
*
...
...
@@ -43,6 +44,10 @@ class ReservePlan extends Component {
}
componentWillUnmount
()
{
batchNo
=
null
;
}
componentDidMount
(){
this
.
props
.
subscribe
(
eventTopics
.
optionArea_view
,
(
topic
,
data
)
=>
{
//按钮接收
this
.
readyOptionAreaData
(
data
);
...
...
@@ -90,7 +95,7 @@ class ReservePlan extends Component {
});
}
getPlanExeRecord
=
(
batchNo
)
=>
{
getPlanExeRecord
=
()
=>
{
batchNo
&&
this
.
refshTimeLine
(
batchNo
);
}
...
...
@@ -100,10 +105,10 @@ class ReservePlan extends Component {
if
(
cxtArry
.
length
===
0
)
{
cxtArry
.
push
(
data
);
}
else
{
const
index
=
cxtArry
.
findIndex
(
item
=>
item
.
c
ontingencyPlan
Id
===
data
.
contingencyPlanId
);
const
index
=
cxtArry
.
findIndex
(
item
=>
item
.
c
ase
Id
===
data
.
contingencyPlanId
);
if
(
index
<
0
)
{
newArry
=
cxtArry
.
map
(
item
=>
{
if
((
JSON
.
parse
(
item
.
button
Json
)
||
{}).
stepCode
!==
(
JSON
.
parse
(
data
.
buttonJs
on
)
||
{}).
stepCode
)
{
if
((
JSON
.
parse
(
item
.
button
)
||
{}).
stepCode
!==
(
JSON
.
parse
(
data
.
butt
on
)
||
{}).
stepCode
)
{
item
.
hiddPlanButton
=
true
;
}
return
item
;
...
...
@@ -139,14 +144,14 @@ class ReservePlan extends Component {
this
.
setState
({
expanded
:
false
});
}
openStepCxt
=
(
batchNo
)
=>
{
this
.
getPlanExeRecord
(
batchNo
);
//查询数据
openStepCxt
=
()
=>
{
this
.
getPlanExeRecord
();
//查询数据
}
hiddPlanRoot
=
(
content
)
=>
{
const
{
cxtArry
}
=
this
.
state
;
cxtArry
.
map
(
cxt
=>
{
if
(
cxt
.
c
ontingencyPlan
Id
===
content
.
contingencyPlanId
)
{
if
(
cxt
.
c
ase
Id
===
content
.
contingencyPlanId
)
{
cxt
.
hiddPlanButton
=
true
;
}
return
cxt
;
...
...
@@ -154,9 +159,9 @@ class ReservePlan extends Component {
let
exixtButtonArry
=
cxtArry
.
filter
(
item
=>!
item
.
hiddPlanButton
);
let
lastStep
=
[];
if
(
exixtButtonArry
.
length
===
0
)
{
lastStep
=
cxtArry
.
filter
(
item
=>
parseInt
((
JSON
.
parse
(
item
.
button
Json
)
||
{}).
stepCode
)
===
parseInt
((
JSON
.
parse
(
content
.
buttonJson
)
||
{}).
stepCode
)
-
1
&&
(
JSON
.
parse
(
item
.
buttonJs
on
)
||
{}).
operate
[
0
].
hide
);
//上一步挂起的按钮
lastStep
=
cxtArry
.
filter
(
item
=>
parseInt
((
JSON
.
parse
(
item
.
button
)
||
{}).
stepCode
)
===
parseInt
((
JSON
.
parse
(
content
.
button
)
||
{}).
stepCode
)
-
1
&&
(
JSON
.
parse
(
item
.
butt
on
)
||
{}).
operate
[
0
].
hide
);
//上一步挂起的按钮
lastStep
.
length
>
0
&&
cxtArry
.
forEach
(
item
=>
{
if
(
parseInt
((
JSON
.
parse
(
item
.
button
Json
)
||
{}).
stepCode
)
===
parseInt
((
JSON
.
parse
(
content
.
buttonJson
)
||
{}).
stepCode
)
-
1
&&
(
JSON
.
parse
(
item
.
buttonJs
on
)
||
{}).
operate
[
0
].
hide
){
if
(
parseInt
((
JSON
.
parse
(
item
.
button
)
||
{}).
stepCode
)
===
parseInt
((
JSON
.
parse
(
content
.
button
)
||
{}).
stepCode
)
-
1
&&
(
JSON
.
parse
(
item
.
butt
on
)
||
{}).
operate
[
0
].
hide
){
item
.
hiddPlanButton
=
false
;
}
});
...
...
@@ -168,19 +173,19 @@ class ReservePlan extends Component {
dealCxtArryAfterClick
=
(
content
)
=>
{
const
{
cxtArry
}
=
this
.
state
;
const
index
=
cxtArry
.
findIndex
(
item
=>
item
.
c
ontingencyPlan
Id
===
content
.
contingencyPlanId
);
const
index
=
cxtArry
.
findIndex
(
item
=>
item
.
c
ase
Id
===
content
.
contingencyPlanId
);
index
>
-
1
?
cxtArry
.
splice
(
index
,
1
)
:
''
;
//删除点击过的数据
let
exixtButtonArry
=
cxtArry
.
filter
(
item
=>!
item
.
hiddPlanButton
);
let
lastStep
=
[];
if
(
parseInt
(
content
.
stepCode
)
===
9
)
{
if
(
parseInt
(
content
.
stepCode
)
===
14
)
{
this
.
setState
({
cxtArry
,
isShowOver
:
false
,
display
:
'none'
});
}
else
{
if
(
cxtArry
.
length
>
0
&&
exixtButtonArry
.
length
>
0
)
{
this
.
setState
({
cxtArry
,
isShowOver
:
false
});
}
else
if
(
cxtArry
.
length
>
0
&&
exixtButtonArry
.
length
===
0
)
{
lastStep
=
cxtArry
.
filter
(
item
=>
parseInt
((
JSON
.
parse
(
item
.
button
Json
)
||
{}).
stepCode
)
===
parseInt
(
content
.
stepCode
)
-
1
&&
(
JSON
.
parse
(
item
.
buttonJs
on
)
||
{}).
operate
[
0
].
hide
);
//上一步挂起的按钮
lastStep
=
cxtArry
.
filter
(
item
=>
parseInt
((
JSON
.
parse
(
item
.
button
)
||
{}).
stepCode
)
===
parseInt
(
content
.
stepCode
)
-
1
&&
(
JSON
.
parse
(
item
.
butt
on
)
||
{}).
operate
[
0
].
hide
);
//上一步挂起的按钮
lastStep
.
length
>
0
&&
cxtArry
.
forEach
(
item
=>
{
if
(
parseInt
((
JSON
.
parse
(
item
.
button
Json
)
||
{}).
stepCode
)
===
parseInt
(
content
.
stepCode
)
-
1
&&
(
JSON
.
parse
(
item
.
buttonJs
on
)
||
{}).
operate
[
0
].
hide
){
if
(
parseInt
((
JSON
.
parse
(
item
.
button
)
||
{}).
stepCode
)
===
parseInt
(
content
.
stepCode
)
-
1
&&
(
JSON
.
parse
(
item
.
butt
on
)
||
{}).
operate
[
0
].
hide
){
item
.
hiddPlanButton
=
false
;
}
});
...
...
@@ -193,7 +198,8 @@ class ReservePlan extends Component {
renderInteractiveZone
=
(
cxtArry
)
=>
{
return
cxtArry
.
map
(
e
=>
{
return
<
OperateButton
message
=
{
e
}
key
=
{
e
.
contingencyPlanId
}
hiddPlanRoot
=
{
this
.
hiddPlanRoot
}
onButtonClick
=
{
this
.
onButtonClick
}
onAutoClick
=
{
this
.
onAutoClick
}
openStepCxt
=
{()
=>
this
.
openStepCxt
(
e
.
batchNo
)}
/>
;
batchNo
=
e
.
batchNo
;
return
<
OperateButton
message
=
{
e
}
key
=
{
e
.
caseId
}
hiddPlanRoot
=
{
this
.
hiddPlanRoot
}
onButtonClick
=
{
this
.
onButtonClick
}
onAutoClick
=
{
this
.
onAutoClick
}
openStepCxt
=
{()
=>
this
.
openStepCxt
(
e
.
batchNo
)}
/>
;
});
}
...
...
mods/components/3dviewConvertor/view/ruleActionView.js
View file @
619ddce8
...
...
@@ -6,7 +6,7 @@ import { desigerHelperConfig } from './conf';
const
typeEum
=
{
picture1
:
'电源负荷图'
,
picture2
:
'电缆沟封堵图'
,
picture3
:
'消防车进站行车路线图'
,
picture4
:
'消防取水图'
};
const
parseTroubleMarkers
=
(
instance
,
content
,
markers
)
=>
{
//处理设备报警:切换图层到探测器、显示报警的探测器(闪烁-报警,不闪烁-报警解除)
const
{
type
,
fireEquipmentId
:
id
,
equipmentName
:
title
}
=
content
.
contingencyRo
;
//数据结构待定
const
{
type
,
fireEquipmentId
:
id
,
equipmentName
:
title
}
=
content
;
//数据结构待定
const
markersArr
=
markers
[
type
]
||
[];
if
(
markersArr
.
length
>
0
){
let
needUpdate
=
false
;
...
...
@@ -38,14 +38,14 @@ const parseTroubleMarkers = (instance,content,markers)=> {//处ç†è®¾å¤‡æŠ¥è¦ï¼
};
export
const
assembleTroubleView
=
(
instance
,
content
,
markers
)
=>
{
//跳转最佳视角,冒泡显示重点设备名称
if
(
void
0
===
content
||
void
0
===
content
.
contingencyRo
||
void
0
===
content
.
contingencyRo
.
fireEquipmentPosition
)
{
if
(
void
0
===
content
||
void
0
===
content
||
void
0
===
content
.
fireEquipmentPosition
)
{
return
;
}
let
equipCameraObj
=
new
Object
();
equipCameraObj
.
position
=
content
.
contingencyRo
.
fireEquipmentPosition
.
split
(
','
);
equipCameraObj
.
position
=
content
.
fireEquipmentPosition
.
split
(
','
);
// instance.cameraFactory.flyTo(equipCameraObj);
instance
.
focusPosition
(
content
.
contingencyRo
.
fireEquipmentPosition
.
split
(
','
));
const
{
fireEquipmentId
,
type
=
'monitorEquipment'
,
equipmentId
,
equipmentName
}
=
content
.
contingencyRo
;
//数据结构待定
instance
.
focusPosition
(
content
.
fireEquipmentPosition
.
split
(
','
));
const
{
fireEquipmentId
,
type
=
'monitorEquipment'
,
equipmentId
,
equipmentName
}
=
content
;
//数据结构待定
const
markersArr
=
markers
[
type
]
||
[];
if
(
markersArr
.
length
>
0
){
let
needUpdate
=
false
;
...
...
@@ -77,7 +77,7 @@ export const executorRecord = (instance,content)=>{//å³ä¾§æŒ‰ç…§æ—¶é—´å€’噿˜
};
const
dealEquipReleteCameraOpen
=
(
instance
,
content
,
markers
)
=>
{
//3d显示重点设备配套的摄像头图标及编号
const
{
type
,
cameraIds
}
=
content
.
contingencyRo
;
//数据结构待定
const
{
type
,
cameraIds
}
=
content
;
//数据结构待定
let
arry
=
cameraIds
?
cameraIds
.
split
(
','
)
:
[];
//摄像头数组
const
oldMarkers
=
instance
.
state
.
markers
;
const
{
monitorEquipment
=
[]
}
=
oldMarkers
||
{};
...
...
@@ -282,7 +282,7 @@ export const dealTroubleMarkers = (instance, content) => {
let
markers
=
{};
const
type
=
'monitorEquipment'
;
hiddenFireTruckRoute
(
instance
);
content
.
contingencyRo
.
type
=
type
;
content
.
type
=
type
;
initView3DAction
(
type
,
''
,
false
).
then
(
d
=>
{
markers
[
type
]
=
d
;
parseTroubleMarkers
(
instance
,
content
,
markers
);
...
...
@@ -349,7 +349,7 @@ export const flickerTroubleMarkers = (instance, content) => {
export
const
equipReleteCameraOpen
=
(
instance
,
content
)
=>
{
let
markers
=
{};
let
type
=
'video'
;
content
.
contingencyRo
.
type
=
type
;
content
.
type
=
type
;
initView3DAction
(
type
,
''
,
false
).
then
(
d
=>
{
markers
[
type
]
=
d
;
dealEquipReleteCameraOpen
(
instance
,
content
,
markers
);
...
...
@@ -357,13 +357,13 @@ export const equipReleteCameraOpen = (instance, content) => {
};
export
const
changeGoodView
=
(
instance
,
content
)
=>
{
if
(
void
0
===
content
||
void
0
===
content
.
contingencyRo
)
{
if
(
void
0
===
content
||
void
0
===
content
)
{
return
;
}
const
equipCameraEffect
=
{};
const
defaultPosition
=
'44.23,395.41,296.57'
;
const
defaultRotation
=
'-0.93,-0.01,-0.01'
;
equipCameraEffect
.
position
=
(
content
.
contingencyRo
.
fireEquipmentPosition
||
defaultPosition
).
split
(
','
);
equipCameraEffect
.
position
=
(
content
.
fireEquipmentPosition
||
defaultPosition
).
split
(
','
);
// equipCameraEffect.rotation = (content.contingencyRo.rotation || defaultRotation).split(',');
equipCameraEffect
.
duration
=
5000
;
instance
.
cameraFactory
.
flyTo
(
equipCameraEffect
);
...
...
@@ -411,7 +411,7 @@ const parseFireTruckMarkers = (instance, content, markers) => {// 3Dç•Œé¢æ¶ˆé˜²
};
const
parseMatchFireEquipMarkers
=
(
instance
,
content
,
markers
)
=>
{
// 3D界面显示着火重点设备配套的消防设施
const
{
equipmentId
}
=
content
.
contingencyRo
;
//数据结构待定
const
{
equipmentId
}
=
content
;
//数据结构待定
getMatchEquipmentListAction
([],
equipmentId
,
-
1
,
-
1
).
then
(
data
=>
{
let
matchEquipIds
=
[];
data
.
content
.
map
(
item
=>
matchEquipIds
.
push
(
item
.
id
));
...
...
mods/components/3dviewConvertor/view/sideControl/TopMsg.js
View file @
619ddce8
...
...
@@ -42,7 +42,7 @@ class TopMsg extends Component {
<
div
className
=
"precontrol-top-view"
style
=
{{
display
:
this
.
state
.
showContent
}}
>
<
div
className
=
"top-view-2"
>
<
div
className
=
"text-content-alarm"
>
{
this
.
state
.
content
}
{
this
.
state
.
content
.
content
}
<
/div
>
<
/div
>
<
/div
>
...
...
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