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
62da8f61
Commit
62da8f61
authored
Sep 26, 2025
by
fanyj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tijiao
parent
da4a5a83
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
10 deletions
+34
-10
App.js
src/App.js
+9
-3
assetmanage.js
src/model/assetmanage.js
+3
-2
dataassetmanager.js
src/service/dataassetmanager.js
+2
-2
axios.js
src/util/axios.js
+9
-0
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+11
-3
No files found.
src/App.js
View file @
62da8f61
...
...
@@ -22,6 +22,7 @@ import ImportAction from './view/Manage/Model/Component/ImportAction';
import
EditModel
from
'./view/Manage/Model/Component/EditModel'
;
import
EditTemplate
from
'./view/Manage/ModelConfig/Component/EditTemplate'
;
import
AssetTree
from
'./view/Manage/AssetManage/Component/AssetManageTree'
;
import
AssetNewDetail
from
"./view/Manage/AssetManage/Component/AssetAction"
import
{
AssetMountReference
}
from
'./util/constant'
;
...
...
@@ -60,13 +61,17 @@ export class App extends React.Component {
const
{
setGlobalState
,
onGlobalStateChange
}
=
this
.
props
;
const
{
hostParams
}
=
this
.
state
;
let
message
=
''
,
id
=
''
,
terms
=
[];
let
message
=
''
,
id
=
''
,
terms
=
[]
,
dirId
=
''
,
templateType
=
''
;
if
(
hostParams
)
{
message
=
hostParams
.
message
||
''
;
id
=
hostParams
.
id
||
''
;
terms
=
hostParams
.
terms
||
[];
dirId
=
hostParams
.
dirId
||
''
;
templateType
=
hostParams
.
templateType
||
''
}
console
.
log
(
'dirId'
,
hostParams
)
if
(
message
===
'showDataModelDetail'
)
{
return
(
<
AppContext
.
Provider
value
=
{{
...
...
@@ -106,10 +111,11 @@ export class App extends React.Component {
setGlobalState
,
onGlobalStateChange
}}
>
<
AssetDetail
<
AssetNewDetail
id
=
{
id
}
dirId
=
{
dirId
}
templateType
=
{
templateType
}
action
=
'detail'
/>
{
/* <AssetDetail
id={id}
terms={terms}
/
>
/>
*/
}
<
/AppContext.Provider
>
);
}
...
...
src/model/assetmanage.js
View file @
62da8f61
...
...
@@ -11,8 +11,9 @@ export function* getLogs(payload) {
return
yield
call
(
service
.
getLogs
,
payload
);
}
export
function
*
listElements
()
{
return
yield
call
(
service
.
listElements
);
export
function
*
listElements
(
payload
)
{
console
.
log
(
'params'
,
payload
)
return
yield
call
(
service
.
listElements
,
payload
);
}
export
function
*
listElementsAndFillValue
(
payload
)
{
...
...
src/service/dataassetmanager.js
View file @
62da8f61
...
...
@@ -8,8 +8,8 @@ export function getLogs(payload) {
return
GetJSON
(
"/dataassetmanager/elementApi/listOperationLogsByPage"
,
payload
);
}
export
function
listElements
()
{
return
PostJSON
(
"/dataassetmanager/elementApi/listElements"
);
export
function
listElements
(
payload
)
{
return
PostJSON
(
"/dataassetmanager/elementApi/listElements"
,
payload
);
}
export
function
listElementsAndFillValue
(
payload
)
{
...
...
src/util/axios.js
View file @
62da8f61
...
...
@@ -144,6 +144,15 @@ export function PostJSON(url, payload) {
const
{
params
=
null
,
data
=
null
}
=
payload
||
{};
const
cancelToken
=
__source
?
__source
.
token
:
null
;
const
env
=
LocalStorage
.
get
(
'assetsEnv'
)??
debugEnv
;
// let templateType = getTemplateType()
// try {
// if(!templateType){
// templateType = params
// }
// } catch (error) {
// }
console
.
log
(
params
)
return
IsArr
(
data
)
?
instance
.
post
(
url
,
data
,
{
params
:
{
env
,
templateType
:
getTemplateType
(),
...
params
},
cancelToken
...
...
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
62da8f61
...
...
@@ -27,7 +27,7 @@ import AttributeMaintain from './AttributeMaintain';
import
'./AssetAction.less'
;
const
AssetAction
=
(
props
)
=>
{
const
{
id
,
dirId
,
action
,
terms
,
onChange
,
reference
,
form
,
onMetadataChange
,
onElementsChange
,
readonly
=
false
,
permissionId
}
=
props
;
const
{
id
,
dirId
,
action
,
terms
,
onChange
,
reference
,
form
,
onMetadataChange
,
onElementsChange
,
readonly
=
false
,
permissionId
,
templateType
}
=
props
;
const
[
currentAction
,
setCurrentAction
]
=
useState
(
action
);
const
[
assetParams
,
setAssetParams
]
=
useState
({
assets
:
{},
attributes
:
[],
attributesFoldMap
:
{}
});
...
...
@@ -72,6 +72,8 @@ const AssetAction = (props) => {
const
app
=
useContext
(
AppContext
);
const
uploadRef
=
useRef
(
undefined
);
console
.
log
(
'dirs'
,
dirId
)
const
columns
=
[
{
title
:
'技术ID(英文名称)'
,
...
...
@@ -334,13 +336,19 @@ const AssetAction = (props) => {
}
const
getElements
=
(
cb
=
null
)
=>
{
console
.
log
(
'data'
,
templateType
)
dispatch
({
type
:
(
currentAction
===
'add'
)?
'assetmanage.listElementsAndFillValue'
:
'assetmanage.listElements'
,
payload
:
(
currentAction
===
'add'
)?{
params
:
{
dirId
dirId
,
templateType
}
}:
undefined
,
}:{
params
:{
templateType
}
},
callback
:
data
=>
{
setWholeElements
(
data
||
[]);
}
...
...
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