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
aff41f24
Commit
aff41f24
authored
Nov 21, 2025
by
放生的三文鱼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产流程
parent
f3eaaa27
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
34 deletions
+40
-34
App.js
src/App.js
+8
-4
AssetDraft.jsx
src/view/Manage/AssetDraft/component/AssetDraft.jsx
+19
-14
assetData.jsx
src/view/Manage/AssetDraft/hooks/assetData.jsx
+13
-16
No files found.
src/App.js
View file @
aff41f24
...
...
@@ -24,6 +24,7 @@ import EditTemplate from './view/Manage/ModelConfig/Component/EditTemplate';
import
AssetDraft
from
'./view/Manage/AssetDraft'
;
import
AssetTree
from
'./view/Manage/AssetManage/Component/AssetManageTree'
;
import
AssetNewDetail
from
"./view/Manage/AssetManage/Component/AssetAction"
import
{
getTemplateType
}
from
'./util/axios'
;
import
{
AssetMountReference
}
from
'./util/constant'
;
...
...
@@ -62,16 +63,17 @@ export class App extends React.Component {
const
{
setGlobalState
,
onGlobalStateChange
}
=
this
.
props
;
const
{
hostParams
}
=
this
.
state
;
let
message
=
''
,
id
=
''
,
terms
=
[],
dirId
=
''
,
templateType
=
''
;
let
message
=
''
,
id
=
''
,
draftId
=
''
,
terms
=
[],
dirId
=
''
,
templateType
=
''
;
if
(
hostParams
)
{
message
=
hostParams
.
message
||
''
;
id
=
hostParams
.
id
||
''
;
terms
=
hostParams
.
terms
||
[];
dirId
=
hostParams
.
dirId
||
''
;
templateType
=
hostParams
.
templateType
||
''
draftId
=
hostParams
.
draftId
||
''
;
templateType
=
hostParams
.
templateType
||
getTemplateType
();
}
console
.
log
(
'd
ir
Id'
,
hostParams
)
console
.
log
(
'd
raft
Id'
,
hostParams
)
if
(
message
===
'showDataModelDetail'
)
{
return
(
...
...
@@ -105,6 +107,8 @@ export class App extends React.Component {
}
if
(
message
===
'showAssetDetail'
)
{
console
.
log
(
'draftId'
,
draftId
);
return
(
<
AppContext
.
Provider
value
=
{{
env
:
hostParams
?.
env
,
...
...
@@ -112,7 +116,7 @@ export class App extends React.Component {
setGlobalState
,
onGlobalStateChange
}}
>
<
AssetNewDetail
id
=
{
id
}
dirId
=
{
dirId
}
templateType
=
{
templateType
}
action
=
'detail'
/>
<
AssetNewDetail
id
=
{
id
}
dirId
=
{
dirId
}
draftId
=
{
draftId
}
templateType
=
{
templateType
}
action
=
'detail'
/>
{
/* <AssetDetail
id={id}
terms={terms}
...
...
src/view/Manage/AssetDraft/component/AssetDraft.jsx
View file @
aff41f24
...
...
@@ -8,11 +8,13 @@ import {
Tag
,
Modal
,
Pagination
,
message
,
}
from
"antd"
;
import
{
ExclamationCircleFilled
}
from
"@ant-design/icons"
;
import
{
useGetAssetDraft
}
from
"../hooks/assetData"
;
import
{
debounce
}
from
"lodash"
;
import
{
appId
}
from
"../../../../App"
;
import
{
showMessage
}
from
"../../../../util"
;
import
AssetDetailDrawer
from
"../../AssetManage/Component/AssetDetailDrawer"
;
import
ImportModal
from
"./ImportModal"
;
import
LocalStorage
from
"local-storage"
;
...
...
@@ -28,6 +30,20 @@ const AssetManagementTable = () => {
templateType
:
""
,
});
const
[
importModalVisible
,
setImportModalVisible
]
=
useState
(
false
);
const
sendFlow
=
(
id
=
""
)
=>
{
let
reason
=
""
;
const
confirmed
=
modal
.
confirm
({
title
:
"请输入送审原因"
,
content
:
<
Input
onChange=
{
(
e
)
=>
(
reason
=
e
.
target
.
value
)
}
/>,
onOk
:
()
=>
{
if
(
reason
?.
trim
()
===
""
)
return
showMessage
(
"warn"
,
"请输入送审原因"
);
batchPublish
(
id
?
id
:
selectedRowKeys
,
reason
);
confirmed
.
destroy
();
},
});
};
const
{
loading
,
templates
,
...
...
@@ -44,8 +60,7 @@ const AssetManagementTable = () => {
setSelectedRowKeys
,
batchDelete
,
batchPublish
,
setApplyReason
,
}
=
useGetAssetDraft
({
setDraftParams
});
}
=
useGetAssetDraft
({
setDraftParams
,
sendFlow
});
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
const
changeTemplate
=
(
value
)
=>
{
LocalStorage
.
set
(
`templateType-
${
appId
}
`
,
value
);
...
...
@@ -79,17 +94,7 @@ const AssetManagementTable = () => {
onChange
:
(
selectedRowKeys
)
=>
{
setSelectedRowKeys
(
selectedRowKeys
);
},
};
const
startDataAssetFlow
=
()
=>
{
const
confirmed
=
modal
.
confirm
({
title
:
"请输入送审原因"
,
content
:
<
Input
onChange=
{
(
e
)
=>
setApplyReason
(
e
.
target
.
value
)
}
/>,
onOk
:
()
=>
{
batchPublish
();
confirmed
.
destroy
();
},
});
selectedRowKeys
,
};
const
showConfirm
=
()
=>
{
...
...
@@ -153,7 +158,7 @@ const AssetManagementTable = () => {
disabled=
{
hasItems
}
type=
"primary"
onClick=
{
()
=>
{
s
tartDataAsset
Flow
();
s
end
Flow
();
}
}
>
送审
...
...
src/view/Manage/AssetDraft/hooks/assetData.jsx
View file @
aff41f24
...
...
@@ -5,7 +5,6 @@ import {
getDraftDataAsset
,
listFilterElementsGroupByType
,
deleteDraftDataAsset
,
auditDraftDataAsset
,
startDataAssetFlow
,
}
from
"../../../../service/dataassetmanager"
;
import
{
AssetItem
}
from
"../../AssetManage/Component/AssetTable"
;
...
...
@@ -15,7 +14,7 @@ import { appId } from "../../../../App";
const
{
Text
}
=
Typography
;
// ../standardmanage/hooks/sourceMap
export
function
useGetAssetDraft
({
setDraftParams
})
{
export
function
useGetAssetDraft
({
setDraftParams
,
sendFlow
})
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
templates
,
setTemplates
]
=
useState
();
const
[
currentTemplate
,
setCurrentTemplate
]
=
useState
();
...
...
@@ -31,7 +30,6 @@ export function useGetAssetDraft({ setDraftParams }) {
const
[
dataLoading
,
setDataLoading
]
=
useState
(
false
);
const
[
draftData
,
setDraftData
]
=
useState
();
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
([]);
const
[
applyReason
,
setApplyReason
]
=
useState
(
""
);
// 批量删除
const
batchDelete
=
async
(
id
=
""
)
=>
{
try
{
...
...
@@ -48,12 +46,12 @@ export function useGetAssetDraft({ setDraftParams }) {
}
};
// 批量送审
const
batchPublish
=
async
(
id
=
""
)
=>
{
console
.
log
(
'batchPublish'
,
applyReason
);
const
batchPublish
=
async
(
id
=
""
,
reason
=
""
)
=>
{
console
.
log
(
"id"
,
id
);
console
.
log
(
"reason"
,
reason
);
try
{
await
startDataAssetFlow
({
params
:
{
applyReason
},
params
:
{
applyReason
:
reason
},
data
:
id
?
id
:
selectedRowKeys
,
});
showMessage
(
"success"
,
"送审成功"
);
...
...
@@ -234,16 +232,16 @@ export function useGetAssetDraft({ setDraftParams }) {
};
return
(
<
div
>
<
Popconfirm
title=
"确认送审吗?"
onConfirm=
{
()
=>
{
batchPublish
([
record
?.
id
]);
<
Button
disabled=
{
disabled
}
type=
"link"
size=
"small"
onClick=
{
()
=>
{
sendFlow
([
record
?.
id
]);
}
}
>
<
Button
disabled=
{
disabled
}
type=
"link"
size=
"small"
>
送审
</
Button
>
</
Popconfirm
>
送审
</
Button
>
<
Button
size=
"small"
waring
...
...
@@ -350,6 +348,5 @@ export function useGetAssetDraft({ setDraftParams }) {
setSelectedRowKeys
,
batchDelete
,
batchPublish
,
setApplyReason
,
};
}
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