Browse Source

在待选体位列表中显示体位示意图

dengdx 1 month ago
parent
commit
ace1d4c2c6
1 changed files with 11 additions and 1 deletions
  1. 11 1
      src/pages/patient/components/register.available.view.list.tsx

+ 11 - 1
src/pages/patient/components/register.available.view.list.tsx

@@ -1,6 +1,7 @@
 import React from 'react';
 import React from 'react';
 import { useSelector, useDispatch } from 'react-redux';
 import { useSelector, useDispatch } from 'react-redux';
-import { Card, Row, Col, Empty } from 'antd';
+import { Card, Row, Col, Empty, Image } from 'antd';
+import { getViewIconUrl } from '@/API/bodyPosition';
 
 
 import type { RootState } from '@/states/store'; // 假设RootState已定义
 import type { RootState } from '@/states/store'; // 假设RootState已定义
 import { View } from '@/states/patient/viewSelection';
 import { View } from '@/states/patient/viewSelection';
@@ -33,6 +34,15 @@ const RegisterViewList: React.FC = () => {
                 bordered
                 bordered
                 onClick={() => handleCardClick(view)}
                 onClick={() => handleCardClick(view)}
               >
               >
+                <Image
+                  alt="example"
+                  src={getViewIconUrl(view.view_icon_name)}
+                  style={{
+                    width: '100%',
+                    height: 'auto',
+                    objectFit: 'cover',
+                  }}
+                />
                 <div>{view.view_description}</div>
                 <div>{view.view_description}</div>
                 {/* 可根据需要展示更多字段 */}
                 {/* 可根据需要展示更多字段 */}
               </Card>
               </Card>