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
c3460df2
Commit
c3460df2
authored
Dec 05, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务样本数据
parent
965249bc
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
121 additions
and
13 deletions
+121
-13
contextmenu.svg
src/assets/contextmenu.svg
+10
-13
pds.js
src/model/pds.js
+4
-0
pds.js
src/service/pds.js
+4
-0
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+14
-0
SampleModal.jsx
src/view/Manage/Model/Component/SampleModal.jsx
+89
-0
No files found.
src/assets/contextmenu.svg
View file @
c3460df2
<svg
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"24"
height=
"
16"
viewBox=
"0 0 124 103
"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"24"
height=
"
20"
viewBox=
"0 0 300 229
"
>
<metadata>
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<metadata>
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta
xmlns:x=
"adobe:ns:meta/"
x:xmptk=
"Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01 "
>
<x:xmpmeta
xmlns:x=
"adobe:ns:meta/"
x:xmptk=
"Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01 "
>
<rdf:RDF
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>
<rdf:RDF
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>
...
@@ -10,26 +10,23 @@
...
@@ -10,26 +10,23 @@
<style>
<style>
.cls-1 {
.cls-1 {
fill: #fff;
fill: #fff;
stroke: #
302624
;
stroke: #
000
;
stroke-linejoin: round;
stroke-linejoin: round;
stroke-width:
1
px;
stroke-width:
8
px;
fill-rule: evenodd;
fill-rule: evenodd;
filter: url(#filter);
filter: url(#filter);
}
}
</style>
</style>
<filter
id=
"filter"
x=
"
49"
y=
"40"
width=
"125"
height=
"104
"
filterUnits=
"userSpaceOnUse"
>
<filter
id=
"filter"
x=
"
-2"
y=
"37"
width=
"305"
height=
"229
"
filterUnits=
"userSpaceOnUse"
>
<feOffset
result=
"offset"
d
x=
"-3.464"
dy=
"2
"
in=
"SourceAlpha"
/>
<feOffset
result=
"offset"
d
y=
"1
"
in=
"SourceAlpha"
/>
<feGaussianBlur
result=
"blur"
stdDeviation=
"
2.44
9"
/>
<feGaussianBlur
result=
"blur"
stdDeviation=
"
4.89
9"
/>
<feFlood
result=
"flood"
flood-opacity=
"0.
32
"
/>
<feFlood
result=
"flood"
flood-opacity=
"0.
78
"
/>
<feComposite
result=
"composite"
operator=
"in"
in2=
"blur"
/>
<feComposite
result=
"composite"
operator=
"in"
in2=
"blur"
/>
<feBlend
result=
"blend"
in=
"SourceGraphic"
/>
<feBlend
result=
"blend"
in=
"SourceGraphic"
/>
<feFlood
result=
"flood-2"
flood-color=
"#fff"
/>
<feComposite
result=
"composite-2"
operator=
"in"
in2=
"SourceGraphic"
/>
<feBlend
result=
"blend-2"
in2=
"blend"
/>
</filter>
</filter>
</defs>
</defs>
<g
transform=
"translate(
-49.5 -40.5
)"
style=
"fill: #fff; filter: url(#filter)"
>
<g
transform=
"translate(
0 -37
)"
style=
"fill: #fff; filter: url(#filter)"
>
<path
id=
"形状_
2"
data-name=
"形状 2"
class=
"cls-1"
d=
"M141.723,135.147a29.367,29.367,0,0,1-28.506-36.052L99,95.9V136H81.857V95.9L57,101.018,89.571,43,117.7,89A29.31,29.31,0,1,1,141.723,135.147ZM131.464,120.3a2.374,2.374,0,0,0,2.379,2.369h0.01a2.374,2.374,0,0,0,2.379-2.369V106.666a2.373,2.373,0,0,0-2.379-2.368h-0.01a2.373,2.373,0,0,0-2.379,2.368V120.3Zm-1.1-20.775a3.295,3.295,0,1,0,3.295-3.306A3.3,3.3,0,0,0,130.366,99.525ZM156,99.35a10.487,10.487,0,0,0-10.511-10.463H133.661v5.582a5.179,5.179,0,0,1,.763-0.062H144.6a5.133,5.133,0,1,1,0,10.265h-7.871l0,0h-0.141l2.338,3.444,1.082,1.7h0.07l8.223,12.114h7.32l-8.57-12.243A10.471,10.471,0,0,0,156,99.354v0
Z"
style=
"stroke: inherit; filter: none; fill: inherit"
/>
<path
id=
"形状_
1"
data-name=
"形状 1"
class=
"cls-1"
d=
"M203,236a76,76,0,1,1,76-76A76,76,0,0,1,203,236Zm-30.4-38.422a6.334,6.334,0,0,0,12.667,0V163.8a6.334,6.334,0,0,0-12.667,0v33.778Zm-1.689-52.356a8.023,8.023,0,1,0,8.022-8.022A8.022,8.022,0,0,0,170.911,145.222Zm64.178,0v-1.689a26.6,26.6,0,0,0-26.6-26.6H179.778c-0.142,0-.281.009-0.422,0.011v15.444a12.726,12.726,0,0,1,2.533-.255h26.178a12.667,12.667,0,0,1,0,25.334H186.481l9.869,14.355h0.385l20.621,29.556h18.577l-21.785-30.165A26.606,26.606,0,0,0,235.089,145.222ZM88,59L21,174l50-10v77h33V163l51,13
Z"
style=
"stroke: inherit; filter: none; fill: inherit"
/>
</g>
</g>
<use
transform=
"translate(
-49.5 -40.5)"
xlink:href=
"#形状_2"
style=
"stroke: #302624
; filter: none; fill: none"
/>
<use
transform=
"translate(
0 -37)"
xlink:href=
"#形状_1"
style=
"stroke: #000
; filter: none; fill: none"
/>
</svg>
</svg>
src/model/pds.js
View file @
c3460df2
...
@@ -73,6 +73,10 @@ export function* getDataServiceLocation(payload) {
...
@@ -73,6 +73,10 @@ export function* getDataServiceLocation(payload) {
return
yield
call
(
pds
.
getDataServiceLocation
,
payload
)
return
yield
call
(
pds
.
getDataServiceLocation
,
payload
)
}
}
export
function
*
getSample
(
payload
)
{
return
yield
call
(
pds
.
getSample
,
payload
)
}
export
function
*
enableOData
(
payload
)
{
export
function
*
enableOData
(
payload
)
{
return
yield
call
(
pds
.
enableOData
,
payload
)
return
yield
call
(
pds
.
enableOData
,
payload
)
}
}
...
...
src/service/pds.js
View file @
c3460df2
...
@@ -72,6 +72,10 @@ export function getDataServiceLocation(payload) {
...
@@ -72,6 +72,10 @@ export function getDataServiceLocation(payload) {
return
GetJSON
(
"/pdataservice/pdsCURD/getDataServiceLocation"
,
payload
)
return
GetJSON
(
"/pdataservice/pdsCURD/getDataServiceLocation"
,
payload
)
}
}
export
function
getSample
(
payload
)
{
return
PostJSON
(
"/pdataservice/pdsCURD/getSample"
,
payload
)
}
export
function
enableOData
(
payload
)
{
export
function
enableOData
(
payload
)
{
return
Post
(
"/pdataservice/pdsOData/enableOData"
,
payload
)
return
Post
(
"/pdataservice/pdsOData/enableOData"
,
payload
)
}
}
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
c3460df2
...
@@ -8,6 +8,7 @@ import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify"
...
@@ -8,6 +8,7 @@ import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify"
import
ResizeObserver
from
'rc-resize-observer'
;
import
ResizeObserver
from
'rc-resize-observer'
;
import
ServiceDetail
from
'./ServiceDetailModal'
;
import
ServiceDetail
from
'./ServiceDetailModal'
;
import
ODataConfigModal
from
'./ODataConfigModal'
;
import
ODataConfigModal
from
'./ODataConfigModal'
;
import
SampleModal
from
'./SampleModal'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
showMessage
,
getQueryParam
,
paginate
,
isSzseEnv
,
formatDate
,
getDataModelerRole
}
from
'../../../../util'
;
import
{
showMessage
,
getQueryParam
,
paginate
,
isSzseEnv
,
formatDate
,
getDataModelerRole
}
from
'../../../../util'
;
...
@@ -146,6 +147,8 @@ const ModelTable = (props) => {
...
@@ -146,6 +147,8 @@ const ModelTable = (props) => {
const
[
subData
,
setSubData
]
=
useState
([]);
const
[
subData
,
setSubData
]
=
useState
([]);
const
[
serviceDetailParams
,
setServiceDetailParams
]
=
useState
({
visible
:
false
,
id
:
''
})
const
[
serviceDetailParams
,
setServiceDetailParams
]
=
useState
({
visible
:
false
,
id
:
''
})
const
[
oDataConfigParams
,
setODataConfigParams
]
=
useState
({
visible
:
false
,
service
:
undefined
});
const
[
oDataConfigParams
,
setODataConfigParams
]
=
useState
({
visible
:
false
,
service
:
undefined
});
const
[
sampleParams
,
setSampleParams
]
=
useState
({
visible
:
false
,
service
:
undefined
});
const
app
=
useContext
(
AppContext
);
const
app
=
useContext
(
AppContext
);
...
@@ -705,6 +708,8 @@ const ModelTable = (props) => {
...
@@ -705,6 +708,8 @@ const ModelTable = (props) => {
editItem
(
currentItem
);
editItem
(
currentItem
);
}
else
if
(
key
===
'delete'
)
{
}
else
if
(
key
===
'delete'
)
{
deleteItem
(
currentItem
);
deleteItem
(
currentItem
);
}
else
if
(
key
===
'sample'
)
{
setSampleParams
({
visible
:
true
,
service
:
currentItem
})
}
else
if
(
key
===
'history'
)
{
}
else
if
(
key
===
'history'
)
{
historyItem
(
currentItem
);
historyItem
(
currentItem
);
}
else
if
(
key
===
'copy'
)
{
}
else
if
(
key
===
'copy'
)
{
...
@@ -735,6 +740,10 @@ const ModelTable = (props) => {
...
@@ -735,6 +740,10 @@ const ModelTable = (props) => {
}
}
}
}
const
onSampleClose
=
()
=>
{
setSampleParams
({
visible
:
false
,
service
:
undefined
});
}
const
mergedColumns
=
()
=>
{
const
mergedColumns
=
()
=>
{
let
newColumns
=
[...
columns
];
let
newColumns
=
[...
columns
];
// if ((modelId||'')==='' && (view==='state'||(keyword||'')!=='')) {
// if ((modelId||'')==='' && (view==='state'||(keyword||'')!=='')) {
...
@@ -847,6 +856,9 @@ const ModelTable = (props) => {
...
@@ -847,6 +856,9 @@ const ModelTable = (props) => {
</
Tooltip
>
</
Tooltip
>
</
RcItem
>
</
RcItem
>
}
}
<
RcItem
id=
"sample"
onClick=
{
handleItemClick
}
>
样本数据
</
RcItem
>
<
RcItem
id=
"history"
onClick=
{
handleItemClick
}
>
<
RcItem
id=
"history"
onClick=
{
handleItemClick
}
>
历史版本
历史版本
</
RcItem
>
</
RcItem
>
...
@@ -888,6 +900,8 @@ const ModelTable = (props) => {
...
@@ -888,6 +900,8 @@ const ModelTable = (props) => {
</
RcMenu
>
</
RcMenu
>
<
ServiceDetail
visible=
{
serviceDetailParams
.
visible
}
id=
{
serviceDetailParams
.
id
}
onClose=
{
onServiceDetailClose
}
/>
<
ServiceDetail
visible=
{
serviceDetailParams
.
visible
}
id=
{
serviceDetailParams
.
id
}
onClose=
{
onServiceDetailClose
}
/>
<
ODataConfigModal
visible=
{
oDataConfigParams
.
visible
}
service=
{
oDataConfigParams
.
service
}
onCancel=
{
onODataConfigClose
}
/>
<
ODataConfigModal
visible=
{
oDataConfigParams
.
visible
}
service=
{
oDataConfigParams
.
service
}
onCancel=
{
onODataConfigClose
}
/>
<
SampleModal
visible=
{
sampleParams
.
visible
}
service=
{
sampleParams
.
service
}
onCancel=
{
onSampleClose
}
/>
{
contextHolder
}
{
contextHolder
}
</
div
>
</
div
>
);
);
...
...
src/view/Manage/Model/Component/SampleModal.jsx
0 → 100644
View file @
c3460df2
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Button
,
Form
,
Input
}
from
'antd'
;
import
{
dispatch
}
from
'../../../../model'
;
import
Table
from
'../../ResizeableTable'
;
const
FC
=
(
props
)
=>
{
const
{
visible
,
service
,
onCancel
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
data
,
setData
]
=
useState
(
undefined
);
const
columns
=
[
{
title
:
'catalog_id'
,
dataIndex
:
'catalog_id'
},
{
title
:
'catalog_name'
,
dataIndex
:
'catalog_name'
},
{
title
:
'display_order'
,
dataIndex
:
'display_order'
},
]
useEffect
(()
=>
{
if
(
visible
)
{
getSample
();
}
},
[
visible
])
const
getSample
=
()
=>
{
setLoading
(
true
)
dispatch
({
type
:
'pds.getSample'
,
payload
:
{
params
:
{
pdsDataServiceId
:
service
?.
id
,
}
},
callback
:
data
=>
{
setLoading
(
false
);
setData
(
data
?.
content
||
[]);
},
error
:
()
=>
{
setLoading
(
false
);
}
});
}
const
cancel
=
()
=>
{
setLoading
(
false
);
setData
(
undefined
);
onCancel
?.();
}
const
footer
=
[
<
Button
key=
"0"
onClick=
{
()
=>
{
cancel
()}
}
>
取消
</
Button
>,
];
return
(
<
Modal
forceRender
visible=
{
visible
}
title=
{
`${service?.name}的样本数据`
}
width=
{
540
}
onCancel=
{
()
=>
{
cancel
()}
}
footer=
{
footer
}
>
<
Table
loading=
{
loading
}
rowKey=
{
'catalog_id'
}
columns=
{
columns
}
dataSource=
{
data
||
[]
}
size=
'small'
style=
{
{
maxHeight
:
300
,
overflow
:
'auto'
}
}
pagination=
{
false
}
/>
</
Modal
>
)
}
export
default
FC
;
\ No newline at end of file
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