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
23356c33
Commit
23356c33
authored
Jun 05, 2020
by
张博
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
8d3a5c84
2ec8b905
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
127 additions
and
83 deletions
+127
-83
imgStatic.js
mods/components/3dviewConvertor/consts/imgStatic.js
+8
-4
urlConsts.js
mods/components/3dviewConvertor/consts/urlConsts.js
+1
-0
panoramicService.js
mods/components/3dviewConvertor/services/panoramicService.js
+9
-0
PointsPool.js
mods/components/3dviewConvertor/view/PointsPool.js
+0
-1
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+0
-0
conf.js
mods/components/3dviewConvertor/view/conf.js
+4
-0
ExceptionArea.js
...nents/3dviewConvertor/view/exceptionArea/ExceptionArea.js
+3
-3
PointLeftTree.js
...3dviewConvertor/view/moduleEditComponent/PointLeftTree.js
+7
-6
RightEditRegionPanel.js
...onvertor/view/moduleEditComponent/RightEditRegionPanel.js
+45
-32
EquipStatusList.js
...ewConvertor/view/panoramic/statistical/EquipStatusList.js
+6
-1
marker3DFactory.js
...components/3dviewConvertor/view/points/marker3DFactory.js
+44
-36
No files found.
mods/components/3dviewConvertor/consts/imgStatic.js
View file @
23356c33
...
...
@@ -238,12 +238,17 @@ export const marker3DIoncMapper = {
export
const
safetyIndexIconMapper
=
{
allEror
:
'/mods/components/3dviewConvertor/threeres/markers/exception_all
@2x
.png'
,
allEror
:
'/mods/components/3dviewConvertor/threeres/markers/exception_all.png'
,
faultEror
:
'/mods/components/3dviewConvertor/threeres/markers/exception_fault.png'
,
riskEror
:
'/mods/components/3dviewConvertor/threeres/markers/exception_risk.png'
,
transparent_rpn
:
require
(
'./../threeres/markers/transparent_rpn.png'
)
};
export
const
markerTitleBgMapper
=
{
base
:
require
(
'../assets/convertor/3dview/markers/markerTitle.png'
)
};
\ No newline at end of file
base
:
'/mods/components/3dviewConvertor/assets/convertor/3dview/markers/markerTitle.png'
};
export
const
equipStatusIconMapper
=
{
equip_false
:
'/mods/components/3dviewConvertor/assets/convertor/3dview/markers/pa-0.png'
,
equip_true
:
'/mods/components/3dviewConvertor/assets/convertor/3dview/markers/pa-1.png'
};
mods/components/3dviewConvertor/consts/urlConsts.js
View file @
23356c33
...
...
@@ -62,6 +62,7 @@ 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}'
)
//查询区域下点
};
export
const
FasSerUrl
=
{
...
...
mods/components/3dviewConvertor/services/panoramicService.js
View file @
23356c33
...
...
@@ -66,3 +66,12 @@ export const exceptionRegionListAction = ()=>{
return
commonGet
(
FscSerUrl
.
exceptionRegionListUrl
);
};
/**
* 区域下点查询
* @param {number} regionId
*/
export
const
getPointsByRegionIdAction
=
(
regionId
)
=>
{
const
url
=
formatUrl
(
FscSerUrl
.
listPointsByRegionIdUrl
,
{
regionId
});
return
commonGet
(
url
);
};
mods/components/3dviewConvertor/view/PointsPool.js
View file @
23356c33
...
...
@@ -115,7 +115,6 @@ class PointsPool extends Component {
isEditMode
=
{
this
.
props
.
isEditMode
}
addMarker
=
{
this
.
addMarker
}
stagePilot
=
{
this
.
props
.
stagePilot
}
editFlag
=
{
this
.
props
.
editFlag
}
selectPoints
=
{
this
.
props
.
selectPoints
}
/
>
{
/* <PatrolPoint
...
...
mods/components/3dviewConvertor/view/View3D.js
View file @
23356c33
This diff is collapsed.
Click to expand it.
mods/components/3dviewConvertor/view/conf.js
View file @
23356c33
...
...
@@ -362,6 +362,10 @@ export const desigerHelperConfig = {
},
objAnchor
:
{
position
:
[
0
,
5
,
0
]
},
verticalCameraEffect
:
{
position
:
[
2.3815615940156256
,
419.57425506421896
,
11.965199740306224
],
target
:
[
2.408441971875859
,
1.3271790975878637
,
3.918674823963386
]
}
};
...
...
mods/components/3dviewConvertor/view/exceptionArea/ExceptionArea.js
View file @
23356c33
...
...
@@ -52,9 +52,9 @@ class ExceptionArea extends Component {
obj
.
baseObjHelper
.
titleConfig
=
{
// 顶牌平面参数
planeOptions
:
{
width
:
4
0
,
height
:
4
0
,
position
:
[
0
,
4
,
0
],
width
:
2
0
,
height
:
2
0
,
position
:
[
0
,
2
,
0
],
doubleSide
:
true
},
canvasOptions
:
{
...
...
mods/components/3dviewConvertor/view/moduleEditComponent/PointLeftTree.js
View file @
23356c33
...
...
@@ -62,14 +62,14 @@ class PointLeftTree extends Component {
this
.
setState
({
treeData
,
treeDataList
,
pointTypeArr
,
pointType
:
pointTypeArr
[
0
]?
pointTypeArr
[
0
].
code
:
''
//
pointTypeArr,
//
pointType: pointTypeArr[0]?pointTypeArr[0].code:''
})
}
onSelectChange
=
(
value
,
item
)
=>
{
console
.
log
(
value
,
item
);
this
.
s
tate
.
pointType
=
value
;
this
.
s
etState
({
pointType
:
value
})
this
.
props
.
pointTypeChange
(
value
);
}
onSearchChange
=
e
=>
{
...
...
@@ -190,14 +190,15 @@ class PointLeftTree extends Component {
<
div
className
=
"leftTree"
>
<
div
className
=
'leftContainer'
>
<
div
className
=
'topForm'
>
{(
pointType
!=
''
)
&&
<
Select
onChange
=
{
this
.
onSelectChange
}
defaultValue
=
{
pointType
}
className
=
'leftSelect'
>
{(
pointType
!=
''
)
&&
<
Select
onChange
=
{
this
.
onSelectChange
}
defaultValue
=
{
pointType
}
value
=
{
pointType
}
className
=
'leftSelect'
>
{
pointTypeArr
.
map
(
item
=>
{
return
(
<
Option
value
=
{
item
.
code
}
>
{
item
.
name
}
<
/Option>
)
})
}
<
/Select>
}
<
/Select
>
}
<
Search
className
=
'leftSearch'
icon
=
"search"
onChange
=
{
this
.
onSearchChange
}
onIconClick
=
{
this
.
onSearchChange
}
/
>
<
/div
>
...
...
mods/components/3dviewConvertor/view/moduleEditComponent/RightEditRegionPanel.js
View file @
23356c33
...
...
@@ -15,43 +15,50 @@ const RadioGroup = Radio.Group;
class
RightEditRegionPanel
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
form
:
{
}
,
rules
:
{},
treeDetailData
:[]
form
:
{
},
rules
:
{},
treeDetailData
:[]
,
detailData
:
{},
heightInput
:
0
};
}
componentDidMount
()
{
console
.
log
(
JSON
.
stringify
(
this
.
props
.
detailData
))
// getAreaTreeDetailAction().then(data => {
// console.log(data);
// this.setState({
// treeDetailData:data || []
// })
// this.props.getAreaData(data || [])
// })
console
.
log
(
JSON
.
stringify
(
this
.
props
.
detailData
))
const
{
detailData
,
routePathData
}
=
this
.
props
;
this
.
mergeDetailData
(
detailData
,
routePathData
);
}
componentWillUnmount
()
{
}
componentWillReceiveProps
(
nextProps
)
{
console
.
log
(
nextProps
)
let
{
treeData
,
pointTypeArr
}
=
nextProps
;
// this.setState({
console
.
log
(
nextProps
)
// if(this.props.detailData != nextProps.detailData || this.props.routePathData != nextProps.routePathData){
let
{
detailData
,
routePathData
}
=
nextProps
;
this
.
mergeDetailData
(
detailData
,
routePathData
);
// }
}
// })
mergeDetailData
=
(
detailData
,
routePathData
)
=>
{
let
{
heightInput
}
=
this
.
state
;
const
{
rightHeight
}
=
this
.
props
;
routePathData
&&
routePathData
.
forEach
(
r
=>
{
if
(
r
.
riskSourceId
===
detailData
.
id
){
detailData
.
routePath
=
r
.
routePath
;
}
});
heightInput
=
detailData
&&
detailData
.
routePath
&&
detailData
.
routePath
!=
''
&&
JSON
.
parse
(
detailData
.
routePath
).
regionHeigth
||
rightHeight
;
this
.
setState
({
detailData
,
heightInput
});
}
onChange
=
(
key
,
e
)
=>
{
const
value
=
e
.
target
.
value
;
const
newForm
=
Object
.
assign
({},
this
.
state
.
form
,
{
[
key
]:
value
});
this
.
setState
({
form
:
newForm
form
:
newForm
,
heightInput
:
value
});
}
onRadioChange
=
(
value
)
=>
{
...
...
@@ -67,15 +74,9 @@ class RightEditRegionPanel extends Component {
});
}
handleSubmit
=
(
e
)
=>
{
// e.preventDefault();
const
{
detailData
}
=
this
.
props
const
{
detailData
}
=
this
.
state
;
this
.
form
.
validate
((
valid
,
dataValues
,
errors
)
=>
{
console
.
log
(
'返回内容:'
,
dataValues
,
valid
,
errors
);
if
(
valid
)
{
...
...
@@ -83,10 +84,19 @@ class RightEditRegionPanel extends Component {
let
routePathData
=
[
{
riskSourceId
:
detailData
.
id
,
routePath
:
JSON
.
stringify
({
routePath
:
detailData
.
routePath
,
routePath
:
JSON
.
parse
(
detailData
.
routePath
)
.
routePath
,
regionHeigth
:
parseFloat
(
dataValues
.
positionZ
)
})}]
this
.
props
.
saveRoutePath
(
routePathData
)
// this.props.saveRoutePath(routePathData)
let
routePathDataNode
=
{
riskSourceId
:
detailData
.
id
,
routePath
:
JSON
.
stringify
({
routePath
:
JSON
.
parse
(
detailData
.
routePath
).
routePath
,
regionHeigth
:
parseFloat
(
dataValues
.
positionZ
)
})
}
this
.
props
.
changeRoutePath
(
routePathDataNode
);
}
else
{
console
.
log
(
'error submit!!'
);
return
false
;
...
...
@@ -95,8 +105,8 @@ class RightEditRegionPanel extends Component {
}
render
()
{
let
{
rules
,
form
,
pointTypeArr
,
pointType
,
}
=
this
.
state
;
let
{
pageType
,
detailData
,
rightHeight
}
=
this
.
props
;
let
{
rules
,
form
,
pointTypeArr
,
pointType
,
detailData
,
heightInput
}
=
this
.
state
;
let
{
pageType
,
rightHeight
}
=
this
.
props
;
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
28
},
...
...
@@ -174,7 +184,10 @@ class RightEditRegionPanel extends Component {
</div> */
}
<
div
className
=
'positionItem'
>
<
FormItem
label
=
"高"
field
=
"positionZ"
{...
formItemLayout
}
>
<
Input
placeholder
=
{
rightHeight
}
onChange
=
{(
e
)
=>
this
.
onChange
(
'positionZ'
,
e
)}
/
>
<
Input
placeholder
=
{
detailData
.
routePath
&&
JSON
.
parse
(
detailData
.
routePath
).
regionHeigth
||
rightHeight
}
value
=
{
heightInput
}
onChange
=
{(
e
)
=>
this
.
onChange
(
'positionZ'
,
e
)}
/
>
{
/* <Input value={detailData.ue4Location && detailData.ue4Location[2]} /> */
}
<
/FormItem
>
<
/div
>
...
...
mods/components/3dviewConvertor/view/panoramic/statistical/EquipStatusList.js
View file @
23356c33
import
React
,
{
Component
}
from
'react'
;
import
{
equipStatusListAction
}
from
'./../../../services/panoramicService'
;
import
{
equipStatusIconMapper
}
from
'./../../../consts/imgStatic'
;
const
getIcon
=
(
status
)
=>
{
return
equipStatusIconMapper
[
`equip_
${
status
}
`
];
};
/**
* 设备状态消息
*/
...
...
@@ -32,7 +37,7 @@ export default class EquipStatusList extends Component {
return
(
<
div
key
=
{
item
.
id
}
className
=
"title-child"
>
<
div
className
=
"title-date"
>
{
item
.
changeDate
}
<
/div
>
<
div
className
=
"title-text"
>
{
item
.
label
}
<
/div
>
<
div
className
=
"title-text"
>
{
item
.
label
}
&
nbsp
;
&
nbsp
;
<
img
src
=
{
getIcon
(
item
.
status
)}
alt
=
""
/>
<
/div
>
<
/div
>
);
})
...
...
mods/components/3dviewConvertor/view/points/marker3DFactory.js
View file @
23356c33
...
...
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import
{
utils
}
from
'amos-tool'
;
import
{
Markers
}
from
'amos-3d/lib/designer'
;
import
{
BaseObjHelper
}
from
'base-r3d/lib/factory'
;
import
formatUrl
from
'amos-processor/lib/utils/urlFormat'
;
import
{
CONSTS
}
from
'./../../consts/storageConsts'
;
import
PointDialog
from
'./PointDialog'
;
import
{
tirggerPlanTopic
}
from
'./../dataProcessor'
;
...
...
@@ -17,29 +18,6 @@ const getIcon = (markerType, level) => {
return
marker3DIoncMapper
[
`
${
markerType
}
`
]
};
const
buildMarkerOptions
=
(
markers
,
markerType
,
defaultParams
=
{})
=>
{
if
(
!
utils
.
isEmpty
(
markers
)){
markers
.
forEach
(
m
=>
{
const
url
=
getIcon
(
markerType
,
m
.
level
);
let
position
;
if
(
!
utils
.
isArray
(
m
.
position
)){
position
=
Object
.
values
(
m
.
position
);
}
for
(
let
k
of
Object
.
keys
(
defaultParams
))
{
m
[
k
]
=
defaultParams
[
k
];
}
m
.
key
=
m
.
key
||
m
.
id
;
m
.
url
=
url
;
m
.
position
=
utils
.
isArray
(
m
.
position
)
?
m
.
position
:
position
;
m
.
size
=
10
;
m
.
name
=
m
.
name
?
m
.
name
:
m
.
label
;
m
.
label
=
null
;
// m.label = createMarkerLabel(m.name);
});
}
return
markers
;
};
const
createMarkerLabel
=
(
text
)
=>
{
const
div
=
document
.
createElement
(
'div'
);
div
.
style
.
position
=
'absolute'
;
...
...
@@ -100,7 +78,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
}
componentWillReceiveProps
=
nextProps
=>
{
if
(
nextProps
.
editFlag
){
if
(
nextProps
.
isEditMode
){
this
.
markersCache
.
eachValue
(
obj
=>
{
this
.
setTopCardConf
(
obj
,
obj
.
extData
);
if
(
nextProps
.
selectPoints
.
type
==
obj
.
extData
.
type
&&
nextProps
.
selectPoints
.
id
==
obj
.
extData
.
id
){
...
...
@@ -130,9 +108,6 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
onMarkerClick
=
(
marker
,
e
)
=>
{
const
{
isClick
}
=
this
.
state
;
if
(
this
.
props
.
editFlag
){
return
false
}
if
(
this
.
props
.
isEditMode
)
{
return
false
}
...
...
@@ -159,14 +134,13 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
}
}
markerCreated
=
({
markersCache
})
=>
{
let
{
editFlag
,
selectKey
,
stagePilot
}
=
this
.
props
let
{
isEditMode
,
selectKey
}
=
this
.
props
this
.
markersCache
=
markersCache
;
this
.
stagePilot
=
stagePilot
;
this
.
stagePilot
=
this
.
props
.
stagePilot
;
this
.
outlineHelper
=
this
.
stagePilot
?
this
.
stagePilot
.
outlineHelper
:
undefined
;
markersCache
.
eachValue
(
obj
=>
{
this
.
setTopCardConf
(
obj
,
obj
.
extData
);
if
(
obj
.
extData
.
type
===
"riskSource"
&&
markerType
!=
'impEquipmentMode'
&&
!
editFlag
){
if
(
obj
.
extData
.
type
===
"riskSource"
&&
markerType
!=
'impEquipmentMode'
&&
!
isEditMode
){
this
.
setTwinkleConf
(
obj
);
}
});
...
...
@@ -192,17 +166,17 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
obj
.
baseObjHelper
.
titleConfig
=
{
// 顶牌平面参数
planeOptions
:
{
width
:
3
0
,
height
:
15
,
width
:
4
0
,
height
:
20
,
position
:
[
0
,
20
,
0
],
doubleSide
:
true
},
canvasOptions
:
{
font
:
'
34
px Microsoft YaHei'
,
font
:
'
28
px Microsoft YaHei'
,
fillStyle
:
'white'
,
textBaseline
:
'middle'
,
textAlign
:
'center'
,
textX
:
128
,
textX
:
128
},
imgWidth
:
256
,
imgHeight
:
128
,
...
...
@@ -217,12 +191,46 @@ export default function marker3DFactory(WrappedComponent = 'div', options){
obj
.
baseObjHelper
.
title
=
cardTitle
;
}
buildMarkerOptions
=
(
markers
,
markerType
,
defaultParams
=
{})
=>
{
const
{
isEditMode
}
=
this
.
props
;
if
(
!
utils
.
isEmpty
(
markers
)){
markers
.
forEach
(
m
=>
{
const
url
=
getIcon
(
markerType
,
m
.
level
);
let
position
;
if
(
!
utils
.
isArray
(
m
.
position
)){
position
=
Object
.
values
(
m
.
position
);
}
for
(
let
k
of
Object
.
keys
(
defaultParams
))
{
if
((
markerType
===
'riskSource'
||
markerType
===
'patrol'
)
&&
k
!=
'useModel'
&&
!
isEditMode
){
m
[
k
]
=
formatUrl
(
defaultParams
[
k
],
{
url
:
`
${
markerType
}
-
${
m
.
level
}
`
});
}
else
if
((
markerType
===
'riskSource'
||
markerType
===
'patrol'
)
&&
k
!=
'useModel'
&&
isEditMode
){
if
(
markerType
===
'riskSource'
){
m
[
k
]
=
formatUrl
(
defaultParams
[
k
],
{
url
:
`
${
markerType
}
-4`
});
}
else
{
m
[
k
]
=
formatUrl
(
defaultParams
[
k
],
{
url
:
`
${
markerType
}
-1`
});
}
}
else
{
m
[
k
]
=
defaultParams
[
k
];
}
}
m
.
key
=
m
.
key
||
m
.
id
;
m
.
url
=
url
;
m
.
position
=
utils
.
isArray
(
m
.
position
)
?
m
.
position
:
position
;
m
.
size
=
10
;
m
.
name
=
m
.
name
?
m
.
name
:
m
.
label
;
m
.
label
=
null
;
// m.label = createMarkerLabel(m.name);
});
}
return
markers
;
};
render
()
{
const
{
markers
,
...
rest
}
=
this
.
props
;
const
{
planStarted
}
=
this
.
state
;
let
dialogStyle
=
{
zIndex
:
1000
};
const
result
=
buildMarkerOptions
(
markers
,
markerType
,
markerParams
);
const
result
=
this
.
buildMarkerOptions
(
markers
,
markerType
,
markerParams
);
return
(
<
WrappedComponent
>
<
Markers
...
...
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