/*
 * @Author: your name
 * @Date: 2022-03-07 11:05:19
 * @LastEditTime: 2022-04-29 17:15:37
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /MedicalWisdomCheckSys/src/pages/GradeHospitalAccreditation/articleManagement/drawer/set.tsx
 */




import { useModel } from 'umi';

import Ledger from './fragment/ledger';
import SetArticle from './fragment/setArticle';

//条文设置/表格批量设置drawer弹窗


const SwitchDrawer = ({drawerFormType}:{drawerFormType:any})=>{

   if(drawerFormType == 'ARTICLE_SET'||drawerFormType == 'BATCHSETTING'){
        return <SetArticle />
   }

   if(drawerFormType == 'Ledger'||drawerFormType == 'VIEWLEDGER'){
     return <Ledger />
   }

   return <></>
}

const SetDrawer = () => {

    const { articleManagement } = useModel('allModels');

    const {
        drawerFormType,
    } = articleManagement;


    return (
        <SwitchDrawer drawerFormType={drawerFormType} />
    )
}

export default SetDrawer;
