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
57c19765
Commit
57c19765
authored
Mar 20, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
流程增加taskId
parent
6f420ec8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
10 deletions
+17
-10
constant.js
src/util/constant.js
+1
-0
EditModel.jsx
src/view/Manage/Model/Component/EditModel.jsx
+8
-5
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+1
-1
index.jsx
src/view/Manage/ModelReview/index.jsx
+7
-4
No files found.
src/util/constant.js
View file @
57c19765
...
@@ -20,6 +20,7 @@ export const Holder = 'holder';
...
@@ -20,6 +20,7 @@ export const Holder = 'holder';
export
const
ReadOnly
=
'readOnly'
;
export
const
ReadOnly
=
'readOnly'
;
export
const
ApprovalId
=
'approvalId'
;
export
const
ApprovalId
=
'approvalId'
;
export
const
ApprovalType
=
'approvalType'
;
export
const
ApprovalType
=
'approvalType'
;
export
const
TaskId
=
'taskId'
;
export
const
DataModelerRoleAdmin
=
'admin'
;
export
const
DataModelerRoleAdmin
=
'admin'
;
export
const
DataModelerRoleUser
=
'user'
;
export
const
DataModelerRoleUser
=
'user'
;
...
...
src/view/Manage/Model/Component/EditModel.jsx
View file @
57c19765
...
@@ -9,7 +9,7 @@ import ImportAction from './ImportAction';
...
@@ -9,7 +9,7 @@ import ImportAction from './ImportAction';
import
CatalogModal
from
'./CatalogModal'
;
import
CatalogModal
from
'./CatalogModal'
;
import
{
dispatchLatest
,
dispatch
}
from
'../../../../model'
;
import
{
dispatchLatest
,
dispatch
}
from
'../../../../model'
;
import
{
getQueryParam
,
showMessage
,
showNotifaction
}
from
'../../../../util'
;
import
{
getQueryParam
,
showMessage
,
showNotifaction
}
from
'../../../../util'
;
import
{
Action
,
CatalogId
,
ModelerId
,
Hints
,
ModelerData
,
PermitCheckOut
,
Editable
,
StateId
,
VersionId
,
Holder
,
DDL
,
ReadOnly
,
BranchId
,
ApprovalId
,
ApprovalType
}
from
'../../../../util/constant'
;
import
{
Action
,
CatalogId
,
ModelerId
,
Hints
,
ModelerData
,
PermitCheckOut
,
Editable
,
StateId
,
VersionId
,
Holder
,
DDL
,
ReadOnly
,
BranchId
,
ApprovalId
,
ApprovalType
,
TaskId
}
from
'../../../../util/constant'
;
import
HistoryAndVersionDrawer
from
'./HistoryAndVersionDrawer'
;
import
HistoryAndVersionDrawer
from
'./HistoryAndVersionDrawer'
;
import
{
EditModelContext
}
from
'./ContextManage'
;
import
{
EditModelContext
}
from
'./ContextManage'
;
import
EditInherited
from
'./EditInherited'
;
import
EditInherited
from
'./EditInherited'
;
...
@@ -23,7 +23,7 @@ import './EditModel.less';
...
@@ -23,7 +23,7 @@ import './EditModel.less';
const
EditModel
=
(
props
)
=>
{
const
EditModel
=
(
props
)
=>
{
const
[
actionData
,
setActionData
]
=
useState
({
action
:
''
,
catalogId
:
''
,
modelerId
:
''
,
hints
:
[],
roughModelerData
:
null
,
permitCheckOut
:
false
,
editable
:
false
,
stateId
:
''
,
versionId
:
''
,
ddl
:
''
,
readOnly
:
false
,
branchId
:
''
,
approvalId
:
''
,
approvalType
:
''
});
const
[
actionData
,
setActionData
]
=
useState
({
action
:
''
,
catalogId
:
''
,
modelerId
:
''
,
hints
:
[],
roughModelerData
:
null
,
permitCheckOut
:
false
,
editable
:
false
,
stateId
:
''
,
versionId
:
''
,
ddl
:
''
,
readOnly
:
false
,
branchId
:
''
,
approvalId
:
''
,
approvalType
:
''
,
taskId
:
''
});
const
[
modelerData
,
setModelerData
]
=
useState
({});
const
[
modelerData
,
setModelerData
]
=
useState
({});
const
[
terms
,
setTerms
]
=
useState
([]);
const
[
terms
,
setTerms
]
=
useState
([]);
...
@@ -51,7 +51,7 @@ const EditModel = (props) => {
...
@@ -51,7 +51,7 @@ const EditModel = (props) => {
const
attrIsEditingRef
=
useRef
(
false
);
const
attrIsEditingRef
=
useRef
(
false
);
const
indexIsEditingRef
=
useRef
(
false
);
const
indexIsEditingRef
=
useRef
(
false
);
const
{
action
,
catalogId
,
modelerId
,
hints
,
roughModelerData
,
permitCheckOut
,
editable
,
stateId
,
versionId
,
holder
,
ddl
,
readOnly
,
branchId
,
approvalId
,
approvalType
}
=
actionData
;
const
{
action
,
catalogId
,
modelerId
,
hints
,
roughModelerData
,
permitCheckOut
,
editable
,
stateId
,
versionId
,
holder
,
ddl
,
readOnly
,
branchId
,
approvalId
,
approvalType
,
taskId
}
=
actionData
;
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
()
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
()
...
@@ -73,6 +73,7 @@ const EditModel = (props) => {
...
@@ -73,6 +73,7 @@ const EditModel = (props) => {
const
_branchId
=
getQueryParam
(
BranchId
,
props
.
location
.
search
)
const
_branchId
=
getQueryParam
(
BranchId
,
props
.
location
.
search
)
const
_approvalId
=
getQueryParam
(
ApprovalId
,
props
.
location
.
search
)
const
_approvalId
=
getQueryParam
(
ApprovalId
,
props
.
location
.
search
)
const
_approvalType
=
getQueryParam
(
ApprovalType
,
props
.
location
.
search
)
const
_approvalType
=
getQueryParam
(
ApprovalType
,
props
.
location
.
search
)
const
_taskId
=
getQueryParam
(
TaskId
,
props
.
location
.
search
)
let
_hints
=
[];
let
_hints
=
[];
if
((
_hintsStr
||
''
)
!==
''
)
{
if
((
_hintsStr
||
''
)
!==
''
)
{
...
@@ -86,7 +87,7 @@ const EditModel = (props) => {
...
@@ -86,7 +87,7 @@ const EditModel = (props) => {
judgeAttributeRepeat
(
_roughModelerData
.
easyDataModelerDataModelAttributes
);
judgeAttributeRepeat
(
_roughModelerData
.
easyDataModelerDataModelAttributes
);
}
}
setActionData
({
action
:
_action
,
catalogId
:
_catalogId
,
modelerId
:
_modelerId
,
hints
:
_hints
,
roughModelerData
:
_roughModelerData
,
permitCheckOut
:
(
_permitCheckOut
===
'true'
),
editable
:
(
_editable
===
'true'
),
stateId
:
_stateId
,
versionId
:
_versionId
,
holder
:
_holder
,
ddl
:
_ddl
,
readOnly
:
_readOnly
,
branchId
:
_branchId
,
approvalId
:
_approvalId
,
approvalType
:
_approvalType
});
setActionData
({
action
:
_action
,
catalogId
:
_catalogId
,
modelerId
:
_modelerId
,
hints
:
_hints
,
roughModelerData
:
_roughModelerData
,
permitCheckOut
:
(
_permitCheckOut
===
'true'
),
editable
:
(
_editable
===
'true'
),
stateId
:
_stateId
,
versionId
:
_versionId
,
holder
:
_holder
,
ddl
:
_ddl
,
readOnly
:
_readOnly
,
branchId
:
_branchId
,
approvalId
:
_approvalId
,
approvalType
:
_approvalType
,
taskId
:
_taskId
});
actionRef
.
current
=
_action
;
actionRef
.
current
=
_action
;
if
(
_approvalId
)
{
if
(
_approvalId
)
{
...
@@ -590,6 +591,7 @@ const EditModel = (props) => {
...
@@ -590,6 +591,7 @@ const EditModel = (props) => {
loading={loadingApprovalData}
loading={loadingApprovalData}
data={approvalData}
data={approvalData}
id={currentApprovalModelId}
id={currentApprovalModelId}
taskId={taskId}
type={approvalType}
type={approvalType}
onExport={() => {
onExport={() => {
setExportParams({ visible: true })
setExportParams({ visible: true })
...
@@ -731,7 +733,7 @@ const EditModel = (props) => {
...
@@ -731,7 +733,7 @@ const EditModel = (props) => {
export default EditModel;
export default EditModel;
const PhysicalModelApprovalBottom = ({ loading, type, data, id, onChange, onOk, onHistory, onExport }) => {
const PhysicalModelApprovalBottom = ({ loading, type, data, id,
taskId,
onChange, onOk, onHistory, onExport }) => {
const [item, setItem] = useState()
const [item, setItem] = useState()
const [waiting, setWaiting] = useState(false)
const [waiting, setWaiting] = useState(false)
...
@@ -792,6 +794,7 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, onChange, onOk,
...
@@ -792,6 +794,7 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, onChange, onOk,
type: 'datamodel.updatePhysicalModelApproval',
type: 'datamodel.updatePhysicalModelApproval',
payload: {
payload: {
params: {
params: {
taskId,
physicalModelApprovalId: data?.id,
physicalModelApprovalId: data?.id,
},
},
data: newModelInfoList,
data: newModelInfoList,
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
57c19765
...
@@ -178,7 +178,7 @@ const ModelTable = (props) => {
...
@@ -178,7 +178,7 @@ const ModelTable = (props) => {
return (
return (
<div className='flex' style={{ alignItems: 'center' }}>
<div className='flex' style={{ alignItems: 'center' }}>
{
{
view === 'branch' && (behindAlramData??[]).
indexOf(props.row.id)
!== -1 && <Tooltip title='基线模型有变更'>
view === 'branch' && (behindAlramData??[]).
findIndex(item => item.id === props.row.id)
!== -1 && <Tooltip title='基线模型有变更'>
<Button size='small' type='text' icon={<ExclamationCircleFilled className='pointer' style={{ fontSize: 18, color: '#E94848' }} />} />
<Button size='small' type='text' icon={<ExclamationCircleFilled className='pointer' style={{ fontSize: 18, color: '#E94848' }} />} />
</Tooltip>
</Tooltip>
}
}
...
...
src/view/Manage/ModelReview/index.jsx
View file @
57c19765
...
@@ -5,7 +5,7 @@ import produce from "immer"
...
@@ -5,7 +5,7 @@ import produce from "immer"
import
Table
from
'../../../util/Component/Table'
import
Table
from
'../../../util/Component/Table'
import
{
isSzseEnv
,
getQueryParam
,
showMessage
}
from
"../../../util"
import
{
isSzseEnv
,
getQueryParam
,
showMessage
}
from
"../../../util"
import
{
dispatch
}
from
'../../../model'
;
import
{
dispatch
}
from
'../../../model'
;
import
{
Action
,
ApprovalId
,
ApprovalType
,
ModelerId
}
from
"../../../util/constant"
import
{
Action
,
ApprovalId
,
ApprovalType
,
ModelerId
,
TaskId
}
from
"../../../util/constant"
const
FC
=
(
props
)
=>
{
const
FC
=
(
props
)
=>
{
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
...
@@ -15,6 +15,7 @@ const FC = (props) => {
...
@@ -15,6 +15,7 @@ const FC = (props) => {
const
id
=
getQueryParam
(
'id'
,
props
.
location
?.
search
)
const
id
=
getQueryParam
(
'id'
,
props
.
location
?.
search
)
const
type
=
getQueryParam
(
'type'
,
props
.
location
?.
search
)
const
type
=
getQueryParam
(
'type'
,
props
.
location
?.
search
)
const
taskId
=
getQueryParam
(
'taskId'
,
props
.
location
?.
search
)
const
listRef
=
React
.
useRef
()
const
listRef
=
React
.
useRef
()
...
@@ -60,6 +61,7 @@ const FC = (props) => {
...
@@ -60,6 +61,7 @@ const FC = (props) => {
type
:
'datamodel.updatePhysicalModelApproval'
,
type
:
'datamodel.updatePhysicalModelApproval'
,
payload
:
{
payload
:
{
params
:
{
params
:
{
taskId
,
physicalModelApprovalId
:
id
,
physicalModelApprovalId
:
id
,
},
},
data
:
tableData
data
:
tableData
...
@@ -90,6 +92,7 @@ const FC = (props) => {
...
@@ -90,6 +92,7 @@ const FC = (props) => {
type
:
'datamodel.commitPhysicalModelApproval'
,
type
:
'datamodel.commitPhysicalModelApproval'
,
payload
:
{
payload
:
{
params
:
{
params
:
{
taskId
,
physicalModelApprovalId
:
id
,
physicalModelApprovalId
:
id
,
...
rows
,
...
rows
,
},
},
...
@@ -161,7 +164,7 @@ const FC = (props) => {
...
@@ -161,7 +164,7 @@ const FC = (props) => {
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
>
</
Form
>
</
div
>
</
div
>
<
List
ref=
{
listRef
}
type=
{
type
}
data=
{
data
}
/>
<
List
ref=
{
listRef
}
type=
{
type
}
data=
{
data
}
taskId=
{
taskId
}
/>
</
div
>
</
div
>
</
Spin
>
</
Spin
>
)
)
...
@@ -169,7 +172,7 @@ const FC = (props) => {
...
@@ -169,7 +172,7 @@ const FC = (props) => {
export
default
FC
export
default
FC
const
List
=
React
.
forwardRef
(
function
({
type
,
data
},
ref
)
{
const
List
=
React
.
forwardRef
(
function
({
type
,
data
,
taskId
},
ref
)
{
const
[
tableData
,
setTableData
]
=
React
.
useState
()
const
[
tableData
,
setTableData
]
=
React
.
useState
()
const
[
form
]
=
Form
.
useForm
()
const
[
form
]
=
Form
.
useForm
()
...
@@ -337,7 +340,7 @@ const List = React.forwardRef(function ({type, data}, ref) {
...
@@ -337,7 +340,7 @@ const List = React.forwardRef(function ({type, data}, ref) {
]
]
const
onModelClick
=
(
record
,
index
)
=>
{
const
onModelClick
=
(
record
,
index
)
=>
{
window
.
open
(
`/data-govern/data-model-action?
${
Action
}
=flow&
${
ModelerId
}
=
${
record
?.
id
}
&
$
{
ApprovalId
}
=
$
{
data
?.
id
}
&
$
{
ApprovalType
}
=
$
{
type
}
`)
window
.
open
(
`/data-govern/data-model-action?
${
Action
}
=flow&
${
ModelerId
}
=
${
record
?.
id
}
&
$
{
ApprovalId
}
=
$
{
data
?.
id
}
&
$
{
ApprovalType
}
=
$
{
type
}
&
$
{
TaskId
}
=
$
{
taskId
}
`)
}
}
return (
return (
...
...
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