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
9e6f9522
Commit
9e6f9522
authored
Dec 08, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产草稿
parent
1af4b7b0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
9 deletions
+59
-9
assetmanage.js
src/model/assetmanage.js
+4
-0
dataassetmanager.js
src/service/dataassetmanager.js
+5
-0
index.jsx
src/view/Manage/AssetDraft/index.jsx
+49
-8
ImportAssetDrawer.jsx
src/view/Manage/AssetManage/Component/ImportAssetDrawer.jsx
+1
-1
No files found.
src/model/assetmanage.js
View file @
9e6f9522
...
...
@@ -339,6 +339,10 @@ export function* getDrafts(payload) {
return
yield
call
(
service
.
getDrafts
,
payload
);
}
export
function
*
listDraftFilterElementsGroupByType
(
payload
)
{
return
yield
call
(
service
.
listDraftFilterElementsGroupByType
,
payload
);
}
export
function
*
getDraftDetail
(
payload
)
{
return
yield
call
(
service
.
getDraftDetail
,
payload
);
}
...
...
src/service/dataassetmanager.js
View file @
9e6f9522
...
...
@@ -324,6 +324,11 @@ export function getDrafts(payload) {
return
GetJSON
(
"/dataassetmanager/draftApi/listDataAssetsByPage"
,
payload
)
}
export
function
listDraftFilterElementsGroupByType
(
payload
)
{
return
GetJSON
(
"/dataassetmanager/elementApi/listDraftFilterElementsGroupByType"
,
payload
);
}
export
function
getDraftDetail
(
payload
)
{
return
PostJSON
(
"/dataassetmanager/draftApi/getDraftDetail"
,
payload
)
}
...
...
src/view/Manage/AssetDraft/index.jsx
View file @
9e6f9522
...
...
@@ -57,8 +57,52 @@ const FC = (props) => {
}
},
[
currentTemplateValue
,
keyword
,
currentElementValue
,
pagination
,
isAdmin
],
{
wait
:
300
})
const
pathCol
=
{
title
:
'路径'
,
dataIndex
:
'dirPath'
,
ellipsis
:
true
,
width
:
120
,
render
:
(
text
,
record
)
=>
{
return
(
<
Tooltip
title=
{
text
}
>
<
Typography
.
Text
ellipsis=
{
true
}
>
{
text
}
</
Typography
.
Text
>
</
Tooltip
>
);
}
}
const
fixedCols
=
[
{
title
:
'修改类型'
,
dataIndex
:
'draftOperation'
,
ellipsis
:
true
,
width
:
80
,
render
:
(
text
,
record
)
=>
{
if
(
text
===
'release'
)
return
'新增'
if
(
text
===
'change'
)
return
'修改'
if
(
text
===
'offline'
)
return
'删除'
return
''
}
},
{
title
:
'状态'
,
dataIndex
:
'draftState'
,
ellipsis
:
true
,
width
:
80
,
render
:
(
text
,
record
)
=>
{
if
(
text
===
'draft'
)
return
'待提交'
if
(
text
===
'auditing'
)
return
'审批中'
return
''
}
},
]
const
[
columns
,
tableData
,
total
]
=
React
.
useMemo
(()
=>
{
cons
t
[
newColumns
,
newTableData
]
=
[[],
[]]
le
t
[
newColumns
,
newTableData
]
=
[[],
[]]
for
(
const
element
of
filterElements
??[])
{
for
(
const
name
of
element
.
names
??[])
{
...
...
@@ -87,7 +131,6 @@ const FC = (props) => {
}
else
if
(
name
===
'资产项'
)
{
column
.
width
=
isSzseEnv
?
250
:
120
column
.
render
=
(
text
)
=>
{
console
.
log
(
'text'
,
text
)
let
metadata
=
null
try
{
metadata
=
JSON
.
parse
(
text
)
...
...
@@ -130,8 +173,9 @@ const FC = (props) => {
}
}
return
[
newColumns
,
newTableData
,
data
?.
total
??
0
]
},
[
filterElements
,
data
,
loadingFilterElements
,
users
])
return
[[
pathCol
,
...
newColumns
,
...
fixedCols
]
,
newTableData
,
data
?.
total
??
0
]
},
[
filterElements
,
data
,
loadingFilterElements
,
users
,
fixedCols
])
const
getAdmin
=
()
=>
{
dispatch
({
...
...
@@ -186,10 +230,7 @@ const FC = (props) => {
const
getFilterElements
=
()
=>
{
setLoadingFilterElements
(
true
)
dispatch
({
type
:
'assetmanage.listFilterElementsGroupByType'
,
payload
:
{
isAdmin
,
},
type
:
'assetmanage.listDraftFilterElementsGroupByType'
,
callback
:
data
=>
{
setLoadingFilterElements
(
false
)
setFilterElements
(
data
)
...
...
src/view/Manage/AssetManage/Component/ImportAssetDrawer.jsx
View file @
9e6f9522
...
...
@@ -156,7 +156,7 @@ const ImportAssetDrawer = (props) => {
setConfirmLoading
(
true
);
dispatch
({
type
:
'assetmanage.assetImport'
,
payload
:
{
fileList
:
fileList
,
params
:
{
env
:
`
${
app
?.
env
?.
domainId
}
` } },
payload
:
{
fileList
:
fileList
,
params
:
{
env
:
`
${
app
?.
env
?.
domainId
}
`
, saveAsDraft: true
} },
callback: data => {
setConfirmLoading(false);
setFileList([]);
...
...
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