瀏覽代碼

feat: 限制发送按钮仅在历史清单中显示

- 为发送按钮添加条件渲染逻辑
- 使用 currentKey 状态判断当前页面类型
- 在任务清单(worklist)中隐藏发送按钮
- 在历史清单(historylist)中保留发送功能

改动文件:
- src/pages/patient/components/ActionPanel.tsx
sw 5 天之前
父節點
當前提交
4c49374fc9
共有 1 個文件被更改,包括 21 次插入19 次删除
  1. 21 19
      src/pages/patient/components/ActionPanel.tsx

+ 21 - 19
src/pages/patient/components/ActionPanel.tsx

@@ -377,25 +377,27 @@ const ActionPanel: React.FC = () => {
         }
         onClick={() => showNotImplemented('')}
       />
-      <ActionButton
-        icon={
-          <Icon
-            module="module-patient"
-            name="Send"
-            userId="base"
-            theme="default"
-            size="2x"
-            state="normal"
-          />
-        }
-        tooltip={
-          <FormattedMessage
-            id="actionPanel.send"
-            defaultMessage="actionPanel.send"
-          />
-        }
-        onClick={handleSend}
-      />
+      {currentKey === 'historylist' && (
+        <ActionButton
+          icon={
+            <Icon
+              module="module-patient"
+              name="Send"
+              userId="base"
+              theme="default"
+              size="2x"
+              state="normal"
+            />
+          }
+          tooltip={
+            <FormattedMessage
+              id="actionPanel.send"
+              defaultMessage="actionPanel.send"
+            />
+          }
+          onClick={handleSend}
+        />
+      )}
       {/* 我们不需要导出功能 */}
       {/* <ActionButton
         icon={