From b2a249c784bed979955a690b20debfd551f4af70 Mon Sep 17 00:00:00 2001
From: panliang <1163816051@qq.com>
Date: Thu, 26 Oct 2023 17:57:22 +0800
Subject: [PATCH] add record.description
---
src/pages/patient/detail.vue | 28 +--
src/pages/record/detail.vue | 8 +-
src/pages/record/form.vue | 347 -----------------------------------
src/pages/record/index.vue | 2 +-
4 files changed, 24 insertions(+), 361 deletions(-)
delete mode 100644 src/pages/record/form.vue
diff --git a/src/pages/patient/detail.vue b/src/pages/patient/detail.vue
index 75ca32a..0c0a49c 100644
--- a/src/pages/patient/detail.vue
+++ b/src/pages/patient/detail.vue
@@ -9,7 +9,7 @@
-->
-
+
@@ -20,6 +20,7 @@
+
@@ -38,6 +39,7 @@ export default {
doctor_id: '',
doctor: {},
},
+ total_record: '0',
type: '',
}
},
@@ -49,21 +51,23 @@ export default {
this.loadData()
},
methods: {
- loadData() {
+ async loadData() {
if (!this.id) {
return
}
uni.showLoading()
- this.$ajax.get(`/api/client/patient/${this.id}`).then(res => {
- uni.stopPullDownRefresh()
- if (res.status == 0) {
- this.info = res.data
- this.type = this.info.type ? this.info.type.name : ''
- uni.setNavigationBarTitle({ title: this.info.name })
- }
- }).catch(error => {
- uni.stopPullDownRefresh()
- })
+ let res = await this.$ajax.get(`/api/client/patient/${this.id}`)
+ uni.stopPullDownRefresh()
+ if (res.status == 0) {
+ this.info = res.data
+ this.info.images = res.data.images ?? []
+ this.type = this.info.type ? this.info.type.name : ''
+ uni.setNavigationBarTitle({ title: this.info.name })
+ }
+ res = await this.$ajax.get('/api/client/record', { params: {patient_id: this.id} })
+ if (res.status == 0) {
+ this.total_record = res.data.total + ''
+ }
},
record() {
uni.navigateTo({ url: `/pages/record/index?patient=${this.id}` })
diff --git a/src/pages/record/detail.vue b/src/pages/record/detail.vue
index fc62b01..da7f9fb 100644
--- a/src/pages/record/detail.vue
+++ b/src/pages/record/detail.vue
@@ -3,7 +3,7 @@
-
+
@@ -11,6 +11,11 @@
+
+
+
+
+
@@ -61,6 +66,7 @@ export default {
uni.stopPullDownRefresh()
if (res.status == 0) {
this.info = res.data
+ this.info.images = res.data.images ?? []
this.type.text = this.info.type ? this.info.type.name : ''
}
diff --git a/src/pages/record/form.vue b/src/pages/record/form.vue
deleted file mode 100644
index 3224b01..0000000
--- a/src/pages/record/form.vue
+++ /dev/null
@@ -1,347 +0,0 @@
-
-
-
-
-
- {{ patient.name }}
-
-
-
-
-
- {{ illnessType.label }}
- 请选择病种
-
-
-
-
-
- {{ form.treat_at | date }}
- 请选择{{ typeName }}时间
-
-
-
-
-
- {{ adminUser.doctor_name }}
- 请选择{{ typeName }}医生
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ form.content }}
- 点击修改
-
-
-
-
-
-
-
-
- {{ form.next_treat_at | date }}
- 请选择下次就诊时间
-
-
-
-
-
-
-
-
- {{ adminUser.notify_user_name }}
- 请选择通知人
-
-
-
-
-
- {{ form.notify_at | date('yyyy-MM-dd') }}
- 请选择通知时间
-
-
-
-
-
- {{ currentUser.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/pages/record/index.vue b/src/pages/record/index.vue
index 27b30d5..c48c08d 100644
--- a/src/pages/record/index.vue
+++ b/src/pages/record/index.vue
@@ -5,7 +5,7 @@
- 患者: {{ item.patient ? item.patient.name : '' }}
+ 姓名: {{ item.patient ? item.patient.name : '' }}