|  | @@ -1,4 +1,4 @@
 | 
	
		
			
				|  |  | -import { useRef, useState, useMemo, useContext } from 'react'
 | 
	
		
			
				|  |  | +import { useRef, useState, useMemo, useEffect, useContext } from 'react'
 | 
	
		
			
				|  |  |  import { Button, Drawer, Radio, Select, Spin, Tag } from 'antd'
 | 
	
		
			
				|  |  |  import { Actions, FlowContext } from '../../context'
 | 
	
		
			
				|  |  |  import debounce from 'lodash/debounce'
 | 
	
	
		
			
				|  | @@ -20,12 +20,19 @@ const FlowDrawer = () => {
 | 
	
		
			
				|  |  |    const { drawerConfig } = flowState
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    const fetchRef = useRef(0)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |    const [state, setState] = useState({
 | 
	
		
			
				|  |  |      approvalType: ApprovalType.TARGET,
 | 
	
		
			
				|  |  |      fetching: false,
 | 
	
		
			
				|  |  |      options: [],
 | 
	
		
			
				|  |  |      staffOptions: []
 | 
	
		
			
				|  |  |    })
 | 
	
		
			
				|  |  | +  useEffect(() => {
 | 
	
		
			
				|  |  | +    if (drawerConfig.nodeId && drawerConfig.visible) {
 | 
	
		
			
				|  |  | +      const defaultStaffIds = flowState.flowData.get(drawerConfig.nodeId)?.staffOptions || []
 | 
	
		
			
				|  |  | +      setState({ ...state, staffOptions: defaultStaffIds })
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  }, [drawerConfig])
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    const handleCancel = () => dispatch({ type: Actions.CLOSE_MODAL })
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -101,6 +108,7 @@ const FlowDrawer = () => {
 | 
	
		
			
				|  |  |      <Drawer
 | 
	
		
			
				|  |  |        visible={drawerConfig.visible}
 | 
	
		
			
				|  |  |        onClose={handleCancel}
 | 
	
		
			
				|  |  | +      destroyOnClose
 | 
	
		
			
				|  |  |        footer={
 | 
	
		
			
				|  |  |          <div className="flex justify-end">
 | 
	
		
			
				|  |  |            <Button onClick={handleCancel}>取消</Button>
 |