Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
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
ReactWeb5
CivManage
Commits
b0875ab5
Commit
b0875ab5
authored
Nov 12, 2020
by
张烨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 跳转样式
parent
6e8b3970
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
10 deletions
+51
-10
index.js
src/components/BaseFramContainer/index.js
+25
-7
index.less
src/components/BaseFramContainer/index.less
+12
-1
config.js
src/routes/config.js
+14
-2
No files found.
src/components/BaseFramContainer/index.js
View file @
b0875ab5
import
{
isDev
}
from
'@/utils/tools'
;
import
{
PageContainer
}
from
'@ant-design/pro-layout'
;
import
{
Tabs
}
from
'antd'
;
import
React
from
'react'
;
import
styles
from
'./index.less'
;
const
{
TabPane
}
=
Tabs
;
/**
* 嵌套iframe的组件
* @param {*} props 可在路由配置里面配置url参数
*/
const
FrameContainer
=
props
=>
{
const
{
route
}
=
props
;
const
url
=
route
.
url
||
props
.
url
;
const
{
url
=
props
.
url
,
tabs
=
props
.
tabs
,
tabProps
=
{}
}
=
route
;
const
renderedFrame
=
tabs
?
(
<
Tabs
type
=
"card"
hideAdd
{...
tabProps
}
>
{
tabs
.
map
(({
url
:
iframeUrl
,
tabName
})
=>
(
<
TabPane
tab
=
{
tabName
}
key
=
{
tabName
}
>
<
iframe
title
=
{
tabName
}
src
=
{
`
${
isDev
?
process
.
env
.
PROXY
:
window
.
location
.
origin
}${
iframeUrl
}
`
}
/
>
<
/TabPane
>
))}
<
/Tabs
>
)
:
(
<
iframe
title
=
"iframe"
src
=
{
`
${
isDev
?
process
.
env
.
PROXY
:
window
.
location
.
origin
}${
url
}
`
}
/
>
);
return
(
<
PageContainer
className
=
{
styles
.
container
}
...
...
@@ -19,12 +42,7 @@ const FrameContainer = props => {
height
:
'calc(100% + 24px)'
,
}}
>
<
iframe
title
=
"iframe"
src
=
{
`
${
isDev
?
process
.
env
.
PROXY
:
window
.
location
.
origin
}${
url
}
`
.
replace
(
'//'
,
'/'
)}
/
>
{
renderedFrame
}
<
/PageContainer
>
);
};
...
...
src/components/BaseFramContainer/index.less
View file @
b0875ab5
...
...
@@ -3,7 +3,7 @@
.ant-pro-grid-content{
flex: 1;
.ant-pro-grid-content-children{
height:
100%
;
height:
calc(100% - 12px)
;
&>div{
height: 100%;
.ant-pro-page-container-children-content{
...
...
@@ -12,8 +12,18 @@
width: 100%;
height: 100%;
}
}
}
}
.ant-tabs.ant-tabs-top.ant-tabs-card{
height: 100%;
.ant-tabs-nav{
margin: 0;
}
.ant-tabs-content.ant-tabs-content-top{
height: 100%;
}
}
}
}
\ No newline at end of file
src/routes/config.js
View file @
b0875ab5
...
...
@@ -148,13 +148,25 @@ export default {
{
path
:
'/platformCenter/notify'
,
name
:
'消息平台'
,
component
:
Welcome
,
component
:
BaseFramContainer
,
tabs
:
[
{
tabName
:
'推送模板配置'
,
url
:
'/web4/?widget=product/oms/MessageTem/MessageTem|hideMap=true&state=scan'
,
},
{
tabName
:
'推送方案配置'
,
url
:
'/web4/?widget=product/oms/MessageConfig/MessageConfig|hideMap=true'
,
},
],
},
{
path
:
'/platformCenter/vedio'
,
name
:
'视频管理'
,
url
:
'
http://192.168.10.151:8055
/web4/?widget=product/oms/VideoConfig/VideoConfig|hideMap=true&videoType=萤石云'
,
'/web4/?widget=product/oms/VideoConfig/VideoConfig|hideMap=true&videoType=萤石云'
,
component
:
BaseFramContainer
,
},
{
...
...
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