|
@@ -24,7 +24,6 @@ import {
|
|
|
} from '../../hooks/task';
|
|
|
import Upload from '../../compontens/upload';
|
|
|
|
|
|
-
|
|
|
const APPLY_STATUS_OPTIONS = [
|
|
|
{
|
|
|
name: '通过',
|
|
@@ -44,7 +43,7 @@ const getTaskProcessLabelByIndex = (state: number) => {
|
|
|
}[state];
|
|
|
};
|
|
|
|
|
|
-const getTaskProcessLabelDescByIndex = (state:number) => {
|
|
|
+const getTaskProcessLabelDescByIndex = (state: number) => {
|
|
|
return {
|
|
|
1: '任务描述',
|
|
|
2: '处理内容',
|
|
@@ -73,8 +72,11 @@ const TaskDetail: React.FC<RouteComponentProps<{ id: string }>> = ({
|
|
|
message.error(error.message);
|
|
|
});
|
|
|
};
|
|
|
- const isCanHandle =
|
|
|
- detailState.dataSource?.status !== taskStatusEnums.reviewed;
|
|
|
+ const isCanHandle = [
|
|
|
+ taskStatusEnums.pending_handle,
|
|
|
+ taskStatusEnums.refused,
|
|
|
+ ].includes(detailState.dataSource?.status as any);
|
|
|
+
|
|
|
return (
|
|
|
<Spin spinning={detailState.loading}>
|
|
|
<Button
|
|
@@ -97,16 +99,17 @@ const TaskDetail: React.FC<RouteComponentProps<{ id: string }>> = ({
|
|
|
},
|
|
|
{
|
|
|
// TODO 任务状态显示
|
|
|
- key: 'status',
|
|
|
- label: '任务状态',
|
|
|
+ key: 'status',
|
|
|
+ label: '任务状态',
|
|
|
value: (value) => value,
|
|
|
},
|
|
|
].map((infos) => {
|
|
|
return (
|
|
|
<Descriptions.Item label={infos.label} key={infos.key}>
|
|
|
<b>
|
|
|
- {infos.value?.(taskStatus[detailState.dataSource?.[infos.key]]) ||
|
|
|
- detailState.dataSource?.[infos.key]}
|
|
|
+ {infos.value?.(
|
|
|
+ taskStatus[detailState.dataSource?.[infos.key]]
|
|
|
+ ) || detailState.dataSource?.[infos.key]}
|
|
|
</b>
|
|
|
</Descriptions.Item>
|
|
|
);
|
|
@@ -122,13 +125,19 @@ const TaskDetail: React.FC<RouteComponentProps<{ id: string }>> = ({
|
|
|
layout='vertical'
|
|
|
title={TaskProcess[process.pipe_type]}>
|
|
|
{[
|
|
|
- { label: getTaskProcessLabelByIndex(process.pipe_type), key: 'person' },
|
|
|
+ {
|
|
|
+ label: getTaskProcessLabelByIndex(process.pipe_type),
|
|
|
+ key: 'person',
|
|
|
+ },
|
|
|
{ label: '操作时间', key: 'pipe_time' },
|
|
|
{
|
|
|
label: '状态',
|
|
|
key: 'status',
|
|
|
},
|
|
|
- { label: getTaskProcessLabelDescByIndex(process.pipe_type), key: 'desc' },
|
|
|
+ {
|
|
|
+ label: getTaskProcessLabelDescByIndex(process.pipe_type),
|
|
|
+ key: 'desc',
|
|
|
+ },
|
|
|
{
|
|
|
label: '附件',
|
|
|
key: 'img',
|