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
91c96e87
Commit
91c96e87
authored
Feb 26, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
已发布模型下的草稿选择送审状态没有实时改变
parent
4b9fe130
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
14 deletions
+47
-14
datamodel.js
src/model/datamodel.js
+6
-2
datamodeler.js
src/service/datamodeler.js
+5
-1
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+1
-1
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+35
-10
No files found.
src/model/datamodel.js
View file @
91c96e87
...
...
@@ -186,8 +186,12 @@ export function* getDataModelWithRecommendedDefinitionAndTermDiscovery(payload)
return
yield
call
(
datamodelerService
.
getDataModelWithRecommendedDefinitionAndTermDiscovery
,
payload
);
}
export
function
*
getCheckOutDataModel
(
payload
)
{
return
yield
call
(
datamodelerService
.
getCheckOutDataModel
,
payload
);
export
function
*
checkOutDataModel
(
payload
)
{
return
yield
call
(
datamodelerService
.
checkOutDataModel
,
payload
);
}
export
function
*
getCheckoutDataModel
(
payload
)
{
return
yield
call
(
datamodelerService
.
getCheckoutDataModel
,
payload
);
}
export
function
*
getDataModelLocation
(
payload
)
{
...
...
src/service/datamodeler.js
View file @
91c96e87
...
...
@@ -141,7 +141,7 @@ export function getDataModelWithRecommendedDefinitionAndTermDiscovery(payload) {
return
GetJSON
(
"/datamodeler/easyDataModelerCURD/getDataModelWithRecommendedDefinitionAndTermDiscovery"
,
payload
);
}
export
function
getC
heckOutDataModel
(
payload
)
{
export
function
c
heckOutDataModel
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelerCURD/checkOutDataModel"
,
payload
);
}
...
...
@@ -181,6 +181,10 @@ export function getMaintenanceRecords(payload) {
return
PostJSON
(
"/datamodeler/easyDataModelerCURD/getMaintenanceRecords"
,
payload
);
}
export
function
getCheckoutDataModel
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelerCURD/getCheckoutDataModel"
,
payload
);
}
export
function
ddlGenerators
()
{
return
GetJSON
(
"/datamodeler/easyDataModelerExport/ddlGenerators"
);
}
...
...
src/view/Manage/Model/Component/ImportAction.jsx
View file @
91c96e87
...
...
@@ -171,7 +171,7 @@ const ImportAction = (props) => {
}
}
}
else
if
(
action
===
'edit'
&&
permitCheckOut
)
{
type
=
'datamodel.
getC
heckOutDataModel'
;
type
=
'datamodel.
c
heckOutDataModel'
;
}
else
if
(
action
===
'edit'
)
{
const
_action
=
getQueryParam
(
Action
,
props
.
location
.
search
);
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
91c96e87
...
...
@@ -8,7 +8,7 @@ import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify"
import
ResizeObserver
from
'rc-resize-observer'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
showMessage
,
getQueryParam
,
paginate
,
isSzseEnv
}
from
'../../../../util'
;
import
{
showMessage
,
getQueryParam
,
paginate
,
isSzseEnv
,
formatDate
}
from
'../../../../util'
;
import
{
AnchorId
,
AnchorTimestamp
,
Action
,
CatalogId
,
ModelerId
}
from
'../../../../util/constant'
;
// import Tag from "../../Tag";
...
...
@@ -116,7 +116,7 @@ const ResizeableHeaderCell = props => {
const
ModelTable
=
(
props
)
=>
{
const
{
data
,
onChange
,
onItemAction
,
onSelect
,
onHistory
,
catalogId
,
keyword
,
onAutoCreateTable
,
offset
=
null
,
modelId
=
null
,
view
,
selectModelerIds
,
onSubSelect
,
modelState
}
=
props
;
const
{
data
,
onChange
,
onItemAction
,
onSelect
,
onHistory
,
catalogId
,
keyword
,
onAutoCreateTable
,
offset
=
null
,
modelId
=
null
,
modelPid
=
null
,
view
,
selectModelerIds
,
onSubSelect
,
modelState
}
=
props
;
const
MENU_ID
=
(((
modelId
||
''
)
!==
''
)
?
`model-table-contextmenu-
${
modelId
}
`
:
'model-table-contextmenu'
);
...
...
@@ -200,6 +200,15 @@ const ModelTable = (props) => {
sorter
:
true
,
sortDirections
:
[
'ascend'
,
'descend'
],
},
{
title
:
'最近修改时间'
,
dataIndex
:
'modifiedTs'
,
width
:
180
,
ellipsis
:
true
,
render
:
(
_
,
record
)
=>
{
return
formatDate
(
record
.
modifiedTs
);
}
},
// {
// title: '标签',
// dataIndex: 'tag',
...
...
@@ -263,13 +272,13 @@ const ModelTable = (props) => {
useEffect
(()
=>
{
//
if ((modelId||'') !== '') {
//
window?.addEventListener("storage", (e) => {
//
if (e.key === 'modelChange') {
// ge
tDataModel();
//
}
//
});
//
}
if
((
modelId
||
''
)
!==
''
)
{
window
?.
addEventListener
(
"storage"
,
(
e
)
=>
{
if
(
e
.
key
===
'modelChange'
)
{
getCheckou
tDataModel
();
}
});
}
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[])
...
...
@@ -398,6 +407,21 @@ const ModelTable = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[
tableWidth
])
const
getCheckoutDataModel
=
()
=>
{
dispatch
({
type
:
'datamodel.getCheckoutDataModel'
,
payload
:
{
id
:
modelPid
},
callback
:
data
=>
{
setSubData
(
data
?[
data
]:[]);
},
error
:
()
=>
{
}
})
}
const
getDataModel
=
()
=>
{
dispatch
({
type
:
'datamodel.getDataModel'
,
...
...
@@ -453,7 +477,7 @@ const ModelTable = (props) => {
if
(
action
.
id
===
'2'
)
{
onChange
&&
onChange
();
}
else
{
getDataModel
();
get
Checkout
DataModel
();
}
}
...
...
@@ -571,6 +595,7 @@ const ModelTable = (props) => {
expandable
=
{
expandedRowRender
:
record
=>
<
ModelTable
modelId=
{
record
?.
checkedOutId
}
modelPid=
{
record
?.
id
}
onSubSelect=
{
onSubSelectChange
}
{
...
props
}
/>,
...
...
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