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
c071979a
Commit
c071979a
authored
Aug 07, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加草稿状态
parent
bde928cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
draft.jsx
src/view/Manage/AssetDraft/draft.jsx
+30
-1
No files found.
src/view/Manage/AssetDraft/draft.jsx
View file @
c071979a
...
...
@@ -29,6 +29,13 @@ const operationMap = {
changeToPendingSubmit
:
'转为待提交'
,
}
const
draftStates
=
[
{
id
:
'PENDINGSUBMIT'
,
name
:
'待提交'
},
{
id
:
'PROCESSING'
,
name
:
'处理中'
},
{
id
:
'DONE'
,
name
:
'已完成'
},
{
id
:
'PUBLISHED'
,
name
:
'已发布'
},
]
const
FC
=
(
props
)
=>
{
const
[
loadingTemplates
,
setLoadingTemplates
]
=
React
.
useState
(
false
)
const
[
templates
,
setTemplates
]
=
React
.
useState
()
...
...
@@ -36,6 +43,7 @@ const FC = (props) => {
const
[
pagination
,
setPagination
]
=
React
.
useState
({
pageNum
:
1
,
pageSize
:
20
})
const
[
currentElementValue
,
setElementValue
]
=
React
.
useState
()
const
[
keyword
,
setKeyword
]
=
React
.
useState
()
const
[
draftState
,
setDraftState
]
=
React
.
useState
()
const
[
selectedRows
,
setSelectedRows
]
=
React
.
useState
()
const
[
loadingElements
,
setLoadingElements
]
=
React
.
useState
()
const
[
elements
,
setElements
]
=
React
.
useState
()
...
...
@@ -89,7 +97,7 @@ const FC = (props) => {
if
(
currentTemplateValue
&&
isAdmin
!==
undefined
)
{
getDrafts
()
}
},
[
currentTemplateValue
,
keyword
,
currentElementValue
,
pagination
,
isAdmin
],
{
wait
:
300
})
},
[
currentTemplateValue
,
keyword
,
currentElementValue
,
pagination
,
isAdmin
,
draftState
],
{
wait
:
300
})
const
[
canPublish
,
canDelete
]
=
React
.
useMemo
(()
=>
{
if
((
selectedRows
??[]).
length
===
0
)
return
[
false
,
false
]
...
...
@@ -147,6 +155,12 @@ const FC = (props) => {
const
fixedCols
=
[
{
title
:
'当前处理人'
,
dataIndex
:
'nextProcessUsers'
,
width
:
120
,
fixed
:
'right'
,
},
{
title
:
'修改类型'
,
dataIndex
:
'operationType'
,
ellipsis
:
true
,
...
...
@@ -326,6 +340,7 @@ const FC = (props) => {
queryElementId
:
currentElementValue
,
templateType
:
currentTemplateValue
,
keyword
:
encodeURIComponent
(
keyword
??
''
),
state
:
draftState
,
pageNum
:
pagination
.
pageNum
,
pageSize
:
pagination
.
pageSize
,
},
...
...
@@ -526,6 +541,20 @@ const FC = (props) => {
</Space>
<Space>
<Select allowClear
placeholder='请选择状态'
value={draftState}
onChange={(val) => {
setDraftState(val)
}}
style={{ width: 160 }}
>
{
draftStates.map((item, index) => (
<Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
))
}
</Select>
<Select allowClear
loading={loadingElements}
value={currentElementValue}
placeholder='请选择搜索属性'
...
...
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