17
17
import { getTaskDetail } from '@/common/network/task' ;
18
18
import Action from '@/component/Action' ;
19
19
import DisplayTable from '@/component/DisplayTable' ;
20
- import StatusLabel , { status } from '@/component/Task/component/Status' ;
20
+ import { status } from '@/component/Task/component/Status' ;
21
21
import { TaskOperationType , TaskRecord , TaskRecordParameters , Operation , TaskType } from '@/d.ts' ;
22
22
import { formatMessage } from '@/util/intl' ;
23
23
import { getFormatDateTime } from '@/util/utils' ;
24
24
import { FilterOutlined } from '@ant-design/icons' ;
25
25
import React , { useEffect , useState } from 'react' ;
26
26
import FlowModal from './FlowModal' ;
27
27
import ChangeDetail from './ChangeDetail' ;
28
- import { isSupportChangeDetail } from '@/component/Task/helper' ;
29
28
import StatusItem from './status' ;
30
29
import styles from './index.less' ;
31
30
@@ -74,10 +73,7 @@ const getConnectionColumns = (params: {
74
73
ellipsis : true ,
75
74
width : 140 ,
76
75
render : ( id , record ) => {
77
- if ( isSupportChangeDetail ( params . taskType ) ) {
78
- return < span > { operationTypeMap ?. [ record . type ] } </ span > ;
79
- }
80
- return < span > { operationTypeMap ?. [ record . parameters ?. operationType ] } </ span > ;
76
+ return < span > { operationTypeMap ?. [ record . type ] } </ span > ;
81
77
} ,
82
78
} ,
83
79
@@ -106,10 +102,7 @@ const getConnectionColumns = (params: {
106
102
return value === record . status ;
107
103
} ,
108
104
render : ( status , record ) => {
109
- if ( isSupportChangeDetail ( params . taskType ) ) {
110
- return < StatusItem status = { status } /> ;
111
- }
112
- return < StatusLabel status = { status } progress = { Math . floor ( record . progressPercentage ) } /> ;
105
+ return < StatusItem status = { status } /> ;
113
106
} ,
114
107
} ,
115
108
@@ -134,18 +127,16 @@ const getConnectionColumns = (params: {
134
127
defaultMessage : '审批记录' ,
135
128
} ) }
136
129
</ Action . Link >
137
- { isSupportChangeDetail ( params . taskType ) && (
138
- < Action . Link
139
- onClick = { async ( ) => {
140
- params ?. onOpenChangeDetail ( record , true ) ;
141
- } }
142
- >
143
- { formatMessage ( {
144
- id : 'src.component.Task.component.CommonDetailModal.5C706BA6' ,
145
- defaultMessage : '变更详情' ,
146
- } ) }
147
- </ Action . Link >
148
- ) }
130
+ < Action . Link
131
+ onClick = { async ( ) => {
132
+ params ?. onOpenChangeDetail ( record , true ) ;
133
+ } }
134
+ >
135
+ { formatMessage ( {
136
+ id : 'src.component.Task.component.CommonDetailModal.5C706BA6' ,
137
+ defaultMessage : '变更详情' ,
138
+ } ) }
139
+ </ Action . Link >
149
140
</ >
150
141
) ;
151
142
} ,
@@ -154,7 +145,7 @@ const getConnectionColumns = (params: {
154
145
} ;
155
146
156
147
interface IProps {
157
- opRecord : Operation [ ] | TaskRecord < any > [ ] ;
148
+ opRecord : Operation [ ] ;
158
149
onReload : ( ) => void ;
159
150
taskType : TaskType ;
160
151
}
@@ -172,11 +163,7 @@ const TaskOperationRecord: React.FC<IProps> = (props) => {
172
163
task : Operation | TaskRecord < TaskRecordParameters > ,
173
164
visible : boolean = false ,
174
165
) => {
175
- if ( isSupportChangeDetail ( taskType ) ) {
176
- setDetailId ( ( task as Operation ) ?. flowInstanceId ) ;
177
- } else {
178
- setDetailId ( task ?. id ) ;
179
- }
166
+ setDetailId ( ( task as Operation ) ?. flowInstanceId ) ;
180
167
setDetailVisible ( visible ) ;
181
168
} ;
182
169
0 commit comments