|
|
@@ -76,28 +76,34 @@ const BasicLayout: React.FC<BasicLayoutProps> = () => {
|
|
|
const handleMenuClick = async (key: string) => {
|
|
|
// 特殊处理打印按钮
|
|
|
if (key === 'print') {
|
|
|
- // 获取当前选中的记录
|
|
|
- const state = store.getState();
|
|
|
- const selectedIds =
|
|
|
- currentKey === 'historylist'
|
|
|
- ? state.historySelection.selectedIds
|
|
|
- : currentKey === 'worklist'
|
|
|
- ? state.workSelection.selectedIds
|
|
|
- : [];
|
|
|
+ if (currentKey === 'worklist' || currentKey === 'historylist') {
|
|
|
+ // 获取当前选中的记录
|
|
|
+ const state = store.getState();
|
|
|
+ const selectedIds =
|
|
|
+ currentKey === 'historylist'
|
|
|
+ ? state.historySelection.selectedIds
|
|
|
+ : currentKey === 'worklist'
|
|
|
+ ? state.workSelection.selectedIds
|
|
|
+ : [];
|
|
|
|
|
|
- if (selectedIds.length === 0) {
|
|
|
- message.warning('请先选择要打印的项目');
|
|
|
- return;
|
|
|
- }
|
|
|
+ if (selectedIds.length === 0) {
|
|
|
+ message.warning('请先选择要打印的项目');
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- try {
|
|
|
- // 调用 selectedWorksToPrint 加载数据并跳转
|
|
|
- await selectedWorksToPrint(selectedIds, currentKey as 'worklist' | 'historylist');
|
|
|
- } catch (error) {
|
|
|
- console.error('[BusinessZone] Print error:', error);
|
|
|
- message.error('加载打印数据失败,请重试');
|
|
|
+ try {
|
|
|
+ // 调用 selectedWorksToPrint 加载数据并跳转
|
|
|
+ await selectedWorksToPrint(selectedIds, currentKey as 'worklist' | 'historylist');
|
|
|
+ } catch (error) {
|
|
|
+ console.error('[BusinessZone] Print error:', error);
|
|
|
+ message.error('加载打印数据失败,请重试');
|
|
|
+ }
|
|
|
+ } else if(currentKey === 'exam' || currentKey === 'process') {
|
|
|
+ // 其他按钮直接切换页面
|
|
|
+ dispatch(setBusinessFlow(key));
|
|
|
}
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ else {
|
|
|
// 其他按钮直接切换页面
|
|
|
dispatch(setBusinessFlow(key));
|
|
|
}
|
|
|
@@ -135,9 +141,9 @@ const BasicLayout: React.FC<BasicLayoutProps> = () => {
|
|
|
>
|
|
|
{/* 品牌区域 */}
|
|
|
<Col xl={4} lg={4} md={5} sm={0} xs={0} className="h-full">
|
|
|
- <img
|
|
|
- src={logo}
|
|
|
- alt="Logo"
|
|
|
+ <img
|
|
|
+ src={logo}
|
|
|
+ alt="Logo"
|
|
|
className="h-full w-auto object-contain"
|
|
|
/>
|
|
|
</Col>
|