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
7c120bb4
Commit
7c120bb4
authored
Nov 03, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
防抖
parent
0767abb2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
19 deletions
+19
-19
index.js
src/model/index.js
+8
-8
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+2
-2
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+3
-3
VersionCompare.jsx
src/view/Manage/Model/Component/VersionCompare.jsx
+2
-2
index.jsx
src/view/Manage/Model/index.jsx
+4
-4
No files found.
src/model/index.js
View file @
7c120bb4
import
{
createStore
,
applyMiddleware
}
from
'redux'
import
createSagaMiddleware
from
'redux-saga'
import
{
all
,
call
,
takeLatest
,
takeEvery
,
cancelled
}
from
'redux-saga/effects'
import
{
SetSource
,
Cancel
}
from
'../util/axios'
import
{
all
,
call
,
takeLatest
,
takeEvery
,
delay
}
from
'redux-saga/effects'
import
{
Connect
,
showErrorNotifaction
}
from
'../util'
;
import
{
reducers
}
from
'./reducer'
;
...
...
@@ -15,9 +14,9 @@ const funcs = Connect({ user, datamodel, map, assetmanage, datasource })
function
*
request
(
args
)
{
const
{
type
,
payload
,
callback
,
error
}
=
args
.
args
;
SetSource
();
try
{
yield
delay
(
300
)
const
rs
=
yield
call
(
funcs
[
type
],
payload
)
if
(
callback
)
yield
call
(
callback
,
rs
)
...
...
@@ -26,10 +25,6 @@ function* request(args) {
ex
.
ApiError
&&
ex
.
ApiError
.
cnMessage
&&
showErrorNotifaction
(
'系统异常'
,
ex
.
ApiError
.
cnMessage
,
5
);
error
&&
error
(
ex
);
}
}
finally
{
if
(
yield
cancelled
())
{
yield
Cancel
(
'cancel request'
);
}
}
}
...
...
@@ -37,6 +32,10 @@ function* watchLatest() {
yield
takeLatest
(
'TAKE_LATEST'
,
request
)
}
function
*
watchLatestHomepage
()
{
yield
takeLatest
(
'TAKE_LATEST_HOMEPAGE'
,
request
);
}
function
*
watchEvery
()
{
yield
takeEvery
(
'TAKE_EVERY'
,
request
)
}
...
...
@@ -49,13 +48,14 @@ export const store = createStore(
function
*
rootSaga
()
{
yield
all
([
watchLatest
(),
watchEvery
()
watchLatest
(),
watch
LatestHomepage
(),
watch
Every
()
])
}
sagaMiddleware
.
run
(
rootSaga
)
export
const
dispatchLatest
=
({
type
,
payload
=
null
,
callback
=
null
,
error
=
null
})
=>
store
.
dispatch
({
type
:
'TAKE_LATEST'
,
args
:
{
type
,
payload
,
callback
,
error
}
})
export
const
dispatchLatestHomepage
=
({
type
,
payload
=
null
,
callback
=
null
,
error
=
null
})
=>
store
.
dispatch
({
type
:
'TAKE_LATEST_HOMEPAGE'
,
args
:
{
type
,
payload
,
callback
,
error
}
})
export
const
dispatch
=
({
type
,
payload
=
null
,
callback
=
null
,
error
=
null
})
=>
store
.
dispatch
({
type
:
'TAKE_EVERY'
,
args
:
{
type
,
payload
,
callback
,
error
}
})
export
const
action
=
({
type
,
args
})
=>
store
.
dispatch
({
type
,
args
})
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
7c120bb4
...
...
@@ -14,7 +14,7 @@ import ImportAsset from './ImportAsset';
import
AssetEdit
from
'./AssetEdit'
;
import
AssetDetail
from
"./AssetDetail"
;
import
AssetItem
from
'./AssetItem'
;
import
{
dispatch
,
dispatchLatest
}
from
'../../../../model'
;
import
{
dispatch
,
dispatchLatest
Homepage
}
from
'../../../../model'
;
import
{
showMessage
,
showNotifaction
,
getQueryParam
}
from
'../../../../util'
;
import
{
AnchorId
,
AnchorTimestamp
}
from
'../../../../util/constant'
;
...
...
@@ -141,7 +141,7 @@ const AssetTable = (props) => {
const
getDataAssets
=
(
elmentsGroup
=
filterElementsGroup
)
=>
{
setLoading
(
true
);
dispatchLatest
({
dispatchLatest
Homepage
({
type
:
'assetmanage.listDataAssetsByPage'
,
payload
:
{
dirId
:
nodeId
,
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
7c120bb4
...
...
@@ -4,7 +4,7 @@ import { DownOutlined, UpOutlined } from '@ant-design/icons';
import
SmoothScroll
from
'smooth-scroll'
;
import
classnames
from
'classnames'
;
import
{
dispatch
Latest
,
dispatch
}
from
'../../../../model'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
showMessage
,
getQueryParam
,
paginate
}
from
'../../../../util'
;
import
{
AnchorId
,
AnchorTimestamp
,
Action
,
CatalogId
,
ModelerId
}
from
'../../../../util/constant'
;
...
...
@@ -272,7 +272,7 @@ const ModelTable = (props) => {
title
:
'提示!'
,
content
:
`您确定要
${
action
.
cnName
||
''
}
该模型吗?`
,
onOk
:
()
=>
{
dispatch
Latest
({
dispatch
({
type
:
'datamodel.nextState'
,
payload
:
{
easyDataModelerDataModelId
:
record
.
id
,
...
...
@@ -311,7 +311,7 @@ const ModelTable = (props) => {
title
:
'提示!'
,
content
:
'您确定要删除该模型吗?'
,
onOk
:
()
=>
{
dispatch
Latest
({
dispatch
({
type
:
'datamodel.deleteDataModel'
,
payload
:
{
params
:
{
...
...
src/view/Manage/Model/Component/VersionCompare.jsx
View file @
7c120bb4
...
...
@@ -136,9 +136,9 @@ const VersionCompare = (props) => {
</
Form
.
Item
>
</
Form
>
<
div
className=
'py-
3
'
>
<
div
className=
'py-
5
'
>
<
Spin
spinning=
{
loadingCompare
}
>
<
div
id=
"model-version-compare-container"
style=
{
{
}
}
></
div
>
<
div
id=
"model-version-compare-container"
></
div
>
</
Spin
>
</
div
>
</
div
>
...
...
src/view/Manage/Model/index.jsx
View file @
7c120bb4
...
...
@@ -14,7 +14,7 @@ import RecatalogModal from './Component/RecatalogModal';
import
HistoryAndVersionDrawer
from
'./Component/HistoryAndVersionDrawer'
;
import
StartFlowModal
from
'./Component/StartFlowModal'
;
import
{
showMessage
,
showNotifaction
}
from
'../../../util'
;
import
{
dispatch
,
dispatchLatest
}
from
'../../../model'
;
import
{
dispatch
,
dispatchLatest
Homepage
}
from
'../../../model'
;
import
{
Action
,
CatalogId
,
ModelerId
,
Hints
,
ModelerData
,
PermitCheckOut
,
Editable
,
StateId
}
from
'../../../util/constant'
;
import
{
AppContext
}
from
'../../../App'
;
...
...
@@ -109,7 +109,7 @@ class Model extends React.Component {
this
.
setState
({
loadingTableData
:
true
},
()
=>
{
if
(
keyword
===
''
)
{
if
(
currentView
===
'dir'
)
{
dispatch
({
dispatch
LatestHomepage
({
type
:
'datamodel.getCurrentDataModelCatalog'
,
payload
:
{
easyDataModelerCatalogId
:
catalogId
,
...
...
@@ -123,7 +123,7 @@ class Model extends React.Component {
}
})
}
else
{
dispatch
({
dispatch
LatestHomepage
({
type
:
'datamodel.getCurrentDataModelStateCatalog'
,
payload
:
{
easyDataModelerStateCatalogId
:
catalogId
...
...
@@ -137,7 +137,7 @@ class Model extends React.Component {
})
}
}
else
{
dispatchLatest
({
dispatchLatest
Homepage
({
type
:
'datamodel.searchModel'
,
payload
:
{
term
:
keyword
,
...
...
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