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
67d00570
Commit
67d00570
authored
Jan 08, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务增加导出
parent
12227dd8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
4 deletions
+41
-4
pds.js
src/model/pds.js
+5
-0
pds.js
src/service/pds.js
+8
-0
index.jsx
src/view/Manage/Model/index.jsx
+28
-4
No files found.
src/model/pds.js
View file @
67d00570
...
...
@@ -164,3 +164,7 @@ export function* getImportLogs(payload) {
export
function
*
exportAll
(
payload
)
{
return
yield
call
(
pds
.
exportAll
,
payload
);
}
export
function
*
exportServices
(
payload
)
{
return
yield
call
(
pds
.
exportServices
,
payload
);
}
\ No newline at end of file
src/service/pds.js
View file @
67d00570
import
{
PostFile
,
GetJSON
,
PostJSON
,
Post
,
Get
,
GetJSONRaw
,
callFetchRawByFormData
,
callFetchRaw
}
from
"../util/axios"
import
qs
from
'qs'
;
import
{
ContextPath
}
from
"../util"
;
export
function
refreshCatalog
()
{
...
...
@@ -164,3 +165,9 @@ export function getImportLogs(payload) {
export
function
exportAll
(
payload
)
{
return
callFetchRaw
(
'post'
,
'/pdataservice/pdsCURD/export/all'
,
payload
)
}
export
function
exportServices
(
payload
)
{
return
callFetchRaw
(
'post'
,
'/pdataservice/pdsCURD/export/ids'
,
{...
payload
,
paramsSerializer
:
function
(
params
)
{
return
qs
.
stringify
(
params
,
{
arrayFormat
:
'repeat'
})
}})
}
\ No newline at end of file
src/view/Manage/Model/index.jsx
View file @
67d00570
...
...
@@ -377,7 +377,9 @@ class Model extends React.Component {
onExportClick = () => {
const { modal } = this.props;
const { catalogId } = this.state;
const { catalogId, selectModelerIds } = this.state;
if ((selectModelerIds??[]).length === 0) {
modal?.confirm({
title: '提示',
content: '是否确认导表格中所有数据?',
...
...
@@ -398,6 +400,28 @@ class Model extends React.Component {
})
},
});
} else {
modal?.confirm({
title: '提示',
content: `
是否确认导出选中服务
,
共
(
$
{(
selectModelerIds
??[]).
length
})
条
?
`,
onOk: () => {
dispatch({
type: 'pds.exportServices',
payload: {
responseType: 'blob',
params: {
pdsDataServiceCatalogId: catalogId,
namespace: this.props.app?.env?.domainId,
ids: selectModelerIds
}
},
callback: (res) => {
download(res)
}
})
},
});
}
}
onSubscribeBtnClick = () => {
...
...
@@ -778,9 +802,9 @@ class Model extends React.Component {
(getDataModelerRole(app?.user)!==DataModelerRoleReader) && !isOnlyEnding && <Button onClick={this.onImportClick}>导入</Button>
}
{
(getDataModelerRole(app?.user)!==DataModelerRoleReader) &&
!isOnlyEnding &&
(currentView==='dir') &&
<Tooltip title={this.state.isRoot
?'请先选择目录
':''}>
<Button onClick={this.onExportClick} disabled={this.state.isRoot}>导出</Button>
(getDataModelerRole(app?.user)!==DataModelerRoleReader) && (currentView==='dir') &&
<Tooltip title={this.state.isRoot
&&(this.state.selectModelerIds??[]).length===0?'请先选择目录或者服务
':''}>
<Button onClick={this.onExportClick} disabled={this.state.isRoot
&&(this.state.selectModelerIds??[]).length===0
}>导出</Button>
</Tooltip>
}
{
...
...
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