|
|
@ -6,8 +6,8 @@ import { SkeletonScreen, WorkflowApprovalModal, } from "$components"; |
|
|
|
import moment from "moment"; |
|
|
|
|
|
|
|
const Rest = (props) => { |
|
|
|
const { dispatch, actions, user, socket, pomsProjectBasicAll } = props |
|
|
|
const { workOrder } = actions |
|
|
|
const { dispatch, actions, user, socket, pomsProjectBasicAll, allPepUsersIncludeDel } = props |
|
|
|
const { workOrder, service } = actions |
|
|
|
const [query, setQuery] = useState({ limit: 10, offset: 0 }); //页码信息 |
|
|
|
const [limits, setLimits] = useState(0)//每页实际条数 |
|
|
|
const [tableData, setTableData] = useState([]); |
|
|
@ -22,6 +22,9 @@ const Rest = (props) => { |
|
|
|
if (!pomsProjectBasicAll.length) { |
|
|
|
dispatch(workOrder.getPomsProjectBasicAll()) |
|
|
|
} |
|
|
|
if (!allPepUsersIncludeDel.length) { |
|
|
|
dispatch(service.getOrganizationUsersIncludeDeleted()) |
|
|
|
} |
|
|
|
}, []) |
|
|
|
|
|
|
|
let backlogData = (obj = { limit: 10, offset: 0 }) => { |
|
|
@ -61,10 +64,16 @@ const Rest = (props) => { |
|
|
|
dataIndex: 'index', |
|
|
|
render: (text, record, index) => index + 1 |
|
|
|
}, { |
|
|
|
title: '标题', |
|
|
|
dataIndex: 'title', |
|
|
|
title: '项目名称', |
|
|
|
dataIndex: 'pomsProject', |
|
|
|
render: (text, record, index) => { |
|
|
|
return record?.pomsNeedData?.projectName?.value || '' |
|
|
|
} |
|
|
|
}, { |
|
|
|
title: '申请内容描述', |
|
|
|
dataIndex: 'applyContent', |
|
|
|
render: (text, record, index) => { |
|
|
|
return record?.pomsNeedData?.title?.value || '' |
|
|
|
return record?.pomsNeedData?.applyContent?.value || '' |
|
|
|
} |
|
|
|
}, |
|
|
|
// { |
|
|
@ -80,13 +89,7 @@ const Rest = (props) => { |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }, |
|
|
|
{ |
|
|
|
title: '项目名称', |
|
|
|
dataIndex: 'pomsProject', |
|
|
|
render: (text, record, index) => { |
|
|
|
return record?.pomsNeedData?.projectName?.value || '' |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
title: '申请人', |
|
|
|
dataIndex: 'applyerName', |
|
|
@ -99,17 +102,50 @@ const Rest = (props) => { |
|
|
|
render: (text, record) => { |
|
|
|
return judgmentProcessState(record, 'initiate') |
|
|
|
}, |
|
|
|
}, { |
|
|
|
title: '提交时间', |
|
|
|
dataIndex: 'submissionTime', |
|
|
|
render: (text, record, index) => text && moment(text).add(8, 'hours').format('YYYY-MM-DD HH:mm:ss') || '--' |
|
|
|
}, { |
|
|
|
title: '期望完成时间', |
|
|
|
dataIndex: 'expectTime', |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
title: '处理人员', |
|
|
|
dataIndex: 'handlingPerson', |
|
|
|
render: (text, record, index) => { |
|
|
|
return record?.pomsNeedData?.expectTime?.value || '' |
|
|
|
// 和 users 对 |
|
|
|
return record?.pomsNeedData?.handlingPerson?.value ? allPepUsersIncludeDel.find(u => u.id == record?.pomsNeedData?.handlingPerson?.value)?.name : '' |
|
|
|
} |
|
|
|
}, { |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '处理结果', |
|
|
|
dataIndex: 'handlingResult', |
|
|
|
render: (text, record, index) => { |
|
|
|
return record?.pomsNeedData?.handlingResult?.value || '' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '问题类型', |
|
|
|
dataIndex: 'issueType', |
|
|
|
render: (text, record, index) => { |
|
|
|
return record?.pomsNeedData?.issueType?.value || '' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '处理完成时间', |
|
|
|
dataIndex: 'completionTime', |
|
|
|
render: (text, record, index) => { |
|
|
|
return record?.pomsNeedData?.completionTime?.value || '' |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// { |
|
|
|
// title: '提交时间', |
|
|
|
// dataIndex: 'submissionTime', |
|
|
|
// render: (text, record, index) => text && moment(text).add(8, 'hours').format('YYYY-MM-DD HH:mm:ss') || '--' |
|
|
|
// }, { |
|
|
|
// title: '期望完成时间', |
|
|
|
// dataIndex: 'expectTime', |
|
|
|
// render: (text, record, index) => { |
|
|
|
// return record?.pomsNeedData?.expectTime?.value || '' |
|
|
|
// } |
|
|
|
// }, |
|
|
|
{ |
|
|
|
title: '操作', |
|
|
|
dataIndex: 'hadle', |
|
|
|
render: (text, record, index) => { |
|
|
@ -119,7 +155,6 @@ const Rest = (props) => { |
|
|
|
record.variables.find(t => t.name == 'fsLastActionTime') ? |
|
|
|
moment.unix(record.variables.find(t => t.name == 'fsLastActionTime').value).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
: ''; |
|
|
|
console.log(reviewTime); |
|
|
|
let tooltipTitle = ''; |
|
|
|
if (record.processDeleted) { |
|
|
|
tooltipTitle = '该表单流程已删除,不支持重新发起'; |
|
|
@ -239,7 +274,7 @@ const Rest = (props) => { |
|
|
|
columns={columns} |
|
|
|
dataSource={tableData} |
|
|
|
bordered={false} |
|
|
|
hideExpandedColumn={false} |
|
|
|
hideExpandedColumn={true} |
|
|
|
empty="暂无数据" |
|
|
|
pagination={false} |
|
|
|
/> |
|
|
@ -289,11 +324,12 @@ const Rest = (props) => { |
|
|
|
} |
|
|
|
|
|
|
|
function mapStateToProps (state) { |
|
|
|
const { auth, global, pomsProjectBasicAll } = state; |
|
|
|
const { auth, global, pomsProjectBasicAll , allPepUsersIncludeDel} = state; |
|
|
|
return { |
|
|
|
user: auth.user, |
|
|
|
actions: global.actions, |
|
|
|
pomsProjectBasicAll: pomsProjectBasicAll.data || [] |
|
|
|
pomsProjectBasicAll: pomsProjectBasicAll.data || [], |
|
|
|
allPepUsersIncludeDel: allPepUsersIncludeDel.data || [], |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|