Browse Source

refactor: 批量优化多页面样式、交互与数据结构

1. 重构病历列表数据分组逻辑,适配新的图片URL数组接口
2. 调整多处文字样式、配色与布局细节
3. 优化弹窗文案与患者信息展示逻辑
4. 修复图标路径、表单校验与图表配置问题
5. 简化重复代码,统一组件样式规范
dev2.0
kola-web 2 weeks ago
parent
commit
5ca2cc58d9
  1. 12
      api.md
  2. 21
      src/doctor/pages/d_caseReport/index.ts
  3. 3
      src/doctor/pages/d_caseReport/index.wxml
  4. 2
      src/doctor/pages/d_createTask/index.scss
  5. 17
      src/doctor/pages/d_patientDetail/index.scss
  6. 9
      src/doctor/pages/d_patientDetail/index.ts
  7. 27
      src/doctor/pages/d_patientDetail/index.wxml
  8. 27
      src/doctor/pages/d_taskDetail/index.scss
  9. 8
      src/doctor/pages/d_taskDetail/index.wxml
  10. 37
      src/doctor/pages/d_taskList/index.scss
  11. 44
      src/doctor/pages/d_taskList/index.wxml
  12. 3
      src/gift/pages/record/index.scss
  13. 16
      src/gift/pages/record/index.ts
  14. 76
      src/gift/pages/record/index.wxml
  15. 34
      src/gift/pages/recordDetail/index.scss
  16. 8
      src/gift/pages/recordDetail/index.ts
  17. 9
      src/gift/pages/recordDetail/index.wxml
  18. 129
      src/gift/pages/recordList/index.scss
  19. 7
      src/gift/pages/recordList/index.ts
  20. 59
      src/gift/pages/recordList/index.wxml
  21. BIN
      src/images/icon147.png
  22. 20
      src/pages/caseReport/index.ts
  23. 3
      src/pages/caseReport/index.wxml
  24. 17
      src/pages/index/index.ts
  25. 7
      src/pages/qaFormDetail/index.scss
  26. 26
      src/pages/qaFormDetail/index.ts

12
api.md

@ -526,12 +526,16 @@
"list": [ "list": [
{ {
"visitDate": "2026-06-29", "visitDate": "2026-06-29",
"imageUrl": "https://...", "imageUrls": [
"https://picsissiok-10049618.cos.ap-shanghai.myqcloud.com/0e3a32a7612090359a9ca36117d0f2db_17835667161658.jpg"
],
"ocrStatus": 2 "ocrStatus": 2
}, },
{ {
"visitDate": "2026-03-15", "visitDate": "2026-03-15",
"imageUrl": "https://...", "imageUrls": [
"https://...",
],
"ocrStatus": 0 "ocrStatus": 0
} }
] ]
@ -539,7 +543,9 @@
} }
``` ```
- 分页按就诊记录维度,每页包含对应就诊记录中该类型的所有图片 - 分页按就诊记录维度,每页包含对应就诊记录中该类型的所有图片 URL 数组
-> imageUrls :图片 URL 数组
--- ---

21
src/doctor/pages/d_caseReport/index.ts

