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
fcb5aadc
Commit
fcb5aadc
authored
Nov 18, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型编辑增加心跳
parent
2e91b9ac
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
2 deletions
+25
-2
datamodel.js
src/model/datamodel.js
+4
-0
datamodeler.js
src/service/datamodeler.js
+5
-0
AttributeRelationModal.jsx
...w/Manage/AssetManage/Component/AttributeRelationModal.jsx
+1
-1
EditModel.jsx
src/view/Manage/Model/Component/EditModel.jsx
+14
-0
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+1
-1
No files found.
src/model/datamodel.js
View file @
fcb5aadc
...
@@ -202,6 +202,10 @@ export function* importWordGenerateModelDraft(payload) {
...
@@ -202,6 +202,10 @@ export function* importWordGenerateModelDraft(payload) {
return
yield
call
(
datamodelerService
.
importWordGenerateModelDraft
,
payload
);
return
yield
call
(
datamodelerService
.
importWordGenerateModelDraft
,
payload
);
}
}
export
function
*
heartbeat
()
{
return
yield
call
(
datamodelerService
.
heartbeat
);
}
export
function
*
validateDataModel
(
payload
)
{
export
function
*
validateDataModel
(
payload
)
{
return
yield
call
(
datamodelerService
.
validateDataModel
,
payload
);
return
yield
call
(
datamodelerService
.
validateDataModel
,
payload
);
}
}
...
...
src/service/datamodeler.js
View file @
fcb5aadc
...
@@ -181,6 +181,10 @@ export function importWordGenerateModelDraft(payload) {
...
@@ -181,6 +181,10 @@ export function importWordGenerateModelDraft(payload) {
return
PostFile
(
"/datamodeler/easyDataModelerExport/word/draft"
,
payload
);
return
PostFile
(
"/datamodeler/easyDataModelerExport/word/draft"
,
payload
);
}
}
export
function
heartbeat
()
{
return
Get
(
"/datamodeler/easyDataModelerExport/heartbeat"
);
}
export
function
validateDataModel
(
payload
)
{
export
function
validateDataModel
(
payload
)
{
return
PostJSON
(
"/datamodeler/easyDataModelerConstraint/validateDataModel"
,
payload
);
return
PostJSON
(
"/datamodeler/easyDataModelerConstraint/validateDataModel"
,
payload
);
}
}
...
@@ -212,3 +216,4 @@ export function getParent(payload) {
...
@@ -212,3 +216,4 @@ export function getParent(payload) {
export
function
autoCreateTable
(
payload
)
{
export
function
autoCreateTable
(
payload
)
{
return
PostJSON
(
"/metadataharvester/datasource/createTableByDDLList"
,
payload
);
return
PostJSON
(
"/metadataharvester/datasource/createTableByDDLList"
,
payload
);
}
}
src/view/Manage/AssetManage/Component/AttributeRelationModal.jsx
View file @
fcb5aadc
...
@@ -207,7 +207,7 @@ const AttributeRelationModal = (props) => {
...
@@ -207,7 +207,7 @@ const AttributeRelationModal = (props) => {
name=
{
element
.
id
||
''
}
name=
{
element
.
id
||
''
}
key=
{
index
}
key=
{
index
}
>
>
<
Select
>
<
Select
allowClear
>
{
{
(
attributes
||
[]).
map
((
attribute
,
_index
)
=>
{
(
attributes
||
[]).
map
((
attribute
,
_index
)
=>
{
return
(
return
(
...
...
src/view/Manage/Model/Component/EditModel.jsx
View file @
fcb5aadc
...
@@ -47,10 +47,24 @@ const EditModel = (props) => {
...
@@ -47,10 +47,24 @@ const EditModel = (props) => {
}
}
setActionData
({
action
:
_action
,
catalogId
:
_catalogId
,
modelerId
:
_modelerId
,
hints
:
_hints
,
roughModelerData
:
_roughModelerData
,
permitCheckOut
:
_permitCheckOut
,
editable
:
_editable
,
stateId
:
_stateId
,
versionId
:
_versionId
});
setActionData
({
action
:
_action
,
catalogId
:
_catalogId
,
modelerId
:
_modelerId
,
hints
:
_hints
,
roughModelerData
:
_roughModelerData
,
permitCheckOut
:
_permitCheckOut
,
editable
:
_editable
,
stateId
:
_stateId
,
versionId
:
_versionId
});
const
interval
=
setInterval
(()
=>
{
heartbeat
();
},
10
*
60
*
1000
);
return
()
=>
{
clearInterval
(
interval
);
}
//eslint-disable-next-line react-hooks/exhaustive-deps
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[])
},
[])
const
heartbeat
=
()
=>
{
dispatchLatest
({
type
:
'datamodel.heartbeat'
});
}
const
save
=
async
(
e
,
cid
=
''
)
=>
{
const
save
=
async
(
e
,
cid
=
''
)
=>
{
try
{
try
{
const
row
=
await
form
.
validateFields
();
const
row
=
await
form
.
validateFields
();
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
fcb5aadc
...
@@ -135,7 +135,7 @@ const ModelTable = (props) => {
...
@@ -135,7 +135,7 @@ const ModelTable = (props) => {
if
(
record
?.
state
?.
id
===
'2'
)
{
if
(
record
?.
state
?.
id
===
'2'
)
{
editTip
=
'待发布的模型不允许编辑'
;
editTip
=
'待发布的模型不允许编辑'
;
}
else
if
(
record
?.
state
?.
id
===
'4'
)
{
}
else
if
(
record
?.
state
?.
id
===
'4'
)
{
editTip
=
'已发布模型下存在未发布的模型,不允许再编辑'
;
editTip
=
`
${
record
.
holder
||
''
}
正在编辑中, 不允许再编辑`
;
}
}
}
}
...
...
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