| | |
| | | import { useEffect, useRef, useState } from 'react'; |
| | | import { Access, useAccess } from 'umi'; |
| | | import AddAndEdit from './components/addAndEdit'; |
| | | import { add, del, edit, getUnitList } from './service'; |
| | | import { add, del, edit, getUnitList ,editSystemUserInfo,addSystemUserInfo} from './service'; |
| | | |
| | | const Role = () => { |
| | | const actionRef = useRef(); |
| | |
| | | ref={addViewRef} |
| | | visible={modalVisible} |
| | | onSave={async (fileds) => { |
| | | let success = await sendRequest(add, fileds); |
| | | let success = await sendRequest(addSystemUserInfo, fileds); |
| | | if (success) { |
| | | handleModalVisibles(false); |
| | | actionRef.current.reload(); |
| | |
| | | addViewRef.current.clean(); |
| | | }} |
| | | onUpdate={async (fileds) => { |
| | | let success = await sendRequest(edit, fileds); |
| | | let success = await sendRequest(editSystemUserInfo, fileds); |
| | | if (success) { |
| | | handleModalVisibles(false); |
| | | actionRef.current.reload(); |