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. 21
      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. 33
      src/doctor/pages/d_taskList/index.scss
  11. 16
      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. 30
      src/gift/pages/recordDetail/index.scss
  16. 8
      src/gift/pages/recordDetail/index.ts
  17. 9
      src/gift/pages/recordDetail/index.wxml
  18. 85
      src/gift/pages/recordList/index.scss
  19. 7
      src/gift/pages/recordList/index.ts
  20. 29
      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 @@ @@ -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 @@ @@ -539,7 +543,9 @@
}
```
- 分页按就诊记录维度,每页包含对应就诊记录中该类型的所有图片
- 分页按就诊记录维度,每页包含对应就诊记录中该类型的所有图片 URL 数组
-> imageUrls :图片 URL 数组
---

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

@ -34,20 +34,7 @@ Page({ @@ -34,20 +34,7 @@ Page({
data,
}).then((res: any) => {
if (!res || !res.list) return
// 按就诊日期分组
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],
}))
const newList = res.list
this.setData({
list: reset ? newList : [...this.data.list, ...newList],
pagination: {
@ -60,12 +47,10 @@ Page({ @@ -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,
})
},
})

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

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

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

@ -59,7 +59,7 @@ page { @@ -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 {

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

@ -51,18 +51,19 @@ page { @@ -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 { @@ -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 { @@ -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);
}
}

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

@ -469,7 +469,7 @@ Page({ @@ -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({ @@ -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') : '',
},
})

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

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

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

@ -1,5 +1,5 @@ @@ -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 { @@ -33,7 +33,7 @@ page {
}
&.status4 {
color: rgba(103, 186, 202, 1);
color: rgba(22, 121, 203, 1);
}
&.status5 {
@ -64,7 +64,7 @@ page { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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;

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

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
<view class="card">
<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 class="c-wrap">
@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
</view>
</view>
<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 class="c-wrap">
@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
</view>
</view>
<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 class="c-wrap">
@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
</view>
<view class="card" wx:if="{{detail.Status === '4' || detail.Status === '5'}}">
<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 class="c-prominent">

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

@ -43,7 +43,7 @@ page { @@ -43,7 +43,7 @@ page {
}
&.status4 {
color: rgba(103, 186, 202, 1);
color: rgba(22, 121, 203, 1);
}
&.status5 {
@ -67,7 +67,8 @@ page { @@ -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 { @@ -98,6 +99,7 @@ page {
.f-content {
display: inline;
white-space: pre-lincwe;
}
}
}
@ -164,18 +166,25 @@ page { @@ -164,18 +166,25 @@ page {
}
}
}
}
.create {
.footer {
position: fixed;
bottom: 100rpx;
left: 50%;
transform: translateX(-50%);
width: 168rpx;
height: 168rpx;
.icon {
bottom: 0;
left: 0;
width: 100%;
height: 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;
}
}

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

@ -21,12 +21,15 @@ @@ -21,12 +21,15 @@
<view class="f-label">选择范围:</view>
<view class="f-content">全部患者</view>
</view>
<block wx:else>
<view class="f-row" wx:if="{{item.FilterCondition.BindStartDate || item.FilterCondition.BindEndDate}}">
<view class="f-label">绑定时间:</view>
<view class="f-content">
<view>
{{item.FilterCondition.BindStartDate || '---'}}~{{item.FilterCondition.BindEndDate || '---'}}
</view>
</view>
</view>
<view class="f-row" wx:if="{{item.FilterCondition.ConfirmedIgg4}}">
<view class="f-label">确诊IgG4-RD:</view>
<view class="f-content">{{ConfirmedIgg4Obj[item.FilterCondition.ConfirmedIgg4]}}</view>
@ -34,13 +37,13 @@ @@ -34,13 +37,13 @@
<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 wx:for="{{item.FilterCondition.MedicationTypeArr}}" wx:for-item="subItem" wx:key="subItem">
{{MedicationTypeObj[subItem]}}
</view>
</view>
</view>
</block>
</view>
</view>
<view class="row">
<view class="label">模板类型</view>
@ -66,7 +69,8 @@ @@ -66,7 +69,8 @@
</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
<view class="create" bind:tap="handleCreate">
<image class="icon" src="{{imageUrl}}icon109.png?t={{Timestamp}}"></image>
</view>
<view class="footer" bind:tap="handleCreate">
<view class="btn">新建群发消息</view>
</view>

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

@ -354,6 +354,7 @@ page { @@ -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 { @@ -371,6 +372,8 @@ page {
color: rgba(0, 0, 0, 0.4);
}
.icon {
position: absolute;
right: 32rpx;
width: 44rpx;
height: 44rpx;
}

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

@ -22,7 +22,7 @@ const IMMUNOSUPPRESSANT_OPTIONS = [ @@ -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<string, string> = {
outpatientRecord: 'outpatientRecord',
@ -102,9 +102,7 @@ Page({ @@ -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({ @@ -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({ @@ -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({ @@ -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

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

@ -79,7 +79,14 @@ @@ -79,7 +79,14 @@
</view>
<view class="content">医生手写或电脑打印的病历、处方</view>
<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>
<view class="del" catch:tap="handleDeleteImage" data-type="outpatientRecord" data-index="{{index}}">
<van-icon name="cross" />
@ -93,7 +100,10 @@ @@ -93,7 +100,10 @@
isSlot="{{true}}"
>
<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>
</uploadFile>
@ -114,7 +124,14 @@ @@ -114,7 +124,14 @@
</view>
<view class="content">抽血检测的IgG4、总免疫球蛋白、ESR等</view>
<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>
<view class="del" catch:tap="handleDeleteImage" data-type="labReport" data-index="{{index}}">
<van-icon name="cross" />
@ -128,7 +145,10 @@ @@ -128,7 +145,10 @@
isSlot="{{true}}"
>
<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>
</uploadFile>
@ -142,7 +162,14 @@ @@ -142,7 +162,14 @@
</view>
<view class="content">超声、CT、核磁共振的描述结论、电子胶片</view>
<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>
<view class="del" catch:tap="handleDeleteImage" data-type="imagingExam" data-index="{{index}}">
<van-icon name="cross" />
@ -156,7 +183,10 @@ @@ -156,7 +183,10 @@
isSlot="{{true}}"
>
<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>
</uploadFile>
@ -170,7 +200,14 @@ @@ -170,7 +200,14 @@
</view>
<view class="content">受累组织穿刺或切除免疫组化报告</view>
<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>
<view class="del" catch:tap="handleDeleteImage" data-type="pathology" data-index="{{index}}">
<van-icon name="cross" />
@ -184,7 +221,10 @@ @@ -184,7 +221,10 @@
isSlot="{{true}}"
>
<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>
</uploadFile>
@ -198,7 +238,14 @@ @@ -198,7 +238,14 @@
</view>
<view class="content">免疫细胞亚群、淋巴细胞比例测定</view>
<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>
<view class="del" catch:tap="handleDeleteImage" data-type="immuneFunction" data-index="{{index}}">
<van-icon name="cross" />
@ -212,7 +259,10 @@ @@ -212,7 +259,10 @@
isSlot="{{true}}"
>
<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>
</uploadFile>
@ -279,7 +329,7 @@ @@ -279,7 +329,7 @@
<view class="content">{{item.label}}</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
class="input"
placeholder-class="place-input"
@ -304,7 +354,7 @@ @@ -304,7 +354,7 @@
bind:tap="handleDosageSelect"
data-val="{{item}}"
>
{{item}}片
{{item == '0.5' ? '半':item}}片
</view>
</view>
<view class="custom-num">
@ -340,7 +390,7 @@ @@ -340,7 +390,7 @@
<view class="content">{{item.label}}</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
class="input"
placeholder-class="place-input"

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

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

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

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

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

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

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

@ -3,7 +3,7 @@ page { @@ -3,7 +3,7 @@ page {
}
.page {
padding: 32rpx 32rpx 300rpx;
padding: 0 32rpx 300rpx;
.user {
.name {
font-size: 44rpx;
@ -27,8 +27,37 @@ page { @@ -27,8 +27,37 @@ page {
}
}
.chart {
.c-header {
margin-top: 42rpx;
display: flex;
justify-content: space-between;
.title {
font-size: 36rpx;
color: rgba(0, 0, 0, 1);
font-weight: bold;
display: flex;
align-items: center;
gap: 24rpx;
&::before {
content: '';
width: 8rpx;
height: 36rpx;
background: #0eb66d;
border-radius: 32rpx 32rpx 32rpx 32rpx;
}
}
.sub {
font-size: 32rpx;
color: rgba(34, 34, 34, 0.4);
}
}
.chart-container {
margin-top: 32rpx;
padding: 32rpx;
background: linear-gradient(180deg, #f5f4f4 0%, #ffffff 17.72%, #ffffff 100%);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff;
.chart-header {
margin-top: 48rpx;
display: flex;
gap: 24rpx;
.type {
@ -40,6 +69,7 @@ page { @@ -40,6 +69,7 @@ page {
display: flex;
align-items: center;
gap: 14rpx;
border: 1px solid #f3f3f3;
.icon {
font-size: 24rpx;
color: rgba(105, 104, 110, 1);
@ -54,7 +84,8 @@ page { @@ -54,7 +84,8 @@ page {
border-radius: 58rpx;
display: flex;
align-items: center;
gap: 14rpx;
gap: 6rpx;
border: 1px solid #f3f3f3;
.start,
.end {
color: rgba(105, 104, 110, 1);
@ -72,48 +103,29 @@ page { @@ -72,48 +103,29 @@ page {
}
}
}
.chart-container {
margin-top: 32rpx;
padding: 32rpx;
background: linear-gradient(180deg, #f5f4f4 0%, #ffffff 17.72%, #ffffff 100%);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff;
.c-header {
display: flex;
justify-content: space-between;
.title {
font-size: 36rpx;
color: rgba(0, 0, 0, 1);
font-weight: bold;
display: flex;
align-items: center;
gap: 24rpx;
&::before {
content: '';
width: 8rpx;
height: 36rpx;
background: #0eb66d;
border-radius: 32rpx 32rpx 32rpx 32rpx;
}
}
.sub {
font-size: 32rpx;
color: rgba(34, 34, 34, 0.4);
}
}
.w-chart {
height: 460rpx;
height: 380rpx;
}
}
}
.list {
margin-top: 56rpx;
margin-top: 36rpx;
.l-header {
padding-bottom: 32rpx;
.title {
display: flex;
align-items: center;
gap: 24rpx;
font-size: 36rpx;
color: #000;
font-weight: bold;
&::before {
content: '';
width: 8rpx;
height: 36rpx;
background: #0eb66d;
border-radius: 32rpx 32rpx 32rpx 32rpx;
}
}
}
.card {
@ -269,6 +281,11 @@ page { @@ -269,6 +281,11 @@ page {
}
}
.list {
.l-header {
.title::before {
background: rgba(89, 86, 233, 1);
}
}
.card {
.circle {
background-color: rgba(89, 86, 233, 1);

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

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

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

@ -1,15 +1,20 @@ @@ -1,15 +1,20 @@
<view class="page" id="{{theme === 'DRUG' && 'drug-page'}}">
<view class="user">
<view class="name">
张先生,您好
<image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon131' : 'icon119'}}.png?t={{Timestamp}}"></image>
</view>
<!-- <view class="name"> -->
<!-- 张先生,您好 -->
<!-- <image class="icon" src="{{imageUrl}}{{theme === 'DRUG' ? 'icon131' : 'icon119'}}.png?t={{Timestamp}}"></image> -->
<!-- </view> -->
<view class="content" wx:if="{{latestIgG4 !== ''}}">
您的最近一次IgG4数值为:
<text class="high">{{latestIgG4}} mg/dL</text>
</view>
</view>
<view class="chart" wx:if="{{chartList.length}}">
<view class="c-header">
<view class="title">血清IgG4趋势监测</view>
<view class="sub">单位{{chartUnit}}</view>
</view>
<view class="chart-container">
<view class="chart-header">
<picker range="{{yearOptions}}" range-key="label" bindchange="handleChange">
<view class="type">
@ -28,11 +33,6 @@ @@ -28,11 +33,6 @@
<van-icon class="icon" name="play" />
</view>
</view>
<view class="chart-container">
<view class="c-header">
<view class="title">血清IgG4趋势监测</view>
<view class="sub">单位{{chartUnit}}</view>
</view>
<view class="w-chart">
<ec-canvas id="chart1" ec="{{ ec }}"></ec-canvas>
</view>
@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
</view>
<view class="list">
<view class="l-header">
<view class="title">我的就诊历史总轴(按日期)</view>
<view class="title">就诊历史记录</view>
</view>
<view
class="card"
@ -76,13 +76,14 @@ @@ -76,13 +76,14 @@
<view wx:if="{{item.recordStatus === 1}}" class="status">{{item.statusText}}</view>
</view>
<view class="row">
<view class="col" wx:if="{{item.oralHormoneDosage}}">
<view class="col">
<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 class="col" wx:if="{{item.nextVisitDate}}">
<view class="col">
<view class="c-name">下次复诊时间</view>
<view class="c-content">{{item.nextVisitDate}}</view>
<view class="c-content">{{item.nextVisitDate || '--'}}</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({ @@ -32,19 +32,7 @@ Page({
}).then((res: any) => {
if (!res || !res.list) return
// 按就诊日期分组
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],
}))
const newList = res.list
this.setData({
list: reset ? newList : [...this.data.list, ...newList],
pagination: {
@ -57,12 +45,10 @@ Page({ @@ -57,12 +45,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,
})
},
})

3
src/pages/caseReport/index.wxml

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

17
src/pages/index/index.ts

@ -47,6 +47,8 @@ Page({ @@ -47,6 +47,8 @@ Page({
nextVisitMonth: '',
nextVisitDay: '',
nextVisitWeek: '',
taskPushId: '',
},
onLoad(options) {
const systemInfo = wx.getSystemInfoSync()
@ -55,6 +57,7 @@ Page({ @@ -55,6 +57,7 @@ Page({
sliderTop: systemInfo.screenHeight - 160,
options,
firstLogin: options.fl,
taskPushId: options.taskPushId || '',
})
},
onShow() {
@ -63,6 +66,17 @@ Page({ @@ -63,6 +66,17 @@ Page({
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) => {
this.setData({
userInfo,
@ -338,9 +352,10 @@ Page({ @@ -338,9 +352,10 @@ Page({
})
},
handleNextVisit() {
const nextVisitDays = this.data.nextVisitDays
app.permissionVerification(3, 0, '').then(() => {
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 { @@ -24,15 +24,12 @@ page {
}
.answer-text {
margin-top: 24rpx;
display: flex;
flex-wrap: wrap;
gap: 16rpx;
.answer-tag {
font-size: 36rpx;
font-size: 32rpx;
color: rgba(33, 33, 32, 1);
}
.answer-content {
font-size: 36rpx;
font-size: 32rpx;
color: rgba(33, 33, 32, 1);
}
}

26
src/pages/qaFormDetail/index.ts

@ -42,9 +42,24 @@ Page({ @@ -42,9 +42,24 @@ Page({
imageField: 'outpatientRecord',
},
{ 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: 'icon130.png', name: '外周血免疫功能评估', content: '免疫细胞亚群、淋巴细胞比例测定', imageField: 'immuneFunction' },
{
icon: 'icon128.png',
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({ @@ -119,8 +134,11 @@ Page({
questions.forEach((q, i) => {
const found = answers.find((a: any) => a.QuestionNo === q.QuestionNo)
if (!found) return
const answer = found.Answer
let answer = found.Answer
if (answer === null || answer === undefined) return
if (Array.isArray(answer)) {
answer = answer.filter((item) => item != 99)
}
if (q.QuestionType === 1) {
updates[`questions[${i}].Answer`] = Number(answer)
updates[`questions[${i}].answerText`] = this.getAnswerText(q, Number(answer))

Loading…
Cancel
Save