Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
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
zhaochengxiang
szse
Commits
4ff996a4
Commit
4ff996a4
authored
Jun 09, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全文检索
parent
5aa636ac
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
10 deletions
+35
-10
App.js
src/App.js
+18
-0
index.js
src/index.js
+7
-8
index.js
src/layout/index.js
+1
-0
ImportModal.jsx
src/view/Manage/Model/Component/ImportModal.jsx
+9
-2
No files found.
src/App.js
View file @
4ff996a4
...
@@ -14,9 +14,27 @@ import AssetManage from './view/Manage/AssetManage';
...
@@ -14,9 +14,27 @@ import AssetManage from './view/Manage/AssetManage';
import
AssetBrowse
from
'./view/Manage/AssetBrowse'
;
import
AssetBrowse
from
'./view/Manage/AssetBrowse'
;
import
AssetRecycle
from
'./view/Manage/AssetRecycle'
;
import
AssetRecycle
from
'./view/Manage/AssetRecycle'
;
import
DatasourceManage
from
'./view/Manage/DatasourceManage'
;
import
DatasourceManage
from
'./view/Manage/DatasourceManage'
;
import
ImportModal
from
'./view/Manage/Model/Component/ImportModal'
;
export
default
class
App
extends
React
.
Component
{
export
default
class
App
extends
React
.
Component
{
render
()
{
render
()
{
const
{
params
,
callback
}
=
this
.
props
;
let
message
=
''
,
id
=
''
;
if
(
params
)
{
message
=
params
.
message
||
''
;
id
=
params
.
id
||
''
;
}
if
(
message
===
'showDataModelDetail'
)
{
return
<
ImportModal
modelerId
=
{
id
}
reference
=
'search'
action
=
'detail'
/>
;
}
return
(
return
(
<
React
.
Fragment
>
<
React
.
Fragment
>
<
Router
basename
=
{
window
.
__POWERED_BY_QIANKUN__
?
'/data-govern'
:
'/'
}
>
<
Router
basename
=
{
window
.
__POWERED_BY_QIANKUN__
?
'/data-govern'
:
'/'
}
>
...
...
src/index.js
View file @
4ff996a4
...
@@ -11,19 +11,18 @@ import App from './App'
...
@@ -11,19 +11,18 @@ import App from './App'
import
'./index.less'
;
import
'./index.less'
;
const
app
=
(
function
render
(
props
)
{
const
{
container
,
...
restProps
}
=
props
;
ReactDOM
.
render
(
//解决主次应用样式冲突
//解决主次应用样式冲突
//https://qiankun.umijs.org/faq#how-to-guarantee-the-main-app-stylesheet-isolated-with-sub-apps
//https://qiankun.umijs.org/faq#how-to-guarantee-the-main-app-stylesheet-isolated-with-sub-apps
<
ConfigProvider
locale
=
{
zh_CN
}
prefixCls
=
"yy"
>
<
ConfigProvider
locale
=
{
zh_CN
}
prefixCls
=
"yy"
>
<
Provider
store
=
{
store
}
><
App
/><
/Provider
>
<
Provider
store
=
{
store
}
><
App
{...
restProps
}
/></
Provider
>
<
/ConfigProvider
>
<
/ConfigProvider>,
);
container
?
container
.
querySelector
(
'#root'
)
:
document
.
querySelector
(
'#root'
));
function
render
(
props
)
{
const
{
container
}
=
props
;
ReactDOM
.
render
(
app
,
container
?
container
.
querySelector
(
'#root'
)
:
document
.
querySelector
(
'#root'
));
}
}
function
storeTest
(
props
)
{
function
storeTest
(
props
)
{
props
.
onGlobalStateChange
((
value
,
prev
)
=>
console
.
log
(
`[onGlobalStateChange -
${
props
.
name
}
]:`
,
value
,
prev
),
true
);
props
.
onGlobalStateChange
((
value
,
prev
)
=>
console
.
log
(
`[onGlobalStateChange -
${
props
.
name
}
]:`
,
value
,
prev
),
true
);
...
...
src/layout/index.js
View file @
4ff996a4
...
@@ -52,6 +52,7 @@ function GetMenuIcon({ name = '', isMenuItem = false }) {
...
@@ -52,6 +52,7 @@ function GetMenuIcon({ name = '', isMenuItem = false }) {
function
GetSubMenu
(
children
,
depth
=
0
)
{
function
GetSubMenu
(
children
,
depth
=
0
)
{
return
children
.
map
((
route
,
i
)
=>
{
return
children
.
map
((
route
,
i
)
=>
{
const
key
=
`
${
depth
}
-
${
i
}
`
;
const
key
=
`
${
depth
}
-
${
i
}
`
;
return
route
.
children
?
return
route
.
children
?
<
SubMenu
key
=
{
route
.
path
}
className
=
{
'layout-menu'
}
<
SubMenu
key
=
{
route
.
path
}
className
=
{
'layout-menu'
}
title
=
{
title
=
{
...
...
src/view/Manage/Model/Component/ImportModal.jsx
View file @
4ff996a4
...
@@ -11,7 +11,7 @@ import { dispatchLatest } from '../../../../model';
...
@@ -11,7 +11,7 @@ import { dispatchLatest } from '../../../../model';
import
{
showMessage
}
from
'../../../../util'
;
import
{
showMessage
}
from
'../../../../util'
;
const
ImportModal
=
(
props
)
=>
{
const
ImportModal
=
(
props
)
=>
{
const
{
catalogId
,
visible
,
onCancel
,
action
,
addMode
,
modelerId
}
=
props
;
const
{
catalogId
,
visible
,
onCancel
,
action
,
addMode
,
modelerId
,
reference
=
null
}
=
props
;
const
[
step
,
setStep
]
=
useState
(
0
);
const
[
step
,
setStep
]
=
useState
(
0
);
const
[
excelFiles
,
setExcelFiles
]
=
useState
([]);
const
[
excelFiles
,
setExcelFiles
]
=
useState
([]);
const
[
hints
,
setHints
]
=
useState
([]);
const
[
hints
,
setHints
]
=
useState
([]);
...
@@ -218,7 +218,9 @@ const ImportModal = (props) => {
...
@@ -218,7 +218,9 @@ const ImportModal = (props) => {
}
}
return
(
return
(
<
Modal
<>
{
!
reference
&&
<
Modal
forceRender
forceRender
visible=
{
visible
}
visible=
{
visible
}
title=
{
title
}
title=
{
title
}
...
@@ -248,6 +250,11 @@ const ImportModal = (props) => {
...
@@ -248,6 +250,11 @@ const ImportModal = (props) => {
}
}
</>
</>
</
Modal
>
</
Modal
>
}
{
reference
===
'search'
&&
<
ImportAction
hints=
{
hints
}
onChange=
{
onActionChange
}
action=
{
action
}
modelerId=
{
modelerId
}
form=
{
form
}
/>
}
</>
)
)
}
}
...
...
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