Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-convertor-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-convertor-view
Commits
b7dc3329
Commit
b7dc3329
authored
Jun 17, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.全景监控按钮增加权限控制
parent
876891a9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
11 deletions
+56
-11
urlConsts.js
src/consts/urlConsts.js
+2
-0
securityService.js
src/services/securityService.js
+12
-1
index.js
src/view/3dview/convertor3d/index.js
+2
-1
index.js
src/view/panoramicMonitor/index.js
+31
-2
index.js
src/view/region/index.js
+9
-7
No files found.
src/consts/urlConsts.js
View file @
b7dc3329
...
@@ -44,6 +44,8 @@ export const secExtUrl = {
...
@@ -44,6 +44,8 @@ export const secExtUrl = {
permissionsMenusUrl
:
completePrefix
(
securityBaseURI
,
`privilege/
${
secExVerson
}
/permission/tree/role?roleSeq={roleSeq}`
),
permissionsMenusUrl
:
completePrefix
(
securityBaseURI
,
`privilege/
${
secExVerson
}
/permission/tree/role?roleSeq={roleSeq}`
),
loginOutUrl
:
completePrefix
(
baseURI
,
'privilege/v1/auth/token'
),
// 注销 delete
loginOutUrl
:
completePrefix
(
baseURI
,
'privilege/v1/auth/token'
),
// 注销 delete
// 获取指定菜单下授权的按钮权限 get
buttonAuthUrl
:
completePrefix
(
securityBaseURI
,
`privilege/
${
secExVerson
}
/permission/map/user/button?menuAgent={menuAgent}&path={path}&roleSeq={roleSeq}`
)
//avoidLoginUrl: completePrefix(baseURI,'api/login/avoid/{loginId}/{accessToken}/{expireTime}?appType={appType}')
//avoidLoginUrl: completePrefix(baseURI,'api/login/avoid/{loginId}/{accessToken}/{expireTime}?appType={appType}')
};
};
...
...
src/services/securityService.js
View file @
b7dc3329
...
@@ -4,7 +4,7 @@ import {
...
@@ -4,7 +4,7 @@ import {
}
from
'amos-security/lib/services'
;
}
from
'amos-security/lib/services'
;
import
formatUrl
from
'amos-processor/lib/utils/urlFormat'
;
import
formatUrl
from
'amos-processor/lib/utils/urlFormat'
;
import
{
Store
}
from
'amos-tool'
;
import
{
Store
,
encodeUrl
}
from
'amos-tool'
;
import
{
secExtUrl
}
from
'./../consts/urlConsts'
;
import
{
secExtUrl
}
from
'./../consts/urlConsts'
;
import
{
commonGet
,
commonPost
,
commonDelete
}
from
'./../utils/request'
;
import
{
commonGet
,
commonPost
,
commonDelete
}
from
'./../utils/request'
;
import
{
FasSerUrl
,
getOutterURL
}
from
'./../consts/urlConsts'
;
import
{
FasSerUrl
,
getOutterURL
}
from
'./../consts/urlConsts'
;
...
@@ -130,3 +130,14 @@ export const userModelURIAction = () => {
...
@@ -130,3 +130,14 @@ export const userModelURIAction = () => {
let
url
=
formatUrl
(
getOutterURL
(
'userModelURI'
),
{
token
});
let
url
=
formatUrl
(
getOutterURL
(
'userModelURI'
),
{
token
});
return
url
;
return
url
;
};
};
/**
* 获取登陆者的全景监控安全权限
* @param {String} path
*/
export
const
buttonAuthAction
=
(
path
)
=>
{
const
roleSeq
=
lsTool
.
read
(
'selectedRole'
);
const
menuAgent
=
'WEB'
;
const
url
=
formatUrl
(
secExtUrl
.
buttonAuthUrl
,
{
path
:
encodeUrl
(
path
),
roleSeq
,
menuAgent
});
return
commonGet
(
url
);
};
src/view/3dview/convertor3d/index.js
View file @
b7dc3329
...
@@ -3,9 +3,10 @@ import getSketchCompnents from './sketch';
...
@@ -3,9 +3,10 @@ import getSketchCompnents from './sketch';
export
default
class
Convertor3d
extends
Component
{
export
default
class
Convertor3d
extends
Component
{
render
()
{
render
()
{
const
{
...
rest
}
=
this
.
props
;
const
Sketch
=
getSketchCompnents
(
'convertorView3DRoot'
)
;
const
Sketch
=
getSketchCompnents
(
'convertorView3DRoot'
)
;
return
(
return
(
<
Sketch
/>
<
Sketch
{...
rest
}
/
>
);
);
}
}
}
}
src/view/panoramicMonitor/index.js
View file @
b7dc3329
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
*
as
endConf
from
'amos-processor/lib/config/endconf'
;
import
*
as
endConf
from
'amos-processor/lib/config/endconf'
;
import
Convertor3d
from
'../3dview/convertor3d'
;
import
Convertor3d
from
'../3dview/convertor3d'
;
import
Ue4RootView
from
'./../ue4'
;
import
Ue4RootView
from
'./../ue4'
;
import
{
buttonAuthAction
}
from
'./../../services/securityService'
;
const
AmosConfig
=
endConf
.
AmosConfig
;
const
AmosConfig
=
endConf
.
AmosConfig
;
const
{
is3dUe4
=
false
}
=
AmosConfig
.
sysConf
;
const
{
is3dUe4
=
false
}
=
AmosConfig
.
sysConf
;
...
@@ -9,10 +11,37 @@ const { is3dUe4 = false } = AmosConfig.sysConf;
...
@@ -9,10 +11,37 @@ const { is3dUe4 = false } = AmosConfig.sysConf;
/**
/**
* 全景监控
* 全景监控
*/
*/
export
default
class
PanoramicMonitor
extends
Component
{
class
PanoramicMonitor
extends
Component
{
constructor
(
props
){
super
(
props
);
this
.
state
=
{
isPermissionControl
:
true
,
bizPerActionBars
:
[]
};
}
componentDidMount
(){
const
{
pathname
}
=
this
.
props
.
location
;
this
.
getPermissionButton
(
pathname
);
}
getPermissionButton
=
(
pathname
)
=>
{
buttonAuthAction
(
pathname
).
then
(
data
=>
{
this
.
setState
({
bizPerActionBars
:
data
});
});
}
render
()
{
render
()
{
const
{
isPermissionControl
,
bizPerActionBars
}
=
this
.
state
;
return
(
return
(
is3dUe4
?
<
Ue4RootView
/>
:
<
Convertor3d
/>
is3dUe4
?
<
Ue4RootView
/>
:
<
Convertor3d
isPermissionControl
=
{
isPermissionControl
}
bizPerActionBars
=
{
bizPerActionBars
}
/
>
);
);
}
}
}
}
PanoramicMonitor
.
propTypes
=
{
location
:
PropTypes
.
object
};
export
default
PanoramicMonitor
;
src/view/region/index.js
View file @
b7dc3329
...
@@ -102,11 +102,13 @@ import PropTypes from 'prop-types';
...
@@ -102,11 +102,13 @@ import PropTypes from 'prop-types';
import
{
browserHistory
}
from
'amos-react-router'
;
import
{
browserHistory
}
from
'amos-react-router'
;
import
{
Select
,
Form
,
Button
}
from
'amos-framework'
;
import
{
Select
,
Form
,
Button
}
from
'amos-framework'
;
import
{
Store
}
from
'amos-tool'
;
import
{
Store
}
from
'amos-tool'
;
import
{
getCurrentUser
,
regionSelectAction
}
from
'./../../services/securityService'
;
import
*
as
endConf
from
'amos-processor/lib/config/endconf'
;
import
*
as
endConf
from
'amos-processor/lib/config/endconf'
;
import
_amosTool
from
'amos-tool'
;
import
_amosTool
from
'amos-tool'
;
import
SysConsts
from
'amos-processor/lib/config/consts'
;
import
SysConsts
from
'amos-processor/lib/config/consts'
;
import
{
setRegion
}
from
'UTILS/cacheUtils'
;
import
{
setRegion
}
from
'UTILS/cacheUtils'
;
import
{
getCurrentUser
,
regionSelectAction
}
from
'./../../services/securityService'
;
const
lsTool
=
Store
.
lsTool
;
const
lsTool
=
Store
.
lsTool
;
const
ls
=
_amosTool
.
Store
.
lsTool
;
const
ls
=
_amosTool
.
Store
.
lsTool
;
const
AmosConfig
=
endConf
.
AmosConfig
;
const
AmosConfig
=
endConf
.
AmosConfig
;
...
@@ -145,12 +147,12 @@ class RegionSelect extends Component {
...
@@ -145,12 +147,12 @@ class RegionSelect extends Component {
regionSelectAction
(
reginParams
).
then
(
regionSelectAction
(
reginParams
).
then
(
data
=>
{
data
=>
{
//1.打开3d屏
//1.打开3d屏
browserHistory
.
push
(
'/main/3dview'
);
browserHistory
.
push
(
'/main/3dview'
);
//2.通过配置,确定是否打开业务屏
//2.通过配置,确定是否打开业务屏
if
(
isAutoOpen
){
if
(
isAutoOpen
){
let
url
=
'?token='
+
ls
.
read
(
token
)
;
const
url
=
`?token=+
${
ls
.
read
(
token
)}
`
;
window
.
open
(
'/biz/assessment/'
+
url
);
window
.
open
(
'/biz/assessment/'
+
url
);
}
}
}
}
);
);
}
}
...
...
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