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
23897607
Commit
23897607
authored
Jun 05, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1,修改缺陷
parent
b6f728ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
47 deletions
+54
-47
imgStatic.js
mods/components/3dviewConvertor/consts/imgStatic.js
+5
-0
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+43
-46
EquipStatusList.js
...ewConvertor/view/panoramic/statistical/EquipStatusList.js
+6
-1
No files found.
mods/components/3dviewConvertor/consts/imgStatic.js
View file @
23897607
...
...
@@ -247,3 +247,8 @@ export const safetyIndexIconMapper = {
export
const
markerTitleBgMapper
=
{
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/view/View3D.js
View file @
23897607
...
...
@@ -2,11 +2,10 @@ import React, { Component } from 'react';
import
PropTypes
from
'prop-types'
;
import
{
utils
,
UUID
,
deepCopy
}
from
'amos-tool'
;
import
{
PubSub
}
from
'ray-eventpool'
;
import
{
Connect
as
UIConnect
,
Modal
,
message
,
AmosAlert
,
Toas
t
}
from
'amos-framework'
;
import
{
Connect
as
UIConnect
,
message
,
AmosAler
t
}
from
'amos-framework'
;
import
{
FatLine
}
from
'amos-3d/lib/advanced'
;
import
A3DDesigner
,
{
Connect
,
FireObject
,
DESIGNER_CONSTS
,
PolygonRegion
}
from
'amos-3d/lib/designer'
;
import
WorkerObjContent
from
'amos-3d/lib/worker/WorkerObjContent'
;
import
{
transitionHelper
}
from
'amos-3d/lib/helpers'
;
import
*
as
endConf
from
'amos-processor/lib/config/endconf'
;
import
{
LensJumpFactory
}
from
'base-r3d/lib/factory'
;
import
{
CONSTS
}
from
'../consts/storageConsts'
;
...
...
@@ -120,9 +119,9 @@ class View3D extends Component {
sideControlShow
:
false
,
//隐藏耳朵
isShowActionBar
:
true
,
//显示工具栏
errorAreaId
:
''
,
//异常区域id
positionxyz
:
''
,
rightHeight
:
1
,
isPointSave
:
true
,
positionxyz
:
''
,
rightHeight
:
1
,
isPointSave
:
true
,
};
getObjFromNet
(
view3dFile
,
(
objs
,
asyncModels
)
=>
{
...
...
@@ -895,15 +894,20 @@ class View3D extends Component {
});
}
}
savePointListAction
(
paramsArr
).
then
(
data
=>
{
getPointTreeAction
(
pointType
).
then
(
data
=>
{
this
.
setState
({
treeData
:
data
||
[],
pageType
:
'point'
,
showRightPanel
:
false
});
});
})
savePointListAction
(
paramsArr
).
then
(
data
=>
{
getPointTreeAction
(
pointType
).
then
(
data
=>
{
this
.
setState
({
treeData
:
data
||
[],
pageType
:
'point'
,
showRightPanel
:
false
});
}
);
message
.
success
(
'保存成功'
);
},
error
=>
message
.
error
(
'保存失败'
)
);
}
...
...
@@ -951,36 +955,29 @@ class View3D extends Component {
})
}
}
toastWarningInfo
=
(
content
)
=>
{
Toast
.
warning
({
title
:
'警告'
,
content
,
placement
:
'topMiddle'
,
})
}
//删除区域
deleteAreaBind
=
()
=>
{
let
{
selectArea
,
treeData
}
=
this
.
state
;
debugger
;
if
(
selectArea
)
{
getPointsByRegionIdAction
(
selectArea
.
id
).
then
(
d
=>
{
if
(
d
&&
d
.
length
==
0
){
this
.
state
.
routePathData
.
push
({
riskSourceId
:
selectArea
.
id
,
routePath
:
''
,
})
var
tree
=
new
Object
();
tree
.
children
=
treeData
;
this
.
removeTreeDataRoutePathByChildId
(
selectArea
.
id
,
tree
);
this
.
getAreas
(
tree
.
children
);
this
.
setState
({
routePathData
:
this
.
state
.
routePathData
,
treeData
:
tree
.
children
,
});
}
else
{
this
.
toastWarningInfo
(
'请先清除点的绑定再进行删除!'
)
}
});
getPointsByRegionIdAction
(
selectArea
.
id
).
then
(
d
=>
{
if
(
d
&&
d
.
length
==
0
){
this
.
state
.
routePathData
.
push
({
riskSourceId
:
selectArea
.
id
,
routePath
:
''
});
var
tree
=
new
Object
();
tree
.
children
=
treeData
;
this
.
removeTreeDataRoutePathByChildId
(
selectArea
.
id
,
tree
);
this
.
getAreas
(
tree
.
children
);
this
.
setState
({
routePathData
:
this
.
state
.
routePathData
,
treeData
:
tree
.
children
});
}
else
{
message
.
danger
(
'请先清除点的绑定再进行删除!'
);
}
});
}
}
...
...
@@ -1055,10 +1052,10 @@ class View3D extends Component {
showConfirm
=
()
=>
{
AmosAlert
.
confirm
(
'提示'
,
'有未保存数据,是否保存?'
,
{
callback
:
(
flag
)
=>
{
if
(
flag
){
this
.
savePointData
()
if
(
flag
){
this
.
savePointData
();
}
else
{
this
.
setState
({
isPointSave
:
true
})
this
.
setState
({
isPointSave
:
true
});
}
}
});
...
...
@@ -1082,11 +1079,11 @@ class View3D extends Component {
drop
=
(
event
)
=>
{
event
.
preventDefault
();
this
.
setState
({
isPointSave
:
false
})
this
.
setState
({
isPointSave
:
false
});
let
{
dragItem
,
markers
}
=
this
.
state
;
if
(
dragItem
)
{
if
(
dragItem
.
isBind
)
{
this
.
toastWarningInfo
(
'只能放置未绑定的标记点'
)
message
.
danger
(
'只能放置未绑定的标记点'
);
return
false
;
}
...
...
@@ -1100,7 +1097,7 @@ class View3D extends Component {
console
.
log
(
isInside
);
if
(
dragItem
)
{
if
(
isInside
===
false
)
{
this
.
toastWarningInfo
(
'只能放置在当前区域'
)
message
.
danger
(
'只能放置在当前区域'
);
return
false
;
}
let
uid
=
UUID
.
uuidFast
();
...
...
mods/components/3dviewConvertor/view/panoramic/statistical/EquipStatusList.js
View file @
23897607
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
>
);
})
...
...
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