@ -34,20 +34,7 @@ Page({
data, data,
}).then((res: any) => { }).then((res: any) => {
if (!res || !res.list) return if (!res || !res.list) return
// 按就诊日期分组 const newList = res.list
const groupMap: Record<string, string[]> = {}
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],
}))
this.setData({ this.setData({
list: reset ? newList : [...this.data.list, ...newList], list: reset ? newList : [...this.data.list, ...newList],
pagination: { pagination: {
@ -60,12 +47,10 @@ Page({
}, },
handlePreviewImage(e: WechatMiniprogram.CustomEvent) { handlePreviewImage(e: WechatMiniprogram.CustomEvent) {
const { url, date } = e.currentTarget.dataset const { url, urls } = e.currentTarget.dataset
const group = this.data.list.find((item) => item.visitDate === date)
if (!group) return
wx.previewImage({ wx.previewImage({
current: url, current: url,
urls: group.images, urls,
}) })
}, },
}) })

3
src/doctor/pages/d_caseReport/index.wxml

@ -11,13 +11,14 @@
<view class="container"> <view class="container">
<image <image
class="photo" class="photo"
wx:for="{{item.images}}" wx:for="{{item.imageUrls}}"
wx:key="*this" wx:key="*this"
wx:for-item="imgUrl" wx:for-item="imgUrl"
src="{{imgUrl}}" src="{{imgUrl}}"
mode="aspectFill" mode="aspectFill"
bind:tap="handlePreviewImage" bind:tap="handlePreviewImage"
data-url="{{imgUrl}}" data-url="{{imgUrl}}"
data-urls="{{item.imageUrls}}"
data-date="{{item.visitDate}}" data-date="{{item.visitDate}}"
></image> ></image>
</view> </view>

2
src/doctor/pages/d_createTask/index.scss

@ -59,7 +59,7 @@ page {
margin-top: 24rpx; margin-top: 24rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 0.8);
line-height: 40rpx; line-height: 40rpx;
} }
.step1 { .step1 {

17
src/doctor/pages/d_patientDetail/index.scss

@ -51,18 +51,19 @@ page {
flex-wrap: wrap; flex-wrap: wrap;
font-size: 44rpx; font-size: 44rpx;
color: rgba(33, 33, 32, 1); color: rgba(33, 33, 32, 1);
.tel-icon {
flex-shrink: 0;
margin-left: 10rpx;
width: 40rpx;
height: 40rpx;
}
} }
.content { .content {
margin-top: 16rpx; margin-top: 16rpx;
font-size: 32rpx; font-size: 32rpx;
color: rgba(33, 33, 32, 1); color: rgba(33, 33, 32, 1);
line-height: 52rpx; 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; justify-content: space-between;
padding: 30rpx 0; padding: 30rpx 0;
border-bottom: 1px solid rgba(244, 243, 243, 1); border-bottom: 1px solid rgba(244, 243, 243, 1);
gap: 32rpx;
&.row-vetical { &.row-vetical {
display: block; display: block;
.content { .content {
@ -118,8 +120,9 @@ page {
font-weight: bold; font-weight: bold;
} }
.content { .content {
flex: 1;
text-align: right; text-align: right;
font-size: 36rpx; font-size: 32rpx;
color: rgba(33, 33, 32, 1); color: rgba(33, 33, 32, 1);
} }
} }

9
src/doctor/pages/d_patientDetail/index.ts

@ -469,7 +469,7 @@ Page({
res.HealthQA.questions.forEach((q: any) => { res.HealthQA.questions.forEach((q: any) => {
q.isAnswerArray = Array.isArray(q.AnswerText) q.isAnswerArray = Array.isArray(q.AnswerText)
if (q.isAnswerArray) { 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}` : '') q.AnswerTextStr = q.AnswerTextArr.join('、') + (q.OtherText ? `${q.OtherText}` : '')
} else { } else {
q.AnswerTextStr = q.AnswerText || '' q.AnswerTextStr = q.AnswerText || ''
@ -479,13 +479,12 @@ Page({
} }
}) })
} }
wx.setNavigationBarTitle({
title: res.Name ? `${res.Name}的患者详情` : '患者详情',
})
this.setData({ this.setData({
detail: { detail: {
...res, ...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') : '', hideTelephone: res.Telephone ? res.Telephone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') : '',
}, },
}) })

27
src/doctor/pages/d_patientDetail/index.wxml

@ -9,13 +9,13 @@
<image class="avatar-img" src="{{detail.UserImg}}"></image> <image class="avatar-img" src="{{detail.UserImg}}"></image>
</view> </view>
<view class="wrap"> <view class="wrap">
<view class="name" bind:tap="handleToggleTel"> <view class="name">{{detail.Name}}</view>
{{showTel ? detail.Name : detail.hideName}} <view class="content" bind:tap="handleToggleTel">
<image wx:if="{{showTel}}" class="tel-icon" src="{{imageUrl}}/5/eye2.png?t={{Timestamp}}"></image> <view>
<image wx:else class="tel-icon" src="{{imageUrl}}/5/eye1.png?t={{Timestamp}}"></image> {{detail.AgeRangeName}} | {{showTel ? detail.Telephone : detail.hideTelephone}}
</view> <image wx:if="{{showTel}}" class="tel-icon" src="{{imageUrl}}/5/eye2.png?t={{Timestamp}}"></image>
<view class="content"> <image wx:else class="tel-icon" src="{{imageUrl}}/5/eye1.png?t={{Timestamp}}"></image>
<view>{{detail.AgeRangeName}} | {{showTel ? detail.Telephone : detail.hideTelephone}}</view> </view>
<view>邀约时间:{{tools.formatDate(detail.InviteTime)}}</view> <view>邀约时间:{{tools.formatDate(detail.InviteTime)}}</view>
</view> </view>
</view> </view>
@ -46,7 +46,7 @@
<view wx:for="{{item.AnswerTextArr}}" wx:for-item="ans" wx:key="index"> <view wx:for="{{item.AnswerTextArr}}" wx:for-item="ans" wx:key="index">
{{ans}} {{ans}}
<text wx:if="{{item.OtherText && index === item.AnswerTextArr.length - 1}}"> <text wx:if="{{item.OtherText && index === item.AnswerTextArr.length - 1}}">
({{item.OtherText}}) 其他:{{item.OtherText}}
</text> </text>
</view> </view>
</block> </block>
@ -102,7 +102,7 @@
</view> </view>
<view class="case-report"> <view class="case-report">
<view class="c-header"> <view class="c-header">
<view class="name">我的病历报告</view> <view class="name">病历报告</view>
</view> </view>
<view class="list"> <view class="list">
<view <view
@ -145,13 +145,14 @@
</view> </view>
</view> </view>
<view class="row"> <view class="row">
<view class="col" wx:if="{{item.oralHormoneDosage}}"> <view class="col">
<view class="c-name">激素用量</view> <view class="c-name">激素用量</view>
<view class="c-content">{{item.oralHormoneDosage}}mg/天</view> <view class="c-content" wx:if="{{item.oralHormoneDosageMg}}">{{item.oralHormoneDosageMg}}mg/天</view>
<view class="c-content" wx:else>--</view>
</view> </view>
<view class="col" wx:if="{{item.nextVisitDate}}"> <view class="col">
<view class="c-name">下次复诊时间</view> <view class="c-name">下次复诊时间</view>
<view class="c-content">{{item.nextVisitDate}}</view> <view class="c-content">{{item.nextVisitDate || '--'}}</view>
</view> </view>
</view> </view>
</view> </view>

27
src/doctor/pages/d_taskDetail/index.scss

@ -1,5 +1,5 @@
page { page {
background-color: rgba(242, 244, 245, 1); background-color: rgba(246, 246, 246, 1);
padding-bottom: 200rpx; padding-bottom: 200rpx;
} }
@ -33,7 +33,7 @@ page {
} }
&.status4 { &.status4 {
color: rgba(103, 186, 202, 1); color: rgba(22, 121, 203, 1);
} }
&.status5 { &.status5 {
@ -64,7 +64,7 @@ page {
.label { .label {
font-size: 32rpx; font-size: 32rpx;
color: rgba(173, 179, 180, 1); color: rgba(34, 34, 34, 0.40);
} }
.content { .content {
@ -112,7 +112,7 @@ page {
margin-right: 20rpx; margin-right: 20rpx;
font-size: 32rpx; font-size: 32rpx;
flex-shrink: 0; flex-shrink: 0;
color: rgba(173, 179, 180, 1); color: rgba(34, 34, 34, 0.40);
} }
} }
} }
@ -144,7 +144,7 @@ page {
.label { .label {
width: 5em; width: 5em;
font-size: 32rpx; font-size: 32rpx;
color: rgba(173, 179, 180, 1); color: rgba(34, 34, 34, 0.40);
} }
.content { .content {
@ -152,7 +152,7 @@ page {
color: rgba(40, 48, 49, 1); color: rgba(40, 48, 49, 1);
&.success { &.success {
color: rgba(98, 190, 208, 1); color: rgba(22, 121, 203, 1);
} }
&.warn { &.warn {
@ -179,23 +179,24 @@ page {
.copy-btn { .copy-btn {
width: 332rpx; width: 332rpx;
height: 84rpx; height: 96rpx;
box-sizing: border-box;
background: #ffffff; background: #ffffff;
border-radius: 98rpx 98rpx 98rpx 98rpx; border-radius: 12rpx;
border: 2rpx solid #67baca; border: 2rpx solid rgba(22, 121, 203, 1);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 36rpx; font-size: 36rpx;
color: rgba(103, 186, 202, 1); color: rgba(22, 121, 203, 1);
} }
.btn { .btn {
width: 332rpx; width: 332rpx;
height: 84rpx; height: 96rpx;
box-sizing: border-box;
color: #fff; color: #fff;
background: #67BACA; background: linear-gradient( 96deg, #293B9F 0%, #1679CB 100%);
border-radius: 98rpx 98rpx 98rpx 98rpx; border-radius: 98rpx 98rpx 98rpx 98rpx;
border: 2rpx solid #67baca;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

8
src/doctor/pages/d_taskDetail/index.wxml

@ -17,7 +17,7 @@
<view class="card"> <view class="card">
<view class="c-title"> <view class="c-title">
<image class="icon" src="{{imageUrl}}/doctor/icon-title-lable.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon147.png?t={{Timestamp}}"></image>
筛选患者 筛选患者
</view> </view>
<view class="c-wrap"> <view class="c-wrap">
@ -43,7 +43,7 @@
</view> </view>
</view> </view>
<view class="c-title"> <view class="c-title">
<image class="icon" src="{{imageUrl}}/doctor/icon-title-lable.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon147.png?t={{Timestamp}}"></image>
消息内容 消息内容
</view> </view>
<view class="c-wrap"> <view class="c-wrap">
@ -57,7 +57,7 @@
</view> </view>
</view> </view>
<view class="c-title"> <view class="c-title">
<image class="icon" src="{{imageUrl}}/doctor/icon-title-lable.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon147.png?t={{Timestamp}}"></image>
发送时间 发送时间
</view> </view>
<view class="c-wrap"> <view class="c-wrap">
@ -69,7 +69,7 @@
</view> </view>
<view class="card" wx:if="{{detail.Status === '4' || detail.Status === '5'}}"> <view class="card" wx:if="{{detail.Status === '4' || detail.Status === '5'}}">
<view class="c-title"> <view class="c-title">
<image class="icon" src="{{imageUrl}}/doctor/icon-title-lable.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon147.png?t={{Timestamp}}"></image>
发送结果 发送结果
</view> </view>
<view class="c-prominent"> <view class="c-prominent">

37
src/doctor/pages/d_taskList/index.scss

@ -43,7 +43,7 @@ page {
} }
&.status4 { &.status4 {
color: rgba(103, 186, 202, 1); color: rgba(22, 121, 203, 1);
} }
&.status5 { &.status5 {
@ -67,7 +67,8 @@ page {
flex-shrink: 0; flex-shrink: 0;
width: 5em; width: 5em;
font-size: 32rpx; font-size: 32rpx;
color: rgba(173, 179, 180, 1); color: rgba(34, 34, 34, 1);
font-weight: bold;
} }
.content { .content {
@ -98,6 +99,7 @@ page {
.f-content { .f-content {
display: inline; display: inline;
white-space: pre-lincwe;
} }
} }
} }
@ -164,18 +166,25 @@ page {
} }
} }
} }
}
.create { .footer {
position: fixed; position: fixed;
bottom: 100rpx; bottom: 0;
left: 50%; left: 0;
transform: translateX(-50%); width: 100%;
width: 168rpx; box-sizing: border-box;
height: 168rpx; background-color: #fff;
padding: 20rpx 30rpx calc(20rpx + env(safe-area-inset-bottom));
.icon { box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0, 0, 0, 0.15);
width: 100%; .btn {
height: 100%; 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;
} }
} }

44
src/doctor/pages/d_taskList/index.wxml

@ -21,25 +21,28 @@
<view class="f-label">选择范围:</view> <view class="f-label">选择范围:</view>
<view class="f-content">全部患者</view> <view class="f-content">全部患者</view>
</view> </view>
<view class="f-row" wx:if="{{item.FilterCondition.BindStartDate || item.FilterCondition.BindEndDate}}"> <block wx:else>
<view class="f-label">绑定时间:</view> <view class="f-row" wx:if="{{item.FilterCondition.BindStartDate || item.FilterCondition.BindEndDate}}">
<view class="f-content"> <view class="f-label">绑定时间:</view>
{{item.FilterCondition.BindStartDate || '---'}}~{{item.FilterCondition.BindEndDate || '---'}} <view class="f-content">
<view>
{{item.FilterCondition.BindStartDate || '---'}}~{{item.FilterCondition.BindEndDate || '---'}}
</view>
</view>
</view> </view>
</view> <view class="f-row" wx:if="{{item.FilterCondition.ConfirmedIgg4}}">
<view class="f-row" wx:if="{{item.FilterCondition.ConfirmedIgg4}}"> <view class="f-label">确诊IgG4-RD:</view>
<view class="f-label">确诊IgG4-RD:</view> <view class="f-content">{{ConfirmedIgg4Obj[item.FilterCondition.ConfirmedIgg4]}}</view>
<view class="f-content">{{ConfirmedIgg4Obj[item.FilterCondition.ConfirmedIgg4]}}</view>
</view>
<view class="f-row" wx:if="{{item.FilterCondition.MedicationTypeArr.length}}">
<view class="f-label">正在使用的药物:</view>
<view class="f-content">
<block wx:for="{{item.FilterCondition.MedicationTypeArr}}" wx:for-item="subItem" wx:key="subItem">
{{MedicationTypeObj[subItem]}}{{index < item.FilterCondition.MedicationTypeArr.length - 1 ? '、' :
''}}
</block>
</view> </view>
</view> <view class="f-row" wx:if="{{item.FilterCondition.MedicationTypeArr.length}}">
<view class="f-label">正在使用的药物:</view>
<view class="f-content">
<view wx:for="{{item.FilterCondition.MedicationTypeArr}}" wx:for-item="subItem" wx:key="subItem">
{{MedicationTypeObj[subItem]}}
</view>
</view>
</view>
</block>
</view> </view>
</view> </view>
<view class="row"> <view class="row">
@ -66,7 +69,8 @@
</view> </view>
</view> </view>
<pagination pagination="{{pagination}}"></pagination> <pagination pagination="{{pagination}}"></pagination>
<view class="create" bind:tap="handleCreate"> </view>
<image class="icon" src="{{imageUrl}}icon109.png?t={{Timestamp}}"></image>
</view> <view class="footer" bind:tap="handleCreate">
<view class="btn">新建群发消息</view>
</view> </view>

3
src/gift/pages/record/index.scss

@ -354,6 +354,7 @@ page {
align-items: center; align-items: center;
gap: 20rpx; gap: 20rpx;
.wrap { .wrap {
position: relative;
padding: 0 32rpx; padding: 0 32rpx;
background: #f6f6f6; background: #f6f6f6;
border-radius: 16rpx 16rpx 16rpx 16rpx; border-radius: 16rpx 16rpx 16rpx 16rpx;
@ -371,6 +372,8 @@ page {
color: rgba(0, 0, 0, 0.4); color: rgba(0, 0, 0, 0.4);
} }
.icon { .icon {
position: absolute;
right: 32rpx;
width: 44rpx; width: 44rpx;
height: 44rpx; height: 44rpx;
} }

16
src/gift/pages/record/index.ts

@ -22,7 +22,7 @@ const IMMUNOSUPPRESSANT_OPTIONS = [
{ id: 99, label: '其他', active: false }, { 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<string, string> = { const IMAGE_TYPE_MAP: Record<string, string> = {
outpatientRecord: 'outpatientRecord', outpatientRecord: 'outpatientRecord',
@ -102,9 +102,7 @@ Page({
_hasFilledData() { _hasFilledData() {
if (this.data.visitDate || this.data.nextVisitDate) return true if (this.data.visitDate || this.data.nextVisitDate) return true
const hasImage = Object.keys(IMAGE_TYPE_MAP).some( const hasImage = Object.keys(IMAGE_TYPE_MAP).some((key) => (this.data[`${key}Files` as any] as any[]).length > 0)
(key) => (this.data[`${key}Files` as any] as any[]).length > 0,
)
if (hasImage) return true if (hasImage) return true
if (this.data.igG4Value || this.data.oralHormoneDosage || this.data.customDosage) 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 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, manualIgG4Value: this.data.igG4Value ? Number(this.data.igG4Value) : undefined,
medicationsUsed: this.data.medicationsUsed.length ? this.data.medicationsUsed : undefined, medicationsUsed: this.data.medicationsUsed.length ? this.data.medicationsUsed : undefined,
medicationsUsedOtherText: this.data.medicationsUsedOtherText || undefined, medicationsUsedOtherText: this.data.medicationsUsedOtherText || undefined,
immunosuppressantName: this.data.immunosuppressantName.length immunosuppressantName: this.data.immunosuppressantName.length ? this.data.immunosuppressantName : undefined,
? this.data.immunosuppressantName
: undefined,
immunosuppressantNameOtherText: this.data.immunosuppressantNameOtherText || undefined, immunosuppressantNameOtherText: this.data.immunosuppressantNameOtherText || undefined,
oralHormoneDosage: oralHormoneDosage:
this.data.oralHormoneDosage || this.data.customDosage this.data.oralHormoneDosage || this.data.customDosage
@ -281,7 +277,7 @@ Page({
const imageType = e.currentTarget.dataset.type as string const imageType = e.currentTarget.dataset.type as string
const file = e.detail[0] const file = e.detail[0]
const filesKey = `${imageType}Files` const filesKey = `${imageType}Files`
const currentFiles = this.data[filesKey as any] as any[] || [] const currentFiles = (this.data[filesKey as any] as any[]) || []
const newFile = { const newFile = {
imgUrl: file.imgUrl, imgUrl: file.imgUrl,
fileUrl: file.imgUrl, fileUrl: file.imgUrl,
@ -337,9 +333,7 @@ Page({
}, },
handleStep2Next() { handleStep2Next() {
const hasImage = Object.keys(IMAGE_TYPE_MAP).some( const hasImage = Object.keys(IMAGE_TYPE_MAP).some((key) => (this.data[`${key}Files` as any] as any[]).length > 0)
(key) => (this.data[`${key}Files` as any] as any[]).length > 0,
)
if (!hasImage) { if (!hasImage) {
this.setData({ toastShow: true, toastType: 'oneWrite', toastParams: {} }) this.setData({ toastShow: true, toastType: 'oneWrite', toastParams: {} })
return return

76
src/gift/pages/record/index.wxml

@ -79,7 +79,14 @@
</view> </view>
<view class="content">医生手写或电脑打印的病历、处方</view> <view class="content">医生手写或电脑打印的病历、处方</view>
<view class="upload-wrap"> <view class="upload-wrap">
<view class="upload-preview" wx:for="{{outpatientRecordFiles}}" wx:key="index" data-type="outpatientRecord" data-index="{{index}}" bind:tap="handlePreviewImage"> <view
class="upload-preview"
wx:for="{{outpatientRecordFiles}}"
wx:key="index"
data-type="outpatientRecord"
data-index="{{index}}"
bind:tap="handlePreviewImage"
>
<image class="upload-img" mode="aspectFill" src="{{item.imgUrl}}"></image> <image class="upload-img" mode="aspectFill" src="{{item.imgUrl}}"></image>
<view class="del" catch:tap="handleDeleteImage" data-type="outpatientRecord" data-index="{{index}}"> <view class="del" catch:tap="handleDeleteImage" data-type="outpatientRecord" data-index="{{index}}">
<van-icon name="cross" /> <van-icon name="cross" />
@ -93,7 +100,10 @@
isSlot="{{true}}" isSlot="{{true}}"
> >
<view class="upload-container"> <view class="upload-container">
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon135' : 'icon48'}}.png?t={{Timestamp}}"></image> <image
class="icon"
src="{{imageUrl}}{{theme === 'DRUG' ? 'icon135' : 'icon48'}}.png?t={{Timestamp}}"
></image>
<view class="name">添加文件照片</view> <view class="name">添加文件照片</view>
</view> </view>
</uploadFile> </uploadFile>
@ -114,7 +124,14 @@
</view> </view>
<view class="content">抽血检测的IgG4、总免疫球蛋白、ESR等</view> <view class="content">抽血检测的IgG4、总免疫球蛋白、ESR等</view>
<view class="upload-wrap"> <view class="upload-wrap">
<view class="upload-preview" wx:for="{{labReportFiles}}" wx:key="index" data-type="labReport" data-index="{{index}}" bind:tap="handlePreviewImage"> <view
class="upload-preview"
wx:for="{{labReportFiles}}"
wx:key="index"
data-type="labReport"
data-index="{{index}}"
bind:tap="handlePreviewImage"
>
<image class="upload-img" mode="aspectFill" src="{{item.imgUrl}}"></image> <image class="upload-img" mode="aspectFill" src="{{item.imgUrl}}"></image>
<view class="del" catch:tap="handleDeleteImage" data-type="labReport" data-index="{{index}}"> <view class="del" catch:tap="handleDeleteImage" data-type="labReport" data-index="{{index}}">
<van-icon name="cross" /> <van-icon name="cross" />
@ -128,7 +145,10 @@
isSlot="{{true}}" isSlot="{{true}}"
> >
<view class="upload-container"> <view class="upload-container">
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon135' : 'icon48'}}.png?t={{Timestamp}}"></image> <image
class="icon"
src="{{imageUrl}}{{theme === 'DRUG' ? 'icon135' : 'icon48'}}.png?t={{Timestamp}}"
></image>
<view class="name">添加文件照片</view> <view class="name">添加文件照片</view>
</view> </view>
</uploadFile> </uploadFile>
@ -142,7 +162,14 @@
</view> </view>
<view class="content">超声、CT、核磁共振的描述结论、电子胶片</view> <view class="content">超声、CT、核磁共振的描述结论、电子胶片</view>
<view class="upload-wrap"> <view class="upload-wrap">
<view class="upload-preview" wx:for="{{imagingExamFiles}}" wx:key="index" data-type="imagingExam" data-index="{{index}}" bind:tap="handlePreviewImage"> <view
class="upload-preview"
wx:for="{{imagingExamFiles}}"
wx:key="index"
data-type="imagingExam"
data-index="{{index}}"
bind:tap="handlePreviewImage"
>
<image class="upload-img" mode="aspectFill" src="{{item.imgUrl}}"></image> <image class="upload-img" mode="aspectFill" src="{{item.imgUrl}}"></image>
<view class="del" catch:tap="handleDeleteImage" data-type="imagingExam" data-index="{{index}}"> <view class="del" catch:tap="handleDeleteImage" data-type="imagingExam" data-index="{{index}}">
<van-icon name="cross" /> <van-icon name="cross" />
@ -156,7 +183,10 @@
isSlot="{{true}}" isSlot="{{true}}"
> >
<view class="upload-container"> <view class="upload-container">
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon135' : 'icon48'}}.png?t={{Timestamp}}"></image> <image
class="icon"
src="{{imageUrl}}{{theme === 'DRUG' ? 'icon135' : 'icon48'}}.png?t={{Timestamp}}"
></image>
<view class="name">添加文件照片</view> <view class="name">添加文件照片</view>
</view> </view>
</uploadFile> </uploadFile>
@ -170,7 +200,14 @@
</view> </view>
<view class="content">受累组织穿刺或切除免疫组化报告</view> <view class="content">受累组织穿刺或切除免疫组化报告</view>
<view class="upload-wrap"> <view class="upload-wrap">
<view class="upload-preview" wx:for="{{pathologyFiles}}" wx:key="index" data-type="pathology" data-index="{{index}}" bind:tap="handlePreviewImage"> <view
class="upload-preview"
wx:for="{{pathologyFiles}}"
wx:key="index"
data-type="pathology"
data-index="{{index}}"
bind:tap="handlePreviewImage"
>
<image class="upload-img" mode="aspectFill" src="{{item.imgUrl}}"></image> <image class="upload-img" mode="aspectFill" src="{{item.imgUrl}}"></image>
<view class="del" catch:tap="handleDeleteImage" data-type="pathology" data-index="{{index}}"> <view class="del" catch:tap="handleDeleteImage" data-type="pathology" data-index="{{index}}">
<van-icon name="cross" /> <van-icon name="cross" />
@ -184,7 +221,10 @@
isSlot="{{true}}" isSlot="{{true}}"
> >
<view class="upload-container"> <view class="upload-container">
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon135' : 'icon48'}}.png?t={{Timestamp}}"></image> <image
class="icon"
src="{{imageUrl}}{{theme === 'DRUG' ? 'icon135' : 'icon48'}}.png?t={{Timestamp}}"
></image>
<view class="name">添加文件照片</view> <view class="name">添加文件照片</view>
</view> </view>
</uploadFile> </uploadFile>
@ -198,7 +238,14 @@
</view> </view>
<view class="content">免疫细胞亚群、淋巴细胞比例测定</view> <view class="content">免疫细胞亚群、淋巴细胞比例测定</view>
<view class="upload-wrap"> <view class="upload-wrap">
<view class="upload-preview" wx:for="{{immuneFunctionFiles}}" wx:key="index" data-type="immuneFunction" data-index="{{index}}" bind:tap="handlePreviewImage"> <view
class="upload-preview"
wx:for="{{immuneFunctionFiles}}"
wx:key="index"
data-type="immuneFunction"
data-index="{{index}}"
bind:tap="handlePreviewImage"
>
<image class="upload-img" mode="aspectFill" src="{{item.imgUrl}}"></image> <image class="upload-img" mode="aspectFill" src="{{item.imgUrl}}"></image>
<view class="del" catch:tap="handleDeleteImage" data-type="immuneFunction" data-index="{{index}}"> <view class="del" catch:tap="handleDeleteImage" data-type="immuneFunction" data-index="{{index}}">
<van-icon name="cross" /> <van-icon name="cross" />
@ -212,7 +259,10 @@
isSlot="{{true}}" isSlot="{{true}}"
> >
<view class="upload-container"> <view class="upload-container">
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon135' : 'icon48'}}.png?t={{Timestamp}}"></image> <image
class="icon"
src="{{imageUrl}}{{theme === 'DRUG' ? 'icon135' : 'icon48'}}.png?t={{Timestamp}}"
></image>
<view class="name">添加文件照片</view> <view class="name">添加文件照片</view>
</view> </view>
</uploadFile> </uploadFile>
@ -279,7 +329,7 @@
<view class="content">{{item.label}}</view> <view class="content">{{item.label}}</view>
</view> </view>
</view> </view>
<view class="custom-num" wx:if="{{medicationsOtherShow}}" style="margin-top: 20rpx;"> <view class="custom-num" wx:if="{{medicationsOtherShow}}" style="margin-top: 20rpx">
<input <input
class="input" class="input"
placeholder-class="place-input" placeholder-class="place-input"
@ -304,7 +354,7 @@
bind:tap="handleDosageSelect" bind:tap="handleDosageSelect"
data-val="{{item}}" data-val="{{item}}"
> >
{{item}}片 {{item == '0.5' ? '半':item}}片
</view> </view>
</view> </view>
<view class="custom-num"> <view class="custom-num">
@ -340,7 +390,7 @@
<view class="content">{{item.label}}</view> <view class="content">{{item.label}}</view>
</view> </view>
</view> </view>
<view class="custom-num" wx:if="{{immunosuppressantOtherShow}}" style="margin-top: 20rpx;"> <view class="custom-num" wx:if="{{immunosuppressantOtherShow}}" style="margin-top: 20rpx">
<input <input
class="input" class="input"
placeholder-class="place-input" placeholder-class="place-input"

34
src/gift/pages/recordDetail/index.scss

@ -7,11 +7,28 @@ page {
padding: 28rpx 32rpx; padding: 28rpx 32rpx;
border-radius: 24rpx; border-radius: 24rpx;
background-color: #fff; background-color: #fff;
.b-header {
margin-bottom: 24rpx;
font-size: 36rpx;
color: rgba(34, 34, 34, 1);
font-weight: bold;
display: flex;
align-items: center;
gap: 24rpx;
margin-left: -32rpx;
&::before {
content: '';
width: 8rpx;
height: 36rpx;
border-radius: 0 8rpx 8rpx 0;
background: #0eb66d;
}
}
.row { .row {
display: flex; display: flex;
gap: 32rpx; gap: 32rpx;
&:last-of-type { &:last-of-type {
margin-top: 52rpx; margin-top: 22rpx;
} }
.icon { .icon {
flex-shrink: 0; flex-shrink: 0;
@ -21,7 +38,7 @@ page {
.col { .col {
.name { .name {
font-size: 32rpx; font-size: 32rpx;
color: rgba(34, 34, 34, 0.6); color: rgba(34, 34, 34, 1);
} }
.date { .date {
margin-top: 12rpx; margin-top: 12rpx;
@ -41,11 +58,11 @@ page {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.name { .name {
font-size: 36rpx; font-size: 32rpx;
color: rgba(34, 34, 34, 1); color: rgba(34, 34, 34, 1);
font-weight: bold;
} }
.switch { .switch {
transform: scale(0.8);
} }
} }
.photos { .photos {
@ -149,6 +166,11 @@ page {
} }
#drug-page { #drug-page {
.banner {
.b-header::before {
background: rgba(89, 86, 233, 1);
}
}
.photos { .photos {
.p-header::before { .p-header::before {
background: rgba(89, 86, 233, 1); background: rgba(89, 86, 233, 1);
@ -159,8 +181,8 @@ page {
background: rgba(89, 86, 233, 1); background: rgba(89, 86, 233, 1);
} }
} }
.footer{ .footer {
.name1{ .name1 {
color: rgba(89, 86, 233, 1); color: rgba(89, 86, 233, 1);
} }
} }

8
src/gift/pages/recordDetail/index.ts

@ -34,7 +34,7 @@ Page({
nextVisitDate: '', nextVisitDate: '',
displayIgG4Value: '' as string | number | null, displayIgG4Value: '' as string | number | null,
medicationsLabel: '', medicationsLabel: '',
oralHormoneDosage: '' as string | number | null, oralHormoneDosageMg: '' as string | number | null,
immunosuppressantLabel: '', immunosuppressantLabel: '',
reminderEnabled: 2, reminderEnabled: 2,
imageGroups: [] as { type: string; label: string; list: string[] }[], imageGroups: [] as { type: string; label: string; list: string[] }[],
@ -86,7 +86,7 @@ Page({
nextVisitDate: res.nextVisitDate || '', nextVisitDate: res.nextVisitDate || '',
displayIgG4Value: res.displayIgG4Value, displayIgG4Value: res.displayIgG4Value,
medicationsLabel, medicationsLabel,
oralHormoneDosage: res.oralHormoneDosage, oralHormoneDosageMg: res.oralHormoneDosageMg,
immunosuppressantLabel, immunosuppressantLabel,
imageGroups, imageGroups,
}) })
@ -117,8 +117,8 @@ Page({
handleDelete() { handleDelete() {
wx.showModal({ wx.showModal({
title: '确认删除记录?', title: `删除${this.data.visitDate || ''}记录`,
content: `删除${this.data.visitDate || ''}记录,此操作不可逆,相关照片将永久删除`, content: `删除后将无法恢复`,
confirmText: '确认删除', confirmText: '确认删除',
confirmColor: '#ee0a24', confirmColor: '#ee0a24',
success: (res) => { success: (res) => {

9
src/gift/pages/recordDetail/index.wxml

@ -1,14 +1,15 @@
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> <view class="page" id="{{theme === 'DRUG' && 'drug-page'}}">
<view class="banner"> <view class="banner">
<view class="b-header">就诊时间</view>
<view class="row"> <view class="row">
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon137' : 'icon121'}}.png?t={{Timestamp}}"></image> <!-- <image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon137' : 'icon121'}}.png?t={{Timestamp}}"></image> -->
<view class="col"> <view class="col">
<view class="name">我的本次就诊时间</view> <view class="name">我的本次就诊时间</view>
<view class="date">{{visitDate || '--'}}</view> <view class="date">{{visitDate || '--'}}</view>
</view> </view>
</view> </view>
<view class="row"> <view class="row">
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon138' : 'icon122'}}.png?t={{Timestamp}}"></image> <!-- <image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon138' : 'icon122'}}.png?t={{Timestamp}}"></image> -->
<view class="col"> <view class="col">
<view class="name">我的下次就诊时间</view> <view class="name">我的下次就诊时间</view>
<view class="date">{{nextVisitDate || '--'}}</view> <view class="date">{{nextVisitDate || '--'}}</view>
@ -44,9 +45,9 @@
<view class="name">本次就诊已使用的药物</view> <view class="name">本次就诊已使用的药物</view>
<view class="content">{{medicationsLabel}}</view> <view class="content">{{medicationsLabel}}</view>
</view> </view>
<view class="row" wx:if="{{oralHormoneDosage !== null && oralHormoneDosage !== ''}}"> <view class="row" wx:if="{{oralHormoneDosageMg !== null && oralHormoneDosageMg !== ''}}">
<view class="name">最近一周,每日激素使用剂量</view> <view class="name">最近一周,每日激素使用剂量</view>
<view class="content">{{oralHormoneDosage}}mg/天</view> <view class="content">{{oralHormoneDosageMg}}mg/天</view>
</view> </view>
<view class="row" wx:if="{{immunosuppressantLabel}}"> <view class="row" wx:if="{{immunosuppressantLabel}}">
<view class="name">正在使用的免疫抑制剂名称</view> <view class="name">正在使用的免疫抑制剂名称</view>

129
src/gift/pages/recordList/index.scss

@ -3,7 +3,7 @@ page {
} }
.page { .page {
padding: 32rpx 32rpx 300rpx; padding: 0 32rpx 300rpx;
.user { .user {
.name { .name {
font-size: 44rpx; font-size: 44rpx;
@ -27,49 +27,28 @@ page {
} }
} }
.chart { .chart {
.chart-header { .c-header {
margin-top: 48rpx; margin-top: 42rpx;
display: flex; display: flex;
gap: 24rpx; justify-content: space-between;
.type { .title {
padding: 8rpx 32rpx; font-size: 36rpx;
font-size: 32rpx; color: rgba(0, 0, 0, 1);
color: rgba(105, 104, 110, 1); font-weight: bold;
background-color: #fff;
border-radius: 58rpx;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 14rpx; gap: 24rpx;
.icon { &::before {
font-size: 24rpx; content: '';
color: rgba(105, 104, 110, 1); width: 8rpx;
transform: rotate(90deg); height: 36rpx;
background: #0eb66d;
border-radius: 32rpx 32rpx 32rpx 32rpx;
} }
} }
.date { .sub {
padding: 8rpx 32rpx;
font-size: 32rpx; font-size: 32rpx;
color: rgba(105, 104, 110, 1); color: rgba(34, 34, 34, 0.4);
background-color: #fff;
border-radius: 58rpx;
display: flex;
align-items: center;
gap: 14rpx;
.start,
.end {
color: rgba(105, 104, 110, 1);
&.active {
color: rgba(34, 34, 34, 1);
}
}
.line {
margin: 0 10rpx;
}
.icon {
transform: rotate(90deg);
color: rgba(105, 104, 110, 1);
font-size: 24rpx;
}
} }
} }
.chart-container { .chart-container {
@ -78,42 +57,75 @@ page {
background: linear-gradient(180deg, #f5f4f4 0%, #ffffff 17.72%, #ffffff 100%); background: linear-gradient(180deg, #f5f4f4 0%, #ffffff 17.72%, #ffffff 100%);
border-radius: 24rpx 24rpx 24rpx 24rpx; border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff; border: 2rpx solid #ffffff;
.c-header { .chart-header {
display: flex; display: flex;
justify-content: space-between; gap: 24rpx;
.title { .type {
font-size: 36rpx; padding: 8rpx 32rpx;
color: rgba(0, 0, 0, 1); font-size: 32rpx;
font-weight: bold; color: rgba(105, 104, 110, 1);
background-color: #fff;
border-radius: 58rpx;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 24rpx; gap: 14rpx;
&::before { border: 1px solid #f3f3f3;
content: ''; .icon {
width: 8rpx; font-size: 24rpx;
height: 36rpx; color: rgba(105, 104, 110, 1);
background: #0eb66d; transform: rotate(90deg);
border-radius: 32rpx 32rpx 32rpx 32rpx;
} }
} }
.sub { .date {
padding: 8rpx 32rpx;
font-size: 32rpx; font-size: 32rpx;
color: rgba(34, 34, 34, 0.4); color: rgba(105, 104, 110, 1);
background-color: #fff;
border-radius: 58rpx;
display: flex;
align-items: center;
gap: 6rpx;
border: 1px solid #f3f3f3;
.start,
.end {
color: rgba(105, 104, 110, 1);
&.active {
color: rgba(34, 34, 34, 1);
}
}
.line {
margin: 0 10rpx;
}
.icon {
transform: rotate(90deg);
color: rgba(105, 104, 110, 1);
font-size: 24rpx;
}
} }
} }
.w-chart { .w-chart {
height: 460rpx; height: 380rpx;
} }
} }
} }
.list { .list {
margin-top: 56rpx; margin-top: 36rpx;
.l-header { .l-header {
padding-bottom: 32rpx; padding-bottom: 32rpx;
.title { .title {
display: flex;
align-items: center;
gap: 24rpx;
font-size: 36rpx; font-size: 36rpx;
color: #000; color: #000;
font-weight: bold; font-weight: bold;
&::before {
content: '';
width: 8rpx;
height: 36rpx;
background: #0eb66d;
border-radius: 32rpx 32rpx 32rpx 32rpx;
}
} }
} }
.card { .card {
@ -269,12 +281,17 @@ page {
} }
} }
.list { .list {
.l-header {
.title::before {
background: rgba(89, 86, 233, 1);
}
}
.card { .card {
.circle { .circle {
background-color: rgba(89, 86, 233, 1); background-color: rgba(89, 86, 233, 1);
border-color: rgba(89, 86, 233, 0.08); border-color: rgba(89, 86, 233, 0.08);
} }
.status{ .status {
background-color: rgba(89, 86, 233, 0.08); background-color: rgba(89, 86, 233, 0.08);
color: rgba(89, 86, 233, 1); color: rgba(89, 86, 233, 1);
} }

7
src/gift/pages/recordList/index.ts

@ -149,8 +149,8 @@ Page({
handleDelete(e: any) { handleDelete(e: any) {
const { id, date } = e.currentTarget.dataset const { id, date } = e.currentTarget.dataset
wx.showModal({ wx.showModal({
title: '确认删除记录?', title: `删除${date}记录`,
content: `删除${date}记录,此操作不可逆,相关照片将永久删除`, content: `删除后将无法恢复`,
confirmText: '确认删除', confirmText: '确认删除',
confirmColor: '#cf5375', confirmColor: '#cf5375',
success: (res) => { success: (res) => {
@ -218,10 +218,11 @@ Page({
yAxis: [ yAxis: [
{ {
type: 'value', type: 'value',
min: 200, min: 0,
minInterval: 1, minInterval: 1,
axisLabel: { color: 'rgba(34, 34, 34, 0.40)' }, axisLabel: { color: 'rgba(34, 34, 34, 0.40)' },
splitLine: { splitLine: {
show:false,
lineStyle: { color: 'rgba(34, 34, 34, 0.20)', type: 'dashed' }, lineStyle: { color: 'rgba(34, 34, 34, 0.20)', type: 'dashed' },
}, },
}, },

59
src/gift/pages/recordList/index.wxml

@ -1,37 +1,37 @@
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}"> <view class="page" id="{{theme === 'DRUG' && 'drug-page'}}">
<view class="user"> <view class="user">
<view class="name"> <!-- <view class="name"> -->
张先生,您好 <!-- 张先生,您好 -->
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon131' : 'icon119'}}.png?t={{Timestamp}}"></image> <!-- <image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon131' : 'icon119'}}.png?t={{Timestamp}}"></image> -->
</view> <!-- </view> -->
<view class="content" wx:if="{{latestIgG4 !== ''}}"> <view class="content" wx:if="{{latestIgG4 !== ''}}">
您的最近一次IgG4数值为: 您的最近一次IgG4数值为:
<text class="high">{{latestIgG4}} mg/dL</text> <text class="high">{{latestIgG4}} mg/dL</text>
</view> </view>
</view> </view>
<view class="chart" wx:if="{{chartList.length}}"> <view class="chart" wx:if="{{chartList.length}}">
<view class="chart-header"> <view class="c-header">
<picker range="{{yearOptions}}" range-key="label" bindchange="handleChange"> <view class="title">血清IgG4趋势监测</view>
<view class="type"> <view class="sub">单位{{chartUnit}}</view>
{{selectedLabel}}
<van-icon class="icon" name="play" />
</view>
</picker>
<view class="date" wx:if="{{selected === 1}}">
<picker mode="date" fields="month" bindchange="handleBeginDateChange" value="{{beginDate}}" end="{{endDate}}">
<view class="start {{beginDate && 'active'}}">{{beginDate ? beginDate : '开始时间'}}</view>
</picker>
<view class="line">-</view>
<picker mode="date" fields="month" bindchange="handleEndDateChange" value="{{endDate}}" start="{{beginDate}}">
<view class="end {{endDate && 'active'}}">{{endDate ? endDate : '结束时间'}}</view>
</picker>
<van-icon class="icon" name="play" />
</view>
</view> </view>
<view class="chart-container"> <view class="chart-container">
<view class="c-header"> <view class="chart-header">
<view class="title">血清IgG4趋势监测</view> <picker range="{{yearOptions}}" range-key="label" bindchange="handleChange">
<view class="sub">单位{{chartUnit}}</view> <view class="type">
{{selectedLabel}}
<van-icon class="icon" name="play" />
</view>
</picker>
<view class="date" wx:if="{{selected === 1}}">
<picker mode="date" fields="month" bindchange="handleBeginDateChange" value="{{beginDate}}" end="{{endDate}}">
<view class="start {{beginDate && 'active'}}">{{beginDate ? beginDate : '开始时间'}}</view>
</picker>
<view class="line">-</view>
<picker mode="date" fields="month" bindchange="handleEndDateChange" value="{{endDate}}" start="{{beginDate}}">
<view class="end {{endDate && 'active'}}">{{endDate ? endDate : '结束时间'}}</view>
</picker>
<van-icon class="icon" name="play" />
</view>
</view> </view>
<view class="w-chart"> <view class="w-chart">
<ec-canvas id="chart1" ec="{{ ec }}"></ec-canvas> <ec-canvas id="chart1" ec="{{ ec }}"></ec-canvas>
@ -40,7 +40,7 @@
</view> </view>
<view class="list"> <view class="list">
<view class="l-header"> <view class="l-header">
<view class="title">我的就诊历史总轴(按日期)</view> <view class="title">就诊历史记录</view>
</view> </view>
<view <view
class="card" class="card"
@ -76,13 +76,14 @@
<view wx:if="{{item.recordStatus === 1}}" class="status">{{item.statusText}}</view> <view wx:if="{{item.recordStatus === 1}}" class="status">{{item.statusText}}</view>
</view> </view>
<view class="row"> <view class="row">
<view class="col" wx:if="{{item.oralHormoneDosage}}"> <view class="col">
<view class="c-name">激素用量</view> <view class="c-name">激素用量</view>
<view class="c-content">{{item.oralHormoneDosage}}mg/天</view> <view class="c-content" wx:if="{{item.oralHormoneDosageMg}}">{{item.oralHormoneDosageMg}}mg/天</view>
<view class="c-content" wx:else>--</view>
</view> </view>
<view class="col" wx:if="{{item.nextVisitDate}}"> <view class="col">
<view class="c-name">下次复诊时间</view> <view class="c-name">下次复诊时间</view>
<view class="c-content">{{item.nextVisitDate}}</view> <view class="c-content">{{item.nextVisitDate || '--'}}</view>
</view> </view>
</view> </view>
</view> </view>

BIN
src/images/icon147.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

20
src/pages/caseReport/index.ts

@ -32,19 +32,7 @@ Page({
}).then((res: any) => { }).then((res: any) => {
if (!res || !res.list) return if (!res || !res.list) return
// 按就诊日期分组 // 按就诊日期分组
const groupMap: Record<string, string[]> = {} const newList = res.list
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],
}))
this.setData({ this.setData({
list: reset ? newList : [...this.data.list, ...newList], list: reset ? newList : [...this.data.list, ...newList],
pagination: { pagination: {
@ -57,12 +45,10 @@ Page({
}, },
handlePreviewImage(e: WechatMiniprogram.CustomEvent) { handlePreviewImage(e: WechatMiniprogram.CustomEvent) {
const { url, date } = e.currentTarget.dataset const { url, urls } = e.currentTarget.dataset
const group = this.data.list.find((item) => item.visitDate === date)
if (!group) return
wx.previewImage({ wx.previewImage({
current: url, current: url,
urls: group.images, urls,
}) })
}, },
}) })

3
src/pages/caseReport/index.wxml

@ -11,13 +11,14 @@
<view class="container"> <view class="container">
<image <image
class="photo" class="photo"
wx:for="{{item.images}}" wx:for="{{item.imageUrls}}"
wx:key="*this" wx:key="*this"
wx:for-item="imgUrl" wx:for-item="imgUrl"
src="{{imgUrl}}" src="{{imgUrl}}"
mode="aspectFill" mode="aspectFill"
bind:tap="handlePreviewImage" bind:tap="handlePreviewImage"
data-url="{{imgUrl}}" data-url="{{imgUrl}}"
data-urls="{{item.imageUrls}}"
data-date="{{item.visitDate}}" data-date="{{item.visitDate}}"
></image> ></image>
</view> </view>

17
src/pages/index/index.ts

@ -47,6 +47,8 @@ Page({
nextVisitMonth: '', nextVisitMonth: '',
nextVisitDay: '', nextVisitDay: '',
nextVisitWeek: '', nextVisitWeek: '',
taskPushId: '',
}, },
onLoad(options) { onLoad(options) {
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
@ -55,6 +57,7 @@ Page({
sliderTop: systemInfo.screenHeight - 160, sliderTop: systemInfo.screenHeight - 160,
options, options,
firstLogin: options.fl, firstLogin: options.fl,
taskPushId: options.taskPushId || '',
}) })
}, },
onShow() { onShow() {
@ -63,6 +66,17 @@ Page({
anyWhere: app.globalData.anyWhere, anyWhere: app.globalData.anyWhere,
}) })
if (this.data.taskPushId) {
wx.ajax({
method: 'POST',
url: '?r=igg4/push-click/task-push-click',
data: { taskPushId: this.data.taskPushId },
})
this.setData({
taskPushId: '',
})
}
app.getUserInfo(this, true, (userInfo) => { app.getUserInfo(this, true, (userInfo) => {
this.setData({ this.setData({
userInfo, userInfo,
@ -338,9 +352,10 @@ Page({
}) })
}, },
handleNextVisit() { handleNextVisit() {
const nextVisitDays = this.data.nextVisitDays
app.permissionVerification(3, 0, '').then(() => { app.permissionVerification(3, 0, '').then(() => {
wx.navigateTo({ wx.navigateTo({
url: '/gift/pages/record/index', url: nextVisitDays == '---' ? '/gift/pages/record/index' : '/gift/pages/recordList/index',
}) })
}) })
}, },

7
src/pages/qaFormDetail/index.scss

@ -24,15 +24,12 @@ page {
} }
.answer-text { .answer-text {
margin-top: 24rpx; margin-top: 24rpx;
display: flex;
flex-wrap: wrap;
gap: 16rpx;
.answer-tag { .answer-tag {
font-size: 36rpx; font-size: 32rpx;
color: rgba(33, 33, 32, 1); color: rgba(33, 33, 32, 1);
} }
.answer-content { .answer-content {
font-size: 36rpx; font-size: 32rpx;
color: rgba(33, 33, 32, 1); color: rgba(33, 33, 32, 1);
} }
} }

26
src/pages/qaFormDetail/index.ts

@ -42,9 +42,24 @@ Page({
imageField: 'outpatientRecord', imageField: 'outpatientRecord',
}, },
{ icon: 'icon127.png', name: '检验报告', content: '抽血检测的IgG4、IgG、ESR等', imageField: 'labReport' }, { icon: 'icon127.png', name: '检验报告', content: '抽血检测的IgG4、IgG、ESR等', imageField: 'labReport' },
{ icon: 'icon128.png', name: '影像学检查', content: '超声/CT/MRI的描述结论、电子胶片', imageField: 'imagingExam' }, {
{ icon: 'icon129.png', name: '病理诊断及活检', content: '受累组织穿刺或切除免疫组化报告', imageField: 'pathology' }, icon: 'icon128.png',
{ icon: 'icon130.png', name: '外周血免疫功能评估', content: '免疫细胞亚群、淋巴细胞比例测定', imageField: 'immuneFunction' }, name: '影像学检查',
content: '超声/CT/MRI的描述结论、电子胶片',
imageField: 'imagingExam',
},
{
icon: 'icon129.png',
name: '病理诊断及活检',
content: '受累组织穿刺或切除免疫组化报告',
imageField: 'pathology',
},
{
icon: 'icon130.png',
name: '外周血免疫功能评估',
content: '免疫细胞亚群、淋巴细胞比例测定',
imageField: 'immuneFunction',
},
], ],
}, },
@ -119,8 +134,11 @@ Page({
questions.forEach((q, i) => { questions.forEach((q, i) => {
const found = answers.find((a: any) => a.QuestionNo === q.QuestionNo) const found = answers.find((a: any) => a.QuestionNo === q.QuestionNo)
if (!found) return if (!found) return
const answer = found.Answer let answer = found.Answer
if (answer === null || answer === undefined) return if (answer === null || answer === undefined) return
if (Array.isArray(answer)) {
answer = answer.filter((item) => item != 99)
}
if (q.QuestionType === 1) { if (q.QuestionType === 1) {
updates[`questions[${i}].Answer`] = Number(answer) updates[`questions[${i}].Answer`] = Number(answer)
updates[`questions[${i}].answerText`] = this.getAnswerText(q, Number(answer)) updates[`questions[${i}].answerText`] = this.getAnswerText(q, Number(answer))

Loading…
Cancel
Save