|
|
@ -3,7 +3,7 @@ import { connect } from 'react-redux'; |
|
|
|
import { ApiTable, EmisApiTable, EmisRequest } from '$utils' |
|
|
|
import { Skeleton, Button, Pagination, Form, Popconfirm, Table, Toast } from '@douyinfe/semi-ui'; |
|
|
|
import { IconSearch } from '@douyinfe/semi-icons'; |
|
|
|
import { SkeletonScreen, } from "$components"; |
|
|
|
import { SkeletonScreen, WorkflowModal } from "$components"; |
|
|
|
import moment from "moment"; |
|
|
|
|
|
|
|
|
|
|
@ -27,6 +27,10 @@ const Rest = (props) => { |
|
|
|
const [projectStatus, setProjectStatus] = useState([]); //获取项目状态列表 |
|
|
|
const [tableData, setTableData] = useState([]); //获取项目状态列表 |
|
|
|
const [loading, setLoading] = useState(true); //获取项目状态列表 |
|
|
|
const [workflowModalVisible, setWorkflowModalVisible] = useState(false) |
|
|
|
const [processInstanceId, setProcessInstanceId] = useState(null) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
backlogData() |
|
|
@ -35,17 +39,13 @@ const Rest = (props) => { |
|
|
|
let backlogData = () => { |
|
|
|
setLoading(true) |
|
|
|
EmisRequest.get(EmisApiTable.processInstancemMyAuditList, |
|
|
|
{ userId: 1, offset: 0, limit: 10, businessType: '' }) |
|
|
|
{ userId: user?.id, businessType: '运维中台表单', }) |
|
|
|
.then(res => { |
|
|
|
console.log(111, res); |
|
|
|
setTableData(res) |
|
|
|
setLimits(res.length || 0) |
|
|
|
setLoading(false) |
|
|
|
// sessionStorage.setItem('pomsUser', JSON.stringify(user)); |
|
|
|
// return dispatch({ |
|
|
|
// type: LOGIN_SUCCESS, |
|
|
|
// payload: { user: user }, |
|
|
|
// }); |
|
|
|
|
|
|
|
}, error => { |
|
|
|
Toast.error({ content: '待办工单请求失败', duration: 1, }) |
|
|
|
setLoading(false) |
|
|
@ -79,6 +79,11 @@ const Rest = (props) => { |
|
|
|
}, { |
|
|
|
title: '操作', |
|
|
|
dataIndex: 'hadle', |
|
|
|
render: (text, record, index) => <div style={{ width: 60, color: "#1890ff", cursor: "pointer" }} onClick={() => { |
|
|
|
setProcessInstanceId(record.processInstanceId) |
|
|
|
setWorkflowModalVisible(true) |
|
|
|
|
|
|
|
}}>查看详情</div> |
|
|
|
}] |
|
|
|
|
|
|
|
return ( |
|
|
@ -92,10 +97,12 @@ const Rest = (props) => { |
|
|
|
</div> |
|
|
|
<div style={{ marginRight: 20, display: 'flex', alignItems: 'center' }} className='myempush'> |
|
|
|
<Form |
|
|
|
onSubmit={(values) => console.log(values)} |
|
|
|
getFormApi={(formApi) => (form.current = formApi)} |
|
|
|
// getFormApi={(formApi) => (form.current = formApi)} |
|
|
|
layout="horizontal" |
|
|
|
style={{ position: "relative", width: "100%", flex: 1 }} |
|
|
|
onSubmit={(values) => { |
|
|
|
console.log(values) |
|
|
|
}} |
|
|
|
> |
|
|
|
<Form.DatePicker |
|
|
|
pure |
|
|
@ -112,26 +119,22 @@ const Rest = (props) => { |
|
|
|
style={{ width: 260, marginLeft: 12, marginRight: 12 }} |
|
|
|
placeholder="请输入申请人" |
|
|
|
/> |
|
|
|
|
|
|
|
<Button |
|
|
|
type="primary" htmlType="submit" |
|
|
|
style={{ |
|
|
|
width: 80, |
|
|
|
height: 32, |
|
|
|
borderRadius: 2, |
|
|
|
marginRight: 32, |
|
|
|
background: '#FFFFFF', |
|
|
|
color: '#005ABD', |
|
|
|
border: '1px solid #005ABD' |
|
|
|
}} |
|
|
|
> |
|
|
|
查询 |
|
|
|
</Button> |
|
|
|
</Form> |
|
|
|
<Button |
|
|
|
theme="solid" |
|
|
|
type="primary" |
|
|
|
style={{ |
|
|
|
width: 80, |
|
|
|
height: 32, |
|
|
|
borderRadius: 2, |
|
|
|
marginRight: 32, |
|
|
|
background: '#FFFFFF', |
|
|
|
color: '#005ABD', |
|
|
|
border: '1px solid #005ABD' |
|
|
|
}} |
|
|
|
onClick={() => { |
|
|
|
getPushList({ limit: query.limit, page: 0 }) |
|
|
|
}} |
|
|
|
> |
|
|
|
查询 |
|
|
|
</Button> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -146,7 +149,7 @@ const Rest = (props) => { |
|
|
|
<Table |
|
|
|
rowKey="name" |
|
|
|
columns={columns} |
|
|
|
dataSource={tableData} |
|
|
|
dataSource={tableData?.slice(query.limit * query.page, (query.page + 1) * query.limit)} |
|
|
|
bordered={false} |
|
|
|
hideExpandedColumn={false} |
|
|
|
empty="暂无数据" |
|
|
@ -175,14 +178,19 @@ const Rest = (props) => { |
|
|
|
pageSizeOpts={[10, 20, 30, 40]} |
|
|
|
onChange={(currentPage, pageSize) => { |
|
|
|
setQuery({ limit: pageSize, page: currentPage - 1 }); |
|
|
|
page.current = currentPage - 1 |
|
|
|
setChange(!change) |
|
|
|
}} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<WorkflowModal |
|
|
|
visible={workflowModalVisible} |
|
|
|
title={''} |
|
|
|
processId={processInstanceId} |
|
|
|
onCancel={() => { setWorkflowModalVisible(false) }} |
|
|
|
successCallBack={() => { setWorkflowModalVisible(false) }} |
|
|
|
/> |
|
|
|
</> |
|
|
|
) |
|
|
|
} |
|
|
|