Commit c071979a by zhaochengxiang

增加草稿状态

parent bde928cb
......@@ -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='请选择搜索属性'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment