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
af248adc
Commit
af248adc
authored
May 26, 2020
by
张博
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
c092a97f
8f7965a8
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
773 additions
and
245 deletions
+773
-245
amos.config.js
amos.config.js
+3
-3
Unknown.js
example/Unknown.js
+17
-0
sketch.js
example/sketch.js
+26
-5
searchpane-background.png
...nvertor/assets/convertor/3dview/searchpane-background.png
+0
-0
wsUrlConsts.js
mods/components/3dviewConvertor/consts/wsUrlConsts.js
+4
-14
3dService.js
mods/components/3dviewConvertor/services/3dService.js
+5
-1
common.scss
mods/components/3dviewConvertor/styles/common.scss
+1
-1
index.scss
mods/components/3dviewConvertor/styles/index.scss
+1
-0
planDetail.scss
mods/components/3dviewConvertor/styles/planDetail.scss
+14
-14
pointsDetails.scss
mods/components/3dviewConvertor/styles/pointsDetails.scss
+4
-4
preControl.scss
mods/components/3dviewConvertor/styles/preControl.scss
+18
-18
searchpane.scss
mods/components/3dviewConvertor/styles/searchpane.scss
+222
-0
request.js
mods/components/3dviewConvertor/utils/request.js
+6
-6
ConvertorView3DRoot.js
mods/components/3dviewConvertor/view/ConvertorView3DRoot.js
+13
-27
MaskContent.js
mods/components/3dviewConvertor/view/MaskContent.js
+17
-4
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+13
-13
conf.js
mods/components/3dviewConvertor/view/conf.js
+2
-1
index.js
...nents/3dviewConvertor/view/panoramic/statistical/index.js
+8
-2
indexLeft.js
...s/3dviewConvertor/view/panoramic/statistical/indexLeft.js
+0
-59
indexRight.js
.../3dviewConvertor/view/panoramic/statistical/indexRight.js
+0
-59
TopView.js
...onents/3dviewConvertor/view/preControl/topNews/TopView.js
+1
-1
index.js
mods/components/3dviewConvertor/view/searchPane/index.js
+220
-0
paramsHeader.js
...omponents/3dviewConvertor/view/searchPane/paramsHeader.js
+171
-0
index.js
mods/index.js
+7
-13
No files found.
amos.config.js
View file @
af248adc
...
...
@@ -18,15 +18,15 @@
rulesConfigURI
:
'http://172.16.10.91:8080/'
,
// plugin URI
pluginURI
:
'http://172.16.11.40:8099/'
,
studioURI
:
'http://172.16.11.40:8099/'
,
studioURI
:
'http://172.16.11.40:8099/'
},
// websocket 地址
wsURI
:
{
pluginURI
:
'ws://172.16.11.40:10600/'
,
studioURI
:
'ws://172.16.11.40:10600/'
,
convertorView3dURI
:
'ws://172.16.10.91:8080/'
,
//换流站websocket
securityBaseURI
:
'ws://172.16.10.91:10600/'
,
baseURI
:
'ws://172.16.10.91:10600/'
convertorView3dURI
:
'ws://172.16.10.91:10600/'
,
ruleURI
:
'ws://172.16.10.91:8080/'
},
// 外部链接地址
outterURI
:
{
...
...
example/Unknown.js
0 → 100644
View file @
af248adc
import
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
classNames
from
'classnames'
;
const
Unknown
=
props
=>
{
const
{
className
}
=
props
;
const
cls
=
classNames
(
'sketch-component-unknown'
,
className
);
return
(
<
div
className
=
{
cls
}
>
未知控件
<
/div
>
);
};
Unknown
.
propTypes
=
{
className
:
PropTypes
.
string
};
export
default
Unknown
;
example/sketch.js
View file @
af248adc
import
{
commonRegister
}
from
'amos-viz/lib/widgets'
;
import
{
getSketchCompnents
}
from
'./../mods'
;
import
{
IModularHub
,
INNER_MODULAR_TYPE
}
from
'amos-viz/lib/widgets'
;
import
Unknown
from
'./Unknown'
;
import
*
as
mods
from
'./../mods'
;
// 测试发布
// import * as mods from './../lib/graphmod';
const
innerModularType
=
commonRegister
.
innerModularType
;
/**
* hybrid 创建自己独立的 modular
* 注册 所有的 mod
*/
export
const
hybridModular
=
new
IModularHub
();
// 注册未知组件
hybridModular
.
registerSketchComponent
(
'unknown'
,
Unknown
);
Object
.
keys
(
mods
).
forEach
(
k
=>
{
// 需要排除 default
if
(
k
!==
'default'
){
hybridModular
.
registerSketchComponent
(
k
,
mods
[
k
]);
}
});
export
function
getComponentKeyList
(){
return
Object
.
keys
(
commonRegister
.
getModularsByType
(
innerModularType
.
sketchComponent
));
const
sc
=
hybridModular
.
getModularsByType
(
INNER_MODULAR_TYPE
.
sketchComponent
);
// const sc = hybridModular.getObjModularsByType(INNER_MODULAR_TYPE.sketchComponent);
return
[...
sc
.
keys
()].
map
(
item
=>
item
.
replace
(
`
${
INNER_MODULAR_TYPE
.
sketchComponen
}
/`
,
''
));
}
export
default
getSketchCompnents
;
export
default
function
getSketchCompnents
(
alias
){
return
hybridModular
.
getModularClass
(
INNER_MODULAR_TYPE
.
sketchComponent
,
alias
,
Unknown
);
}
mods/components/3dviewConvertor/assets/convertor/3dview/searchpane-background.png
0 → 100644
View file @
af248adc
339 KB
mods/components/3dviewConvertor/consts/wsUrlConsts.js
View file @
af248adc
...
...
@@ -6,10 +6,9 @@ const lsTool = Store.lsTool;
const
completePrefix
=
endConf
.
completePrefix
;
const
AmosConfig
=
endConf
.
AmosConfig
;
const
ConvertorView3dURI
=
AmosConfig
.
wsURI
.
convertorView3dURI
;
const
baseURI
=
AmosConfig
.
wsURI
.
base
URI
;
const
view3dURI
=
AmosConfig
.
wsURI
.
view3d
URI
;
const
convertorView3dURI
=
AmosConfig
.
wsURI
.
convertorView3d
URI
;
const
ruleURI
=
AmosConfig
.
wsURI
.
rule
URI
;
const
getToken
=
()
=>
{
return
lsTool
.
read
(
SysConsts
.
token
);
...
...
@@ -17,13 +16,8 @@ const getToken = () => {
export
default
{
convertorRulews
:
completePrefix
(
ConvertorView3dURI
,
'rule.ws?token={token}'
),
convertorView3dws
:
completePrefix
(
ConvertorView3dURI
,
'view3d.ws?token={token}'
),
rulews
:
completePrefix
(
view3dURI
,
'rule.ws?token={token}'
),
view3dws
:
completePrefix
(
view3dURI
,
'view3d.ws?token={token}'
),
viewIndexws
:
completePrefix
(
baseURI
,
'3dViewMessage'
)
rulews
:
completePrefix
(
ruleURI
,
'rule.ws?token={token}'
),
convertorView3d
:
completePrefix
(
convertorView3dURI
,
'3dViewMessage'
)
};
export
const
completeToken
=
(
url
)
=>
{
...
...
@@ -31,7 +25,3 @@ export const completeToken = (url) => {
const
result
=
formatUrl
(
url
,
{
token
});
return
result
;
};
mods/components/3dviewConvertor/services/3dService.js
View file @
af248adc
...
...
@@ -26,7 +26,11 @@ export const getObjFromNet = (url, callback) => {
* @param {string} type
*/
export
const
initView3DAction
=
(
type
,
riskSourceId
)
=>
{
const
url
=
formatUrl
(
FscSerUrl
.
view3dInitUrl
,
{
type
,
riskSourceId
});
if
(
!
riskSourceId
)
{
riskSourceId
=
""
;
}
const
url
=
formatUrl
(
FscSerUrl
.
view3dInitUrl
,
{
type
,
riskSourceId
});
return
commonGet
(
url
);
};
...
...
mods/components/3dviewConvertor/styles/common.scss
View file @
af248adc
...
...
@@ -97,7 +97,7 @@
// border-radius: $core-border-radius;
// box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
// box-sizing: border-box;
background-image
:
url('
./..
/assets/convertor/3dview/dialogbg.png')
;
background-image
:
url('
/mods/components/3dviewConvertor
/assets/convertor/3dview/dialogbg.png')
;
background-color
:
rgba
(
25
,
86
,
147
,
0
.5
);
.body-min-header
{
...
...
mods/components/3dviewConvertor/styles/index.scss
View file @
af248adc
...
...
@@ -12,6 +12,7 @@
@import
'./planDetail.scss'
;
@import
'./actionbar.scss'
;
@import
'./moduleEdit.scss'
;
@import
'./searchpane.scss'
;
@import
'./../assets/bizFont/iconfont.css'
;
@import
'./../assets/amosFont/iconfont.css'
;
...
...
mods/components/3dviewConvertor/styles/planDetail.scss
View file @
af248adc
...
...
@@ -3,7 +3,7 @@
width
:
216px
!
important
;
height
:
100%
!
important
;
padding
:
0px
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/detail-info.png')
no-repeat
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/detail-info.png')
no-repeat
;
background-size
:
100%
;
background-repeat
:
round
;
position
:
relative
;
...
...
@@ -108,7 +108,7 @@
.carImg
{
width
:
35px
;
background
:
url('
./..
/assets/convertor/3dview/plan/car.png')
no-repeat
top
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/plan/car.png')
no-repeat
top
;
}
.carHead
{
...
...
@@ -131,7 +131,7 @@
width
:
81px
!
important
;
margin-left
:
5px
!
important
;
font-size
:
5px
!
important
;
background-image
:
url('
./..
/assets/convertor/3dview/plan/post.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/plan/post.png')
;
text-align
:
center
!
important
;
line-height
:
27px
!
important
;
}
...
...
@@ -147,7 +147,7 @@
margin-left
:
0px
;
height
:
25px
;
color
:
white
;
background-image
:
url('
./..
/assets/convertor/3dview/plan/detail-title.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/plan/detail-title.png')
;
background-size
:
100%
;
background-repeat
:
round
;
}
...
...
@@ -156,7 +156,7 @@
margin-left
:
3px
;
height
:
25px
;
color
:
white
;
background-image
:
url('
./..
/assets/convertor/3dview/prePlan/zhuyibar.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/zhuyibar.png')
;
background-size
:
100%
;
background-repeat
:
round
;
}
...
...
@@ -165,7 +165,7 @@
margin-left
:
3px
;
height
:
25px
;
color
:
white
;
background-image
:
url('
./..
/assets/convertor/3dview/prePlan/jianyibar.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/jianyibar.png')
;
background-size
:
100%
;
background-repeat
:
round
;
}
...
...
@@ -174,7 +174,7 @@
margin-left
:
3px
;
height
:
25px
;
color
:
white
;
background-image
:
url('
./..
/assets/convertor/3dview/prePlan/jinggaobar.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/jinggaobar.png')
;
background-size
:
100%
;
background-repeat
:
round
;
}
...
...
@@ -436,7 +436,7 @@
width
:
316px
!
important
;
height
:
100%
!
important
;
padding
:
0px
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/detail-info.png')
no-repeat
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/detail-info.png')
no-repeat
;
background-size
:
100%
;
background-repeat
:
round
;
position
:
relative
;
...
...
@@ -534,7 +534,7 @@
.carImg
{
width
:
59px
;
background
:
url('
./..
/assets/convertor/3dview/plan/car.png')
no-repeat
top
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/plan/car.png')
no-repeat
top
;
}
.carHead
{
...
...
@@ -557,7 +557,7 @@
width
:
81px
!
important
;
margin-left
:
45px
!
important
;
font-size
:
13px
!
important
;
background-image
:
url('
./..
/assets/convertor/3dview/plan/post.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/plan/post.png')
;
text-align
:
center
!
important
;
line-height
:
27px
!
important
;
}
...
...
@@ -571,7 +571,7 @@
margin-left
:
5px
;
height
:
35px
;
color
:
white
;
background-image
:
url('
./..
/assets/convertor/3dview/plan/detail-title.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/plan/detail-title.png')
;
background-size
:
100%
;
background-repeat
:
round
;
}
...
...
@@ -580,7 +580,7 @@
margin-left
:
5px
;
height
:
35px
;
color
:
white
;
background-image
:
url('
./..
/assets/convertor/3dview/prePlan/zhuyibar.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/zhuyibar.png')
;
background-size
:
100%
;
background-repeat
:
round
;
}
...
...
@@ -589,7 +589,7 @@
margin-left
:
5px
;
height
:
35px
;
color
:
white
;
background-image
:
url('
./..
/assets/convertor/3dview/prePlan/jianyibar.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/jianyibar.png')
;
background-size
:
100%
;
background-repeat
:
round
;
}
...
...
@@ -598,7 +598,7 @@
margin-left
:
5px
;
height
:
35px
;
color
:
white
;
background-image
:
url('
./..
/assets/convertor/3dview/prePlan/jinggaobar.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/jinggaobar.png')
;
background-size
:
100%
;
background-repeat
:
round
;
}
...
...
mods/components/3dviewConvertor/styles/pointsDetails.scss
View file @
af248adc
...
...
@@ -159,7 +159,7 @@
width
:
100%
;
height
:
100%
;
.amos-modal-container
{
background-image
:
url('
./..
/assets/convertor/3dview/toolmodalbg.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/toolmodalbg.png')
;
background-repeat
:
no-repeat
;
height
:
262px
;
width
:
452px
!
important
;
...
...
@@ -225,7 +225,7 @@
height
:
8px
;
}
::-webkit-scrollbar-thumb
{
/* 拖动条 */
background-image
:
url('
./..
/assets/convertor/3dview/scrollslider.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/scrollslider.png')
;
background-repeat
:
no-repeat
;
height
:
10px
;
}
...
...
@@ -233,13 +233,13 @@
background-color
:rgba
(
17
,
44
,
88
,
0
.2
)
;
}
::-webkit-scrollbar-button
{
background-image
:
url('
./..
/assets/convertor/3dview/scrollbutton.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/scrollbutton.png')
;
background-repeat
:
no-repeat
;
}
height
:
100%
;
.amos-modal-container
{
background-image
:
url('
./..
/assets/convertor/3dview/modalbg.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/modalbg.png')
;
height
:
497px
;
width
:
866px
!
important
;
background-color
:
rgba
(
255
,
255
,
255
,
0
);
...
...
mods/components/3dviewConvertor/styles/preControl.scss
View file @
af248adc
...
...
@@ -59,22 +59,22 @@
width
:
260px
;
height
:
206px
;
padding
:
20px
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/buzhouqu.png')
no-repeat
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/buzhouqu.png')
no-repeat
;
.step-trace
{
height
:
144px
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/step-trace.png')
no-repeat
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/step-trace.png')
no-repeat
;
.next-step
{
width
:
24px
;
height
:
24px
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/buzhouqu-xiayibu.png')
no-repeat
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/buzhouqu-xiayibu.png')
no-repeat
;
}
.previous-step
{
width
:
24px
;
height
:
24px
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/buzhouqu-dangqianbu.png')
no-repeat
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/buzhouqu-dangqianbu.png')
no-repeat
;
}
}
...
...
@@ -130,7 +130,7 @@
width
:
840px
;
height
:
60px
;
margin
:
0
auto
;
background-image
:
url('
./..
/assets/convertor/3dview/prePlan/dingbu.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/dingbu.png')
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
...
...
@@ -155,7 +155,7 @@
height
:
30px
;
margin
:
0
auto
;
margin-top
:
10px
;
background-image
:
url('
./..
/assets/convertor/3dview/prePlan/baojing.png')
;
background-image
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/baojing.png')
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
...
...
@@ -179,7 +179,7 @@
height
:
60px
;
margin-bottom
:
7px
;
text-align
:
center
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/shujuqu.png')
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/shujuqu.png')
;
.text-icon
{
width
:
36px
;
...
...
@@ -200,7 +200,7 @@
.text-icon
{
// flex: 1 0 16%;
background
:
url('
./..
/assets/convertor/3dview/prePlan/shujuqu-shijian.png')
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/shujuqu-shijian.png')
;
background-repeat
:
no-repeat
;
}
...
...
@@ -214,7 +214,7 @@
.text-icon
{
// flex: 1 0 16%;
background
:
url('
./..
/assets/convertor/3dview/prePlan/shujuqu-shuichi.png')
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/shujuqu-shuichi.png')
;
background-repeat
:
no-repeat
;
}
...
...
@@ -228,7 +228,7 @@
.text-icon
{
// flex: 1 0 8%;
background
:
url('
./..
/assets/convertor/3dview/prePlan/shujuqu-shuiwei.png')
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/shujuqu-shuiwei.png')
;
background-repeat
:
no-repeat
;
}
...
...
@@ -243,7 +243,7 @@
.text-icon
{
// flex: 1 0 7%;
background
:
url('
./..
/assets/convertor/3dview/prePlan/shujuqu-gongshu.png')
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/shujuqu-gongshu.png')
;
background-repeat
:
no-repeat
;
}
...
...
@@ -257,7 +257,7 @@
.text-icon
{
// flex: 1 0 7%;
background
:
url('
./..
/assets/convertor/3dview/prePlan/shujuqu-paomo.png')
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/shujuqu-paomo.png')
;
background-repeat
:
no-repeat
;
}
...
...
@@ -279,7 +279,7 @@
.amos-modal-confirm-confirm
{
.amos-modal-container
{
text-align
:
center
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/tishitanchuang.png')
no-repeat
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/tishitanchuang.png')
no-repeat
;
background-size
:
100%
100%
;
box-shadow
:
unset
;
...
...
@@ -305,7 +305,7 @@
.amos-btn
{
width
:
95px
;
height
:
44px
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/jiaohuqu-2anniu-cheng-chang.png')
no-repeat
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/jiaohuqu-2anniu-cheng-chang.png')
no-repeat
;
background-size
:
100%
100%
;
border
:
0
;
}
...
...
@@ -315,7 +315,7 @@
height
:
40px
;
margin-top
:
-5px
;
color
:
white
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/jiaohuqu-2anniu-lan-chang.png')
no-repeat
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/jiaohuqu-2anniu-lan-chang.png')
no-repeat
;
border
:
0
;
}
}
...
...
@@ -454,7 +454,7 @@
.precontrol-water-view
{
width
:
260px
;
text-align
:
center
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/buzhouqu.png')
no-repeat
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/buzhouqu.png')
no-repeat
;
background-size
:
100%
100%
;
padding-bottom
:
10px
;
padding-top
:
10px
;
...
...
@@ -493,7 +493,7 @@
height
:
20px
;
width
:
20px
;
float
:
left
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/shujuqu-shuiwei.png')
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/shujuqu-shuiwei.png')
;
background-size
:
cover
;
// background-repeat: no-repeat;
}
...
...
@@ -502,7 +502,7 @@
height
:
17px
;
width
:
20px
;
float
:
left
;
background
:
url('
./..
/assets/convertor/3dview/prePlan/shujuqu-shuichi.png')
;
background
:
url('
/mods/components/3dviewconvertor
/assets/convertor/3dview/prePlan/shujuqu-shuichi.png')
;
background-size
:
cover
;
}
}
...
...
mods/components/3dviewConvertor/styles/searchpane.scss
0 → 100644
View file @
af248adc
.search-pane-bg
{
position
:
absolute
;
right
:
20px
;
bottom
:
20px
;
width
:
460px
;
height
:
600px
;
background
:
url('/mods/components/3dviewConvertor/assets//convertor//3dview//searchpane-background.png')
;
filter
:blur
(
3px
)
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
z-index
:
99
;
}
.search-pane
{
position
:
absolute
!
important
;
right
:
20px
!
important
;
bottom
:
20px
!
important
;
left
:
unset
!
important
;
top
:
unset
!
important
;
width
:
460px
;
height
:
600px
;
color
:
white
;
z-index
:
999
!
important
;
border
:
1px
solid
rgba
(
39
,
85
,
162
,
0
.3
);
border-radius
:
10px
;
.search-pane-close
{
position
:
absolute
;
width
:
30px
;
height
:
30px
;
right
:
0
;
background-image
:
linear-gradient
(
0deg
,
#eb0404
0%
,
#ff0057
100%
);
opacity
:
0
.6
;
text-align
:
center
;
.amosicon-close
{
font-style
:
normal
;
}
}
.amos-tabs-list
{
border
:
none
!
important
;
height
:
30px
;
background
:
#13428f
!
important
;
border-radius
:
5px
;
.amos-tabs-tabitem
{
background-color
:
#2755a2
;
margin-right
:
8px
;
border-radius
:
5px
;
.amos-tabs-tabitem-inner
{
padding
:
3px
15px
;
.amos-tabs-tabitem-content
{
color
:
white
;
}
}
}
.amos-tabs-tabitem-active
{
background-color
:
#036fa7
!
important
;
color
:
white
;
border-radius
:
2px
2px
0
0
;
}
}
.params-header
{
padding
:
5px
14px
;
height
:
40px
;
width
:
100%
;
.amos-group-item
{
float
:
left
;
}
.amos-select-dropdown
{
border
:
none
!
important
;
background-color
:
#13428f
;
border-radius
:
5px
;
}
.amos-input
{
width
:
100%
;
border
:
none
!
important
;
background-color
:
#13428f
;
border-radius
:
5px
;
float
:
left
;
}
.params-input
{
float
:
left
;
.params-input-img
{
}
}
}
.amos-tabs
.amos-tabs-panel
{
padding-top
:
0px
!
important
;
}
.search-pane-table
{
.ant-table-title
{
display
:
none
;
}
.ant-table-body
{
max-height
:
35rem
!
important
;
}
.ant-table-thead
{
}
.ant-table-content
{
height
:
100%
;
.ant-table-header
{
overflow
:
hidden
!
important
;
}
.ant-table-body
{
color
:
white
;
max-height
:
500px
!
important
;
min-height
:
500px
!
important
;
overflow-y
:
auto
!
important
;
overflow-x
:
hidden
;
background
:transparent
!
important
;
border
:
1px
solid
rgba
(
234
,
234
,
234
,
0
.3
);
table
{
border-color
:
transparent
!
important
;
td
{
border
:
1px
solid
rgba
(
234
,
234
,
234
,
0
.3
)
!
important
;
}
th
{
color
:
white
;
background
:
#2755a2
;
}
}
}
.ant-table-placeholder
{
background
:transparent
!
important
;
color
:
white
;
}
.ant-table-thead
>
tr
>
th
{
color
:
white
;
background
:
#2755a2
!
important
;
//background: #222b51 !important;
border-color
:
transparent
!
important
;
text-align
:
center
;
}
.ant-table-thead
>
tr
.ant-table-row-hover
>
td
,
.ant-table-tbody
>
tr
.ant-table-row-hover
>
td
,
.ant-table-thead
>
tr
:hover
>
td
,
.ant-table-tbody
>
tr
:hover
>
td
{
background
:
rgba
(
255
,
255
,
255
,
0
.3
);
}
//滚动条样式
.ant-table-body
{
&
:
:-
webkit-scrollbar
{
width
:
10px
;
height
:
10px
;
}
&
:
:-
webkit-scrollbar-thumb
{
background
:
rgba
(
39
,
85
,
162
,
0
.8
);
border-radius
:
10px
;
}
&
:
:-
webkit-scrollbar-track
{
border-radius
:
10px
;
background
:
rgba
(
2
,
11
,
45
,
0
.5
);
border
:
none
;
}
&
:
:-
webkit-scrollbar-corner
{
background
:
transparent
;
}
&
:
:-
webkit-scrollbar-thumb
:
hover
{
background
:
rgba
(
39
,
85
,
162
,
1
);
}
}
}
.ant-table-pagination
{
margin
:
0
10px
;
float
:
right
;
.ant-select-selection
{
display
:
none
;
}
.ant-pagination-prev
{
background-color
:
rgba
(
255
,
255
,
255
,
0
.5
);
}
.ant-pagination-next
{
background-color
:
rgba
(
255
,
255
,
255
,
0
.5
);
}
.ant-pagination-item
{
background-color
:
rgba
(
255
,
255
,
255
,
0
.5
);
}
.ant-pagination-item-active
a
,
.ant-pagination-item-active
:focus
a
,
.ant-pagination-item-active
:hover
a
{
color
:
#fff
;
}
}
}
}
\ No newline at end of file
mods/components/3dviewConvertor/utils/request.js
View file @
af248adc
...
...
@@ -13,8 +13,8 @@ const defaultPageable = {
};
const
defaultHeaders
=
{
//
appKey: 'CONVERTER_STATION',
//
product: 'CONVERTER_STATION_WEB',
appKey
:
'CONVERTER_STATION'
,
product
:
'CONVERTER_STATION_WEB'
,
channelType
:
'3dpage'
};
...
...
@@ -36,8 +36,8 @@ const getToken = () => {
/**
* 删除全局变量requests中的地址
* @param {*} url
* @param {*} method
* @param {*} url
* @param {*} method
*/
const
delRequest
=
(
url
,
method
)
=>
{
if
(
window
.
requests
&&
window
.
requests
.
length
>
0
)
{
...
...
@@ -70,8 +70,8 @@ const convertDatalist = (dataList = [], key = 'content') => {
export
function
commonGet
(
url
)
{
window
.
setLoading
&&
window
.
setLoading
(
true
);
return
amosRequest
(
url
,
{
timeout
:
10000000
,
return
amosRequest
(
url
,
{
timeout
:
10000000
,
method
:
'GET'
,
headers
:
compleHeaders
(),
reject
(
error
){
...
...
mods/components/3dviewConvertor/view/ConvertorView3DRoot.js
View file @
af248adc
...
...
@@ -2,15 +2,11 @@ import React from 'react';
import
PropTypes
from
'prop-types'
;
import
{
Connect
,
Modal
}
from
'amos-framework'
;
import
Basic
from
'amos-designer/lib/pages/sketchs'
;
import
AmosWebSocket
from
'amos-websocket'
;
import
*
as
endConf
from
'amos-processor/lib/config/endconf'
;
import
PilotController
from
'amos-viz/lib/board/PilotController'
;
import
SysWsURL
,
{
completeToken
}
from
'./../consts/wsUrlConsts'
;
import
{
eventTopics
}
from
'./consts'
;
import
ScreenSaverView
from
'./screenSaver/ScreenSaverView'
;
import
View3D
from
'./View3D'
;
import
PanoramicLeft
from
'./../view/panoramic/statistical/indexLeft'
;
import
PanoramicRight
from
'./../view/panoramic/statistical/indexRight'
;
import
Statistical
from
'./../view/panoramic/statistical'
;
// 引入换流站3dview模块主体样式文件
import
'./../styles'
;
...
...
@@ -45,9 +41,7 @@ class ConvertorView3DRoot extends Basic {
this
.
pushTimeOutId
=
null
;
}
}
// componentWillReceiveProps = nextProps => {
// this.setState({ alarmStarted: nextProps.alarmStarted });
// }
editModelChange
=
(
status
)
=>
{
this
.
setState
({
isEdit
:
status
...
...
@@ -95,32 +89,24 @@ class ConvertorView3DRoot extends Basic {
}
}
/**
* 监控视图消息 (view3d ws)
*/
handleData
=
(
data
=
{})
=>
{
console
.
log
(
'view3d ws data:'
,
data
);
const
topic
=
data
.
topic
||
eventTopics
.
base3d_view
;
this
.
props
.
trigger
(
topic
,
data
);
};
refshExceptAreaData
=
()
=>
{
this
.
view3d
.
initExceptionAreasData
&&
this
.
view3d
.
initExceptionAreasData
();
}
render
()
{
const
{
isEdit
}
=
this
.
state
;
const
wsURL
=
completeToken
(
SysWsURL
.
convertorView3dws
);
return
(
<
div
>
{
isEdit
?
''
:
<
PanoramicLeft
/>
}
<
div
style
=
{{
height
:
'100%'
}}
>
{
isEdit
?
''
:
<
Statistical
refshExceptAreaData
=
{
this
.
refshExceptAreaData
}
/>
}
<
div
className
=
"sys-view-3d"
>
<
AmosWebSocket
ref
=
{
node
=>
this
.
aws
=
node
}
url
=
{
wsURL
}
onMessage
=
{
this
.
handleData
}
reconnect
debug
/>
<
View3D
onLoadCompleted
=
{
this
.
onLoadCompleted
}
hiddenScreenSaver
=
{
this
.
hiddenScreenSaver
}
editModelChange
=
{
this
.
editModelChange
}
/
>
<
View3D
ref
=
{
node
=>
this
.
view3d
=
node
}
onLoadCompleted
=
{
this
.
onLoadCompleted
}
hiddenScreenSaver
=
{
this
.
hiddenScreenSaver
}
editModelChange
=
{
this
.
editModelChange
}
/
>
{
this
.
getScreenSaver
()}
<
/div
>
{
isEdit
?
''
:
<
PanoramicRight
/>
}
<
/div
>
);
}
...
...
mods/components/3dviewConvertor/view/MaskContent.js
View file @
af248adc
...
...
@@ -11,6 +11,7 @@ import LayerPool from './LayerPool';
import
TopMsg
from
'./sideControl/TopMsg'
;
import
ActionBar
from
'./actionbar'
;
import
ModelHeader
from
'./common/ModelHeader'
;
import
SearchPane
from
'./searchPane'
;
const
eventConnect
=
Connect
.
eventConnect
;
...
...
@@ -21,7 +22,8 @@ class MaskContent extends Component {
super
(
props
);
this
.
state
=
{
planStarted
:
false
,
activeAction
:
'panoramic'
activeAction
:
'panoramic'
,
searchPaneVisible
:
false
};
}
...
...
@@ -49,10 +51,20 @@ class MaskContent extends Component {
};
actionBarClick
=
({
singleClick
,
type
,
label
,
showLabel
})
=>
{
if
(
!
singleClick
){
//设置选中状态
this
.
setState
({
activeAction
:
type
});
}
this
.
props
.
onActionItemClick
&&
this
.
props
.
onActionItemClick
(
type
,
label
,
showLabel
);
if
(
type
===
"search"
){
this
.
changeSearchPaneVisible
();
}
}
changeSearchPaneVisible
=
()
=>
{
debugger
;
const
{
searchPaneVisible
}
=
this
.
state
;
this
.
setState
({
searchPaneVisible
:
!
searchPaneVisible
});
}
handleExceptModel
=
(
type
)
=>
{
...
...
@@ -65,7 +77,7 @@ class MaskContent extends Component {
}
render
()
{
const
{
planStarted
,
activeAction
}
=
this
.
state
;
const
{
planStarted
,
activeAction
,
searchPaneVisible
}
=
this
.
state
;
const
{
multiple
,
onItemClick
,
...
...
@@ -79,7 +91,7 @@ class MaskContent extends Component {
headerName
,
errorAreaId
}
=
this
.
props
;
const
wsURL
=
completeToken
(
SysWsURL
.
convertorR
ulews
);
const
wsURL
=
completeToken
(
SysWsURL
.
r
ulews
);
const
controlAnimation
=
{
animateName
:
'zoom-comb-left'
,
visible
:
!
planStarted
,
...
...
@@ -112,10 +124,11 @@ class MaskContent extends Component {
{
sideControlShow
&&
<
SideControl
multiple
=
{
multiple
}
errorAreaId
=
{
errorAreaId
}
onItemClick
=
{
onItemClick
}
layerConfig
=
{
layerConfig
}
animationProps
=
{
controlAnimation
}
/>
}
{
/* <SideControl multiple={multiple} errorAreaId={errorAreaId} onItemClick={onItemClick} layerConfig={layerConfig} animationProps={controlAnimation} /> */
}
{
sideControlShow
&&
<
DataPane
animationProps
=
{
datapaneAnim
}
/>
}
<
SearchPane
visible
=
{
searchPaneVisible
}
changeSearchPaneVisible
=
{()
=>
this
.
changeSearchPaneVisible
}
/
>
<
TopMsg
alarmStart
=
{
alarmStart
}
/
>
{
!
isShowActionBar
&&
<
ModelHeader
headerName
=
{
headerName
}
handleExceptModel
=
{
this
.
handleExceptModel
}
/>
}
{
isShowActionBar
&&
<
ActionBar
activeAction
=
{
activeAction
}
onActionItemClick
=
{(
e
)
=>
this
.
actionBarClick
(
e
)}
animationProps
=
{
controlAnimation
}
/>
}
{
/*{alarmStarted && <LayerPool animationProps={layerPoolAnimation} planStart={planStart} planQuit={planQuit} planStarted={planStarted} />}*/
}
{
alarmStarted
&&
<
LayerPool
animationProps
=
{
layerPoolAnimation
}
planStart
=
{
planStart
}
planQuit
=
{
planQuit
}
planStarted
=
{
planStarted
}
/>
}
<
/div
>
);
}
...
...
mods/components/3dviewConvertor/view/View3D.js
View file @
af248adc
...
...
@@ -84,8 +84,7 @@ class View3D extends Component {
markerList
:
[],
plFatLineCache
:
[],
fireEquipmentPosition
:
[],
contingencyPlanId
:
''
,
contingencyPlanId
:
''
,
markers
:
{
patrol
:
[],
risk
:
[],
...
...
@@ -151,7 +150,7 @@ class View3D extends Component {
this
.
_registerEvents
();
this
.
_bindPubSubEvents
();
this
.
_bindRulesPubSubEvents
();
this
.
getExceptionAreaList
();
this
.
getExceptionArea
s
List
();
}
genPenId
=
()
=>
{
...
...
@@ -213,10 +212,8 @@ class View3D extends Component {
if
(
this
.
timer
)
{
clearTimeout
(
this
.
timer
);
}
// this.infoHelper && this.infoHelper.destroy();
}
// eslint-disable-next-line react/sort-comp
_registerEvents
=
()
=>
{
this
.
r3d
.
on
(
'dbclick'
,
evt
=>
{
if
(
evt
.
button
!==
0
)
{
...
...
@@ -268,7 +265,6 @@ class View3D extends Component {
let
fireEquipmentPosition
=
data
.
contingencyRo
.
fireEquipmentPosition
.
split
(
','
);
this
.
setState
({
fireEquipmentPosition
});
}
assembleTroubleView
(
this
,
data
,
this
.
state
.
markers
);
break
;
case
'base3d.fromws.mapArea_action1-2'
:
//镜头切换(旋转+推进)
...
...
@@ -790,7 +786,6 @@ class View3D extends Component {
renderAreas
=
()
=>
{
this
.
areas
=
[];
this
.
getAreas
(
this
.
state
.
treeData
);
console
.
log
(
this
.
areas
)
return
this
.
areas
;
}
onRegionCreated
=
(
polygonRegion
,
item
)
=>
{
...
...
@@ -1238,10 +1233,16 @@ class View3D extends Component {
}
}
getExceptionAreaList
=
()
=>
{
// exceptionRegionListAction().then(data=>{
// this.setState({ exceptionAreas: data });
// });
getExceptionAreasList
=
()
=>
{
exceptionRegionListAction
().
then
(
data
=>
{
this
.
setState
({
exceptionAreas
:
data
});
});
}
initExceptionAreasData
=
()
=>
{
this
.
setState
({
startLoadExceptionArea
:
false
},()
=>
{
this
.
getExceptionAreasList
();
});
}
renderPolygonRegion
=
(
exceptionAreas
)
=>
{
...
...
@@ -1333,7 +1334,7 @@ class View3D extends Component {
x
:
fireEquipmentPosition
[
0
],
y
:
fireEquipmentPosition
[
1
],
z
:
fireEquipmentPosition
[
2
]
}
}
;
}
else
{
firePosition
=
{
x
:
-
90.827
,
y
:
30.4577
,
z
:
1.0839
};
}
...
...
@@ -1390,7 +1391,6 @@ class View3D extends Component {
{
startLoadExceptionArea
&&
<
ExceptionArea
markers
=
{
exceptionMarkers
}
handleExceptModel
=
{
this
.
handleExceptModel
}
/>
}
<
/A3DDesigner
>
<
/div
>
{
/* <div className="editButton" onClick={() => this.editButtonChange()}>编辑模式</div> */
}
{
editFlag
&&
<
div
>
{
...
...
mods/components/3dviewConvertor/view/conf.js
View file @
af248adc
...
...
@@ -83,7 +83,8 @@ export const actionBars = [
{
key
:
'panoramic-action'
,
icon
:
'panoramic'
,
type
:
'panoramic'
,
singleClick
:
false
,
label
:
'全景'
,
showLabel
:
true
},
{
key
:
'burst-action'
,
icon
:
'burst'
,
type
:
'burst'
,
singleClick
:
true
,
label
:
'分解'
,
showLabel
:
false
},
{
key
:
'fitview-action'
,
icon
:
'fitview'
,
type
:
'fitview'
,
singleClick
:
true
,
label
:
'初始视图'
,
showLabel
:
false
},
{
key
:
'edit-action'
,
icon
:
'editMode'
,
type
:
'editMode'
,
singleClick
:
false
,
label
:
'编辑'
,
showLabel
:
true
}
{
key
:
'edit-action'
,
icon
:
'editMode'
,
type
:
'editMode'
,
singleClick
:
false
,
label
:
'编辑'
,
showLabel
:
true
},
{
key
:
'search-action'
,
icon
:
'editMode'
,
type
:
'search'
,
singleClick
:
true
,
label
:
'检索'
,
showLabel
:
true
}
];
/**
...
...
mods/components/3dviewConvertor/view/panoramic/statistical/index.js
View file @
af248adc
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
EquipStatusList
from
'./EquipStatusList'
;
import
SafetyExecuteList
from
'./SafetyExecuteList'
;
import
SafetyIndex
from
'./SafetyIndex'
;
...
...
@@ -35,6 +35,7 @@ export default class Statistical extends Component {
break
;
case
'error_status'
:
console
.
log
(
'异常区域刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
props
.
refshExceptAreaData
&&
this
.
props
.
refshExceptAreaData
();
break
;
case
'week_safety_index'
:
console
.
log
(
'一周安全指数趋势刷新~~~~~~~~~~~~~~~~~~~~'
);
...
...
@@ -52,6 +53,7 @@ export default class Statistical extends Component {
console
.
log
(
'首页刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
safetyIndex
.
getSafetyIndex
();
this
.
safetyExecute
.
safetyExecuteList
();
this
.
safetyExecute
.
onlineDayData
();
this
.
equipStatus
.
equipStatusList
();
this
.
safetyIndexWeek
.
safetyIndexWeekData
();
this
.
statisticsCheck
.
statisticsCheckData
();
...
...
@@ -64,7 +66,7 @@ export default class Statistical extends Component {
render
()
{
const
wsURL
=
completeToken
(
SysWsURL
.
viewIndexws
);
const
wsURL
=
completeToken
(
SysWsURL
.
convertorView3d
);
return
(
<
div
className
=
"statistical"
>
<
AmosWebSocket
ref
=
{
node
=>
this
.
aws
=
node
}
url
=
{
wsURL
}
onMessage
=
{
this
.
handleData
}
reconnect
debug
/>
...
...
@@ -82,3 +84,7 @@ export default class Statistical extends Component {
);
}
}
Statistical
.
propTypes
=
{
refshExceptAreaData
:
PropTypes
.
func
};
mods/components/3dviewConvertor/view/panoramic/statistical/indexLeft.js
deleted
100644 → 0
View file @
c092a97f
import
React
,
{
Component
}
from
'react'
;
import
EquipStatusList
from
'./EquipStatusList'
;
import
SafetyExecuteList
from
'./SafetyExecuteList'
;
import
SafetyIndex
from
'./SafetyIndex'
;
import
AmosWebSocket
from
'amos-websocket'
;
import
SysWsURL
,
{
completeToken
}
from
'./../../../consts/wsUrlConsts'
;
/**
* 全景监控统计
*/
export
default
class
StatisticalLeft
extends
Component
{
handleData
=
(
data
=
{})
=>
{
console
.
log
(
'ws data:'
,
data
);
data
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
console
.
log
(
data
);
let
refreshType
=
data
.
refreshType
;
let
content
=
data
.
content
;
switch
(
refreshType
){
case
'today_safety_index'
:
console
.
log
(
'今日安全指数刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
safetyIndex
.
getSafetyIndex
();
break
;
case
'fire_safety'
:
console
.
log
(
'消防安全执行刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
safetyExecute
.
safetyExecuteList
();
break
;
case
'monitor_data'
:
console
.
log
(
'设备状态检测数据刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
equipStatus
.
equipStatusList
();
break
;
case
'error_status'
:
console
.
log
(
'异常区域刷新~~~~~~~~~~~~~~~~~~~~'
);
break
;
case
'all'
:
console
.
log
(
'首页左侧刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
safetyIndex
.
getSafetyIndex
();
this
.
safetyExecute
.
safetyExecuteList
();
this
.
equipStatus
.
equipStatusList
();
break
;
default
:
console
.
log
(
refreshType
,
':类型不支持'
);
}
}
render
()
{
const
wsURL
=
completeToken
(
SysWsURL
.
viewIndexws
);
return
(
<
div
className
=
"statistical-left"
>
<
AmosWebSocket
ref
=
{
node
=>
this
.
aws
=
node
}
url
=
{
wsURL
}
onMessage
=
{
this
.
handleData
}
reconnect
debug
/>
<
SafetyIndex
ref
=
{
node
=>
this
.
safetyIndex
=
node
}
/
>
<
SafetyExecuteList
ref
=
{
node
=>
this
.
safetyExecute
=
node
}
/
>
<
EquipStatusList
ref
=
{
node
=>
this
.
equipStatus
=
node
}
/
>
<
/div
>
);
}
}
mods/components/3dviewConvertor/view/panoramic/statistical/indexRight.js
deleted
100644 → 0
View file @
c092a97f
import
React
,
{
Component
}
from
'react'
;
import
SafetyIndexWeek
from
'./SafetyIndexWeek'
;
import
StatisticsCheck
from
'./StatisticsCheck'
;
import
StatisticsDuty
from
'./StatisticsDuty'
;
import
AmosWebSocket
from
'amos-websocket'
;
import
SysWsURL
,
{
completeToken
}
from
'../../../consts/wsUrlConsts'
;
/**
* 全景监控统计
*/
export
default
class
StatisticalRight
extends
Component
{
handleData
=
(
data
=
{})
=>
{
console
.
log
(
'ws data:'
,
data
);
data
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
console
.
log
(
data
);
let
refreshType
=
data
.
refreshType
;
let
content
=
data
.
content
;
switch
(
refreshType
){
case
'error_status'
:
console
.
log
(
'异常区域刷新~~~~~~~~~~~~~~~~~~~~'
);
break
;
case
'week_safety_index'
:
console
.
log
(
'一周安全指数趋势刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
safetyIndexWeek
.
safetyIndexWeekData
();
break
;
case
'today_check_status'
:
console
.
log
(
'今日巡检情况刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
statisticsCheck
.
statisticsCheckData
();
break
;
case
'today_duty'
:
this
.
statisticsDuty
.
statisticsDutyData
();
console
.
log
(
'今日值班刷新~~~~~~~~~~~~~~~~~~~~'
);
break
;
case
'all'
:
console
.
log
(
'首页右侧刷新~~~~~~~~~~~~~~~~~~~~'
);
this
.
safetyIndexWeek
.
safetyIndexWeekData
();
this
.
statisticsCheck
.
statisticsCheckData
();
this
.
statisticsDuty
.
statisticsDutyData
();
break
;
default
:
console
.
log
(
refreshType
,
':类型不支持'
);
}
}
render
()
{
const
wsURL
=
completeToken
(
SysWsURL
.
viewIndexws
);
return
(
<
div
className
=
"statistical-right"
>
<
AmosWebSocket
ref
=
{
node
=>
this
.
aws
=
node
}
url
=
{
wsURL
}
onMessage
=
{
this
.
handleData
}
reconnect
debug
/>
<
SafetyIndexWeek
ref
=
{
node
=>
this
.
safetyIndexWeek
=
node
}
/
>
<
StatisticsCheck
ref
=
{
node
=>
this
.
statisticsCheck
=
node
}
/
>
<
StatisticsDuty
ref
=
{
node
=>
this
.
statisticsDuty
=
node
}
/
>
<
/div
>
);
}
}
mods/components/3dviewConvertor/view/preControl/topNews/TopView.js
View file @
af248adc
...
...
@@ -26,7 +26,7 @@ class TopView extends Component {
componentDidMount
()
{
this
.
props
.
subscribe
(
eventTopics
.
top_ae_msg
,
(
topic
,
data
)
=>
{
const
{
content
,
batchNo
,
contingencyPlanId
}
=
data
;
this
.
props
.
planStart
(
data
.
content
);
this
.
props
.
planStart
(
data
);
this
.
setState
(
{
content
,
showContent
:
'block'
,
batchNo
,
contingencyPlanId
}
);
let
{
planStart
}
=
this
.
props
;
this
.
prepareChangeTimeText
(
planStart
);
...
...
mods/components/3dviewConvertor/view/searchPane/index.js
0 → 100644
View file @
af248adc
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
SidePane
,
Tabs
}
from
'amos-framework'
;
import
Icon
from
'amos-icon'
;
import
ParamsHeader
from
'./paramsHeader'
;
import
AmosGridTable
from
'./../common/tableComponent/table/AmosGridTable'
;
import
{
searchAction
}
from
'./../../services/3dService'
;
const
{
TabList
,
Tab
,
TabPanel
}
=
Tabs
;
const
getColumns
=
(
self
,
retrieveType
)
=>
{
switch
(
retrieveType
)
{
case
'riskSource'
:
return
[
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'25%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'25%'
},
{
title
:
'等级'
,
dataIndex
:
'level'
,
key
:
'level'
,
width
:
'25%'
},
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'25%'
}
];
case
'patrol'
:
return
[
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'16.5%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'16.5%'
},
{
title
:
'路线'
,
dataIndex
:
'routeName'
,
key
:
'level'
,
width
:
'16.5%'
},
{
title
:
'状态'
,
dataIndex
:
'title'
,
key
:
'level'
,
width
:
'16.5%'
},
{
title
:
'责任人'
,
dataIndex
:
'person'
,
key
:
'level'
,
width
:
'16.5%'
},
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'16.5%'
}
];
case
'monitorEquipment'
:
return
[
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'25%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'25%'
},
{
title
:
'监控对象'
,
dataIndex
:
'level'
,
key
:
'protectObjName'
,
width
:
'25%'
},
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'25%'
}
]
case
'video'
:
return
[
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'25%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'25%'
},
{
title
:
'监控对象'
,
dataIndex
:
'level'
,
key
:
'protectObjName'
,
width
:
'25%'
},
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'25%'
}
]
default
:
return
[
{
title
:
'编号'
,
dataIndex
:
'code'
,
key
:
'code'
,
width
:
'33%'
},
{
title
:
'名称'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
'33%'
},
{
title
:
'类别'
,
dataIndex
:
'typeName'
,
key
:
'typeName'
,
width
:
'33%'
}
];
}
};
const
tabs
=
[
{
id
:
'1'
,
key
:
'search'
,
closable
:
false
,
title
:
'检索'
},
{
id
:
'2'
,
key
:
'message'
,
closable
:
false
,
title
:
'消息'
},
{
id
:
'3'
,
key
:
'contingency'
,
closable
:
false
,
title
:
'预案'
},
];
class
SearchPane
extends
Component
{
constructor
(
props
){
super
(
props
);
this
.
pageConfig
=
{
current
:
0
,
pageSize
:
10
},
this
.
state
=
{
activeKey
:
'search'
,
filter
:
[],
dataList
:
[],
retrieveType
:
undefined
,
totalCount
:
0
,
filter
:
[]
};
}
componentDidMount
()
{
const
{
type
}
=
this
.
props
;
const
{
activeKey
}
=
this
.
state
;
this
.
fetchRetrieveData
();
}
// onSearch = (page) => {
// searchAction(inputText, dataLevel, orgCode, nodeState, protectObjName, routeName, type, page || 0, pageSize).then(d => {
// // 填充列表数据
// this.listRef.setData(d, this);
// });
// }
retrieveOnChange
=
(
filter
)
=>
{
// const { pageSize } = this.state;
this
.
setState
({
filter
},
this
.
fetchRetrieveData
);
}
/**
* 获取表格刷新方法
*/
reload
=
r
=>
{
this
.
setState
(
{
reload
:
()
=>
{
r
();
this
.
setState
({
selectedRows
:
[],
selectedRowKeys
:
[]
});
}
},
r
()
);
};
onTabClick
=
(
value
)
=>
{
console
.
log
(
value
)
if
(
value
===
'search'
){
this
.
fetchRetrieveData
();
}
else
if
(
value
===
'search'
){
}
else
{
}
this
.
setState
({
activeKey
:
value
});
}
getPanelHeight
=
()
=>
{
return
700
;
};
fetchRetrieveData
=
()
=>
{
const
{
filter
}
=
this
.
state
;
let
inputText
=
''
;
let
dataLevel
=
''
;
let
orgCode
=
''
;
let
nodeState
=
''
;
let
type
=
''
;
let
routeName
=
''
;
let
protectObjName
=
''
;
(
filter
||
[]
).
forEach
((
item
,
i
)
=>
{
if
(
item
.
name
===
'type'
)
{
type
=
item
.
value
;
this
.
setState
({
retrieveType
:
type
})
}
else
if
(
item
.
name
===
'dataLevel'
)
{
dataLevel
=
item
.
value
;
}
else
if
(
item
.
name
===
'nodeState'
)
{
nodeState
=
item
.
value
;
}
else
if
(
item
.
name
===
'inputText'
){
inputText
=
item
.
value
;
}
else
if
(
item
.
name
===
'route'
){
routeName
=
item
.
value
;
}
else
if
(
item
.
name
===
'impEquipment'
){
protectObjName
=
item
.
value
;
}
});
searchAction
(
inputText
,
dataLevel
,
orgCode
,
nodeState
,
protectObjName
,
routeName
,
type
,
this
.
pageConfig
.
current
,
this
.
pageConfig
.
pageSize
).
then
(
d
=>
{
this
.
setState
({
dataList
:
d
.
content
,
totalCount
:
d
.
totalElements
,
})
});
}
setPageConfig
=
({
pageSize
,
current
})
=>
{
if
(
pageSize
!==
undefined
)
{
this
.
pageConfig
.
pageSize
=
pageSize
;
}
if
(
current
!==
undefined
)
{
this
.
pageConfig
.
current
=
current
-
1
;
}
};
render
()
{
const
{
dataList
,
activeKey
,
retrieveType
,
totalCount
}
=
this
.
state
;
return
(
<
div
>
{
this
.
props
.
visible
&&
<
div
className
=
"search-pane-bg"
/>
}
{
this
.
props
.
visible
&&
<
SidePane
className
=
"search-pane"
>
<
div
className
=
"search-pane-close"
onClick
=
{
this
.
props
.
changeSearchPaneVisible
()}
>
<
Icon
icon
=
"close"
/>
<
/div
>
<
Tabs
activeKey
=
{
activeKey
}
onChange
=
{(
index
,
key
)
=>
this
.
onTabClick
(
key
)}
>
<
TabList
>
{
tabs
.
map
((
item
,
i
)
=>
(
<
Tab
key
=
{
item
.
key
}
activeKey
=
{
item
.
key
}
closable
=
{
item
.
closable
}
>
{
item
.
title
}
<
/Tab>
)
)}
<
/TabList
>
<
ParamsHeader
retrieveOnChange
=
{
this
.
retrieveOnChange
}
retrieveType
=
'search'
/>
<
TabPanel
activeKey
=
"search"
>
<
div
className
=
"search-pane-table"
>
<
AmosGridTable
columns
=
{
getColumns
(
this
,
retrieveType
)}
getTableDataAction
=
{()
=>
{}}
callBack
=
{
this
.
reload
}
isPageable
=
{
true
}
setPageConfig
=
{
this
.
setPageConfig
}
isChecked
=
{
false
}
// getPanelHeight={this.getPanelHeight}
dataList
=
{
dataList
}
totals
=
{
totalCount
}
getTableDataAction
=
{
this
.
fetchRetrieveData
}
/>
<
/div
>
<
/TabPanel
>
<
TabPanel
activeKey
=
"message"
>
消息
<
/TabPanel
>
<
TabPanel
activeKey
=
"contingency"
>
预案
<
/TabPanel
>
<
/Tabs
>
<
/SidePane>
}
<
/div
>
);
}
}
SearchPane
.
propTypes
=
{
};
export
default
SearchPane
;
mods/components/3dviewConvertor/view/searchPane/paramsHeader.js
0 → 100644
View file @
af248adc
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
Button
,
Input
,
Select
,
Group
}
from
'amos-framework'
;
import
{
trim
}
from
'amos-tool'
;
import
imgStatic
from
'./../../consts/imgStatic'
;
import
{
getImpEquipmentAction
}
from
'./../../services/3dService'
;
import
{
bizControlsTypes
,
riskSourceLevel
}
from
'./../conf'
;
const
Option
=
Select
.
Option
;
const
enterkey
=
13
;
/**
*
* @class paramsHeader
* @extends {Component}
*/
class
paramsHeader
extends
Component
{
static
defaultProps
=
{
retrieveType
:
'input'
};
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
value
:
''
,
textValue
:
undefined
,
showRiskLevel
:
false
,
showImpEquiList
:
false
,
impEquiList
:
[],
filter
:
[]
};
}
componentDidMount
()
{
getImpEquipmentAction
().
then
(
d
=>
this
.
setState
({
impEquiList
:
d
}));
}
onChange
=
(
e
)
=>
{
this
.
setState
({
value
:
e
.
target
.
value
});
}
onSearchTypeChange
=
(
value
)
=>
{
let
showRiskLevel
=
false
;
let
showImpEquiList
=
false
;
if
(
value
===
'riskSource'
){
showRiskLevel
=
true
;
}
else
if
(
value
===
'monitorEquipment'
){
showImpEquiList
=
true
;
}
this
.
setState
({
showRiskLevel
,
showImpEquiList
});
this
.
onPamarmsChange
(
'type'
,
value
);
}
onPamarmsChange
=
(
name
,
value
)
=>
{
let
{
filter
}
=
this
.
state
;
if
(
name
===
'inputText'
){
value
=
value
.
target
.
value
;
this
.
setState
({
textValue
:
value
})
}
if
(
value
)
{
const
flag
=
filter
.
some
(
e
=>
{
if
(
e
.
name
===
name
)
{
e
.
value
=
value
;
return
true
;
}
});
!
flag
&&
filter
.
push
({
name
,
value
});
}
else
{
filter
=
filter
.
filter
(
e
=>
e
.
name
!==
name
);
}
this
.
setState
({
filter
},
this
.
props
.
retrieveOnChange
(
filter
));
}
getSearchContent
=
()
=>
{
const
{
retrieveType
}
=
this
.
props
;
const
{
showRiskLevel
,
showImpEquiList
,
impEquiList
}
=
this
.
state
;
if
(
retrieveType
===
'input'
)
{
return
(
<
Input
value
=
{
this
.
state
.
value
}
onChange
=
{
this
.
onChange
}
// onKeyPress={this.keypress}
/>
)
;
}
else
if
(
retrieveType
===
'select'
)
{
return
(
<
Select
data
=
{
bizControlsTypes
}
renderOption
=
{
item
=>
<
Option
value
=
{
item
.
key
}
>
{
item
.
label
}
<
/Option>
}
defaultOption
=
{
<
Option
>
请选择
<
/Option>
}
onChange
=
{
this
.
onSelectChange
}
/>
)
;
}
else
if
(
retrieveType
===
'search'
)
{
let
groupStyle
=
{
display
:
'unset'
,
width
:
'70%'
};
let
selectStyle
=
{
width
:
'25%'
,
minWidth
:
'20%'
,
marginRight
:
'14px'
};
let
inputStyle
=
{
width
:
'30%'
,
minWidth
:
'20%'
,
height
:
'28px'
,
marginRight
:
'14px'
};
let
levelStyle
=
{
width
:
'20%'
,
minWidth
:
'15%'
,
height
:
'28px'
,
marginRight
:
'14px'
};
let
implStyle
=
{
width
:
'35%'
,
minWidth
:
'20%'
,
height
:
'28px'
,
marginRight
:
'14px'
};
return
(
<
Group
style
=
{
groupStyle
}
>
<
Select
style
=
{
selectStyle
}
data
=
{
bizControlsTypes
}
renderOption
=
{
item
=>
<
Option
value
=
{
item
.
key
}
>
{
item
.
label
}
<
/Option>
}
defaultOption
=
{
<
Option
>
全部
<
/Option>
}
onChange
=
{
this
.
onSearchTypeChange
}
/
>
<
div
className
=
"params-input"
style
=
{
inputStyle
}
>
<
Input
value
=
{
this
.
state
.
textValue
}
onChange
=
{(
v
)
=>
this
.
onPamarmsChange
(
'inputText'
,
v
)}
// onKeyPress={this.keypress}
placeholder
=
"输入关键字"
/>
<
img
className
=
"params-input-img"
src
=
{
imgStatic
.
datapane
.
search
}
alt
=
""
/>
<
/div
>
{
showRiskLevel
&&
<
Select
style
=
{
levelStyle
}
data
=
{
riskSourceLevel
}
renderOption
=
{
item
=>
<
Option
value
=
{
item
.
key
}
>
{
item
.
label
}
<
/Option>
}
defaultOption
=
{
<
Option
>
全部
<
/Option>
}
onChange
=
{(
v
)
=>
this
.
onPamarmsChange
(
'dataLevel'
,
v
)}
/
>
}
{
showImpEquiList
&&
<
Select
style
=
{
implStyle
}
data
=
{
impEquiList
}
renderOption
=
{
item
=>
<
Option
value
=
{
item
.
name
}
>
{
item
.
name
}
<
/Option>
}
defaultOption
=
{
<
Option
>
全部
<
/Option>
}
onChange
=
{(
v
)
=>
this
.
onPamarmsChange
(
'impEquipment'
,
v
)}
/
>
}
<
/Group>
)
;
}
}
// keypress = (e) => {
// if (e.which === enterkey ){
// this.props.onSearch(trim(this.state.value || ''));
// }
// return;
// }
render
()
{
return
(
<
div
className
=
"params-header"
>
{
this
.
getSearchContent
()
}
<
/div
>
);
}
}
paramsHeader
.
propTypes
=
{
width
:
PropTypes
.
any
,
onSearch
:
PropTypes
.
func
,
retrieveOnChange
:
PropTypes
.
func
,
dataList
:
PropTypes
.
array
,
searchType
:
PropTypes
.
string
};
export
default
paramsHeader
;
mods/index.js
View file @
af248adc
import
parseWidgetsMod
from
'amos-viz/lib/widgets/modLoader'
;
import
{
commonRegister
}
from
'amos-viz/lib/widgets'
;
import
Unknown
from
'./Unknown'
;
const
innerModularType
=
commonRegister
.
innerModularType
;
const
getMods
=
(
req
)
=>
{
return
parseWidgetsMod
(
req
,
true
);
};
// 注册未知组件
commonRegister
.
registerSketchComponent
(
'unknown'
,
Unknown
);
// 注册所有的 SketchComponent
const
scReq
=
require
.
context
(
'./components'
,
true
,
/^
\.\/([^
_
][\w
-
]
+
\/)
+index
\.(
js|jsx
)?
$/
);
const
sketchComponets
=
getMods
(
scReq
);
Object
.
keys
(
sketchComponets
).
forEach
(
k
=>
{
commonRegister
.
registerSketchComponent
(
k
,
sketchComponets
[
k
]);
});
export
function
getSketchCompnents
(
alias
){
return
commonRegister
.
getModularClass
(
innerModularType
.
sketchComponent
,
alias
,
Unknown
);
}
const
mods
=
getMods
(
scReq
);
Object
.
keys
(
mods
).
forEach
(
mk
=>
{
if
(
mk
!==
'default'
){
exports
[
mk
]
=
mods
[
mk
];
}
});
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