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
5c267cef
Commit
5c267cef
authored
May 17, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务更新模型详情
parent
855979dc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
279 additions
and
0 deletions
+279
-0
datamodel.js
src/model/datamodel.js
+24
-0
datamodeler.js
src/service/datamodeler.js
+25
-0
result-detail.jsx
src/view/Manage/ModelCompare/result-detail.jsx
+230
-0
No files found.
src/model/datamodel.js
View file @
5c267cef
...
@@ -616,6 +616,30 @@ export function* getCompareJobResultModelPerfectMatchCatalog(payload) {
...
@@ -616,6 +616,30 @@ export function* getCompareJobResultModelPerfectMatchCatalog(payload) {
return
yield
call
(
datamodelerService
.
getCompareJobResultModelPerfectMatchCatalog
,
payload
)
return
yield
call
(
datamodelerService
.
getCompareJobResultModelPerfectMatchCatalog
,
payload
)
}
}
export
function
*
getDeployWaitingTotalCount
(
payload
)
{
return
yield
call
(
datamodelerService
.
getDeployWaitingTotalCount
,
payload
)
}
export
function
*
getDeployWaitingModelPage
(
payload
)
{
return
yield
call
(
datamodelerService
.
getDeployWaitingModelPage
,
payload
)
}
export
function
*
getDeployedTotalCount
(
payload
)
{
return
yield
call
(
datamodelerService
.
getDeployedTotalCount
,
payload
)
}
export
function
*
getDeployedModelPage
(
payload
)
{
return
yield
call
(
datamodelerService
.
getDeployedModelPage
,
payload
)
}
export
function
*
getOfflineTotalCount
(
payload
)
{
return
yield
call
(
datamodelerService
.
getOfflineTotalCount
,
payload
)
}
export
function
*
getOfflineModelPage
(
payload
)
{
return
yield
call
(
datamodelerService
.
getOfflineModelPage
,
payload
)
}
export
function
*
addDataTypeConfig
(
payload
)
{
export
function
*
addDataTypeConfig
(
payload
)
{
return
yield
call
(
datamodelerService
.
addDataTypeConfig
,
payload
)
return
yield
call
(
datamodelerService
.
addDataTypeConfig
,
payload
)
}
}
...
...
src/service/datamodeler.js
View file @
5c267cef
...
@@ -561,6 +561,31 @@ export function getCompareJobResultModelPerfectMatchCatalog(payload) {
...
@@ -561,6 +561,31 @@ export function getCompareJobResultModelPerfectMatchCatalog(payload) {
return
GetJSON
(
"/datamodeler/easyDataModelModelCompareJobResult/getModelPerfectMatchCatalog"
,
payload
)
return
GetJSON
(
"/datamodeler/easyDataModelModelCompareJobResult/getModelPerfectMatchCatalog"
,
payload
)
}
}
export
function
getDeployWaitingTotalCount
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelModelCompareJobResult/getDeployWaitingTotalCount"
,
payload
)
}
export
function
getDeployWaitingModelPage
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelModelCompareJobResult/getDeployWaitingModelPage"
,
payload
)
}
export
function
getDeployedTotalCount
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelModelCompareJobResult/getDeployedTotalCount"
,
payload
)
}
export
function
getDeployedModelPage
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelModelCompareJobResult/getDeployedModelPage"
,
payload
)
}
export
function
getOfflineTotalCount
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelModelCompareJobResult/getOfflineTotalCount"
,
payload
)
}
export
function
getOfflineModelPage
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelModelCompareJobResult/getOfflineModelPage"
,
payload
)
}
/*type config*/
/*type config*/
export
function
addDataTypeConfig
(
payload
)
{
export
function
addDataTypeConfig
(
payload
)
{
return
PostJSON
(
"/datamodeler/easyDataModelerColumnDataType/addDataTypeConfig"
,
payload
)
return
PostJSON
(
"/datamodeler/easyDataModelerColumnDataType/addDataTypeConfig"
,
payload
)
...
...
src/view/Manage/ModelCompare/result-detail.jsx
View file @
5c267cef
...
@@ -50,6 +50,58 @@ const FC = (props) => {
...
@@ -50,6 +50,58 @@ const FC = (props) => {
export
default
FC
export
default
FC
const
Basic
=
({
item
})
=>
{
const
Basic
=
({
item
})
=>
{
const
[
deployWaitingCount
,
setDeployWaitingCount
]
=
React
.
useState
()
const
[
deployedCount
,
setDeployedCount
]
=
React
.
useState
()
const
[
offlineCount
,
setOfflineCount
]
=
React
.
useState
()
const
[
modelListParams
,
setModelListParams
]
=
React
.
useState
({
visible
:
false
,
type
:
undefined
,
})
React
.
useEffect
(()
=>
{
if
(
item
?.
id
)
{
getDeployWaitingTotalCount
()
getDeployedTotalCount
()
getOfflineTotalCount
()
}
},
[
item
])
const
getDeployWaitingTotalCount
=
()
=>
{
dispatch
({
type
:
'datamodel.getDeployWaitingTotalCount'
,
payload
:
{
resultId
:
item
?.
id
,
},
callback
:
data
=>
{
setDeployWaitingCount
(
data
)
}
})
}
const
getDeployedTotalCount
=
()
=>
{
dispatch
({
type
:
'datamodel.getDeployedTotalCount'
,
payload
:
{
resultId
:
item
?.
id
,
},
callback
:
data
=>
{
setDeployedCount
(
data
)
}
})
}
const
getOfflineTotalCount
=
()
=>
{
dispatch
({
type
:
'datamodel.getOfflineTotalCount'
,
payload
:
{
resultId
:
item
?.
id
,
},
callback
:
data
=>
{
setOfflineCount
(
data
)
}
})
}
return
(
return
(
<
div
>
<
div
>
<
Descriptions
column=
{
3
}
>
<
Descriptions
column=
{
3
}
>
...
@@ -69,10 +121,188 @@ const Basic = ({ item }) => {
...
@@ -69,10 +121,188 @@ const Basic = ({ item }) => {
<
Descriptions
.
Item
label=
'差异元数据数'
>
{
item
?.
metadataPartialMatchCount
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'差异元数据数'
>
{
item
?.
metadataPartialMatchCount
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'未匹配元数据数'
>
{
item
?.
metadataNotMatchCount
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'未匹配元数据数'
>
{
item
?.
metadataNotMatchCount
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Descriptions
>
<
Descriptions
column=
{
3
}
>
<
Descriptions
.
Item
label=
'本次任务更新模型评审通过'
>
{
deployWaitingCount
?
<
a
onClick=
{
()
=>
{
setModelListParams
({
visible
:
true
,
type
:
'deployWaiting'
,
})
}
}
>
{
deployWaitingCount
}
</
a
>
:
<
span
>
{
deployWaitingCount
}
</
span
>
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'本次任务更新模型上线'
>
{
deployedCount
?
<
a
onClick=
{
()
=>
{
setModelListParams
({
visible
:
true
,
type
:
'deployed'
,
})
}
}
>
{
deployedCount
}
</
a
>
:
<
span
>
{
deployedCount
}
</
span
>
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
'本次任务更新模型下线'
>
{
offlineCount
?
<
a
onClick=
{
()
=>
{
setModelListParams
({
visible
:
true
,
type
:
'offline'
,
})
}
}
>
{
offlineCount
}
</
a
>
:
<
span
>
{
offlineCount
}
</
span
>
}
</
Descriptions
.
Item
>
</
Descriptions
>
<
ModelList
{
...
modelListParams
}
item=
{
item
}
onCancel=
{
()
=>
{
setModelListParams
({
visible
:
false
,
type
:
undefined
})
}
}
/>
</
div
>
</
div
>
)
)
}
}
const
ModelList
=
({
visible
,
item
,
type
,
onCancel
})
=>
{
const
[
args
,
setArgs
]
=
React
.
useState
({
page
:
defaultPage
.
pageNum
,
size
:
defaultPage
.
pageSize
,
})
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
const
[
data
,
setData
]
=
React
.
useState
()
const
[
total
,
setTotal
]
=
React
.
useState
(
0
)
const
[
animating
,
setAnimating
]
=
React
.
useState
(
true
)
React
.
useEffect
(()
=>
{
if
(
visible
)
{
setTimeout
(()
=>
{
setAnimating
(
false
)
},
300
)
}
},
[
visible
])
React
.
useEffect
(()
=>
{
if
(
type
&&
item
)
{
getList
()
}
},
[
args
,
type
])
const
setArgsByParams
=
React
.
useCallback
((
params
)
=>
{
setArgs
((
prev
)
=>
{
return
{...
prev
,
...
params
}
})
},
[])
const
title
=
React
.
useMemo
(()
=>
{
if
(
type
)
{
if
(
type
===
'deployWaiting'
)
{
return
'任务更新模型评审通过详情'
}
else
if
(
type
===
'deployed'
)
{
return
'任务更新模型上线详情'
}
else
if
(
type
===
'offline'
)
{
return
'任务更新模型下线详情'
}
}
return
''
},
[
type
])
const
cols
=
[
{
title
:
'序号'
,
dataIndex
:
'index'
,
width
:
60
,
render
:
(
_
,
__
,
index
)
=>
((
args
.
page
-
1
)
*
args
.
size
+
index
+
1
)
},
{
title
:
'模型路径'
,
dataIndex
:
'modelPath'
,
},
{
title
:
'模型名称'
,
dataIndex
:
'modelName'
,
render
:
(
_
,
record
)
=>
{
return
(
<
Tooltip
title=
{
record
.
modelName
}
>
<
Typography
.
Text
ellipsis=
{
true
}
>
<
a
onClick=
{
()
=>
{
openModelDetail
(
record
.
modelId
)
}
}
>
{
record
.
modelName
}
</
a
>
</
Typography
.
Text
>
</
Tooltip
>
)
}
},
]
const
getList
=
()
=>
{
setLoading
(
true
)
let
url
=
''
if
(
type
===
'deployWaiting'
)
{
url
=
'datamodel.getDeployWaitingModelPage'
}
else
if
(
type
===
'deployed'
)
{
url
=
'datamodel.getDeployedModelPage'
}
else
if
(
type
===
'offline'
)
{
url
=
'datamodel.getOfflineModelPage'
}
dispatch
({
type
:
url
,
payload
:
{
resultId
:
item
?.
id
,
pageNo
:
args
.
page
,
pageSize
:
args
.
size
,
},
callback
:
data
=>
{
setLoading
(
false
)
setData
(
data
?.
content
)
setTotal
(
data
?.
totalElements
)
},
error
:
()
=>
{
setLoading
(
false
)
}
})
}
const
close
=
()
=>
{
setAnimating
(
true
)
onCancel
?.()
}
return
(
<
Modal
visible=
{
visible
}
footer=
{
null
}
width=
'50%'
bodyStyle=
{
{
padding
:
'15px 15px 0'
,
overflowX
:
'auto'
,
height
:
'50vh'
}
}
title=
{
title
}
centered
destroyOnClose
onCancel=
{
()
=>
{
close
()
}
}
>
{
!
animating
&&
<
Table
loading=
{
loading
}
columns=
{
cols
??[]
}
dataSource=
{
data
??[]
}
pageNum=
{
args
.
page
}
pageSize=
{
args
.
size
}
total=
{
total
}
onPaginate=
{
(
page
,
size
)
=>
{
setArgsByParams
({
page
,
size
})
}
}
/>
}
</
Modal
>
)
}
const
Match
=
({
item
})
=>
{
const
Match
=
({
item
})
=>
{
const
onExportClick
=
()
=>
{
const
onExportClick
=
()
=>
{
window
.
open
(
`/api/datamodeler/easyDataModelModelCompareJobResult/exportResultDetails?resultId=
${
item
?.
id
??
''
}
`);
window
.
open
(
`/api/datamodeler/easyDataModelModelCompareJobResult/exportResultDetails?resultId=
${
item
?.
id
??
''
}
`);
...
...
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