Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
Internet-hospital
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
yuguo
Internet-hospital
Commits
9033450a
Commit
9033450a
authored
Mar 02, 2026
by
yuguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
f5410548
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1251 additions
and
499 deletions
+1251
-499
.claude/settings.local.json
.claude/settings.local.json
+2
-1
web/src/app/(main)/admin/agents/page.tsx
web/src/app/(main)/admin/agents/page.tsx
+156
-24
web/src/app/(main)/admin/workflows/page.tsx
web/src/app/(main)/admin/workflows/page.tsx
+20
-9
web/src/components/GlobalAIFloat/FloatContainer.tsx
web/src/components/GlobalAIFloat/FloatContainer.tsx
+5
-0
web/src/components/workflow/VisualWorkflowEditor.tsx
web/src/components/workflow/VisualWorkflowEditor.tsx
+1
-0
web/src/pages/doctor/Consult/AIPanel.tsx
web/src/pages/doctor/Consult/AIPanel.tsx
+224
-139
web/src/pages/doctor/Consult/ChatPanel.tsx
web/src/pages/doctor/Consult/ChatPanel.tsx
+244
-96
web/src/pages/doctor/Consult/PatientList.tsx
web/src/pages/doctor/Consult/PatientList.tsx
+214
-99
web/src/pages/doctor/Consult/index.tsx
web/src/pages/doctor/Consult/index.tsx
+91
-60
web/src/pages/doctor/Prescription/index.tsx
web/src/pages/doctor/Prescription/index.tsx
+294
-71
No files found.
.claude/settings.local.json
View file @
9033450a
...
...
@@ -23,7 +23,8 @@
"Bash(npm:*)"
,
"Bash(./api.exe:*)"
,
"Bash(PGPASSWORD=123456 psql:*)"
,
"Bash(go mod:*)"
"Bash(go mod:*)"
,
"Bash(go vet:*)"
]
}
}
web/src/app/(main)/admin/agents/page.tsx
View file @
9033450a
This diff is collapsed.
Click to expand it.
web/src/app/(main)/admin/workflows/page.tsx
View file @
9033450a
...
...
@@ -5,7 +5,6 @@ import { Card, Table, Tag, Button, Modal, Form, Input, Select, message, Space, B
import
{
DeploymentUnitOutlined
,
PlayCircleOutlined
,
PlusOutlined
,
EditOutlined
}
from
'
@ant-design/icons
'
;
import
{
workflowApi
}
from
'
@/api/agent
'
;
import
VisualWorkflowEditor
from
'
@/components/workflow/VisualWorkflowEditor
'
;
import
type
{
Node
,
Edge
}
from
'
@xyflow/react
'
;
interface
Workflow
{
id
:
number
;
...
...
@@ -60,7 +59,13 @@ export default function WorkflowsPage() {
},
edges
:
[{
id
:
'
e1
'
,
source_node
:
'
start
'
,
target_node
:
'
end
'
}],
};
await
workflowApi
.
create
({
...
values
,
definition
:
JSON
.
stringify
(
definition
)
});
await
workflowApi
.
create
({
workflow_id
:
values
.
workflow_id
,
name
:
values
.
name
,
description
:
values
.
description
,
category
:
values
.
category
,
definition
:
JSON
.
stringify
(
definition
),
});
message
.
success
(
'
创建成功
'
);
setCreateModal
(
false
);
form
.
resetFields
();
...
...
@@ -72,7 +77,8 @@ export default function WorkflowsPage() {
}
};
const
handleSaveWorkflow
=
useCallback
(
async
(
nodes
:
Node
[],
edges
:
Edge
[])
=>
{
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const
handleSaveWorkflow
=
useCallback
(
async
(
nodes
:
any
[],
edges
:
any
[])
=>
{
if
(
!
editingWorkflow
)
return
;
try
{
await
workflowApi
.
update
(
editingWorkflow
.
id
,
{
definition
:
JSON
.
stringify
({
nodes
,
edges
})
});
...
...
@@ -81,7 +87,8 @@ export default function WorkflowsPage() {
}
catch
{
message
.
error
(
'
保存失败
'
);
}
},
[
editingWorkflow
]);
const
handleExecuteFromEditor
=
useCallback
(
async
(
nodes
:
Node
[],
edges
:
Edge
[])
=>
{
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const
handleExecuteFromEditor
=
useCallback
(
async
(
nodes
:
any
[],
edges
:
any
[])
=>
{
if
(
!
editingWorkflow
)
return
;
try
{
const
result
=
await
workflowApi
.
execute
(
editingWorkflow
.
workflow_id
,
{
workflow_data
:
{
nodes
,
edges
}
});
...
...
@@ -96,7 +103,7 @@ export default function WorkflowsPage() {
} catch { message.error('执行失败'); }
};
const getEditorInitialData = (): { nodes?:
Node[]; edges?: Edge
[] } | undefined => {
const getEditorInitialData = (): { nodes?:
unknown[]; edges?: unknown
[] } | undefined => {
if (!editingWorkflow?.definition) return undefined;
try { return JSON.parse(editingWorkflow.definition); } catch { return undefined; }
};
...
...
@@ -193,10 +200,14 @@ export default function WorkflowsPage() {
<div style={{ height: 650 }}>
<VisualWorkflowEditor
workflowName={editingWorkflow?.name || '编辑工作流'}
initialNodes={getEditorInitialData()?.nodes}
initialEdges={getEditorInitialData()?.edges}
onSave={handleSaveWorkflow}
onExecute={handleExecuteFromEditor}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
initialNodes={getEditorInitialData()?.nodes as any}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
initialEdges={getEditorInitialData()?.edges as any}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onSave={handleSaveWorkflow as any}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onExecute={handleExecuteFromEditor as any}
/>
</div>
</Modal>
...
...
web/src/components/GlobalAIFloat/FloatContainer.tsx
View file @
9033450a
...
...
@@ -8,6 +8,7 @@ import {
HeartOutlined
,
MessageOutlined
,
}
from
'
@ant-design/icons
'
;
import
{
usePathname
}
from
'
next/navigation
'
;
import
{
useUserStore
}
from
'
../../store/userStore
'
;
import
{
useAIAssistStore
}
from
'
../../store/aiAssistStore
'
;
import
ChatPanel
from
'
./ChatPanel
'
;
...
...
@@ -15,6 +16,7 @@ import ChatPanel from './ChatPanel';
const
FloatContainer
:
React
.
FC
=
()
=>
{
const
{
user
}
=
useUserStore
();
const
{
isOpen
,
patientContext
,
openDrawer
,
closeDrawer
}
=
useAIAssistStore
();
const
pathname
=
usePathname
();
if
(
!
user
)
return
null
;
...
...
@@ -22,6 +24,9 @@ const FloatContainer: React.FC = () => {
const
isPatient
=
user
.
role
===
'
patient
'
;
if
(
!
isDoctor
&&
!
isPatient
)
return
null
;
// Hide on doctor consult page — it has its own integrated AI panel
if
(
isDoctor
&&
pathname
?.
includes
(
'
/doctor/consult
'
))
return
null
;
const
primaryColor
=
isPatient
?
'
linear-gradient(135deg, #22c55e, #06b6d4)
'
:
'
linear-gradient(135deg, #3b82f6, #8b5cf6)
'
;
...
...
web/src/components/workflow/VisualWorkflowEditor.tsx
View file @
9033450a
...
...
@@ -40,6 +40,7 @@ interface NodeData {
label
:
string
;
nodeType
:
NodeType
;
config
?:
Record
<
string
,
unknown
>
;
[
key
:
string
]:
unknown
;
}
const
NODE_CONFIGS
:
{
type
:
NodeType
;
label
:
string
;
icon
:
React
.
ReactNode
;
color
:
string
;
bgColor
:
string
}[]
=
[
...
...
web/src/pages/doctor/Consult/AIPanel.tsx
View file @
9033450a
This diff is collapsed.
Click to expand it.
web/src/pages/doctor/Consult/ChatPanel.tsx
View file @
9033450a
This diff is collapsed.
Click to expand it.
web/src/pages/doctor/Consult/PatientList.tsx
View file @
9033450a
This diff is collapsed.
Click to expand it.
web/src/pages/doctor/Consult/index.tsx
View file @
9033450a
This diff is collapsed.
Click to expand it.
web/src/pages/doctor/Prescription/index.tsx
View file @
9033450a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment