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
9235bcb5
Commit
9235bcb5
authored
Dec 25, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务导出
parent
9b5bc4b6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
12 deletions
+56
-12
pds.js
src/model/pds.js
+5
-0
dataassetmanager.js
src/service/dataassetmanager.js
+2
-2
metadata.js
src/service/metadata.js
+2
-2
pds.js
src/service/pds.js
+7
-2
axios.js
src/util/axios.js
+25
-5
index.jsx
src/view/Manage/Model/index.jsx
+15
-1
No files found.
src/model/pds.js
View file @
9235bcb5
...
@@ -160,3 +160,7 @@ export function* importConfirm(payload) {
...
@@ -160,3 +160,7 @@ export function* importConfirm(payload) {
export
function
*
getImportLogs
(
payload
)
{
export
function
*
getImportLogs
(
payload
)
{
return
yield
call
(
pds
.
getImportLogs
,
payload
);
return
yield
call
(
pds
.
getImportLogs
,
payload
);
}
}
export
function
*
exportAll
(
payload
)
{
return
yield
call
(
pds
.
exportAll
,
payload
);
}
\ No newline at end of file
src/service/dataassetmanager.js
View file @
9235bcb5
import
{
PostJSON
,
GetJSON
,
PostFile
,
Post
,
Get
,
callFetchRaw
}
from
"../util/axios"
import
{
PostJSON
,
GetJSON
,
PostFile
,
Post
,
Get
,
callFetchRaw
ByFormData
}
from
"../util/axios"
export
function
importElement
(
payload
)
{
export
function
importElement
(
payload
)
{
return
PostFile
(
"/dataassetmanager/elementApi/import"
,
payload
);
return
PostFile
(
"/dataassetmanager/elementApi/import"
,
payload
);
...
@@ -297,7 +297,7 @@ export function deleteStandardBatchMetadata(payload) {
...
@@ -297,7 +297,7 @@ export function deleteStandardBatchMetadata(payload) {
}
}
export
function
exportIndicator
(
payload
)
{
export
function
exportIndicator
(
payload
)
{
return
callFetchRaw
(
'post'
,
'/standard/indicator/exportData'
,
payload
)
return
callFetchRaw
ByFormData
(
'post'
,
'/standard/indicator/exportData'
,
payload
)
}
}
export
function
importIndicator
(
payload
)
{
export
function
importIndicator
(
payload
)
{
...
...
src/service/metadata.js
View file @
9235bcb5
import
{
GetJSON
,
PostJSON
,
callFetchRaw
,
PostFile
}
from
"../util/axios"
import
{
GetJSON
,
PostJSON
,
callFetchRaw
ByFormData
,
PostFile
}
from
"../util/axios"
export
function
queryDatabase
(
payload
)
{
export
function
queryDatabase
(
payload
)
{
return
GetJSON
(
"/metadatarepo/rest/tag/getDatabaseBySystemCode"
,
payload
);
return
GetJSON
(
"/metadatarepo/rest/tag/getDatabaseBySystemCode"
,
payload
);
...
@@ -25,7 +25,7 @@ export function getAttributes(payload) {
...
@@ -25,7 +25,7 @@ export function getAttributes(payload) {
}
}
export
function
exportAttributes
(
payload
)
{
export
function
exportAttributes
(
payload
)
{
return
callFetchRaw
(
'post'
,
'/metadatarepo/rest/download/exportAssetInfo'
,
payload
)
return
callFetchRaw
ByFormData
(
'post'
,
'/metadatarepo/rest/download/exportAssetInfo'
,
payload
)
}
}
export
function
importAttributes
(
payload
)
{
export
function
importAttributes
(
payload
)
{
...
...
src/service/pds.js
View file @
9235bcb5
import
{
PostFile
,
GetJSON
,
PostJSON
,
Post
,
Get
,
GetJSONRaw
,
callFetchRaw
}
from
"../util/axios"
import
{
PostFile
,
GetJSON
,
PostJSON
,
Post
,
Get
,
GetJSONRaw
,
callFetchRaw
ByFormData
,
callFetchRaw
}
from
"../util/axios"
import
{
ContextPath
}
from
"../util"
;
import
{
ContextPath
}
from
"../util"
;
export
function
refreshCatalog
()
{
export
function
refreshCatalog
()
{
...
@@ -146,7 +146,7 @@ export function getJdbcInformation() {
...
@@ -146,7 +146,7 @@ export function getJdbcInformation() {
}
}
export
function
subscribe
(
payload
)
{
export
function
subscribe
(
payload
)
{
return
callFetchRaw
(
'post'
,
'/pdataservice/pdsSub/subscribeMsg'
,
payload
);
return
callFetchRaw
ByFormData
(
'post'
,
'/pdataservice/pdsSub/subscribeMsg'
,
payload
);
}
}
export
function
addImportWithConfirm
(
payload
)
{
export
function
addImportWithConfirm
(
payload
)
{
...
@@ -160,3 +160,7 @@ export function importConfirm(payload) {
...
@@ -160,3 +160,7 @@ export function importConfirm(payload) {
export
function
getImportLogs
(
payload
)
{
export
function
getImportLogs
(
payload
)
{
return
GetJSON
(
"/pdataservice/pdsCURD/log"
,
payload
);
return
GetJSON
(
"/pdataservice/pdsCURD/log"
,
payload
);
}
}
export
function
exportAll
(
payload
)
{
return
callFetchRaw
(
'post'
,
'/pdataservice/pdsCURD/export/all'
,
payload
)
}
\ No newline at end of file
src/util/axios.js
View file @
9235bcb5
...
@@ -207,17 +207,37 @@ export function PostFile(url, payload) {
...
@@ -207,17 +207,37 @@ export function PostFile(url, payload) {
)
)
}
}
let
config
=
{
export
const
callFetchRaw
=
(
method
,
url
,
options
)
=>
{
const
{
params
,
...
reqConfig
}
=
options
;
const
config
=
{
baseURL
,
baseURL
,
headers
:
{
timeout
:
300000
,
'Content-Type'
:
'multipart/form-data'
,
},
cache
:
'no-cache'
,
cache
:
'no-cache'
,
}
const
templateType
=
getTemplateType
();
return
axios
.
request
({
method
,
url
,
...
config
,
...
options
})
}
}
export
const
callFetchRaw
=
(
method
,
url
,
options
)
=>
{
export
const
callFetchRaw
ByFormData
=
(
method
,
url
,
options
)
=>
{
const
{
params
,
...
reqConfig
}
=
options
;
const
{
params
,
...
reqConfig
}
=
options
;
const
config
=
{
baseURL
,
timeout
:
300000
,
headers
:
{
'Content-Type'
:
'multipart/form-data'
,
},
cache
:
'no-cache'
,
}
const
templateType
=
getTemplateType
();
const
templateType
=
getTemplateType
();
var
bodyFormData
=
new
FormData
();
var
bodyFormData
=
new
FormData
();
...
...
src/view/Manage/Model/index.jsx
View file @
9235bcb5
...
@@ -25,6 +25,7 @@ import StartAuthorize from './Component/StartAuthorize';
...
@@ -25,6 +25,7 @@ import StartAuthorize from './Component/StartAuthorize';
import
StartRelease
from
'./Component/StartRelease'
;
import
StartRelease
from
'./Component/StartRelease'
;
import
Offline
from
'./Component/Offline'
;
import
Offline
from
'./Component/Offline'
;
import
ImportServices
from
'./Component/ImportServices'
;
import
ImportServices
from
'./Component/ImportServices'
;
import
download
from
'../../../util/download'
;
import
'./index.less'
;
import
'./index.less'
;
...
@@ -359,7 +360,20 @@ class Model extends React.Component {
...
@@ -359,7 +360,20 @@ class Model extends React.Component {
title: '提示',
title: '提示',
content: '是否确认导表格中所有数据?',
content: '是否确认导表格中所有数据?',
onOk: () => {
onOk: () => {
window.open(`
/
api
/
pdataservice
/
pdsCURD
/
export
/all
?
pdsDataServiceCatalogId=${catalogId}&namespace=${this.props.app
?
.env
?
.domainId}&isExcludeOtherOwner=${this.props.isOnlyEnding}`
)
;
dispatch({
type: 'pds.exportAll',
payload: {
responseType: 'blob',
params: {
pdsDataServiceCatalogId: catalogId,
namespace: this.props.app?.env?.domainId,
isExcludeOtherOwner: this.props.isOnlyEnding
}
},
callback: (res) => {
download(res)
}
})
},
},
});
});
}
}
...
...
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