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
859070a9
Commit
859070a9
authored
Dec 15, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产送审
parent
d3982338
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
140 additions
and
0 deletions
+140
-0
assetmanage.js
src/model/assetmanage.js
+5
-0
dataassetmanager.js
src/service/dataassetmanager.js
+5
-0
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+33
-0
StartFlow.jsx
src/view/Manage/AssetManage/Component/StartFlow.jsx
+97
-0
No files found.
src/model/assetmanage.js
View file @
859070a9
...
@@ -253,3 +253,7 @@ export function* updateResourceState(payload) {
...
@@ -253,3 +253,7 @@ export function* updateResourceState(payload) {
export
function
*
subs
(
payload
)
{
export
function
*
subs
(
payload
)
{
return
yield
call
(
service
.
subs
,
payload
);
return
yield
call
(
service
.
subs
,
payload
);
}
}
export
function
*
startFlow
(
payload
)
{
return
yield
call
(
service
.
startFlow
,
payload
)
}
\ No newline at end of file
src/service/dataassetmanager.js
View file @
859070a9
...
@@ -259,3 +259,7 @@ export function updateResourceState(payload) {
...
@@ -259,3 +259,7 @@ export function updateResourceState(payload) {
export
function
subs
(
payload
)
{
export
function
subs
(
payload
)
{
return
Get
(
"/dataassetmanager/subApi/subs"
,
payload
);
return
Get
(
"/dataassetmanager/subApi/subs"
,
payload
);
}
}
export
function
startFlow
(
payload
)
{
return
Post
(
"/dataassetmanager/flowApi/startDataAssetFlow"
,
payload
);
}
\ No newline at end of file
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
859070a9
...
@@ -17,6 +17,7 @@ import { AnchorId, AnchorDirId, AnchorTimestamp, AssetBrowseReference, AssetMana
...
@@ -17,6 +17,7 @@ import { AnchorId, AnchorDirId, AnchorTimestamp, AssetBrowseReference, AssetMana
import
{
FullScreenSvg
,
CancelFullScreenSvg
}
from
'./AssetSvg'
;
import
{
FullScreenSvg
,
CancelFullScreenSvg
}
from
'./AssetSvg'
;
import
AssetDeleteModal
from
'./AssetDeleteModal'
;
import
AssetDeleteModal
from
'./AssetDeleteModal'
;
import
{
AppContext
}
from
"../../../../App"
;
import
{
AppContext
}
from
"../../../../App"
;
import
StartFlowModal
from
"./StartFlow"
;
import
"./AssetTable.less"
;
import
"./AssetTable.less"
;
import
'react-contexify/dist/ReactContexify.css'
;
import
'react-contexify/dist/ReactContexify.css'
;
...
@@ -149,6 +150,7 @@ const AssetTable = (props) => {
...
@@ -149,6 +150,7 @@ const AssetTable = (props) => {
const
[
TableWidth
,
setTableWidth
]
=
useState
(
0
);
const
[
TableWidth
,
setTableWidth
]
=
useState
(
0
);
const
[
compact
,
setCompact
]
=
useState
(
false
);
const
[
compact
,
setCompact
]
=
useState
(
false
);
const
[
assetDeleteModalVisible
,
setAssetDeleteModalVisible
]
=
useState
(
false
);
const
[
assetDeleteModalVisible
,
setAssetDeleteModalVisible
]
=
useState
(
false
);
const
[
startFlowModalVisible
,
setStartFlowModalVisible
]
=
useState
(
false
);
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
const
[
modal
,
contextHolder
]
=
Modal
.
useModal
();
const
anchorId
=
getQueryParam
(
AnchorId
,
props
?.
location
?.
search
);
const
anchorId
=
getQueryParam
(
AnchorId
,
props
?.
location
?.
search
);
...
@@ -726,6 +728,17 @@ const AssetTable = (props) => {
...
@@ -726,6 +728,17 @@ const AssetTable = (props) => {
onFullScreenChange
&&
onFullScreenChange
(
!
fullScreen
);
onFullScreenChange
&&
onFullScreenChange
(
!
fullScreen
);
}
}
const
onStartFlowClick
=
()
=>
{
setStartFlowModalVisible
(
true
);
}
const
onStartFlowModalCancel
=
(
refresh
=
false
)
=>
{
setStartFlowModalVisible
(
false
);
if
(
refresh
)
{
setCheckedKeys
([]);
}
}
const
handleResize
=
index
=>
(
e
,
{
size
})
=>
{
const
handleResize
=
index
=>
(
e
,
{
size
})
=>
{
const
nextColumns
=
[...
realColumns
];
const
nextColumns
=
[...
realColumns
];
nextColumns
[
index
]
=
{
nextColumns
[
index
]
=
{
...
@@ -802,6 +815,14 @@ const AssetTable = (props) => {
...
@@ -802,6 +815,14 @@ const AssetTable = (props) => {
const
moreMenu
=
(
const
moreMenu
=
(
<
Menu
>
<
Menu
>
{
{
(
reference
===
AssetManageReference
)
&&
<
Menu
.
Item
disabled=
{
(
checkedKeys
||
[]).
length
===
0
}
>
<
div
className=
'text-center'
onClick=
{
onStartFlowClick
}
>
送审
</
div
>
</
Menu
.
Item
>
}
{
(
reference
!==
AssetRecycleReference
)
&&
(
reference
!==
AssetRecycleReference
)
&&
<
Menu
.
Item
disabled=
{
(
checkedKeys
||
[]).
length
===
0
}
>
<
Menu
.
Item
disabled=
{
(
checkedKeys
||
[]).
length
===
0
}
>
<
div
className=
'text-center'
onClick=
{
subscriptAsset
}
>
<
div
className=
'text-center'
onClick=
{
subscriptAsset
}
>
...
@@ -888,6 +909,13 @@ const AssetTable = (props) => {
...
@@ -888,6 +909,13 @@ const AssetTable = (props) => {
<
Button
>
其他操作
</
Button
>
<
Button
>
其他操作
</
Button
>
</
Dropdown
>
:
<
React
.
Fragment
>
</
Dropdown
>
:
<
React
.
Fragment
>
{
{
(
reference
===
AssetManageReference
)
&&
<
Tooltip
title=
{
(
checkedKeys
||
[]).
length
===
0
?
'请先选择资产'
:
''
}
>
<
Button
onClick=
{
onStartFlowClick
}
disabled=
{
(
checkedKeys
||
[]).
length
===
0
}
>
送审
</
Button
>
</
Tooltip
>
}
{
(
reference
!==
AssetRecycleReference
)
&&
(
reference
!==
AssetRecycleReference
)
&&
<
Tooltip
title=
{
(
checkedKeys
||
[]).
length
===
0
?
'请先选择资产'
:
''
}
>
<
Tooltip
title=
{
(
checkedKeys
||
[]).
length
===
0
?
'请先选择资产'
:
''
}
>
<
Button
onClick=
{
subscriptAsset
}
disabled=
{
(
checkedKeys
||
[]).
length
===
0
}
>
订阅
</
Button
>
<
Button
onClick=
{
subscriptAsset
}
disabled=
{
(
checkedKeys
||
[]).
length
===
0
}
>
订阅
</
Button
>
...
@@ -1056,6 +1084,11 @@ const AssetTable = (props) => {
...
@@ -1056,6 +1084,11 @@ const AssetTable = (props) => {
onDelete=
{
onAssetDeleteModalDelete
}
onDelete=
{
onAssetDeleteModalDelete
}
onDeleteAll=
{
onAssetDeleteModalDeleteAll
}
onDeleteAll=
{
onAssetDeleteModalDeleteAll
}
/>
/>
<
StartFlowModal
visible=
{
startFlowModalVisible
}
ids=
{
checkedKeys
||
[]
}
onCancel=
{
onStartFlowModalCancel
}
/>
<
RcMenu
id=
{
MENU_ID
}
>
<
RcMenu
id=
{
MENU_ID
}
>
{
/* {
{
/* {
(contextMenuItem.resourceState==='notRelatedAsset') && <RcItem id="uncombed" onClick={handleItemClick}>
(contextMenuItem.resourceState==='notRelatedAsset') && <RcItem id="uncombed" onClick={handleItemClick}>
...
...
src/view/Manage/AssetManage/Component/StartFlow.jsx
0 → 100644
View file @
859070a9
import
React
,
{
useState
,
useContext
}
from
'react'
;
import
{
Modal
,
Form
,
Input
}
from
'antd'
;
import
{
dispatchLatest
}
from
'../../../../model'
;
import
{
showNotifaction
}
from
'../../../../util'
;
import
{
AppContext
}
from
'../../../../App'
;
const
StartFlowModal
=
(
props
)
=>
{
const
{
visible
,
onCancel
,
ids
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
);
const
app
=
useContext
(
AppContext
);
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
4
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
20
},
},
};
const
handleOk
=
async
()
=>
{
try
{
const
values
=
await
form
.
validateFields
();
setConfirmLoading
(
true
);
dispatchLatest
({
type
:
'assetmanage.startFlow'
,
payload
:
{
params
:
{
env
:
app
?.
env
?.
domainId
,
dataAssetIds
:
ids
.
join
(
','
),
flowDesc
:
values
?.
desc
}
},
callback
:
data
=>
{
reset
();
if
((
data
||
''
)
!==
''
)
{
showNotifaction
(
'送审提示'
,
data
,
5
);
}
onCancel
&&
onCancel
(
true
);
},
error
:
()
=>
{
setConfirmLoading
(
false
);
}
})
}
catch
(
errInfo
)
{
}
}
const
reset
=
()
=>
{
setConfirmLoading
(
false
);
form
.
resetFields
();
}
return
(
<
Modal
forceRender
visible=
{
visible
}
title=
'资产送审'
width=
{
520
}
confirmLoading=
{
confirmLoading
}
onCancel=
{
()
=>
{
reset
();
onCancel
&&
onCancel
();
}
}
onOk=
{
handleOk
}
>
<
Form
{
...
formItemLayout
}
form=
{
form
}
>
<
Form
.
Item
label=
"送审内容"
name=
"desc"
rules=
{
[{
required
:
true
,
message
:
'请填写送审内容'
}]
}
>
<
Input
.
TextArea
rows=
{
6
}
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
);
}
export
default
StartFlowModal
;
\ No newline at end of file
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