|
@@ -7,15 +7,9 @@ import {
|
|
|
getBtnAvailability,
|
|
|
LocationKey,
|
|
|
} from '@/domain/permissionMap';
|
|
|
-import {
|
|
|
- AlertOutlined,
|
|
|
- AppstoreOutlined,
|
|
|
- MailOutlined,
|
|
|
- PrinterOutlined,
|
|
|
- SettingOutlined,
|
|
|
-} from '@ant-design/icons';
|
|
|
-import MeButton from '../pages/security/components/MeButton';
|
|
|
import { RootState } from '@/states/store';
|
|
|
+import { IconButton } from '@/components/IconButton';
|
|
|
+import Icon from '@/components/Icon';
|
|
|
|
|
|
interface BusinessZoneProps {
|
|
|
onMenuClick?: (key: string) => void;
|
|
@@ -31,7 +25,7 @@ function useItems(btnAvailability: Record<string, boolean>) {
|
|
|
defaultMessage={'语言包中没有定义patient的翻译文本'}
|
|
|
/>
|
|
|
),
|
|
|
- icon: <MailOutlined />,
|
|
|
+ icon: 'Registration',
|
|
|
disabled: !btnAvailability['patient_management'],
|
|
|
children: [
|
|
|
{
|
|
@@ -43,6 +37,7 @@ function useItems(btnAvailability: Record<string, boolean>) {
|
|
|
defaultMessage={'语言包中没有定义patient的翻译文本'}
|
|
|
/>
|
|
|
),
|
|
|
+ icon: 'Registration',
|
|
|
},
|
|
|
{
|
|
|
key: 'worklist',
|
|
@@ -53,6 +48,7 @@ function useItems(btnAvailability: Record<string, boolean>) {
|
|
|
defaultMessage={'语言包中没有定义patient的翻译文本'}
|
|
|
/>
|
|
|
),
|
|
|
+ icon: 'Worklist',
|
|
|
},
|
|
|
{
|
|
|
key: 'historylist',
|
|
@@ -63,6 +59,7 @@ function useItems(btnAvailability: Record<string, boolean>) {
|
|
|
defaultMessage={'语言包中没有定义patient的翻译文本'}
|
|
|
/>
|
|
|
),
|
|
|
+ icon: 'Registration',
|
|
|
},
|
|
|
{
|
|
|
key: 'archivelist',
|
|
@@ -73,6 +70,7 @@ function useItems(btnAvailability: Record<string, boolean>) {
|
|
|
defaultMessage={'语言包中没有定义patient的翻译文本'}
|
|
|
/>
|
|
|
),
|
|
|
+ icon: 'Registration',
|
|
|
},
|
|
|
{
|
|
|
key: 'bin',
|
|
@@ -93,15 +91,16 @@ function useItems(btnAvailability: Record<string, boolean>) {
|
|
|
defaultMessage={'语言包中没有定义patient的翻译文本'}
|
|
|
/>
|
|
|
),
|
|
|
+ icon: 'Registration',
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
- {
|
|
|
- key: 'emergency',
|
|
|
- icon: <AlertOutlined />,
|
|
|
- label: '急诊',
|
|
|
- disabled: false,
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // key: 'emergency',
|
|
|
+ // icon: 'Emergency',
|
|
|
+ // label: '急诊',
|
|
|
+ // disabled: false,
|
|
|
+ // },
|
|
|
{
|
|
|
key: 'exam',
|
|
|
disabled:
|
|
@@ -113,7 +112,7 @@ function useItems(btnAvailability: Record<string, boolean>) {
|
|
|
defaultMessage={'语言包中没有定义patient的翻译文本'}
|
|
|
/>
|
|
|
),
|
|
|
- icon: <AppstoreOutlined />,
|
|
|
+ icon: 'Exam',
|
|
|
},
|
|
|
{
|
|
|
type: 'divider',
|
|
@@ -131,7 +130,7 @@ function useItems(btnAvailability: Record<string, boolean>) {
|
|
|
defaultMessage={'语言包中没有定义patient的翻译文本'}
|
|
|
/>
|
|
|
),
|
|
|
- icon: <SettingOutlined />,
|
|
|
+ icon: 'Process',
|
|
|
},
|
|
|
{
|
|
|
key: 'print',
|
|
@@ -142,7 +141,7 @@ function useItems(btnAvailability: Record<string, boolean>) {
|
|
|
defaultMessage={'语言包中没有定义patient的翻译文本'}
|
|
|
/>
|
|
|
),
|
|
|
- icon: <PrinterOutlined />,
|
|
|
+ icon: 'Output',
|
|
|
},
|
|
|
];
|
|
|
}
|
|
@@ -243,34 +242,57 @@ const BusinessZone: React.FC<BusinessZoneProps> = ({ onMenuClick }) => {
|
|
|
item.key === currentKey ? 'border border-red-500' : ''
|
|
|
}
|
|
|
>
|
|
|
- <MeButton
|
|
|
- icon={item.icon}
|
|
|
+ <IconButton
|
|
|
data-testid={item.key}
|
|
|
onClick={
|
|
|
item.key === 'patient_management'
|
|
|
? handlePatientManagementClick
|
|
|
: () => onMenuClick?.(item.key ?? 'error')
|
|
|
}
|
|
|
- username={item.label}
|
|
|
- disabled={
|
|
|
- (console.log(`${item.key}=======${item.disabled}`),
|
|
|
- item.disabled)
|
|
|
+ iconSize={56}
|
|
|
+ icon={
|
|
|
+ <Icon
|
|
|
+ module="module-common"
|
|
|
+ name={item.icon ?? ''}
|
|
|
+ userId="user-A"
|
|
|
+ theme="default"
|
|
|
+ size="2x"
|
|
|
+ state="normal"
|
|
|
+ />
|
|
|
}
|
|
|
- />
|
|
|
+ style={{ padding: '0px' }}
|
|
|
+ disabled={item.disabled}
|
|
|
+ >
|
|
|
+ {item.label}
|
|
|
+ </IconButton>
|
|
|
{item.key === 'patient_management' && floatingMenuVisible && (
|
|
|
<Space direction="vertical" style={{ marginLeft: 20 }}>
|
|
|
{item.children?.map((child) => (
|
|
|
- <MeButton
|
|
|
+ <IconButton
|
|
|
data-testid={child.key}
|
|
|
+ iconSize={56}
|
|
|
+ icon={
|
|
|
+ <Icon
|
|
|
+ module="module-common"
|
|
|
+ name={item.icon ?? ''}
|
|
|
+ userId="user-A"
|
|
|
+ theme="default"
|
|
|
+ size="2x"
|
|
|
+ state="normal"
|
|
|
+ />
|
|
|
+ }
|
|
|
key={child.key}
|
|
|
onClick={() => onMenuClick?.(child.key)}
|
|
|
- username={child.label}
|
|
|
className={
|
|
|
child.key === currentKey
|
|
|
? 'border border-red-500'
|
|
|
: ''
|
|
|
}
|
|
|
- />
|
|
|
+ style={{ padding: '0px' }}
|
|
|
+ disabled={item.disabled}
|
|
|
+ >
|
|
|
+ {child.label}
|
|
|
+ </IconButton>
|
|
|
))}
|
|
|
</Space>
|
|
|
)}
|