From 5ca2cc58d9e7ab3166196a6be55578b36b8384b2 Mon Sep 17 00:00:00 2001 From: kola-web Date: Fri, 10 Jul 2026 16:26:43 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=89=B9=E9=87=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=A4=9A=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F=E3=80=81?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=B8=8E=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 重构病历列表数据分组逻辑,适配新的图片URL数组接口 2. 调整多处文字样式、配色与布局细节 3. 优化弹窗文案与患者信息展示逻辑 4. 修复图标路径、表单校验与图表配置问题 5. 简化重复代码,统一组件样式规范 --- api.md | 12 ++- src/doctor/pages/d_caseReport/index.ts | 21 +---- src/doctor/pages/d_caseReport/index.wxml | 3 +- src/doctor/pages/d_createTask/index.scss | 2 +- src/doctor/pages/d_patientDetail/index.scss | 17 ++-- src/doctor/pages/d_patientDetail/index.ts | 9 +- src/doctor/pages/d_patientDetail/index.wxml | 27 +++--- src/doctor/pages/d_taskDetail/index.scss | 27 +++--- src/doctor/pages/d_taskDetail/index.wxml | 8 +- src/doctor/pages/d_taskList/index.scss | 37 +++++--- src/doctor/pages/d_taskList/index.wxml | 44 +++++----- src/gift/pages/record/index.scss | 3 + src/gift/pages/record/index.ts | 16 ++-- src/gift/pages/record/index.wxml | 76 +++++++++++++--- src/gift/pages/recordDetail/index.scss | 34 ++++++-- src/gift/pages/recordDetail/index.ts | 8 +- src/gift/pages/recordDetail/index.wxml | 9 +- src/gift/pages/recordList/index.scss | 129 ++++++++++++++++------------ src/gift/pages/recordList/index.ts | 7 +- src/gift/pages/recordList/index.wxml | 59 ++++++------- src/images/icon147.png | Bin 0 -> 359 bytes src/pages/caseReport/index.ts | 20 +---- src/pages/caseReport/index.wxml | 3 +- src/pages/index/index.ts | 17 +++- src/pages/qaFormDetail/index.scss | 7 +- src/pages/qaFormDetail/index.ts | 26 +++++- 26 files changed, 368 insertions(+), 253 deletions(-) create mode 100644 src/images/icon147.png diff --git a/api.md b/api.md index a7f9ddb..6d52f27 100644 --- a/api.md +++ b/api.md @@ -526,12 +526,16 @@ "list": [ { "visitDate": "2026-06-29", - "imageUrl": "https://...", + "imageUrls": [ + "https://picsissiok-10049618.cos.ap-shanghai.myqcloud.com/0e3a32a7612090359a9ca36117d0f2db_17835667161658.jpg" + ], "ocrStatus": 2 }, { "visitDate": "2026-03-15", - "imageUrl": "https://...", + "imageUrls": [ + "https://...", + ], "ocrStatus": 0 } ] @@ -539,7 +543,9 @@ } ``` -- 分页按就诊记录维度,每页包含对应就诊记录中该类型的所有图片 +- 分页按就诊记录维度,每页包含对应就诊记录中该类型的所有图片 URL 数组 + +-> imageUrls :图片 URL 数组 --- diff --git a/src/doctor/pages/d_caseReport/index.ts b/src/doctor/pages/d_caseReport/index.ts index d2e0c87..077ab15 100644 --- a/src/doctor/pages/d_caseReport/index.ts +++ b/src/doctor/pages/d_caseReport/index.ts @@ -34,20 +34,7 @@ Page({ data, }).then((res: any) => { if (!res || !res.list) return - // 按就诊日期分组 - const groupMap: Record = {} - for (const item of res.list) { - if (!groupMap[item.visitDate]) { - groupMap[item.visitDate] = [] - } - groupMap[item.visitDate].push(item.imageUrl) - } - const newList = Object.keys(groupMap) - .sort((a, b) => b.localeCompare(a)) - .map((visitDate) => ({ - visitDate, - images: groupMap[visitDate], - })) + const newList = res.list this.setData({ list: reset ? newList : [...this.data.list, ...newList], pagination: { @@ -60,12 +47,10 @@ Page({ }, handlePreviewImage(e: WechatMiniprogram.CustomEvent) { - const { url, date } = e.currentTarget.dataset - const group = this.data.list.find((item) => item.visitDate === date) - if (!group) return + const { url, urls } = e.currentTarget.dataset wx.previewImage({ current: url, - urls: group.images, + urls, }) }, }) diff --git a/src/doctor/pages/d_caseReport/index.wxml b/src/doctor/pages/d_caseReport/index.wxml index 089a6fa..6f97843 100644 --- a/src/doctor/pages/d_caseReport/index.wxml +++ b/src/doctor/pages/d_caseReport/index.wxml @@ -11,13 +11,14 @@ diff --git a/src/doctor/pages/d_createTask/index.scss b/src/doctor/pages/d_createTask/index.scss index 4f7d626..a1fb6cf 100644 --- a/src/doctor/pages/d_createTask/index.scss +++ b/src/doctor/pages/d_createTask/index.scss @@ -59,7 +59,7 @@ page { margin-top: 24rpx; text-align: center; font-size: 28rpx; - color: rgba(255, 255, 255, 1); + color: rgba(255, 255, 255, 0.8); line-height: 40rpx; } .step1 { diff --git a/src/doctor/pages/d_patientDetail/index.scss b/src/doctor/pages/d_patientDetail/index.scss index 4265196..0116721 100644 --- a/src/doctor/pages/d_patientDetail/index.scss +++ b/src/doctor/pages/d_patientDetail/index.scss @@ -51,18 +51,19 @@ page { flex-wrap: wrap; font-size: 44rpx; color: rgba(33, 33, 32, 1); - .tel-icon { - flex-shrink: 0; - margin-left: 10rpx; - width: 40rpx; - height: 40rpx; - } } .content { margin-top: 16rpx; font-size: 32rpx; color: rgba(33, 33, 32, 1); line-height: 52rpx; + .tel-icon { + display: inline-block; + margin-left: 10rpx; + vertical-align: middle; + width: 40rpx; + height: 40rpx; + } } } } @@ -102,6 +103,7 @@ page { justify-content: space-between; padding: 30rpx 0; border-bottom: 1px solid rgba(244, 243, 243, 1); + gap: 32rpx; &.row-vetical { display: block; .content { @@ -118,8 +120,9 @@ page { font-weight: bold; } .content { + flex: 1; text-align: right; - font-size: 36rpx; + font-size: 32rpx; color: rgba(33, 33, 32, 1); } } diff --git a/src/doctor/pages/d_patientDetail/index.ts b/src/doctor/pages/d_patientDetail/index.ts index 8b1a28c..29a28f6 100644 --- a/src/doctor/pages/d_patientDetail/index.ts +++ b/src/doctor/pages/d_patientDetail/index.ts @@ -469,7 +469,7 @@ Page({ res.HealthQA.questions.forEach((q: any) => { q.isAnswerArray = Array.isArray(q.AnswerText) if (q.isAnswerArray) { - q.AnswerTextArr = q.AnswerText.filter((a: any) => a !== null && a !== undefined) + q.AnswerTextArr = q.AnswerText.filter((a: any) => a !== null && a !== undefined && a !== '其他') q.AnswerTextStr = q.AnswerTextArr.join('、') + (q.OtherText ? `(${q.OtherText})` : '') } else { q.AnswerTextStr = q.AnswerText || '' @@ -479,13 +479,12 @@ Page({ } }) } + wx.setNavigationBarTitle({ + title: res.Name ? `${res.Name}的患者详情` : '患者详情', + }) this.setData({ detail: { ...res, - hideName: - res.Name.length <= 2 - ? res.Name.charAt(0) + '*' - : res.Name.charAt(0) + '*' + res.Name.charAt(res.Name.length - 1), hideTelephone: res.Telephone ? res.Telephone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') : '', }, }) diff --git a/src/doctor/pages/d_patientDetail/index.wxml b/src/doctor/pages/d_patientDetail/index.wxml index a981d50..f6fc465 100644 --- a/src/doctor/pages/d_patientDetail/index.wxml +++ b/src/doctor/pages/d_patientDetail/index.wxml @@ -9,13 +9,13 @@ - - {{showTel ? detail.Name : detail.hideName}} - - - - - {{detail.AgeRangeName}} | {{showTel ? detail.Telephone : detail.hideTelephone}} + {{detail.Name}} + + + {{detail.AgeRangeName}} | {{showTel ? detail.Telephone : detail.hideTelephone}} + + + 邀约时间:{{tools.formatDate(detail.InviteTime)}} @@ -46,7 +46,7 @@ {{ans}} - ({{item.OtherText}}) + 其他:{{item.OtherText}} @@ -102,7 +102,7 @@ - 我的病历报告 + 病历报告 - + 激素用量 - {{item.oralHormoneDosage}}mg/天 + {{item.oralHormoneDosageMg}}mg/天 + -- - + 下次复诊时间 - {{item.nextVisitDate}} + {{item.nextVisitDate || '--'}} diff --git a/src/doctor/pages/d_taskDetail/index.scss b/src/doctor/pages/d_taskDetail/index.scss index 830050c..9afe84b 100644 --- a/src/doctor/pages/d_taskDetail/index.scss +++ b/src/doctor/pages/d_taskDetail/index.scss @@ -1,5 +1,5 @@ page { - background-color: rgba(242, 244, 245, 1); + background-color: rgba(246, 246, 246, 1); padding-bottom: 200rpx; } @@ -33,7 +33,7 @@ page { } &.status4 { - color: rgba(103, 186, 202, 1); + color: rgba(22, 121, 203, 1); } &.status5 { @@ -64,7 +64,7 @@ page { .label { font-size: 32rpx; - color: rgba(173, 179, 180, 1); + color: rgba(34, 34, 34, 0.40); } .content { @@ -112,7 +112,7 @@ page { margin-right: 20rpx; font-size: 32rpx; flex-shrink: 0; - color: rgba(173, 179, 180, 1); + color: rgba(34, 34, 34, 0.40); } } } @@ -144,7 +144,7 @@ page { .label { width: 5em; font-size: 32rpx; - color: rgba(173, 179, 180, 1); + color: rgba(34, 34, 34, 0.40); } .content { @@ -152,7 +152,7 @@ page { color: rgba(40, 48, 49, 1); &.success { - color: rgba(98, 190, 208, 1); + color: rgba(22, 121, 203, 1); } &.warn { @@ -179,23 +179,24 @@ page { .copy-btn { width: 332rpx; - height: 84rpx; + height: 96rpx; + box-sizing: border-box; background: #ffffff; - border-radius: 98rpx 98rpx 98rpx 98rpx; - border: 2rpx solid #67baca; + border-radius: 12rpx; + border: 2rpx solid rgba(22, 121, 203, 1); display: flex; align-items: center; justify-content: center; font-size: 36rpx; - color: rgba(103, 186, 202, 1); + color: rgba(22, 121, 203, 1); } .btn { width: 332rpx; - height: 84rpx; + height: 96rpx; + box-sizing: border-box; color: #fff; - background: #67BACA; + background: linear-gradient( 96deg, #293B9F 0%, #1679CB 100%); border-radius: 98rpx 98rpx 98rpx 98rpx; - border: 2rpx solid #67baca; display: flex; align-items: center; justify-content: center; diff --git a/src/doctor/pages/d_taskDetail/index.wxml b/src/doctor/pages/d_taskDetail/index.wxml index d1bad5a..538e729 100644 --- a/src/doctor/pages/d_taskDetail/index.wxml +++ b/src/doctor/pages/d_taskDetail/index.wxml @@ -17,7 +17,7 @@ - + 筛选患者 @@ -43,7 +43,7 @@ - + 消息内容 @@ -57,7 +57,7 @@ - + 发送时间 @@ -69,7 +69,7 @@ - + 发送结果 diff --git a/src/doctor/pages/d_taskList/index.scss b/src/doctor/pages/d_taskList/index.scss index ce7a4b0..5efecee 100644 --- a/src/doctor/pages/d_taskList/index.scss +++ b/src/doctor/pages/d_taskList/index.scss @@ -43,7 +43,7 @@ page { } &.status4 { - color: rgba(103, 186, 202, 1); + color: rgba(22, 121, 203, 1); } &.status5 { @@ -67,7 +67,8 @@ page { flex-shrink: 0; width: 5em; font-size: 32rpx; - color: rgba(173, 179, 180, 1); + color: rgba(34, 34, 34, 1); + font-weight: bold; } .content { @@ -98,6 +99,7 @@ page { .f-content { display: inline; + white-space: pre-lincwe; } } } @@ -164,18 +166,25 @@ page { } } } +} - .create { - position: fixed; - bottom: 100rpx; - left: 50%; - transform: translateX(-50%); - width: 168rpx; - height: 168rpx; - - .icon { - width: 100%; - height: 100%; - } +.footer { + position: fixed; + bottom: 0; + left: 0; + width: 100%; + box-sizing: border-box; + background-color: #fff; + padding: 20rpx 30rpx calc(20rpx + env(safe-area-inset-bottom)); + box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0, 0, 0, 0.15); + .btn { + height: 96rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 36rpx; + color: rgba(255, 255, 255, 1); + background: linear-gradient(96deg, #293b9f 0%, #1679cb 100%); + border-radius: 12rpx 12rpx 12rpx 12rpx; } } diff --git a/src/doctor/pages/d_taskList/index.wxml b/src/doctor/pages/d_taskList/index.wxml index f76d46d..99553a6 100644 --- a/src/doctor/pages/d_taskList/index.wxml +++ b/src/doctor/pages/d_taskList/index.wxml @@ -21,25 +21,28 @@ 选择范围: 全部患者 - - 绑定时间: - - {{item.FilterCondition.BindStartDate || '---'}}~{{item.FilterCondition.BindEndDate || '---'}} + + + 绑定时间: + + + {{item.FilterCondition.BindStartDate || '---'}}~{{item.FilterCondition.BindEndDate || '---'}} + + - - - 确诊IgG4-RD: - {{ConfirmedIgg4Obj[item.FilterCondition.ConfirmedIgg4]}} - - - 正在使用的药物: - - - {{MedicationTypeObj[subItem]}}{{index < item.FilterCondition.MedicationTypeArr.length - 1 ? '、' : - ''}} - + + 确诊IgG4-RD: + {{ConfirmedIgg4Obj[item.FilterCondition.ConfirmedIgg4]}} - + + 正在使用的药物: + + + {{MedicationTypeObj[subItem]}} + + + + @@ -66,7 +69,8 @@ - - - + + + + 新建群发消息 diff --git a/src/gift/pages/record/index.scss b/src/gift/pages/record/index.scss index 4133be9..a8759d9 100644 --- a/src/gift/pages/record/index.scss +++ b/src/gift/pages/record/index.scss @@ -354,6 +354,7 @@ page { align-items: center; gap: 20rpx; .wrap { + position: relative; padding: 0 32rpx; background: #f6f6f6; border-radius: 16rpx 16rpx 16rpx 16rpx; @@ -371,6 +372,8 @@ page { color: rgba(0, 0, 0, 0.4); } .icon { + position: absolute; + right: 32rpx; width: 44rpx; height: 44rpx; } diff --git a/src/gift/pages/record/index.ts b/src/gift/pages/record/index.ts index 3a5e836..52bb5e7 100644 --- a/src/gift/pages/record/index.ts +++ b/src/gift/pages/record/index.ts @@ -22,7 +22,7 @@ const IMMUNOSUPPRESSANT_OPTIONS = [ { id: 99, label: '其他', active: false }, ] -const HORMONE_DOSAGE_OPTIONS = [1, 2, 4, 6, 8] +const HORMONE_DOSAGE_OPTIONS = [1, 2, 4, 6, 8, 0.5] const IMAGE_TYPE_MAP: Record = { outpatientRecord: 'outpatientRecord', @@ -102,9 +102,7 @@ Page({ _hasFilledData() { if (this.data.visitDate || this.data.nextVisitDate) return true - const hasImage = Object.keys(IMAGE_TYPE_MAP).some( - (key) => (this.data[`${key}Files` as any] as any[]).length > 0, - ) + const hasImage = Object.keys(IMAGE_TYPE_MAP).some((key) => (this.data[`${key}Files` as any] as any[]).length > 0) if (hasImage) return true if (this.data.igG4Value || this.data.oralHormoneDosage || this.data.customDosage) return true if (this.data.medicationsUsed.length || this.data.immunosuppressantName.length) return true @@ -190,9 +188,7 @@ Page({ manualIgG4Value: this.data.igG4Value ? Number(this.data.igG4Value) : undefined, medicationsUsed: this.data.medicationsUsed.length ? this.data.medicationsUsed : undefined, medicationsUsedOtherText: this.data.medicationsUsedOtherText || undefined, - immunosuppressantName: this.data.immunosuppressantName.length - ? this.data.immunosuppressantName - : undefined, + immunosuppressantName: this.data.immunosuppressantName.length ? this.data.immunosuppressantName : undefined, immunosuppressantNameOtherText: this.data.immunosuppressantNameOtherText || undefined, oralHormoneDosage: this.data.oralHormoneDosage || this.data.customDosage @@ -281,7 +277,7 @@ Page({ const imageType = e.currentTarget.dataset.type as string const file = e.detail[0] const filesKey = `${imageType}Files` - const currentFiles = this.data[filesKey as any] as any[] || [] + const currentFiles = (this.data[filesKey as any] as any[]) || [] const newFile = { imgUrl: file.imgUrl, fileUrl: file.imgUrl, @@ -337,9 +333,7 @@ Page({ }, handleStep2Next() { - const hasImage = Object.keys(IMAGE_TYPE_MAP).some( - (key) => (this.data[`${key}Files` as any] as any[]).length > 0, - ) + const hasImage = Object.keys(IMAGE_TYPE_MAP).some((key) => (this.data[`${key}Files` as any] as any[]).length > 0) if (!hasImage) { this.setData({ toastShow: true, toastType: 'oneWrite', toastParams: {} }) return diff --git a/src/gift/pages/record/index.wxml b/src/gift/pages/record/index.wxml index 7d4ed79..5a095e0 100644 --- a/src/gift/pages/record/index.wxml +++ b/src/gift/pages/record/index.wxml @@ -79,7 +79,14 @@ 医生手写或电脑打印的病历、处方 - + @@ -93,7 +100,10 @@ isSlot="{{true}}" > - + 添加文件照片 @@ -114,7 +124,14 @@ 抽血检测的IgG4、总免疫球蛋白、ESR等 - + @@ -128,7 +145,10 @@ isSlot="{{true}}" > - + 添加文件照片 @@ -142,7 +162,14 @@ 超声、CT、核磁共振的描述结论、电子胶片 - + @@ -156,7 +183,10 @@ isSlot="{{true}}" > - + 添加文件照片 @@ -170,7 +200,14 @@ 受累组织穿刺或切除免疫组化报告 - + @@ -184,7 +221,10 @@ isSlot="{{true}}" > - + 添加文件照片 @@ -198,7 +238,14 @@ 免疫细胞亚群、淋巴细胞比例测定 - + @@ -212,7 +259,10 @@ isSlot="{{true}}" > - + 添加文件照片 @@ -279,7 +329,7 @@ {{item.label}} - + - {{item}}片 + {{item == '0.5' ? '半':item}}片 @@ -340,7 +390,7 @@ {{item.label}} - + { diff --git a/src/gift/pages/recordDetail/index.wxml b/src/gift/pages/recordDetail/index.wxml index 4f70508..d33ef36 100644 --- a/src/gift/pages/recordDetail/index.wxml +++ b/src/gift/pages/recordDetail/index.wxml @@ -1,14 +1,15 @@