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
0c1ef5b0
Commit
0c1ef5b0
authored
Sep 09, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下发盘古权限控制
parent
6b25568e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
index.js
src/util/index.js
+1
-1
ExportOtherModal.jsx
src/view/Manage/Model/Component/ExportOtherModal.jsx
+15
-3
StartFlowModal.jsx
src/view/Manage/Model/Component/StartFlowModal.jsx
+7
-3
No files found.
src/util/index.js
View file @
0c1ef5b0
...
@@ -387,7 +387,7 @@ export function getTextWidth(text, font='14px tabular-nums') {
...
@@ -387,7 +387,7 @@ export function getTextWidth(text, font='14px tabular-nums') {
}
}
export
function
getDataModelerRole
(
user
)
{
export
function
getDataModelerRole
(
user
)
{
if
((
user
?.
roles
||
[]).
indexOf
(
'ROLE_data
Service
_admin'
)
!==
-
1
)
{
if
((
user
?.
roles
||
[]).
indexOf
(
'ROLE_data
Modeler
_admin'
)
!==
-
1
)
{
return
DataModelerRoleAdmin
;
return
DataModelerRoleAdmin
;
}
}
// else if ((user?.roles||[]).indexOf('ROLE_dataModeler_user') !== -1) {
// else if ((user?.roles||[]).indexOf('ROLE_dataModeler_user') !== -1) {
...
...
src/view/Manage/Model/Component/ExportOtherModal.jsx
View file @
0c1ef5b0
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
,
useContext
}
from
'react'
;
import
{
Modal
,
Button
,
Form
,
Radio
}
from
'antd'
;
import
{
Modal
,
Button
,
Form
,
Radio
}
from
'antd'
;
import
{
AppContext
}
from
'../../../../App'
;
import
{
getDataModelerRole
}
from
'../../../../util'
;
import
{
DataModelerRoleAdmin
}
from
'../../../../util/constant'
;
const
exportModes
=
[
const
exportModes
=
[
{
name
:
'导出DDL'
,
key
:
'ddl'
},
{
name
:
'导出DDL'
,
key
:
'ddl'
},
...
@@ -12,11 +15,20 @@ const exportModes = [
...
@@ -12,11 +15,20 @@ const exportModes = [
const
ExportOtherModal
=
(
props
)
=>
{
const
ExportOtherModal
=
(
props
)
=>
{
const
{
visible
,
onCancel
}
=
props
;
const
{
visible
,
onCancel
}
=
props
;
const
[
modeKey
,
setModeKey
]
=
useState
(
''
);
const
[
modeKey
,
setModeKey
]
=
useState
(
''
);
const
app
=
useContext
(
AppContext
);
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
_exportModes
=
React
.
useMemo
(()
=>
{
if
(
getDataModelerRole
(
app
?.
user
)
!==
DataModelerRoleAdmin
)
{
return
exportModes
.
filter
(
item
=>
item
.
key
!==
'upload'
)
}
return
exportModes
},
[])
const
onModeChange
=
(
e
)
=>
{
const
onModeChange
=
(
e
)
=>
{
setModeKey
(
e
.
target
?.
value
);
setModeKey
(
e
.
target
?.
value
);
}
}
...
@@ -81,7 +93,7 @@ const ExportOtherModal = (props) => {
...
@@ -81,7 +93,7 @@ const ExportOtherModal = (props) => {
>
>
<
Radio
.
Group
onChange=
{
onModeChange
}
value=
{
modeKey
}
>
<
Radio
.
Group
onChange=
{
onModeChange
}
value=
{
modeKey
}
>
{
{
exportModes
.
map
((
item
,
index
)
=>
{
_
exportModes
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
Radio
<
Radio
...
...
src/view/Manage/Model/Component/StartFlowModal.jsx
View file @
0c1ef5b0
...
@@ -3,7 +3,7 @@ import { Modal, Form, Input, Button, Spin } from 'antd';
...
@@ -3,7 +3,7 @@ import { Modal, Form, Input, Button, Spin } from 'antd';
import
LocalStorage
from
'local-storage'
;
import
LocalStorage
from
'local-storage'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
showNotifaction
}
from
'../../../../util'
;
import
{
show
Message
,
show
Notifaction
}
from
'../../../../util'
;
const
StartFlowModal
=
(
props
)
=>
{
const
StartFlowModal
=
(
props
)
=>
{
const
{
visible
,
onCancel
,
items
}
=
props
;
const
{
visible
,
onCancel
,
items
}
=
props
;
...
@@ -34,9 +34,13 @@ const StartFlowModal = (props) => {
...
@@ -34,9 +34,13 @@ const StartFlowModal = (props) => {
sendReviewExplain
:
rows
.
desc
,
sendReviewExplain
:
rows
.
desc
,
}
}
},
},
callback
:
data
=>
{
callback
:
data
=>
{
if
(
data
)
{
if
(
data
)
{
showNotifaction
(
'送审提示'
,
data
,
5
);
if
(
data
===
'发起成功'
)
{
showMessage
(
'success'
,
data
)
}
else
{
showNotifaction
(
'送审提示'
,
data
,
5
);
}
}
}
LocalStorage
.
set
(
'modelChange'
,
!
(
LocalStorage
.
get
(
'modelChange'
)
||
false
));
LocalStorage
.
set
(
'modelChange'
,
!
(
LocalStorage
.
get
(
'modelChange'
)
||
false
));
...
...
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