From 7cb83882b854a2503fd7dcb12efdb5cbf6bc2e81 Mon Sep 17 00:00:00 2001
From: Jafeng <2998840497@qq.com>
Date: Fri, 23 Jan 2026 17:10:23 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A5=E5=85=A5=E6=82=A3=E8=80=85?=
=?UTF-8?q?=E5=BB=BA=E6=A1=A3=E3=80=81=E6=A1=A3=E6=A1=88=E7=BC=96=E8=BE=91?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../archive-detail/customer-profile-tab.vue | 202 +++++----
.../form-template/form-cell/form-files.vue | 144 ++++++
.../form-template/form-cell/form-input.vue | 9 +-
.../form-cell/form-multiSelectAndOther.vue | 168 +++++++
.../form-template/form-cell/form-run-time.vue | 89 ++++
.../form-cell/form-select-image.vue | 65 +++
.../form-cell/form-select-mobile.vue | 90 ++++
.../form-cell/form-select-other.vue | 121 ++++++
.../form-template/form-cell/form-select.vue | 6 +-
.../form-cell/form-surgical-history.vue | 35 ++
.../form-template/form-cell/form-textarea.vue | 9 +-
components/form-template/form-cell/index.vue | 33 +-
components/form-template/index.vue | 51 ++-
components/form-template/verify.js | 59 ++-
pages/case/archive-detail.vue | 123 +++++-
pages/case/archive-edit.vue | 219 +++++++++-
pages/case/case.vue | 411 ++++++++++++------
pages/case/patient-create.vue | 257 +++++++++--
pages/case/patient-inner-info.vue | 275 ++++++++++--
pages/case/search.vue | 192 ++++----
utils/api.js | 7 +-
21 files changed, 2167 insertions(+), 398 deletions(-)
create mode 100644 components/form-template/form-cell/form-files.vue
create mode 100644 components/form-template/form-cell/form-multiSelectAndOther.vue
create mode 100644 components/form-template/form-cell/form-run-time.vue
create mode 100644 components/form-template/form-cell/form-select-image.vue
create mode 100644 components/form-template/form-cell/form-select-mobile.vue
create mode 100644 components/form-template/form-cell/form-select-other.vue
create mode 100644 components/form-template/form-cell/form-surgical-history.vue
diff --git a/components/archive-detail/customer-profile-tab.vue b/components/archive-detail/customer-profile-tab.vue
index 6b95bfc..47ba157 100644
--- a/components/archive-detail/customer-profile-tab.vue
+++ b/components/archive-detail/customer-profile-tab.vue
@@ -19,28 +19,30 @@
-
- 姓名
- {{ data.name || '-' }}
-
-
-
- 性别
- {{ data.sex || '-' }}
-
- {{ draft.sex || '请选择' }}
-
-
-
- 年龄
- {{ data.age || '-' }}
-
-
-
- 联系电话
- {{ data.mobile || '-' }}
-
-
+
+
+
+ {{ item.name || item.title }}
+
+ {{ displayValue(item) }}
+
+ {{ displayValue(item) }}
+
+
@@ -53,35 +55,28 @@
院内来源
- {{ data.creator || '点击查看' }}
+ {{ forms.creator || '点击查看' }}
-
- 备注
- {{ data.notes || '-' }}
-
-
-
-
-
-
-
- 行为画像
-
-
-
- 门诊号
- {{ data.outpatientNo || '-' }}
-
-
- 住院号
- {{ data.inpatientNo || '-' }}
-
-
- 病案号
- {{ data.medicalRecordNo || '-' }}
-
+
+
+
+ {{ item.name || item.title }}
+ {{ displayValue(item) }}
+
+
@@ -120,11 +115,14 @@
+
+
+
diff --git a/components/form-template/form-cell/form-input.vue b/components/form-template/form-cell/form-input.vue
index 80321eb..7214f88 100644
--- a/components/form-template/form-cell/form-input.vue
+++ b/components/form-template/form-cell/form-input.vue
@@ -1,7 +1,7 @@
-
{{ appendText }}
@@ -45,7 +45,10 @@ const props = defineProps({
})
const placeholder = computed(() => `请输入${props.name || ''}`)
-const value = computed(() => props.form && props.form && props.form[props.title] ? props.form[props.title] : '')
+const value = computed(() => {
+ const v = props.form?.[props.title];
+ return v === undefined || v === null ? '' : String(v);
+})
function change(e) {
emits('change', {
@@ -68,4 +71,4 @@ function change(e) {
margin-left: 10rpx;
flex-shrink: 0;
}
-
\ No newline at end of file
+
diff --git a/components/form-template/form-cell/form-multiSelectAndOther.vue b/components/form-template/form-cell/form-multiSelectAndOther.vue
new file mode 100644
index 0000000..4047d9e
--- /dev/null
+++ b/components/form-template/form-cell/form-multiSelectAndOther.vue
@@ -0,0 +1,168 @@
+
+
+ {{ name }}
+
+
+ {{ opt.label }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/form-template/form-cell/form-run-time.vue b/components/form-template/form-cell/form-run-time.vue
new file mode 100644
index 0000000..1055ea2
--- /dev/null
+++ b/components/form-template/form-cell/form-run-time.vue
@@ -0,0 +1,89 @@
+
+
+ {{ name }}
+
+
+ 年
+
+ 月
+
+ 日
+
+
+
+
+
+
+
+
diff --git a/components/form-template/form-cell/form-select-image.vue b/components/form-template/form-cell/form-select-image.vue
new file mode 100644
index 0000000..3f83213
--- /dev/null
+++ b/components/form-template/form-cell/form-select-image.vue
@@ -0,0 +1,65 @@
+
+
+
+
+
+ {{ valueLabel || placeholder }}
+
+
+
+
+
+
+
+
+
+
diff --git a/components/form-template/form-cell/form-select-mobile.vue b/components/form-template/form-cell/form-select-mobile.vue
new file mode 100644
index 0000000..32e15d5
--- /dev/null
+++ b/components/form-template/form-cell/form-select-mobile.vue
@@ -0,0 +1,90 @@
+
+
+ {{ name }}
+
+
+
+
+ {{ noteValue || '请选择' }}
+
+
+
+
+
+
+
+
+
+
diff --git a/components/form-template/form-cell/form-select-other.vue b/components/form-template/form-cell/form-select-other.vue
new file mode 100644
index 0000000..c432b05
--- /dev/null
+++ b/components/form-template/form-cell/form-select-other.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+ {{ selectLabel || placeholder }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/form-template/form-cell/form-select.vue b/components/form-template/form-cell/form-select.vue
index d261253..2a0deae 100644
--- a/components/form-template/form-cell/form-select.vue
+++ b/components/form-template/form-cell/form-select.vue
@@ -50,9 +50,9 @@ const displayRange = computed(() => {
return props.range;
})
const value = computed(() => {
- if (!props.form || !props.form[props.title]) return '';
-
+ if (!props.form) return '';
const currentValue = props.form[props.title];
+ if (currentValue === undefined || currentValue === null || currentValue === '') return '';
// 如果range是对象数组,找到对应的label显示
if (Array.isArray(props.range) && props.range.length > 0 && typeof props.range[0] === 'object') {
const option = props.range.find(item => item.value === currentValue);
@@ -71,4 +71,4 @@ function change(e) {
\ No newline at end of file
+
diff --git a/components/form-template/form-cell/form-surgical-history.vue b/components/form-template/form-cell/form-surgical-history.vue
new file mode 100644
index 0000000..7cf5f12
--- /dev/null
+++ b/components/form-template/form-cell/form-surgical-history.vue
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
diff --git a/components/form-template/form-cell/form-textarea.vue b/components/form-template/form-cell/form-textarea.vue
index 3b6b40b..2aab1cd 100644
--- a/components/form-template/form-cell/form-textarea.vue
+++ b/components/form-template/form-cell/form-textarea.vue
@@ -42,10 +42,13 @@ const props = defineProps({
})
const placeholder = computed(() => `请输入${props.name || ''}`)
-const value = computed(() => props.form && props.form && props.form[props.title] ? props.form[props.title] : '')
+const value = computed(() => {
+ const v = props.form?.[props.title];
+ return v === undefined || v === null ? '' : String(v);
+})
const wordLimit = computed(() => {
if (typeof props.wordLimit === 'string' && Number(props.wordLimit) > 0) {
- return Number.ceil(props.wordLimit)
+ return Math.ceil(Number(props.wordLimit))
}
if (typeof props.wordLimit === 'number' && props.wordLimit > 0) {
return props.wordLimit
@@ -84,4 +87,4 @@ function change(e) {
color: #666;
font-size: 24rpx;
}
-
\ No newline at end of file
+
diff --git a/components/form-template/form-cell/index.vue b/components/form-template/form-cell/index.vue
index b6339f4..7d2527c 100644
--- a/components/form-template/form-cell/index.vue
+++ b/components/form-template/form-cell/index.vue
@@ -1,11 +1,33 @@
-
+
+
+
+
+
+
+
+
+
+ {{ attrs.name || attrs.title }}(暂不支持:{{ attrs.type }})
+
-
\ No newline at end of file
+
diff --git a/components/form-template/index.vue b/components/form-template/index.vue
index 7f7e023..84a1ca4 100644
--- a/components/form-template/index.vue
+++ b/components/form-template/index.vue
@@ -1,18 +1,13 @@
-
-
+
-
\ No newline at end of file
+
diff --git a/pages/case/patient-create.vue b/pages/case/patient-create.vue
index 5a52206..42ce0aa 100644
--- a/pages/case/patient-create.vue
+++ b/pages/case/patient-create.vue
@@ -5,12 +5,23 @@
+
+
+
+
+
+
+
@@ -18,36 +29,151 @@
diff --git a/pages/case/patient-inner-info.vue b/pages/case/patient-inner-info.vue
index 606d876..08d9b72 100644
--- a/pages/case/patient-inner-info.vue
+++ b/pages/case/patient-inner-info.vue
@@ -3,86 +3,283 @@
-
+
+
+
+
+
+
+
+
@@ -90,16 +287,20 @@ function save() {
.page {
height: 100vh;
background: #f6f6f6;
+ display: flex;
+ flex-direction: column;
}
.body {
- height: 100vh;
+ flex: 1;
display: flex;
flex-direction: column;
}
.scroll {
flex: 1;
+ min-height: 0;
+ height: 0;
}
@@ -116,15 +317,21 @@ function save() {
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
display: flex;
gap: 12px;
+ z-index: 10;
box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
}
+.scroll-spacer {
+ height: calc(120px + env(safe-area-inset-bottom));
+}
+
.btn {
flex: 1;
height: 44px;
line-height: 44px;
border-radius: 6px;
font-size: 15px;
+ text-align: center;
}
.btn::after {
diff --git a/pages/case/search.vue b/pages/case/search.vue
index 2111c8b..3c2ebe7 100644
--- a/pages/case/search.vue
+++ b/pages/case/search.vue
@@ -19,12 +19,16 @@
-
+
+ 搜索中...
+
+
+
暂无搜索结果
-
+
@@ -58,97 +62,135 @@