Browse Source

2.0联调

2.0
kola-web 2 weeks ago
parent
commit
4e230a5c28
  1. 142
      src/components/uploadFile/index.js
  2. 3
      src/components/uploadFile/index.json
  3. 4
      src/components/uploadFile/index.wxml
  4. 2
      src/patient/pages/casesAdd/index.scss
  5. 209
      src/patient/pages/casesAdd/index.ts
  6. 135
      src/patient/pages/casesAdd/index.wxml
  7. 11
      src/patient/pages/course/index.ts
  8. 2
      src/patient/pages/index/index.ts
  9. 22
      src/patient/pages/preDiagnosisReport/index.scss
  10. 209
      src/patient/pages/preDiagnosisReport/index.ts
  11. 260
      src/patient/pages/preDiagnosisReport/index.wxml
  12. 37
      src/patient/pages/selectDoctorList/index.ts

142
src/components/uploadFile/index.js

@ -15,30 +15,11 @@ Component({
type: Array, type: Array,
value: [], value: [],
}, },
accept: {
type: String,
value: 'media',
},
fileTypes: {
// 上传类型
type: Array,
value: ['image', 'video'],
},
// 拍照和相机
sourceType: {
type: Array,
value: ['album', 'camera'],
},
// 是否可以删除 // 是否可以删除
canDelete: { canDelete: {
type: Boolean, type: Boolean,
value: true, value: true,
}, },
// 是否可以下载
// canDownLoad: {
// type: Boolean,
// value: true
// },
// 最大上传数量, -1为不限制 // 最大上传数量, -1为不限制
maxNum: { maxNum: {
type: Number, type: Number,
@ -60,6 +41,32 @@ Component({
data: { data: {
Timestamp: app.globalData.Timestamp, Timestamp: app.globalData.Timestamp,
imageUrl: app.globalData.imageUrl, imageUrl: app.globalData.imageUrl,
show: false,
actions: [
{
id: 1,
name: '选择视频或图片',
},
{
id: 2,
name: '选择聊天文件',
},
],
fileTypenNum: {
image: 1,
video: 2,
audio: 3,
pdf: 4,
ppt: 7,
1: 'image',
2: 'video',
3: 'audio',
4: 'pdf',
7: 'ppt',
},
}, },
/** /**
@ -123,22 +130,12 @@ Component({
title: '附件请到pc端下载!', title: '附件请到pc端下载!',
icon: 'none', icon: 'none',
}) })
// wx.saveFile({
// tempFilePath: res.tempFilePath,
// success: () => {
// wx.showToast({
// title: '下载成功',
// })
// },
// fail(err){
// console.log(err)
// },
// })
} }
}, },
}) })
}, },
uploadFile(item) { uploadFile(item) {
const { fileTypenNum } = this.data
return new Promise((resolve, resject) => { return new Promise((resolve, resject) => {
let url = `${app.globalData.upFileUrl}?r=file-service/upload-` let url = `${app.globalData.upFileUrl}?r=file-service/upload-`
if (item.fileType === 'image') { if (item.fileType === 'image') {
@ -147,26 +144,30 @@ Component({
if (item.fileType === 'video') { if (item.fileType === 'video') {
url += 'video' url += 'video'
} }
let that = this if (item.fileType === 'file') {
url += 'doc'
}
wx.uploadFile({ wx.uploadFile({
filePath: item.tempFilePath, filePath: item.tempFilePath,
name: 'file', name: 'file',
url: url, url: url,
success(res) { success: (res) => {
let data = JSON.parse(res.data) let data = JSON.parse(res.data)
let expandJson = { let expandJson = {
fileId: '', name: item.name,
name: data.data.Url, extend: item.extend,
size: (item.size / 1024).toFixed(2), fnum: fileTypenNum[item.fileType],
fileUrl: data.data.Url,
suffix: that.GetExtensionFileName(data.data.Url),
type: item.fileType,
} }
if (item.fileType === 'image') { if (item.fileType === 'image') {
expandJson.imgUrl = data.data.Url expandJson.url = data.data.Url
} }
if (item.fileType === 'video') { if (item.fileType === 'video') {
expandJson.imgUrl = data.data.SnapshotUrl expandJson.url = data.data.SnapshotUrl
expandJson.videoUrl = data.data.Url
expandJson.duration = data.data.Duration
}
if (item.fileType === 'file') {
expandJson.url = data.data.Url
} }
resolve(expandJson) resolve(expandJson)
}, },
@ -207,25 +208,68 @@ Component({
}) })
}) })
}, },
selectFile() { handleAction() {
let { fileList, maxNum, sourceType, fileTypes, count = 0 } = this.properties this.setData({
var that = this show: true,
})
},
onSelect(e) {
if (e.detail.id === 1) {
this.setData({
show: false,
})
this.selectMedia()
}
if (e.detail.id === 2) {
this.setData({
show: false,
})
this.selectFiles()
}
},
selectMedia() {
let { fileList, maxNum, count = 0 } = this.properties
if (maxNum >= 0 && count == 0) { if (maxNum >= 0 && count == 0) {
count = maxNum - fileList.length count = maxNum - fileList.length
} }
this.triggerEvent('choose')
wx.chooseMedia({ wx.chooseMedia({
mediaType: fileTypes, mediaType: ['image', 'video'],
count: count, count: count,
sourceType: sourceType, sourceType: ['album', 'camera'],
sizeType: ['original'], sizeType: ['original'],
success(res) { success: (res) => {
res.tempFiles.map((e) => {
e.name = e.tempFilePath
e.extend = this.GetExtensionFileName(e.tempFilePath)
e.tempFilePath = e.tempFilePath
e.fileType = e.fileType
})
this.upFile(res.tempFiles)
},
})
},
selectFiles() {
let { fileList, maxNum, count = 0 } = this.properties
if (maxNum >= 0 && count == 0) {
count = maxNum - fileList.length
}
wx.chooseMessageFile({
count: count,
type: 'file',
extension: ['doc', 'docx', 'pdf', 'xlsx', 'xls', 'ppt', 'pptx'],
success: (res) => {
res.tempFiles.map((e) => { res.tempFiles.map((e) => {
e.fileType = e.fileType || res.type e.fileType = 'file'
e.tempFilePath = e.path
e.extend = this.GetExtensionFileName(e.path)
console.warn('DEBUGPRINT[62]: index.js:265: e=', e)
}) })
that.upFile(res.tempFiles) this.upFile(res.tempFiles)
}, },
}) })
}, },
onClose() {
this.setData({ show: false })
},
}, },
}) })

3
src/components/uploadFile/index.json

@ -2,6 +2,7 @@
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"van-image": "@vant/weapp/image/index" "van-image": "@vant/weapp/image/index",
"van-action-sheet": "@vant/weapp/action-sheet/index"
} }
} }

4
src/components/uploadFile/index.wxml

@ -9,7 +9,7 @@
<van-icon name="clear" /> <van-icon name="clear" />
</view> </view>
</view> </view>
<view wx:if="{{upload && (maxNum === -1 || maxNum > fileList.length)}}" catchtap="selectFile"> <view wx:if="{{upload && (maxNum === -1 || maxNum > fileList.length)}}" catchtap="handleAction">
<slot wx:if="{{isSlot}}"></slot> <slot wx:if="{{isSlot}}"></slot>
<view wx:else class="btn"> <view wx:else class="btn">
<van-icon name="plus" color="rgba(207, 209, 213, 1)" size="50rpx" /> <van-icon name="plus" color="rgba(207, 209, 213, 1)" size="50rpx" />
@ -17,3 +17,5 @@
</view> </view>
</view> </view>
</view> </view>
<van-action-sheet show="{{ show }}" actions="{{ actions }}" bind:close="onClose" bind:select="onSelect" />

2
src/patient/pages/casesAdd/index.scss

@ -120,7 +120,7 @@ page {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&::before { &:empty:before {
display: inline; display: inline;
content: attr(data-place); content: attr(data-place);
color: rgba(161, 164, 172, 0.5); color: rgba(161, 164, 172, 0.5);

209
src/patient/pages/casesAdd/index.ts

@ -1,82 +1,268 @@
const _app = getApp<IAppOption>() const app = getApp<IAppOption>()
Page({ Page({
data: { data: {
popupShow: false, popupShow: false,
popupType: 'casesAddComplete', popupType: 'casesAddComplete',
popupParams: { popupParams: {} as any,
close: true,
content: '',
},
currentFinish: true, currentFinish: true,
current: 0, current: 0,
// form
diagnosisTime: '',
weight: '',
clottingFactor: '',
treatmentPlan: '',
fixExposureDay: '',
beforeFixHistory: '',
beforeLiverHistory: '',
liverRecord: '',
drinkingHistory: '',
allergyHistory: '',
allergyRecord: '',
isNotGlucocorticoid: '',
medicalHistoryInfo: '',
remark: '',
bleedingParts: [],
formKeys: [
'diagnosisTime',
'weight',
'clottingFactor',
'treatmentPlan',
'fixExposureDay',
'beforeFixHistory',
'beforeLiverHistory',
'liverRecord',
'drinkingHistory',
'allergyHistory',
'allergyRecord',
'isNotGlucocorticoid',
'medicalHistoryInfo',
'remark',
'bleedingParts',
],
dict: {
treatmentPlan: {},
dataHaveNo: {},
drink: {},
parts: {} as any,
},
parts: [ parts: [
{ {
top: '94', top: '94',
left: '-14', left: '-14',
active: false,
}, },
{ {
top: '78', top: '78',
left: '28', left: '28',
active: false,
}, },
{ {
top: '88', top: '88',
left: '72', left: '72',
active: false,
}, },
{ {
top: '78', top: '78',
left: '126', left: '126',
active: false,
}, },
{ {
top: '78', top: '78',
left: '184', left: '184',
active: false,
}, },
{ {
top: '88', top: '88',
left: '238', left: '238',
active: false,
}, },
{ {
top: '78', top: '78',
left: '284', left: '284',
active: false,
}, },
{ {
top: '94', top: '94',
left: '324', left: '324',
active: false,
}, },
{ {
top: '194', top: '194',
left: '122', left: '122',
active: false,
}, },
{ {
top: '194', top: '194',
left: '190', left: '190',
active: false,
}, },
{ {
top: '296', top: '296',
left: '122', left: '122',
active: false,
}, },
{ {
top: '296', top: '296',
left: '190', left: '190',
active: false,
}, },
{ {
top: '364', top: '364',
left: '122', left: '122',
active: false,
}, },
{ {
top: '364', top: '364',
left: '190', left: '190',
active: false,
},
{
top: '396',
left: '104',
active: false,
},
{
top: '396',
left: '206',
active: false,
}, },
], ],
}, },
onLoad() {}, onShow() {
const casesCache = wx.getStorageSync('casesCache')
app.waitLogin().then(() => {
this.getDict()
if (casesCache) {
const { formKeys } = this.data
const reset = formKeys.reduce((pre, cur) => {
pre[cur] = casesCache[cur] || ''
return pre
}, {})
this.setData({
...reset,
})
} else {
this.getDetail()
}
})
},
onUnload() {
this.updateSave()
},
onHide() {
this.updateSave()
},
getDict() {
wx.ajax({
method: 'GET',
url: '?r=wtx/treatment/get-dict',
data: {},
}).then((res) => {
this.setData({
dict: res,
})
})
},
getDetail() {
const { formKeys, parts } = this.data
wx.ajax({
method: 'GET',
url: '?r=wtx/treatment/get-medical-history-info',
data: {},
}).then((res) => {
const reset = formKeys.reduce((pre, cur) => {
pre[cur] = res[cur] || ''
return pre
}, {})
const bleedingParts = res.lastBleedingInfo.bleedingPartList.map((item: any) => {
parts[item.bleedingPart - 1].active = true
return {
name: item.bleedingPartName,
id: item.bleedingPart,
}
})
this.setData({
...reset,
remark: res.lastBleedingInfo.remark,
bleedingParts,
parts,
})
})
},
handleSelect(e) {
const { key, value } = e.currentTarget.dataset
this.setData({
[`${key}`]: value,
})
},
handlePartSelect(e) {
const { index } = e.currentTarget.dataset
const {
dict: { parts: partsDict },
parts,
} = this.data
parts[index].active = !parts[index].active
const bleedingParts = parts.reduce((pre, cur, index) => {
if (cur.active) {
pre.push({
name: partsDict[index + 1],
id: index + 1,
})
}
return pre
}, [] as any)
this.setData({
parts,
bleedingParts,
})
},
updateSave(e = false) {
let back = false
if (e) {
back = (e as any).currentTarget.dataset.back
}
const { formKeys, ...reset } = this.data
const form: any = formKeys.reduce((pre, cur) => {
pre[cur] = reset[cur]
return pre
}, {})
wx.setStorageSync('casesCache', form)
wx.ajax({
method: 'POST',
url: '?r=wtx/treatment/save-medical-history-info',
data: {
...form,
lastBleedingInfo: JSON.stringify({
remark: form.remark,
bleedingParts: form.bleedingParts.map((item: any) => item.id),
}),
},
}).then(() => {
wx.removeStorageSync('casesCache')
if (back) {
this.setData({
popupShow: true,
popupType: 'casesAddComplete',
popupParams: {},
})
}
})
},
handleFinish() { handleFinish() {
this.setData({ this.setData({
currentFinish: true, currentFinish: true,
}) })
}, },
handleBack() {
wx.navigateBack()
},
handlePrev() { handlePrev() {
if (!this.data.currentFinish) return if (!this.data.currentFinish) return
this.setData({ this.setData({
@ -91,6 +277,17 @@ Page({
current: this.data.current + 1, current: this.data.current + 1,
}) })
}, },
handlePopupCancel() {
const { popupType } = this.data
if (popupType === 'casesAddComplete') {
wx.navigateBack()
this.setData({
popupShow: false,
popupType: '',
popupParams: {},
})
}
},
}) })
export {} export {}

135
src/patient/pages/casesAdd/index.wxml

@ -39,8 +39,8 @@
<view class="row"> <view class="row">
<view class="label">确诊时间</view> <view class="label">确诊时间</view>
<view class="container"> <view class="container">
<picker mode="date" class="date"> <picker mode="date" model:value="{{diagnosisTime}}" class="date">
<view class="date-content" data-place="请选择确诊时间"></view> <view class="date-content" data-place="请选择确诊时间">{{diagnosisTime}}</view>
</picker> </picker>
</view> </view>
</view> </view>
@ -48,7 +48,13 @@
<view class="label">您的体重</view> <view class="label">您的体重</view>
<view class="container"> <view class="container">
<view class="input-wrap"> <view class="input-wrap">
<input class="input" placeholder-class="place-input" type="number" value="" placeholder="请输入" /> <input
class="input"
model:value="{{weight}}"
placeholder-class="place-input"
type="number"
placeholder="请输入"
/>
<view class="unit">kg</view> <view class="unit">kg</view>
</view> </view>
</view> </view>
@ -59,7 +65,13 @@
<view class="label">凝血因子</view> <view class="label">凝血因子</view>
<view class="container"> <view class="container">
<view class="input-wrap"> <view class="input-wrap">
<input class="input" placeholder-class="place-input" type="number" value="" placeholder="请输入" /> <input
class="input"
model:value="{{clottingFactor}}"
placeholder-class="place-input"
type="number"
placeholder="请输入"
/>
<view class="unit">%</view> <view class="unit">%</view>
</view> </view>
</view> </view>
@ -70,8 +82,16 @@
<view class="label">治疗方案</view> <view class="label">治疗方案</view>
<view class="container"> <view class="container">
<view class="select select2"> <view class="select select2">
<view class="s-item">预防治疗</view> <view
<view class="s-item">按需治疗</view> class="s-item {{treatmentPlan == index && 'active'}}"
wx:for="{{dict.treatmentPlan}}"
wx:key="index"
bind:tap="handleSelect"
data-key="treatmentPlan"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
</view> </view>
</view> </view>
@ -79,7 +99,13 @@
<view class="label">FIX暴露日</view> <view class="label">FIX暴露日</view>
<view class="container"> <view class="container">
<view class="input-wrap"> <view class="input-wrap">
<input class="input" placeholder-class="place-input" type="number" value="" placeholder="请输入" /> <input
class="input"
model:value="{{fixExposureDay}}"
placeholder-class="place-input"
type="number"
placeholder="请输入"
/>
<view class="unit">个</view> <view class="unit">个</view>
</view> </view>
<view class="tip">在某一天接受1次或多次凝血因子输注,该天计为1个暴露日</view> <view class="tip">在某一天接受1次或多次凝血因子输注,该天计为1个暴露日</view>
@ -88,7 +114,7 @@
</view> </view>
</scroll-view> </scroll-view>
<view class="footer"> <view class="footer">
<view class="cancel">取消</view> <view class="cancel" bind:tap="handleBack">取消</view>
<view class="submit" bind:tap="handleNext">下一步</view> <view class="submit" bind:tap="handleNext">下一步</view>
</view> </view>
</swiper-item> </swiper-item>
@ -99,8 +125,16 @@
<view class="label">既往FIX抑制物病史</view> <view class="label">既往FIX抑制物病史</view>
<view class="container"> <view class="container">
<view class="select select2"> <view class="select select2">
<view class="s-item">有</view> <view
<view class="s-item active">没有</view> class="s-item {{beforeFixHistory == index && 'active'}}"
wx:for="{{dict.dataHaveNo}}"
wx:key="index"
bind:tap="handleSelect"
data-key="beforeFixHistory"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
</view> </view>
</view> </view>
@ -108,13 +142,27 @@
<view class="label">既往肝脏疾病病史</view> <view class="label">既往肝脏疾病病史</view>
<view class="container"> <view class="container">
<view class="select select2"> <view class="select select2">
<view class="s-item">有</view> <view
<view class="s-item active">没有</view> class="s-item {{beforeLiverHistory == index && 'active'}}"
wx:for="{{dict.dataHaveNo}}"
wx:key="index"
bind:tap="handleSelect"
data-key="beforeLiverHistory"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="auto-input"> <view class="auto-input">
<input class="input" placeholder-class="place-input" type="text" placeholder="您的肝脏疾病是?" /> <input
class="input"
model:value="{{liverRecord}}"
placeholder-class="place-input"
type="text"
placeholder="您的肝脏疾病是?"
/>
</view> </view>
</view> </view>
<view class="card"> <view class="card">
@ -122,25 +170,40 @@
<view class="label">您是否有饮酒史?</view> <view class="label">您是否有饮酒史?</view>
<view class="container"> <view class="container">
<view class="select select4"> <view class="select select4">
<view class="s-item">从不</view> <view
<view class="s-item active">偶尔</view> class="s-item {{drinkingHistory == index && 'active'}}"
<view class="s-item">经常</view> wx:for="{{dict.drink}}"
<view class="s-item">已戒酒</view> wx:key="index"
bind:tap="handleSelect"
data-key="drinkingHistory"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="row"> <view class="row">
<view class="label">您是否有饮酒史?</view> <view class="label">您是否有过敏史?</view>
<view class="container"> <view class="container">
<view class="select select2"> <view class="select select2">
<view class="s-item">有</view> <view
<view class="s-item active">没有</view> class="s-item {{allergyHistory == index && 'active'}}"
wx:for="{{dict.dataHaveNo}}"
wx:key="index"
bind:tap="handleSelect"
data-key="allergyHistory"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="auto-input"> <view class="auto-input">
<input <input
class="input" class="input"
model:value="{{allergyRecord}}"
placeholder-class="place-input" placeholder-class="place-input"
type="text" type="text"
placeholder="请填写您的过敏情况,药物、饮食等" placeholder="请填写您的过敏情况,药物、饮食等"
@ -156,13 +219,27 @@
<view class="tip">例如高血压、消化性溃疡、精神疾病、青光眼、股骨头坏死等</view> <view class="tip">例如高血压、消化性溃疡、精神疾病、青光眼、股骨头坏死等</view>
<view class="container"> <view class="container">
<view class="select select4"> <view class="select select4">
<view class="s-item">有</view> <view
<view class="s-item active">没有</view> class="s-item {{isNotGlucocorticoid == index && 'active'}}"
wx:for="{{dict.dataHaveNo}}"
wx:key="index"
bind:tap="handleSelect"
data-key="isNotGlucocorticoid"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="auto-input"> <view class="auto-input">
<input class="input" placeholder-class="place-input" type="text" placeholder="请补充描述" /> <input
class="input"
model:value="{{medicalHistoryInfo}}"
placeholder-class="place-input"
type="text"
placeholder="请补充描述"
/>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -184,15 +261,16 @@
style="background: #fff url({{imageUrl}}body1.png?t={{Timestamp}}) no-repeat top center/345rpx 417rpx" style="background: #fff url({{imageUrl}}body1.png?t={{Timestamp}}) no-repeat top center/345rpx 417rpx"
> >
<view <view
class="part {{index===0 &&'active'}}" class="part {{item.active && 'active'}}"
wx:for="{{parts}}" wx:for="{{parts}}"
wx:key="index" wx:key="index"
bind:tap="handlePartSelect"
data-index="{{index}}"
style="top:{{item.top}}rpx;left:{{item.left}}rpx" style="top:{{item.top}}rpx;left:{{item.left}}rpx"
></view> ></view>
</view> </view>
<view class="part-name"> <view class="part-name">
<view class="item">左侧手肘</view> <view class="item" wx:for="{{bleedingParts}}" wx:key="id">{{item.name}}</view>
<view class="item">右侧手肘</view>
</view> </view>
<view class="name">已选择关节</view> <view class="name">已选择关节</view>
</view> </view>
@ -207,6 +285,7 @@
<view class="auto-area"> <view class="auto-area">
<textarea <textarea
class="textarea" class="textarea"
model:value="{{remark}}"
placeholder-class="place-textarea" placeholder-class="place-textarea"
disable-default-padding disable-default-padding
placeholder="出血频次、出血部位、出血原因等" placeholder="出血频次、出血部位、出血原因等"
@ -216,8 +295,8 @@
</view> </view>
</scroll-view> </scroll-view>
<view class="footer"> <view class="footer">
<view class="cancel">取消</view> <view class="cancel" bind:tap="handlePrev">上一步</view>
<view class="submit">完成</view> <view class="submit" bind:tap="updateSave" data-back="{{true}}">完成</view>
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>

11
src/patient/pages/course/index.ts

@ -13,10 +13,10 @@ Page({
current: 0, current: 0,
periodInfo1: {}, periodInfo1: {} as any,
periodInfo2: {}, periodInfo2: {} as any,
periodInfo3: {}, periodInfo3: {} as any,
periodInfo4: {}, periodInfo4: {} as any,
}, },
onShow() { onShow() {
app.waitLogin({ type: 1 }).then(() => { app.waitLogin({ type: 1 }).then(() => {
@ -66,8 +66,9 @@ Page({
}) })
}, },
handlePreDiagnosisReport() { handlePreDiagnosisReport() {
const { periodInfo1 } = this.data
wx.navigateTo({ wx.navigateTo({
url: '/patient/pages/preDiagnosisReport/index', url: `/patient/pages/preDiagnosisReport/index?examid=${periodInfo1.examId}&period=1`,
}) })
}, },
handleAavReport() { handleAavReport() {

2
src/patient/pages/index/index.ts

@ -71,7 +71,7 @@ Page({
}).then((res) => { }).then((res) => {
this.setData({ this.setData({
treatment: res, treatment: res,
progress: res.period, progress: res.period - 1,
}) })
}) })
}, },

22
src/patient/pages/preDiagnosisReport/index.scss

@ -7,7 +7,8 @@ page {
.date-form { .date-form {
padding: 24rpx 32rpx; padding: 24rpx 32rpx;
background-color: #fff; background-color: #fff;
border-radius: 80rpx; border-radius: 24rpx;
.title {
display: flex; display: flex;
align-items: center; align-items: center;
.icon { .icon {
@ -21,12 +22,22 @@ page {
font-size: 32rpx; font-size: 32rpx;
color: rgba(0, 0, 0, 1); color: rgba(0, 0, 0, 1);
} }
}
.range {
margin-top: 24rpx;
display: flex;
align-items: center;
gap: 18rpx;
font-size: 32rpx;
color: rgba(207, 209, 213, 1);
.picker { .picker {
flex: 1; flex: 1;
.picker-content { .picker-content {
padding-left: 48rpx; padding: 22rpx 32rpx;
display: flex; display: flex;
align-items: center; align-items: center;
background-color: rgba(247, 247, 250, 1);
border-radius: 12rpx;
.content { .content {
flex: 1; flex: 1;
font-size: 32rpx; font-size: 32rpx;
@ -46,6 +57,7 @@ page {
} }
} }
} }
}
.form { .form {
margin-top: 48rpx; margin-top: 48rpx;
.form-header { .form-header {
@ -147,6 +159,10 @@ page {
.icon { .icon {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
transition: transform 0.3s;
&.turn {
transform: rotate(180deg);
}
} }
} }
.status { .status {
@ -464,7 +480,7 @@ page {
} }
.module10 { .module10 {
padding: 0 32rpx 32rpx; padding: 0 32rpx 32rpx;
.text-area{ .text-area {
padding: 24rpx 32rpx; padding: 24rpx 32rpx;
width: 100%; width: 100%;
height: 182rpx; height: 182rpx;

209
src/patient/pages/preDiagnosisReport/index.ts

@ -1,12 +1,217 @@
const _app = getApp<IAppOption>() const app = getApp<IAppOption>()
Page({ Page({
data: { data: {
popupShow: false, popupShow: false,
popupType: 'preDiagnosisReportDate', // 确认绑定曾经扫码医生 popupType: 'preDiagnosisReportDate', // 确认绑定曾经扫码医生
popupParams: {}, popupParams: {},
fold1: true,
fold2: true,
fold3: true,
fold4: true,
fold5: true,
fold6: true,
fold7: true,
fold8: true,
fold9: true,
fold10: true,
// form
examId: '',
period: '1',
beginDate: '',
endDate: '',
isBloodRoutine: 2,
isBiochemical: 2,
alt: '',
ast: '',
bilirubin: '',
isCFIxActivity: 2,
clottingFactor: '',
isCFIxInhibitor: 2,
cFII: '',
isHepatitisB: 2,
hbsAg: '',
hbvDNA: '',
isHepatitisC: 2,
hcvAntibody: '',
hcvRNA: '',
isHivAntibody: 2,
hiv: '',
isAfp: 2,
afp: '',
isAav: 2,
aav: '',
isOther: 2,
otherInfo: '',
attachmentList1: [],
attachmentList2: [],
attachmentList3: [],
attachmentList4: [],
attachmentList5: [],
attachmentList6: [],
attachmentList7: [],
attachmentList8: [],
attachmentList9: [],
attachmentList10: [],
formKeys: [
'beginDate',
'endDate',
'isBloodRoutine',
'isBiochemical',
'alt',
'ast',
'bilirubin',
'isCFIxActivity',
'clottingFactor',
'isCFIxInhibitor',
'cFII',
'isHepatitisB',
'hbsAg',
'hbvDNA',
'isHepatitisC',
'hcvAntibody',
'hcvRNA',
'isHivAntibody',
'hiv',
'isAfp',
'afp',
'isAav',
'aav',
'isOther',
'otherInfo',
],
dict: {
result: {},
number: {},
},
},
onLoad(options) {
this.setData({
examId: options.examid || '',
period: options.period || '1',
})
},
onShow() {
const { formKeys, period } = this.data
const examinationCache = wx.getStorageSync(`examinationCache${period}`)
app.waitLogin().then(() => {
this.getDict()
if (examinationCache) {
const reset = formKeys.reduce((pre, cur) => {
pre[cur] = examinationCache[cur] || ''
return pre
}, {})
this.setData({
...reset,
})
} else {
this.getDetail()
}
})
},
onUnload() {
this.updateSave()
},
onHide() {
this.updateSave()
},
getDict() {
wx.ajax({
method: 'GET',
url: '?r=wtx/treatment/get-dict',
data: {},
}).then((res) => {
this.setData({
dict: res,
})
})
},
getDetail() {
const { examId, formKeys } = this.data
wx.ajax({
method: 'GET',
url: '?r=wtx/treatment/get-examination-info',
data: {
examId: examId,
},
}).then((res) => {
const reset = formKeys.reduce((pre, cur) => {
pre[cur] = res[cur] || ''
return pre
}, {})
this.setData({
...reset,
attachmentList1: res.attachmentList[1] || [],
attachmentList2: res.attachmentList[2] || [],
attachmentList3: res.attachmentList[3] || [],
attachmentList4: res.attachmentList[4] || [],
attachmentList5: res.attachmentList[5] || [],
attachmentList6: res.attachmentList[6] || [],
attachmentList7: res.attachmentList[7] || [],
attachmentList8: res.attachmentList[8] || [],
attachmentList9: res.attachmentList[9] || [],
attachmentList10: res.attachmentList[10] || [],
})
})
},
handleToggleFold(e: any) {
const { fold } = e.currentTarget.dataset
this.setData({
[fold]: !this.data[fold],
})
},
handleToggleCheck(e: any) {
const { check, fold } = e.currentTarget.dataset
let foldValue = this.data[fold]
if (!this.data[check]) {
foldValue = false
}
this.setData({
[check]: this.data[check] == 1 ? 2 : 1,
[fold]: foldValue,
})
this.updateSave()
},
handleSelect(e: any) {
const { key, value } = e.currentTarget.dataset
this.setData({
[key]: value,
})
this.updateSave()
},
updateSave() {
const { formKeys, period, examId, ...reset } = this.data
const form = formKeys.reduce((pre, cur) => {
pre[cur] = reset[cur]
return pre
}, {})
const storageKey = `examinationCache${period}`
wx.setStorageSync(storageKey, form)
wx.ajax({
method: 'POST',
url: '?r=wtx/treatment/save-examination',
data: {
examId,
period,
...form,
},
}).then(() => {
wx.removeStorageSync(storageKey)
})
},
setFile(e: any) {
console.log('DEBUGPRINT[63]: index.ts:189: e=', e)
const { type, key } = e.currentTarget.dataset
const detail = e.detail || []
detail.forEach((item: any) => {})
}, },
onLoad() {},
}) })
export {} export {}

260
src/patient/pages/preDiagnosisReport/index.wxml

@ -1,13 +1,24 @@
<view class="page"> <view class="page">
<view class="date-form"> <view class="date-form">
<view class="title">
<image class="icon" src="{{imageUrl}}icon52.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon52.png?t={{Timestamp}}"></image>
<view class="label">诊前检查时间</view> <view class="label">诊前检查时间</view>
<picker class="picker"> </view>
<view class="range">
<picker class="picker" end="{{endDate}}" model:value="{{beginDate}}" mode="date" bind:change="updateSave">
<view class="picker-content"> <view class="picker-content">
<view class="content" data-place="请选择"></view> <view class="content" data-place="开始时间">{{beginDate}}</view>
<view class="tril"></view> <view class="tril"></view>
</view> </view>
</picker> </picker>
<picker class="picker" start="beginDate" model:value="{{endDate}}" mode="date" bind:change="updateSave">
<view class="picker-content">
<view class="content" data-place="结束时间">{{endDate}}</view>
<view class="tril"></view>
</view>
</picker>
</view>
</view> </view>
<view class="form"> <view class="form">
<view class="form-header"> <view class="form-header">
@ -27,23 +38,29 @@
<view class="container"> <view class="container">
<view class="c-header"> <view class="c-header">
<view class="wrap"> <view class="wrap">
<view class="left"> <view class="left" bind:tap="handleToggleFold" data-fold="fold1">
<view class="title">血常规检查</view> <view class="title">血常规检查</view>
<image class="icon" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image> <image class="icon {{fold1 && 'turn'}}" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image>
</view> </view>
<view class="status"> <view class="status" catch:tap="handleToggleCheck" data-check="isBloodRoutine" data-fold="fold1">
<image wx:if="{{true}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image> <image wx:if="{{isBloodRoutine==1}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image> <image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image>
已检查 已检查
</view> </view>
</view> </view>
<view class="content">重点检查项目:白细胞计数)WBC)血红蛋白(HGB)血小板计数(PLT)</view> <view class="content">重点检查项目:白细胞计数)WBC)血红蛋白(HGB)血小板计数(PLT)</view>
</view> </view>
<view class="c-body"> <view class="c-body {{fold1 && 'fold'}}">
<view class="module1"> <view class="module1">
<view class="m-title">请上传您的检查报告</view> <view class="m-title">请上传您的检查报告</view>
<view class="file-list"> <view class="file-list">
<uploadFile></uploadFile> <uploadFile
bind:setData="setFile"
fileList="{{attachmentList1}}"
maxNum="{{9}}"
data-key="attachmentList1"
data-type="1"
></uploadFile>
</view> </view>
</view> </view>
</view> </view>
@ -58,18 +75,18 @@
<view class="container"> <view class="container">
<view class="c-header"> <view class="c-header">
<view class="wrap"> <view class="wrap">
<view class="left"> <view class="left" bind:tap="handleToggleFold" data-fold="fold2">
<view class="title">生化检查</view> <view class="title">生化检查</view>
<image class="icon" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image> <image class="icon {{fold2 && 'turn'}}" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image>
</view> </view>
<view class="status"> <view class="status" catch:tap="handleToggleCheck" data-check="isBiochemical" data-fold="fold2">
<image wx:if="{{true}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image> <image wx:if="{{isBiochemical==1}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image> <image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image>
已检查 已检查
</view> </view>
</view> </view>
</view> </view>
<view class="c-body"> <view class="c-body {{fold2 && 'fold'}}">
<view class="module2"> <view class="module2">
<view class="m-input-area"> <view class="m-input-area">
<view class="m-input"> <view class="m-input">
@ -77,7 +94,15 @@
ALT ALT
<view class="sub-label">丙氨酸氨基转移酶</view> <view class="sub-label">丙氨酸氨基转移酶</view>
</view> </view>
<input type="number" placeholder="请填写" class="input" placeholder-class="place-input" /> <input
bind:blur="updateSave"
bind:blur="updateSave"
type="number"
model:value="{{alt}}"
placeholder="请填写"
class="input"
placeholder-class="place-input"
/>
<view class="sub">U/L</view> <view class="sub">U/L</view>
</view> </view>
<view class="m-input"> <view class="m-input">
@ -85,12 +110,26 @@
AST AST
<view class="sub-label">天门冬氨酸氨基转移酶</view> <view class="sub-label">天门冬氨酸氨基转移酶</view>
</view> </view>
<input type="number" placeholder="请填写" class="input" placeholder-class="place-input" /> <input
bind:blur="updateSave"
type="number"
model:value="{{ast}}"
placeholder="请填写"
class="input"
placeholder-class="place-input"
/>
<view class="sub">U/L</view> <view class="sub">U/L</view>
</view> </view>
<view class="m-input"> <view class="m-input">
<view class="label">总胆红素</view> <view class="label">总胆红素</view>
<input type="number" placeholder="请填写" class="input" placeholder-class="place-input" /> <input
bind:blur="updateSave"
type="number"
model:value="{{bilirubin}}"
placeholder="请填写"
class="input"
placeholder-class="place-input"
/>
<view class="sub">μmol/L</view> <view class="sub">μmol/L</view>
</view> </view>
</view> </view>
@ -111,22 +150,29 @@
<view class="container"> <view class="container">
<view class="c-header"> <view class="c-header">
<view class="wrap"> <view class="wrap">
<view class="left"> <view class="left" bind:tap="handleToggleFold" data-fold="fold3">
<view class="title">凝血因子 IX 活性</view> <view class="title">凝血因子 IX 活性</view>
<image class="icon" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image> <image class="icon {{fold3 && 'turn'}}" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image>
</view> </view>
<view class="status"> <view class="status" catch:tap="handleToggleCheck" data-check="isCFIxActivity" data-fold="fold3">
<image wx:if="{{true}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image> <image wx:if="{{isCFIxActivity==1}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image> <image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image>
已检查 已检查
</view> </view>
</view> </view>
</view> </view>
<view class="c-body"> <view class="c-body {{fold3 && 'fold'}}">
<view class="module3"> <view class="module3">
<view class="m-input"> <view class="m-input">
<view class="label">您的凝血因子水平</view> <view class="label">您的凝血因子水平</view>
<input type="number" placeholder="请填写" class="input" placeholder-class="place-input" /> <input
bind:blur="updateSave"
type="number"
model:value="{{clottingFactor}}"
placeholder="请填写"
class="input"
placeholder-class="place-input"
/>
<view class="sub">%</view> <view class="sub">%</view>
</view> </view>
<view class="m-title">请上传您的检查报告</view> <view class="m-title">请上传您的检查报告</view>
@ -146,22 +192,30 @@
<view class="container"> <view class="container">
<view class="c-header"> <view class="c-header">
<view class="wrap"> <view class="wrap">
<view class="left"> <view class="left" bind:tap="handleToggleFold" data-fold="fold4">
<view class="title">凝血因子 IX 抑制物检测</view> <view class="title">凝血因子 IX 抑制物检测</view>
<image class="icon" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image> <image class="icon {{fold4 && 'turn'}}" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image>
</view> </view>
<view class="status"> <view class="status" catch:tap="handleToggleCheck" data-check="isCFIxInhibitor" data-fold="fold4">
<image wx:if="{{true}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image> <image wx:if="{{isCFIxInhibitor==1}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image> <image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image>
已检查 已检查
</view> </view>
</view> </view>
</view> </view>
<view class="c-body"> <view class="c-body {{fold4 && 'fold'}}">
<view class="module4"> <view class="module4">
<view class="m-select"> <view class="m-select">
<view class="m-item active">阳性(+)</view> <view
<view class="m-item">阴性(-)</view> class="m-item {{cFII==index && 'active'}}"
wx:for="{{dict.result}}"
wx:key="index"
bind:tap="handleSelect"
data-key="cFII"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
<view class="m-title">可上传您的抑制物检查结果</view> <view class="m-title">可上传您的抑制物检查结果</view>
<view class="file-list"> <view class="file-list">
@ -180,28 +234,44 @@
<view class="container"> <view class="container">
<view class="c-header"> <view class="c-header">
<view class="wrap"> <view class="wrap">
<view class="left"> <view class="left" bind:tap="handleToggleFold" data-fold="fold5">
<view class="title">乙型肝炎相关检查</view> <view class="title">乙型肝炎相关检查</view>
<image class="icon" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image> <image class="icon {{fold5 && 'turn'}}" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image>
</view> </view>
<view class="status"> <view class="status" catch:tap="handleToggleCheck" data-check="isHepatitisB" data-fold="fold5">
<image wx:if="{{true}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image> <image wx:if="{{isHepatitisB==1}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image> <image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image>
已检查 已检查
</view> </view>
</view> </view>
</view> </view>
<view class="c-body"> <view class="c-body {{fold5 && 'fold'}}">
<view class="module5"> <view class="module5">
<view class="m-select-title">乙型肝炎病毒表面抗原(HBsAg)</view> <view class="m-select-title">乙型肝炎病毒表面抗原(HBsAg)</view>
<view class="m-select"> <view class="m-select">
<view class="m-item active">阳性(+)</view> <view
<view class="m-item">阴性(-)</view> class="m-item {{hbsAg==index && 'active'}}"
wx:for="{{dict.result}}"
wx:key="index"
bind:tap="handleSelect"
data-key="hbsAg"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
<view class="m-select-title" style="margin-top: 48rpx">乙型肝炎病毒脱氧核糖核酸(HBV - DNA)</view> <view class="m-select-title" style="margin-top: 48rpx">乙型肝炎病毒脱氧核糖核酸(HBV - DNA)</view>
<view class="m-select"> <view class="m-select">
<view class="m-item active">正常数值</view> <view
<view class="m-item">偏高数值</view> class="m-item {{hbvDNA==index && 'active'}}"
wx:for="{{dict.number}}"
wx:key="index"
bind:tap="handleSelect"
data-key="hbvDNA"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
<view class="m-title">请上传乙型肝炎检查报告</view> <view class="m-title">请上传乙型肝炎检查报告</view>
<view class="file-list"> <view class="file-list">
@ -220,28 +290,44 @@
<view class="container"> <view class="container">
<view class="c-header"> <view class="c-header">
<view class="wrap"> <view class="wrap">
<view class="left"> <view class="left" bind:tap="handleToggleFold" data-fold="fold6">
<view class="title">丙型肝炎相关检查</view> <view class="title">丙型肝炎相关检查</view>
<image class="icon" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image> <image class="icon {{fold6 && 'turn'}}" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image>
</view> </view>
<view class="status"> <view class="status" catch:tap="handleToggleCheck" data-check="isHepatitisC" data-fold="fold6">
<image wx:if="{{true}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image> <image wx:if="{{isHepatitisC==1}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image> <image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image>
已检查 已检查
</view> </view>
</view> </view>
</view> </view>
<view class="c-body"> <view class="c-body {{fold6 && 'fold'}}">
<view class="module6"> <view class="module6">
<view class="m-select-title">丙型肝炎病毒抗体(抗 - HCV)</view> <view class="m-select-title">丙型肝炎病毒抗体(抗 - HCV)</view>
<view class="m-select"> <view class="m-select">
<view class="m-item active">阳性(+)</view> <view
<view class="m-item">阴性(-)</view> class="m-item {{hcvAntibody==index && 'active'}}"
wx:for="{{dict.result}}"
wx:key="index"
bind:tap="handleSelect"
data-key="hcvAntibody"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
<view class="m-select-title" style="margin-top: 48rpx">丙型肝炎病毒核糖核酸(HCV - RNA)</view> <view class="m-select-title" style="margin-top: 48rpx">丙型肝炎病毒核糖核酸(HCV - RNA)</view>
<view class="m-select"> <view class="m-select">
<view class="m-item active">阳性(+)</view> <view
<view class="m-item">阴性(-)</view> class="m-item {{hcvRNA==index && 'active'}}"
wx:for="{{dict.result}}"
wx:key="index"
bind:tap="handleSelect"
data-key="hcvRNA"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
<view class="m-title">请上传丙型肝炎检查报告</view> <view class="m-title">请上传丙型肝炎检查报告</view>
<view class="file-list"> <view class="file-list">
@ -260,24 +346,32 @@
<view class="container"> <view class="container">
<view class="c-header"> <view class="c-header">
<view class="wrap"> <view class="wrap">
<view class="left"> <view class="left" bind:tap="handleToggleFold" data-fold="fold7">
<view class="title">HIV抗体</view> <view class="title">HIV抗体</view>
<image class="icon" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image> <image class="icon {{fold7 && 'turn'}}" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image>
</view> </view>
<view class="status"> <view class="status" catch:tap="handleToggleCheck" data-check="isHivAntibody" data-fold="fold7">
<image wx:if="{{true}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image> <image wx:if="{{isHivAntibody==1}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image> <image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image>
已检查 已检查
</view> </view>
</view> </view>
<view class="content">类免疫缺陷病毒抗体(HIV - Ab)</view> <view class="content">类免疫缺陷病毒抗体(HIV - Ab)</view>
</view> </view>
<view class="c-body"> <view class="c-body {{fold7 && 'fold'}}">
<view class="module7"> <view class="module7">
<view class="m-select-title">填选您的HIV检查结果</view> <view class="m-select-title">填选您的HIV检查结果</view>
<view class="m-select"> <view class="m-select">
<view class="m-item active">阳性(+)</view> <view
<view class="m-item">阴性(-)</view> class="m-item {{hiv==index && 'active'}}"
wx:for="{{dict.result}}"
wx:key="index"
bind:tap="handleSelect"
data-key="hiv"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
<view class="m-title">填提交您的HIV检测报告</view> <view class="m-title">填提交您的HIV检测报告</view>
<view class="file-list"> <view class="file-list">
@ -296,22 +390,29 @@
<view class="container"> <view class="container">
<view class="c-header"> <view class="c-header">
<view class="wrap"> <view class="wrap">
<view class="left"> <view class="left" bind:tap="handleToggleFold" data-fold="fold8">
<view class="title">甲胎蛋白(AFP)检测</view> <view class="title">甲胎蛋白(AFP)检测</view>
<image class="icon" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image> <image class="icon {{fold8 && 'turn'}}" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image>
</view> </view>
<view class="status"> <view class="status" catch:tap="handleToggleCheck" data-check="isAfp" data-fold="fold8">
<image wx:if="{{true}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image> <image wx:if="{{isAfp==1}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image> <image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image>
已检查 已检查
</view> </view>
</view> </view>
</view> </view>
<view class="c-body"> <view class="c-body {{fold8 && 'fold'}}">
<view class="module8"> <view class="module8">
<view class="m-input"> <view class="m-input">
<view class="label">您的(AFP)检测</view> <view class="label">您的(AFP)检测</view>
<input type="number" placeholder="请填写" class="input" placeholder-class="place-input" /> <input
bind:blur="updateSave"
type="number"
model:value="{{afp}}"
placeholder="请填写"
class="input"
placeholder-class="place-input"
/>
<view class="sub">μg/L</view> <view class="sub">μg/L</view>
</view> </view>
<view class="m-title">填提交您的AFP 检测报告</view> <view class="m-title">填提交您的AFP 检测报告</view>
@ -331,24 +432,32 @@
<view class="container"> <view class="container">
<view class="c-header"> <view class="c-header">
<view class="wrap"> <view class="wrap">
<view class="left"> <view class="left" bind:tap="handleToggleFold" data-fold="fold9">
<view class="title">AAV 抗体检查</view> <view class="title">AAV 抗体检查</view>
<image class="icon" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image> <image class="icon {{fold9 && 'turn'}}" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image>
</view> </view>
<view class="status"> <view class="status" catch:tap="handleToggleCheck" data-check="isAav" data-fold="fold9">
<image wx:if="{{true}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image> <image wx:if="{{isAav==1}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image> <image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image>
已检查 已检查
</view> </view>
</view> </view>
<view class="content">提交您的AAV抗体检查报告</view> <view class="content">提交您的AAV抗体检查报告</view>
</view> </view>
<view class="c-body"> <view class="c-body {{fold9 && 'fold'}}">
<view class="module9"> <view class="module9">
<view class="m-select-title">填选您的AAV检查结果</view> <view class="m-select-title">填选您的AAV检查结果</view>
<view class="m-select"> <view class="m-select">
<view class="m-item active">阳性(+)</view> <view
<view class="m-item">阴性(-)</view> class="m-item {{aav==index && 'active'}}"
wx:for="{{dict.result}}"
wx:key="index"
bind:tap="handleSelect"
data-key="aav"
data-value="{{index}}"
>
{{item}}
</view>
</view> </view>
<view class="m-title">填提交您的AAV检测报告</view> <view class="m-title">填提交您的AAV检测报告</view>
<view class="file-list"> <view class="file-list">
@ -367,21 +476,26 @@
<view class="container"> <view class="container">
<view class="c-header"> <view class="c-header">
<view class="wrap"> <view class="wrap">
<view class="left"> <view class="left" bind:tap="handleToggleFold" data-fold="fold10">
<view class="title">其他检查</view> <view class="title">其他检查</view>
<image class="icon" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image> <image class="icon {{fold10 && 'turn'}}" src="{{imageUrl}}icon63.png?t={{Timestamp}}"></image>
</view> </view>
<view class="status"> <view class="status" catch:tap="handleToggleCheck" data-check="isOther" data-fold="fold10">
<image wx:if="{{true}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image> <image wx:if="{{isOther==1}}" class="icon" src="{{imageUrl}}icon64.png?t={{Timestamp}}"></image>
<image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image> <image wx:else class="icon" src="{{imageUrl}}icon65.png?t={{Timestamp}}"></image>
已检查 已检查
</view> </view>
</view> </view>
<view class="content">您的其他项检查</view> <view class="content">您的其他项检查</view>
</view> </view>
<view class="c-body"> <view class="c-body {{fold10 && 'fold'}}">
<view class="module10"> <view class="module10">
<textarea class="text-area" placeholder="您做了哪些其他检查?" disable-default-padding></textarea> <textarea
class="text-area"
model:value="{{otherInfo}}"
placeholder="您做了哪些其他检查?"
disable-default-padding
></textarea>
<view class="m-title">填提交您的检测报告</view> <view class="m-title">填提交您的检测报告</view>
<view class="file-list"> <view class="file-list">
<uploadFile></uploadFile> <uploadFile></uploadFile>

37
src/patient/pages/selectDoctorList/index.ts

@ -7,6 +7,8 @@ Page({
popupType: 'selectHostipalComplete', popupType: 'selectHostipalComplete',
popupParams: {} as any, popupParams: {} as any,
selectId: '',
doctorList: [] as any, doctorList: [] as any,
}, },
onLoad() { onLoad() {
@ -28,11 +30,30 @@ Page({
hadnleSelect(e) { hadnleSelect(e) {
const { index } = e.currentTarget.dataset const { index } = e.currentTarget.dataset
const item = this.data.doctorList[index] const item = this.data.doctorList[index]
this.setData({
selectId: item.hospitalId,
popupShow: true,
popupType: 'selectHostipal',
popupParams: {
...item,
provinceName: item.hospitalProvinceName,
cityName: item.hospitalCityName,
districtName: item.hospitalDistrictName,
address: item.hospitalAddress,
},
})
},
handlePopupOk() {
const { popupType } = this.data
if (popupType === 'selectHostipal') {
this.setData({
popupShow: false,
})
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
url: '?r=wtx/treatment/save-d-hospital', url: '?r=wtx/treatment/save-d-hospital',
data: { data: {
hospitalId: item.hospitalId, hospitalId: this.data.selectId,
}, },
}).then(() => { }).then(() => {
this.setData({ this.setData({
@ -43,22 +64,16 @@ Page({
}, },
}) })
}) })
},
handlePopupOk() {
const { popupType } = this.data
if (popupType === 'selectHostipal') {
this.setData({
popupShow: false,
})
} }
}, },
handlePopupCancel() { handlePopupCancel() {
const { popupType } = this.data const { popupType } = this.data
if (popupType === 'selectHostipalComplete') { if (popupType === 'selectHostipalComplete') {
wx.navigateBack({ wx.navigateBack({ delta: 2 })
delta: 2,
})
} }
this.setData({
popupShow: false,
})
}, },
handleBack() { handleBack() {
wx.navigateBack() wx.navigateBack()

Loading…
Cancel
Save