Преглед на файлове

添加打印页面及组件,slice等

dengdx преди 1 месец
родител
ревизия
ccea4876b3

+ 2 - 0
src/layouts/BasicLayout.tsx

@@ -21,6 +21,7 @@ import ExamPage from '@/pages/exam/ExamPage';
 import { RootState } from '@/states/store';
 import { setBusinessFlow } from '@/states/BusinessFlowSlice';
 import ImageProcessingPage from '@/pages/view/ImageProcessingPage';
+import PrintPage from '@/pages/output/print/PrintPage';
 import { pageLayoutConfig } from '@/config/pageLayout';
 
 // import { Link } from 'react-router-dom';
@@ -65,6 +66,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = () => {
     outputlist: <OutputlistPage />,
     patient_management: <PatientManagement />,
     profile: <Profile />, // 需确保已引入 Profile 组件
+    print: <PrintPage />,
   };
   //感知菜单项点击
   const handleMenuClick = (key: string) => {

+ 65 - 3
src/pages/output/print/Film.tsx

@@ -1,10 +1,72 @@
 import React from 'react';
+import { useAppSelector } from '@/states/store';
+import { useDispatch } from 'react-redux';
+import { setSelectedImageIndex } from '@/states/print/printSlice';
 
 const Film: React.FC = () => {
+  const dispatch = useDispatch();
+  const films = useAppSelector((state) => state.print.films);
+  const activeFilmId = useAppSelector((state) => state.print.activeFilmId);
+  const selectedImageIndex = useAppSelector(
+    (state) => state.print.selectedImageIndex
+  );
+
+  const currentFilm = films.find((film) => film.id === activeFilmId);
+
+  if (!currentFilm) {
+    return <div className="film p-4">未找到胶片</div>;
+  }
+
+  // 根据布局获取grid类名
+  const getGridClass = () => {
+    const { layout, orientation } = currentFilm;
+    
+    if (layout === '1x1') {
+      return 'grid-cols-1 grid-rows-1';
+    } else if (layout === '1x2') {
+      return orientation === 'horizontal'
+        ? 'grid-cols-2 grid-rows-1'
+        : 'grid-cols-1 grid-rows-2';
+    } else if (layout === '2x1') {
+      return orientation === 'horizontal'
+        ? 'grid-cols-1 grid-rows-2'
+        : 'grid-cols-2 grid-rows-1';
+    } else if (layout === '2x2') {
+      return 'grid-cols-2 grid-rows-2';
+    }
+    return 'grid-cols-1 grid-rows-1';
+  };
+
+  const handleCellClick = (index: number) => {
+    dispatch(setSelectedImageIndex(index));
+  };
+
   return (
-    <div className="film">
-      {/* Film content */}
-      胶片页面
+    <div className="film h-full w-full p-4">
+      <div className={`grid gap-2 h-full w-full ${getGridClass()}`}>
+        {currentFilm.images.map((imageId, index) => (
+          <div
+            key={index}
+            className={`border-2 rounded flex items-center justify-center cursor-pointer hover:border-blue-400 transition-colors ${
+              selectedImageIndex === index
+                ? 'border-blue-500 bg-blue-50'
+                : 'border-gray-300 bg-gray-50'
+            }`}
+            onClick={() => handleCellClick(index)}
+            style={{
+              minHeight: '100px',
+            }}
+          >
+            {imageId ? (
+              <div className="text-center">
+                <div className="text-sm text-gray-600">图像 {imageId}</div>
+              </div>
+            ) : (
+              <div className="text-gray-400 text-sm">空格子 {index + 1}</div>
+            )}
+          </div>
+        ))}
+      </div>
     </div>
   );
 };

+ 146 - 22
src/pages/output/print/FilmOperationPanel.tsx

@@ -1,31 +1,155 @@
 import React from 'react';
+import { Button, Flex } from 'antd';
+import { useDispatch } from 'react-redux';
+import { useAppSelector } from '@/states/store';
+import {
+  addFilm,
+  deleteFilm,
+  toggleFilmOrientation,
+  setFilmLayout,
+  deleteSelectedImage,
+} from '@/states/print/printSlice';
+import Icon from '@/components/Icon';
 import { showNotImplemented } from '@/utils/notificationHelper';
 
+interface FilmOperationButtonProps {
+  title: string;
+  iconName: string;
+  onClick: () => void;
+  disabled?: boolean;
+}
+
+const FilmOperationButton: React.FC<FilmOperationButtonProps> = ({
+  title,
+  iconName,
+  onClick,
+  disabled = false,
+}) => {
+  const themeType = useAppSelector((state) => state.theme.themeType);
+
+  return (
+    <Button
+      onClick={onClick}
+      disabled={disabled}
+      icon={
+        <Icon
+          module="module-process"
+          name={iconName}
+          userId="base"
+          theme={themeType}
+          size="2x"
+          state="normal"
+        />
+      }
+      style={{
+        width: '1.5rem',
+        height: '1.5rem',
+        padding: 0,
+      }}
+      title={title}
+      className="truncate-text"
+    />
+  );
+};
+
 const FilmOperationPanel: React.FC = () => {
+  const dispatch = useDispatch();
+  const activeFilmId = useAppSelector((state) => state.print.activeFilmId);
+  const films = useAppSelector((state) => state.print.films);
+
+  const handleAddFilm = () => {
+    dispatch(addFilm());
+  };
+
+  const handleDeleteFilm = () => {
+    if (films.length <= 1) {
+      showNotImplemented('至少需要保留一个胶片');
+      return;
+    }
+    dispatch(deleteFilm(activeFilmId));
+  };
+
+  const handleToggleOrientation = () => {
+    dispatch(toggleFilmOrientation());
+  };
+
+  const handleDeleteSelectedImage = () => {
+    dispatch(deleteSelectedImage());
+  };
+
+  const handleSetLayout = (layout: '1x1' | '1x2' | '2x1' | '2x2') => {
+    dispatch(setFilmLayout(layout));
+  };
+
   return (
     <div className="film-operation-panel">
-      <button onClick={() => showNotImplemented('添加胶片')}>添加胶片</button>
-      <button onClick={() => showNotImplemented('删除胶片')}>删除胶片</button>
-      <button onClick={() => showNotImplemented('横向与竖向胶片')}>
-        横向与竖向胶片
-      </button>
-      <button onClick={() => showNotImplemented('关闭选中胶片')}>
-        关闭选中胶片
-      </button>
-      <button onClick={() => showNotImplemented('1×1布局')}>1×1布局</button>
-      <button onClick={() => showNotImplemented('1×2布局')}>1×2布局</button>
-      <button onClick={() => showNotImplemented('2×1布局')}>2×1布局</button>
-      <button onClick={() => showNotImplemented('2×2布局')}>2×2布局</button>
-      <button onClick={() => showNotImplemented('自定义布局')}>
-        自定义布局
-      </button>
-      <button onClick={() => showNotImplemented('定义子布局')}>
-        定义子布局
-      </button>
-      <button onClick={() => showNotImplemented('删除子布局')}>
-        删除子布局
-      </button>
-      <button onClick={() => showNotImplemented('Preset')}>Preset</button>
+      <div className="font-semibold">胶片操作</div>
+      <Flex wrap align="center" justify="start">
+        <FilmOperationButton
+          title="添加胶片"
+          iconName="RotateAnyDegree"
+          onClick={handleAddFilm}
+        />
+        <FilmOperationButton
+          title="删除胶片"
+          iconName="RotateAnyDegree"
+          onClick={handleDeleteFilm}
+        />
+        <FilmOperationButton
+          title="横向/竖向"
+          iconName="RotateAnyDegree"
+          onClick={handleToggleOrientation}
+        />
+        <FilmOperationButton
+          title="删除选中图像"
+          iconName="RotateAnyDegree"
+          onClick={handleDeleteSelectedImage}
+        />
+      </Flex>
+
+      <div className="font-semibold">胶片布局</div>
+      <Flex wrap gap="small" align="center" justify="start">
+        <FilmOperationButton
+          title="1×1分格"
+          iconName="1x1_normal"
+          onClick={() => handleSetLayout('1x1')}
+        />
+        <FilmOperationButton
+          title="1×2分格"
+          iconName="1x2_normal"
+          onClick={() => handleSetLayout('1x2')}
+        />
+        <FilmOperationButton
+          title="2×1分格"
+          iconName="2x1_normal"
+          onClick={() => handleSetLayout('2x1')}
+        />
+        <FilmOperationButton
+          title="2×2分格"
+          iconName="2x2_normal"
+          onClick={() => handleSetLayout('2x2')}
+        />
+        <FilmOperationButton
+          title="自定义布局"
+          iconName="RotateAnyDegree"
+          onClick={() => showNotImplemented('自定义布局')}
+        />
+        <FilmOperationButton
+          title="定义子布局"
+          iconName="RotateAnyDegree"
+          onClick={() => showNotImplemented('定义子布局')}
+        />
+        <FilmOperationButton
+          title="取消子布局"
+          iconName="RotateAnyDegree"
+          onClick={() => showNotImplemented('取消子布局')}
+        />
+        <FilmOperationButton
+          title="更多胶片布局"
+          iconName="btn_OtherSetting"
+          onClick={() => showNotImplemented('更多胶片布局')}
+        />
+      </Flex>
     </div>
   );
 };

+ 27 - 1
src/pages/output/print/FilmTabBar.tsx

@@ -1,7 +1,33 @@
 import React from 'react';
+import { Tabs } from 'antd';
+import { useAppSelector } from '@/states/store';
+import { useDispatch } from 'react-redux';
+import { setActiveFilm } from '@/states/print/printSlice';
 
 const FilmTabBar: React.FC = () => {
-  return <div className="film-tab-bar">{/* Tab bar content */}</div>;
+  const dispatch = useDispatch();
+  const films = useAppSelector((state) => state.print.films);
+  const activeFilmId = useAppSelector((state) => state.print.activeFilmId);
+
+  const handleTabChange = (key: string) => {
+    dispatch(setActiveFilm(key));
+  };
+
+  const items = films.map((film) => ({
+    key: film.id,
+    label: `胶片 ${film.id}`,
+  }));
+
+  return (
+    <div className="film-tab-bar">
+      <Tabs
+        activeKey={activeFilmId}
+        items={items}
+        onChange={handleTabChange}
+        type="card"
+      />
+    </div>
+  );
 };
 
 export default FilmTabBar;

+ 122 - 20
src/pages/output/print/ImageOperationPanel.tsx

@@ -1,28 +1,130 @@
 import React from 'react';
+import { Button, Flex } from 'antd';
+import { useAppSelector } from '@/states/store';
+import Icon from '@/components/Icon';
 import { showNotImplemented } from '@/utils/notificationHelper';
 
+interface ImageOperationButtonProps {
+  title: string;
+  iconName: string;
+  onClick: () => void;
+  disabled?: boolean;
+}
+
+const ImageOperationButton: React.FC<ImageOperationButtonProps> = ({
+  title,
+  iconName,
+  onClick,
+  disabled = false,
+}) => {
+  const themeType = useAppSelector((state) => state.theme.themeType);
+
+  return (
+    <Button
+      onClick={onClick}
+      disabled={disabled}
+      icon={
+        <Icon
+          module="module-process"
+          name={iconName}
+          userId="base"
+          theme={themeType}
+          size="2x"
+          state="normal"
+        />
+      }
+      style={{
+        width: '1.5rem',
+        height: '1.5rem',
+        padding: 0,
+      }}
+      title={title}
+      className="truncate-text"
+    />
+  );
+};
+
 const ImageOperationPanel: React.FC = () => {
   return (
-    <div className="image-operation-panel">
-      <button onClick={() => showNotImplemented('Zoom')}>Zoom</button>
-      <button onClick={() => showNotImplemented('Pan')}>Pan</button>
-      <button onClick={() => showNotImplemented('左转90')}>左转90</button>
-      <button onClick={() => showNotImplemented('右转90')}>右转90</button>
-      <button onClick={() => showNotImplemented('拖放')}>拖放</button>
-      <button onClick={() => showNotImplemented('同比缩放')}>同比缩放</button>
-      <button onClick={() => showNotImplemented('水平翻转')}>水平翻转</button>
-      <button onClick={() => showNotImplemented('竖直翻转')}>竖直翻转</button>
-      <button onClick={() => showNotImplemented('重新装载')}>重新装载</button>
-      <button onClick={() => showNotImplemented('自适应大小')}>
-        自适应大小
-      </button>
-      <button onClick={() => showNotImplemented('鼠标调节亮度与对比度')}>
-        鼠标调节亮度与对比度
-      </button>
-      <button onClick={() => showNotImplemented('反色')}>反色</button>
-      <button onClick={() => showNotImplemented('隐藏或者显示信息')}>
-        隐藏或者显示信息
-      </button>
+    <div>
+      <div className="font-semibold">图像操作</div>
+      <Flex wrap gap="small" align="center" justify="start">
+        <ImageOperationButton
+          title="缩放图像"
+          iconName="Zoom"
+          onClick={() => showNotImplemented('缩放图像')}
+        />
+        <ImageOperationButton
+          title="漫游图像"
+          iconName="Pan"
+          onClick={() => showNotImplemented('漫游图像')}
+        />
+        <ImageOperationButton
+          title="逆时针旋转90度"
+          iconName="RotateL90"
+          onClick={() => showNotImplemented('逆时针旋转90度')}
+        />
+        <ImageOperationButton
+          title="顺时针旋转90度"
+          iconName="RotateR90"
+          onClick={() => showNotImplemented('顺时针旋转90度')}
+        />
+        <ImageOperationButton
+          title="拖放图像"
+          iconName="RotateAnyDegree"
+          onClick={() => showNotImplemented('拖放图像')}
+        />
+        <ImageOperationButton
+          title="同比缩放"
+          iconName="RotateAnyDegree"
+          onClick={() => showNotImplemented('同比缩放')}
+        />
+        <ImageOperationButton
+          title="水平翻转"
+          iconName="HReverse"
+          onClick={() => showNotImplemented('水平翻转')}
+        />
+        <ImageOperationButton
+          title="竖直翻转"
+          iconName="VReverse"
+          onClick={() => showNotImplemented('竖直翻转')}
+        />
+        <ImageOperationButton
+          title="重新装载图像"
+          iconName="Reset"
+          onClick={() => showNotImplemented('重新装载图像')}
+        />
+        <ImageOperationButton
+          title="自适应大小"
+          iconName="FitInWindow"
+          onClick={() => showNotImplemented('自适应大小')}
+        />
+        <ImageOperationButton
+          title="鼠标调节亮度和对比度"
+          iconName="btn_BrightnessContrast"
+          onClick={() => showNotImplemented('鼠标调节亮度和对比度')}
+        />
+        <ImageOperationButton
+          title="真实尺寸打印"
+          iconName="1by1_normal"
+          onClick={() => showNotImplemented('真实尺寸打印')}
+        />
+        <ImageOperationButton
+          title="重置光标"
+          iconName="btn_pointer"
+          onClick={() => showNotImplemented('重置光标')}
+        />
+        <ImageOperationButton
+          title="反色图像"
+          iconName="Invert"
+          onClick={() => showNotImplemented('反色图像')}
+        />
+        <ImageOperationButton
+          title="四角信息"
+          iconName="RotateAnyDegree"
+          onClick={() => showNotImplemented('四角信息')}
+        />
+      </Flex>
     </div>
   );
 };

+ 17 - 3
src/pages/output/print/OperationPanel.tsx

@@ -1,12 +1,26 @@
 import React from 'react';
+import { Divider } from 'antd';
 import FilmOperationPanel from './FilmOperationPanel';
 import ImageOperationPanel from './ImageOperationPanel';
+import PrintControl from './PrintControl';
 
 const OperationPanel: React.FC = () => {
   return (
-    <div className="operation-panel">
-      <FilmOperationPanel />
-      <ImageOperationPanel />
+    <div className="operation-panel h-full overflow-y-auto p-2">
+      <div className="flex flex-col gap-4">
+        {/* 胶片操作面板 */}
+        <FilmOperationPanel />
+        
+        <Divider />
+        
+        {/* 图像操作面板 */}
+        <ImageOperationPanel />
+        
+        <Divider />
+        
+        {/* 打印控制面板 */}
+        <PrintControl />
+      </div>
     </div>
   );
 };

+ 79 - 12
src/pages/output/print/PrintControl.tsx

@@ -1,19 +1,86 @@
-import React from 'react';
+import React, { useState } from 'react';
+import { Select, Button, Space } from 'antd';
 import { showNotImplemented } from '@/utils/notificationHelper';
 
 const PrintControl: React.FC = () => {
+  const [selectedNode, setSelectedNode] = useState<string>('');
+  const [selectedSize, setSelectedSize] = useState<string>('14IN×17IN');
+
+  // TODO: 打印节点需要从后端API获取
+  const printNodes = [
+    { value: 'node1', label: 'TestPrinter' },
+    // { value: 'node2', label: '打印节点2' },
+  ];
+
+  const filmSizes = [
+    { value: '14IN×17IN', label: '14IN×17IN' },
+    { value: '14IN×14IN', label: '14IN×14IN' },
+    { value: '17IN×17IN', label: '17IN×17IN' },
+  ];
+
+  const handleLocalPrint = () => {
+    showNotImplemented('本地打印');
+  };
+
+  const handleDicomPrint = () => {
+    showNotImplemented('DICOM打印');
+  };
+
   return (
-    <div className="print-control">
-      <select>
-        <option>打印节点1</option>
-        <option>打印节点2</option>
-      </select>
-      <select>
-        <option>操作尺寸1</option>
-        <option>操作尺寸2</option>
-      </select>
-      <button onClick={() => showNotImplemented('DICOM打印')}>DICOM打印</button>
-      <button onClick={() => showNotImplemented('本地打印')}>本地打印</button>
+    <div>
+      <div className="font-semibold">打印设置</div>
+      <Space direction="vertical" style={{ width: '100%' }} size="middle">
+        {/* 打印节点下拉框 */}
+        <div>
+          <div className="mb-1">打印节点</div>
+          <Select
+            style={{ width: '100%' }}
+            placeholder="选择打印节点"
+            value={selectedNode}
+            onChange={setSelectedNode}
+            options={printNodes}
+            // TODO: 暂时disabled,等待后端API
+            disabled={printNodes.length === 0}
+          />
+          {printNodes.length === 0 && (
+            <div className="text-gray-400 mt-1">
+              TODO: 等待后端API提供打印节点
+            </div>
+          )}
+        </div>
+
+        {/* 尺寸下拉框 */}
+        <div>
+          <div className="mb-1">胶片尺寸</div>
+          <Select
+            style={{ width: '100%' }}
+            value={selectedSize}
+            onChange={setSelectedSize}
+            options={filmSizes}
+          />
+        </div>
+
+        {/* 打印按钮 */}
+        <div>
+          <Space direction="vertical" style={{ width: '100%' }}>
+            <Button
+              type="primary"
+              block
+              onClick={handleLocalPrint}
+              disabled={!selectedNode}
+            >
+              本地打印
+            </Button>
+            <Button
+              block
+              onClick={handleDicomPrint}
+              disabled={!selectedNode}
+            >
+              DICOM打印
+            </Button>
+          </Space>
+        </div>
+      </Space>
     </div>
   );
 };

+ 46 - 0
src/pages/output/print/PrintPage.tsx

@@ -0,0 +1,46 @@
+import React from 'react';
+import { useAppSelector } from '@/states/store';
+import BodyPositionList from '@/pages/exam/components/BodyPositionList';
+import FilmTabBar from './FilmTabBar';
+import Film from './Film';
+import OperationPanel from './OperationPanel';
+
+const PrintPage: React.FC = () => {
+  // 从Redux获取患者信息
+  const examWorksCache = useAppSelector((state) => state.examWorksCache);
+  const patientName = examWorksCache.works[0]?.PatientName || '未知患者';
+
+  return (
+    <div className="print-page h-full flex flex-col">
+      {/* 顶部标题栏 */}
+      <div className="flex justify-between items-center p-0 border-b">
+        <div>
+          患者名字: {patientName}
+        </div>
+        <div className="flex-1 ml-8">
+          <FilmTabBar />
+        </div>
+      </div>
+
+      {/* 内容区域 */}
+      <div className="flex-1 flex gap-2 p-1 overflow-hidden">
+        {/* 左侧:体位列表 */}
+        <div className="w-[15%] border rounded overflow-hidden">
+          <BodyPositionList layout="vertical" showAddButton={false} />
+        </div>
+
+        {/* 中间:胶片区域 */}
+        <div className="flex-1 border rounded overflow-hidden">
+          <Film />
+        </div>
+
+        {/* 右侧:操作面板 */}
+        <div className="w-[20%] border rounded overflow-hidden">
+          <OperationPanel />
+        </div>
+      </div>
+    </div>
+  );
+};
+
+export default PrintPage;

+ 137 - 0
src/states/print/printSlice.ts

@@ -0,0 +1,137 @@
+import { createSlice, PayloadAction } from '@reduxjs/toolkit';
+
+export type FilmLayout = '1x1' | '1x2' | '2x1' | '2x2';
+export type FilmOrientation = 'horizontal' | 'vertical';
+
+interface Film {
+  id: string;
+  layout: FilmLayout;
+  orientation: FilmOrientation;
+  images: (string | null)[]; // 图像ID或null(空格子)
+}
+
+interface PrintState {
+  films: Film[];
+  activeFilmId: string;
+  selectedImageIndex: number | null; // 当前选中的图像在格子中的索引
+}
+
+const initialFilm: Film = {
+  id: '1',
+  layout: '1x1',
+  orientation: 'vertical',
+  images: [null], // 1x1只有一个格子
+};
+
+const initialState: PrintState = {
+  films: [initialFilm],
+  activeFilmId: '1',
+  selectedImageIndex: null,
+};
+
+const printSlice = createSlice({
+  name: 'print',
+  initialState,
+  reducers: {
+    // 添加新胶片
+    addFilm: (state) => {
+      const newId = String(state.films.length + 1);
+      const newFilm: Film = {
+        id: newId,
+        layout: '1x1',
+        orientation: 'vertical',
+        images: [null],
+      };
+      state.films.push(newFilm);
+      state.activeFilmId = newId;
+    },
+
+    // 删除胶片
+    deleteFilm: (state, action: PayloadAction<string>) => {
+      if (state.films.length <= 1) {
+        // 至少保留一个胶片
+        return;
+      }
+      state.films = state.films.filter((film) => film.id !== action.payload);
+      // 如果删除的是当前胶片,切换到第一个
+      if (state.activeFilmId === action.payload) {
+        state.activeFilmId = state.films[0].id;
+      }
+    },
+
+    // 切换当前胶片
+    setActiveFilm: (state, action: PayloadAction<string>) => {
+      state.activeFilmId = action.payload;
+      state.selectedImageIndex = null; // 切换胶片时清除选中
+    },
+
+    // 设置胶片布局
+    setFilmLayout: (state, action: PayloadAction<FilmLayout>) => {
+      const film = state.films.find((f) => f.id === state.activeFilmId);
+      if (!film) return;
+
+      film.layout = action.payload;
+      
+      // 根据布局调整images数组大小
+      const layoutSizes = {
+        '1x1': 1,
+        '1x2': 2,
+        '2x1': 2,
+        '2x2': 4,
+      };
+      const newSize = layoutSizes[action.payload];
+      
+      // 保留现有图像,补充或裁剪
+      if (film.images.length < newSize) {
+        film.images = [...film.images, ...Array(newSize - film.images.length).fill(null)];
+      } else {
+        film.images = film.images.slice(0, newSize);
+      }
+    },
+
+    // 切换胶片方向
+    toggleFilmOrientation: (state) => {
+      const film = state.films.find((f) => f.id === state.activeFilmId);
+      if (!film) return;
+      
+      film.orientation = film.orientation === 'horizontal' ? 'vertical' : 'horizontal';
+    },
+
+    // 设置选中的图像格子
+    setSelectedImageIndex: (state, action: PayloadAction<number | null>) => {
+      state.selectedImageIndex = action.payload;
+    },
+
+    // 删除选中的图像
+    deleteSelectedImage: (state) => {
+      if (state.selectedImageIndex === null) return;
+      
+      const film = state.films.find((f) => f.id === state.activeFilmId);
+      if (!film) return;
+      
+      film.images[state.selectedImageIndex] = null;
+      state.selectedImageIndex = null;
+    },
+
+    // 添加图像到指定格子
+    addImageToCell: (state, action: PayloadAction<{ index: number; imageId: string }>) => {
+      const film = state.films.find((f) => f.id === state.activeFilmId);
+      if (!film) return;
+      
+      film.images[action.payload.index] = action.payload.imageId;
+    },
+  },
+});
+
+export const {
+  addFilm,
+  deleteFilm,
+  setActiveFilm,
+  setFilmLayout,
+  toggleFilmOrientation,
+  setSelectedImageIndex,
+  deleteSelectedImage,
+  addImageToCell,
+} = printSlice.actions;
+
+export default printSlice.reducer;

+ 2 - 0
src/states/store.ts

@@ -85,6 +85,7 @@ import {
 } from './patient/bin/slices/binSlice';
 import binDiskInfoSlice from './patient/bin/slices/binDiskInfoSlice';
 import dicomOverlayReducer from './view/dicomOverlaySlice';
+import printReducer from './print/printSlice';
 
 const store = configureStore({
   reducer: {
@@ -160,6 +161,7 @@ const store = configureStore({
     binUI: binUISlice.reducer,
     binDiskInfo: binDiskInfoSlice.reducer,
     dicomOverlay: dicomOverlayReducer,
+    print: printReducer,
   },
   middleware: (getDefaultMiddleware) =>
     getDefaultMiddleware().concat(