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
930af7cd
Commit
930af7cd
authored
May 26, 2025
by
放生的三文鱼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出版本对比组件
parent
4b513880
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
11 deletions
+27
-11
App.js
src/App.js
+19
-1
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+8
-10
No files found.
src/App.js
View file @
930af7cd
...
@@ -25,7 +25,7 @@ import GrantedDataServiceList from './view/Manage/Pdata/Component/GrantedList';
...
@@ -25,7 +25,7 @@ import GrantedDataServiceList from './view/Manage/Pdata/Component/GrantedList';
import
AssetTask
from
'./view/Manage/AssetTask'
;
import
AssetTask
from
'./view/Manage/AssetTask'
;
import
AssetEvaluate
from
'./view/Manage/AssetEvaluate'
;
import
AssetEvaluate
from
'./view/Manage/AssetEvaluate'
;
import
AssetColumnDetail
from
'./view/Manage/AssetManage/Component/AssetColumnDetail'
;
import
AssetColumnDetail
from
'./view/Manage/AssetManage/Component/AssetColumnDetail'
;
import
VersionCompare
from
'./view/Manage/AssetManage/Component/VersionCompare'
import
{
AssetBrowseReference
,
AssetDraftReference
,
AssetMountReference
}
from
'./util/constant'
;
import
{
AssetBrowseReference
,
AssetDraftReference
,
AssetMountReference
}
from
'./util/constant'
;
const
AssetDraft
=
loadable
(()
=>
import
(
'./view/Manage/AssetDraft'
));
const
AssetDraft
=
loadable
(()
=>
import
(
'./view/Manage/AssetDraft'
));
...
@@ -203,6 +203,24 @@ export class App extends React.Component {
...
@@ -203,6 +203,24 @@ export class App extends React.Component {
);
);
}
}
if
(
message
===
'showVersionCompare'
)
{
return
(
<
AppContext
.
Provider
value
=
{{
env
:
hostParams
?.
env
,
user
:
hostParams
?.
user
,
openAdmit
:
hostParams
?.
openAdmit
,
openDetail
:
hostParams
?.
openDetail
,
editServer
:
hostParams
?.
editServer
,
applyServer
:
hostParams
?.
applyServer
,
setGlobalState
,
onGlobalStateChange
}}
>
<
VersionCompare
id
=
{
id
}
/
>
<
/AppContext.Provider
>
);
}
return
(
return
(
<
AppContext
.
Provider
value
=
{{
<
AppContext
.
Provider
value
=
{{
env
:
hostParams
?.
env
||
{
env
:
hostParams
?.
env
||
{
...
...
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
930af7cd
...
@@ -20,7 +20,6 @@ import SubsribeButton from './subscribe-button';
...
@@ -20,7 +20,6 @@ import SubsribeButton from './subscribe-button';
import
{
CancelSvg
,
EditSvg
,
SaveSvg
,
FullScreenSvg
,
CancelFullScreenSvg
}
from
'./AssetSvg'
;
import
{
CancelSvg
,
EditSvg
,
SaveSvg
,
FullScreenSvg
,
CancelFullScreenSvg
}
from
'./AssetSvg'
;
import
SelectUser
from
'../Component/SelectUser'
;
import
SelectUser
from
'../Component/SelectUser'
;
import
SelectFilter
from
'../../Model/Component/SelectFilter'
;
import
SelectFilter
from
'../../Model/Component/SelectFilter'
;
import
{
checkDataAssetEditable
}
from
'../../../../service/dataassetmanager'
;
import
download
from
'../../../../util/download'
;
import
download
from
'../../../../util/download'
;
import
RelationAssets
from
'./asset-relation-assets'
;
import
RelationAssets
from
'./asset-relation-assets'
;
...
@@ -72,8 +71,6 @@ const AssetAction = React.forwardRef(function (props, ref) {
...
@@ -72,8 +71,6 @@ const AssetAction = React.forwardRef(function (props, ref) {
const
[
businessColumns
,
setBusinessColumns
]
=
useState
();
const
[
businessColumns
,
setBusinessColumns
]
=
useState
();
const
[
resoureTagMap
,
setResourceTagMap
]
=
useState
()
const
[
resoureTagMap
,
setResourceTagMap
]
=
useState
()
console
.
log
(
'refence'
,
reference
)
const
[
loadingSaveAsDraft
,
setLoadingSaveAsDraft
]
=
React
.
useState
(
false
)
const
[
loadingSaveAsDraft
,
setLoadingSaveAsDraft
]
=
React
.
useState
(
false
)
const
[
needSaveAsDraft
,
setNeedSaveAsDraft
]
=
React
.
useState
()
const
[
needSaveAsDraft
,
setNeedSaveAsDraft
]
=
React
.
useState
()
...
@@ -167,7 +164,6 @@ const AssetAction = React.forwardRef(function (props, ref) {
...
@@ -167,7 +164,6 @@ const AssetAction = React.forwardRef(function (props, ref) {
width
:
360
,
width
:
360
,
className
:
'table-tag-cell'
,
className
:
'table-tag-cell'
,
render
:
(
_
,
record
)
=>
{
render
:
(
_
,
record
)
=>
{
console
.
log
(
record
)
return
(
return
(
<
div
onClick=
{
(
e
)
=>
e
.
stopPropagation
()
}
>
<
div
onClick=
{
(
e
)
=>
e
.
stopPropagation
()
}
>
<
TagCell
<
TagCell
...
@@ -190,7 +186,6 @@ const AssetAction = React.forwardRef(function (props, ref) {
...
@@ -190,7 +186,6 @@ const AssetAction = React.forwardRef(function (props, ref) {
const
getResourceTag
=
()
=>
{
const
getResourceTag
=
()
=>
{
const
ids
=
(
tableData
??[]).
map
(
item
=>
item
.
id
)
const
ids
=
(
tableData
??[]).
map
(
item
=>
item
.
id
)
console
.
log
(
'tableData'
,
tableData
)
if
(
ids
.
length
>
0
)
{
if
(
ids
.
length
>
0
)
{
dispatch
({
dispatch
({
type
:
'tag.getResourceTagIn'
,
type
:
'tag.getResourceTagIn'
,
...
@@ -465,10 +460,15 @@ const getResourceTag = () => {
...
@@ -465,10 +460,15 @@ const getResourceTag = () => {
}
}
}
}
const
getElements
=
()
=>
{
const
getElements
=
async
()
=>
{
setLoading
(
true
);
setLoading
(
true
);
dispatch
({
dispatch
({
type
:
'assetmanage.listElements'
,
type
:
'assetmanage.listElementsAndFillValue'
,
payload
:{
params
:{
dirId
}
},
callback
:
(
data
)
=>
{
callback
:
(
data
)
=>
{
setLoading
(
false
);
setLoading
(
false
);
const
_attributes
=
Array
.
from
(
new
Set
((
data
??[]).
map
(
item
=>
item
.
type
)));
const
_attributes
=
Array
.
from
(
new
Set
((
data
??[]).
map
(
item
=>
item
.
type
)));
...
@@ -595,7 +595,6 @@ const getResourceTag = () => {
...
@@ -595,7 +595,6 @@ const getResourceTag = () => {
setMetadataId
(
data
?.
metadataId
||
''
);
setMetadataId
(
data
?.
metadataId
||
''
);
const
_attributes
=
Array
.
from
(
new
Set
((
data
?.
elements
??[]).
map
(
item
=>
item
.
type
)))
const
_attributes
=
Array
.
from
(
new
Set
((
data
?.
elements
??[]).
map
(
item
=>
item
.
type
)))
console
.
log
(
'assets'
,
data
)
setAssetParams
({
assets
:
data
,
attributes
:
_attributes
});
setAssetParams
({
assets
:
data
,
attributes
:
_attributes
});
if
((
_attributes
??[]).
length
>
0
)
{
if
((
_attributes
??[]).
length
>
0
)
{
...
@@ -789,7 +788,6 @@ const getResourceTag = () => {
...
@@ -789,7 +788,6 @@ const getResourceTag = () => {
// };
// };
const elementEditComponent = (element) => {
const elementEditComponent = (element) => {
console.log(element)
if (element.selectMode==='单选') {
if (element.selectMode==='单选') {
return (
return (
<Select
<Select
...
@@ -813,7 +811,7 @@ const getResourceTag = () => {
...
@@ -813,7 +811,7 @@ const getResourceTag = () => {
if (element.selectMode==='多选') return <MultipleSelect element={element}/>;
if (element.selectMode==='多选') return <MultipleSelect element={element}/>;
return <Input disabled={element.manualMaintain==='否'} />;
return <Input disabled={element.manualMaintain==='否'}
value={element?.value}
/>;
}
}
const elementDetailComponent = (item, publishedItem) => {
const elementDetailComponent = (item, publishedItem) => {
...
...
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