Commit c071979a by zhaochengxiang

增加草稿状态

parent bde928cb
...@@ -29,6 +29,13 @@ const operationMap = { ...@@ -29,6 +29,13 @@ const operationMap = {
changeToPendingSubmit: '转为待提交', changeToPendingSubmit: '转为待提交',
} }
const draftStates = [
{ id: 'PENDINGSUBMIT', name: '待提交' },
{ id: 'PROCESSING', name: '处理中' },
{ id: 'DONE', name: '已完成' },
{ id: 'PUBLISHED', name: '已发布' },
]
const FC = (props) => { const FC = (props) => {
const [loadingTemplates, setLoadingTemplates] = React.useState(false) const [loadingTemplates, setLoadingTemplates] = React.useState(false)
const [templates, setTemplates] = React.useState() const [templates, setTemplates] = React.useState()
...@@ -36,6 +43,7 @@ const FC = (props) => { ...@@ -36,6 +43,7 @@ const FC = (props) => {
const [pagination, setPagination] = React.useState({ pageNum: 1, pageSize: 20 }) const [pagination, setPagination] = React.useState({ pageNum: 1, pageSize: 20 })
const [currentElementValue, setElementValue] = React.useState() const [currentElementValue, setElementValue] = React.useState()
const [keyword, setKeyword] = React.useState() const [keyword, setKeyword] = React.useState()
const [draftState, setDraftState] = React.useState()
const [selectedRows, setSelectedRows] = React.useState() const [selectedRows, setSelectedRows] = React.useState()
const [loadingElements, setLoadingElements] = React.useState() const [loadingElements, setLoadingElements] = React.useState()
const [elements, setElements] = React.useState() const [elements, setElements] = React.useState()
...@@ -89,7 +97,7 @@ const FC = (props) => { ...@@ -89,7 +97,7 @@ const FC = (props) => {
if (currentTemplateValue && isAdmin!==undefined) { if (currentTemplateValue && isAdmin!==undefined) {
getDrafts() getDrafts()
} }
}, [currentTemplateValue, keyword, currentElementValue, pagination, isAdmin], { wait: 300 }) }, [currentTemplateValue, keyword, currentElementValue, pagination, isAdmin, draftState], { wait: 300 })
const [canPublish, canDelete] = React.useMemo(() => { const [canPublish, canDelete] = React.useMemo(() => {
if ((selectedRows??[]).length === 0) return [false, false] if ((selectedRows??[]).length === 0) return [false, false]
...@@ -147,6 +155,12 @@ const FC = (props) => { ...@@ -147,6 +155,12 @@ const FC = (props) => {
const fixedCols = [ const fixedCols = [
{ {
title: '当前处理人',
dataIndex: 'nextProcessUsers',
width: 120,
fixed: 'right',
},
{
title: '修改类型', title: '修改类型',
dataIndex: 'operationType', dataIndex: 'operationType',
ellipsis: true, ellipsis: true,
...@@ -326,6 +340,7 @@ const FC = (props) => { ...@@ -326,6 +340,7 @@ const FC = (props) => {
queryElementId: currentElementValue, queryElementId: currentElementValue,
templateType: currentTemplateValue, templateType: currentTemplateValue,
keyword: encodeURIComponent(keyword??''), keyword: encodeURIComponent(keyword??''),
state: draftState,
pageNum: pagination.pageNum, pageNum: pagination.pageNum,
pageSize: pagination.pageSize, pageSize: pagination.pageSize,
}, },
...@@ -526,6 +541,20 @@ const FC = (props) => { ...@@ -526,6 +541,20 @@ const FC = (props) => {
</Space> </Space>
<Space> <Space>
<Select allowClear <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} loading={loadingElements}
value={currentElementValue} value={currentElementValue}
placeholder='请选择搜索属性' 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