File tree Expand file tree Collapse file tree
admin-ui/src/pages/flow/leave Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,25 +31,32 @@ const LeaveForm: React.FC<FlowFormViewProps> = (props) => {
3131 const [ visible , setVisible ] = React . useState ( false ) ;
3232
3333 useEffect ( ( ) => {
34- if ( eventKey === 'test' ) {
34+ if ( eventKey === 'test' ) {
3535 console . log ( "点击了自定义事件" , eventKey ) ;
3636 setVisible ( true ) ;
3737 }
3838
3939 // 当流程审批反馈结果关闭时,重新加载数据
40- if ( eventKey == EVENT_CLOSE_RESULT_VIEW && props . flowData ?. getNodeCode ( ) === 'start' ) {
40+ if ( eventKey == EVENT_CLOSE_RESULT_VIEW && props . flowData ?. getNodeCode ( ) === 'start' ) {
4141 // 重新加载数据
4242 console . log ( "重新加载数据" ) ;
4343 props . handlerClick && props . handlerClick ( { type : "RELOAD" } ) ;
4444 }
4545
46- if ( eventKey == EVENT_RELOAD_DATA ) {
46+ if ( eventKey == EVENT_RELOAD_DATA ) {
4747 props . form . resetFields ( ) ;
4848 props . form . setFieldsValue ( props . data ) ;
4949 }
5050 } , [ eventKey ] ) ;
5151
5252
53+ useEffect ( ( ) => {
54+ setTimeout ( ( ) => {
55+ console . log ( 'flowData recordId' , props . flowData ?. getRecordId ( ) ) ;
56+ } , 100 )
57+ } , [ props . flowData ] ) ;
58+
59+
5360 return (
5461 < ProForm
5562 form = { props . form }
@@ -112,7 +119,7 @@ const LeaveForm: React.FC<FlowFormViewProps> = (props) => {
112119 ) }
113120
114121 < Button
115- onClick = { ( ) => {
122+ onClick = { ( ) => {
116123 const recordId = props . flowData ?. getRecordId ( ) ;
117124 alert ( recordId ) ;
118125 } }
You can’t perform that action at this time.
0 commit comments