25 changed files with 1780 additions and 194 deletions
@ -1,5 +1,11 @@ |
|||||||
{ |
{ |
||||||
"navigationBarTitleText": "病历反馈", |
"navigationBarTitleText": "病历反馈", |
||||||
"navigationStyle": "default", |
"navigationStyle": "default", |
||||||
"usingComponents": {} |
"usingComponents": { |
||||||
|
"uploadFile": "/components/uploadFile/index", |
||||||
|
"van-icon": "@vant/weapp/icon/index", |
||||||
|
"customRecord": "/components/customRecord/index", |
||||||
|
"customAudioBar": "/components/customAudioBar/index", |
||||||
|
"van-popup": "@vant/weapp/popup/index" |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -1,12 +1,198 @@ |
|||||||
const _app = getApp<IAppOption>() |
const app = getApp<IAppOption>(); |
||||||
|
|
||||||
Page({ |
Page({ |
||||||
data: { |
data: { |
||||||
show1: false, |
show1: false, |
||||||
show2: false, |
show2: false, |
||||||
show3: false, |
|
||||||
show4: false, |
images: [] as any, |
||||||
show5: false, |
info: "", |
||||||
|
audios: [] as any, |
||||||
|
files: [] as any, |
||||||
|
|
||||||
|
DoctorLevel: 1, |
||||||
|
}, |
||||||
|
onLoad() { |
||||||
|
app.waitLogin().then(() => { |
||||||
|
app.getUserInfo(this, (res) => { |
||||||
|
this.setData({ |
||||||
|
DoctorLevel: res.DoctorLevel, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
handlePhoto(e) { |
||||||
|
const detail = e.detail; |
||||||
|
const images = this.data.images; |
||||||
|
this.setData({ |
||||||
|
images: [ |
||||||
|
...images, |
||||||
|
{ |
||||||
|
name: detail.name, |
||||||
|
url: detail.fileUrl, |
||||||
|
isRepeat: 2, |
||||||
|
}, |
||||||
|
], |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleDelPhoto(e) { |
||||||
|
const { index } = e.currentTarget.dataset; |
||||||
|
this.setData({ |
||||||
|
images: this.data.images.filter((_, i) => i !== Number(index)), |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleAudio(e) { |
||||||
|
this.setData({ |
||||||
|
audios: [ |
||||||
|
...this.data.audios, |
||||||
|
{ |
||||||
|
name: e.detail.name, |
||||||
|
url: e.detail.fileUrl, |
||||||
|
duration: e.detail.duration, |
||||||
|
isRepeat: 2, |
||||||
|
}, |
||||||
|
], |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleDelAudio(e) { |
||||||
|
const { index } = e.currentTarget.dataset; |
||||||
|
this.setData({ |
||||||
|
audios: this.data.audios.filter((_, i) => i !== Number(index)), |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleFile(e) { |
||||||
|
this.setData({ |
||||||
|
files: [ |
||||||
|
...this.data.files, |
||||||
|
{ |
||||||
|
fileType: e.detail.fileType, |
||||||
|
name: e.detail.name, |
||||||
|
url: e.detail.fileUrl, |
||||||
|
size: e.detail.size, |
||||||
|
isRepeat: 2, |
||||||
|
videoUrl: e.detail.videoUrl, |
||||||
|
duration: e.detail.duration, |
||||||
|
}, |
||||||
|
], |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleDelFile(e) { |
||||||
|
const { index } = e.currentTarget.dataset; |
||||||
|
this.setData({ |
||||||
|
files: this.data.files.filter((_, i) => i !== Number(index)), |
||||||
|
}); |
||||||
|
}, |
||||||
|
handlePreviewFile(e) { |
||||||
|
const { index } = e.currentTarget.dataset; |
||||||
|
const item = this.data.files[index]; |
||||||
|
wx.downloadFile({ |
||||||
|
url: item.url, |
||||||
|
success(res) { |
||||||
|
wx.openDocument({ |
||||||
|
filePath: res.tempFilePath, |
||||||
|
fail() { |
||||||
|
wx.showToast({ |
||||||
|
title: "该文件无法预览", |
||||||
|
icon: "none", |
||||||
|
}); |
||||||
|
}, |
||||||
|
}); |
||||||
|
}, |
||||||
|
}); |
||||||
}, |
}, |
||||||
onLoad() {}, |
handleDownloadFile(e) { |
||||||
}) |
const { index } = e.currentTarget.dataset; |
||||||
|
const item = this.data.files[index]; |
||||||
|
wx.downloadFile({ |
||||||
|
url: item.url, |
||||||
|
success(res) { |
||||||
|
if (res.statusCode === 200) { |
||||||
|
wx.hideLoading(); |
||||||
|
const tempFilePath = res.tempFilePath; |
||||||
|
const FileSystemManager = wx.getFileSystemManager(); |
||||||
|
FileSystemManager.saveFile({ |
||||||
|
tempFilePath, |
||||||
|
success() { |
||||||
|
wx.showToast({ |
||||||
|
title: "下载成功", |
||||||
|
icon: "none", |
||||||
|
mask: true, |
||||||
|
}); |
||||||
|
}, |
||||||
|
fail() { |
||||||
|
wx.showToast({ |
||||||
|
title: "下载失败,请重新尝试", |
||||||
|
icon: "none", |
||||||
|
mask: true, |
||||||
|
}); |
||||||
|
}, |
||||||
|
}); |
||||||
|
} |
||||||
|
}, |
||||||
|
}); |
||||||
|
}, |
||||||
|
formatParams() { |
||||||
|
const { images, info, audios, files } = this.data; |
||||||
|
return { |
||||||
|
images: JSON.stringify(images), |
||||||
|
info, |
||||||
|
audios: JSON.stringify(audios), |
||||||
|
files: JSON.stringify(files), |
||||||
|
}; |
||||||
|
}, |
||||||
|
onClose() { |
||||||
|
this.setData({ |
||||||
|
show1: false, |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleCache() { |
||||||
|
const params = this.formatParams(); |
||||||
|
wx.ajax({ |
||||||
|
method: "POST", |
||||||
|
url: "?r=takeda/case/create-case", |
||||||
|
data: { |
||||||
|
...params, |
||||||
|
isSubmit: 2, |
||||||
|
}, |
||||||
|
}).then(() => { |
||||||
|
wx.navigateBack(); |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleInvite() { |
||||||
|
const params = this.formatParams(); |
||||||
|
const images = this.data.images; |
||||||
|
if (images.length === 0) { |
||||||
|
wx.showToast({ |
||||||
|
title: "请上传病例图片", |
||||||
|
icon: "none", |
||||||
|
}); |
||||||
|
return; |
||||||
|
} |
||||||
|
wx.navigateTo({ |
||||||
|
url: `/module1/pages/setCaseDoctor/index`, |
||||||
|
success(res) { |
||||||
|
res.eventChannel.emit("acceptDataFromOpenerPage", { |
||||||
|
params, |
||||||
|
}); |
||||||
|
}, |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleSave() {}, |
||||||
|
handleSubmit() {}, |
||||||
|
handleBack() { |
||||||
|
wx.showModal({ |
||||||
|
title: "您的病历还未保存,是否要存为草稿?", |
||||||
|
confirmText: "存为草稿", |
||||||
|
cancelColor: "退出", |
||||||
|
success: (res) => { |
||||||
|
if (res.confirm) { |
||||||
|
this.handleCache(); |
||||||
|
} else { |
||||||
|
wx.navigateBack(); |
||||||
|
} |
||||||
|
}, |
||||||
|
}); |
||||||
|
}, |
||||||
|
}); |
||||||
|
|
||||||
|
export {}; |
||||||
|
@ -1,6 +1,101 @@ |
|||||||
<view class="page"> |
<view class="page"> |
||||||
|
<view class="card"> |
||||||
|
<view class="card-title">我的批注</view> |
||||||
|
<view class="remark"> |
||||||
|
<textarea |
||||||
|
class="textarea" |
||||||
|
model:value="{{info}}" |
||||||
|
placeholder-style="color:rgba(205, 205, 205, 1);" |
||||||
|
placeholder="请输入您的病历备注" |
||||||
|
auto-height |
||||||
|
maxlength="{{3000}}" |
||||||
|
></textarea> |
||||||
|
<view class="limit">{{description.length}}/3000</view> |
||||||
|
</view> |
||||||
|
<view class="audio-list"> |
||||||
|
<view class="row" wx:for="{{audios}}" wx:key="index"> |
||||||
|
<customAudioBar class="audio-bar" url="{{item.url}}" time="{{item.duration}}"></customAudioBar> |
||||||
|
<view class="options"> |
||||||
|
<image |
||||||
|
class="del" |
||||||
|
src="{{imageUrl}}icon-del.png?t={{Timestamp}}" |
||||||
|
bind:tap="handleDelAudio" |
||||||
|
data-index="{{index}}" |
||||||
|
></image> |
||||||
|
<!-- <view class="trans">转文字</view> --> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="record"> |
||||||
|
<customRecord class="record-btn" bind:file="handleAudio"></customRecord> |
||||||
|
<view class="r-title">您也可以长按录入语音</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="card"> |
||||||
|
<view class="card-title required"> |
||||||
|
上传图片建议 |
||||||
|
<text class="limit">(0/9)</text> |
||||||
|
</view> |
||||||
|
<view class="image-files"> |
||||||
|
<view class="photo" wx:for="{{images}}" wx:key="index"> |
||||||
|
<image class="p-img" src="{{item.url}}" mode="aspectFill"></image> |
||||||
|
<view class="del" bind:tap="handleDelPhoto" data-index="{{index}}"> |
||||||
|
<van-icon name="cross" /> |
||||||
|
</view> |
||||||
|
<!-- <view class="repeat"> |
||||||
|
<image class="icon" src="{{imageUrl}}icon-error.png?t={{Timestamp}}"></image> |
||||||
|
<view class="r-title">重复图片</view> |
||||||
|
</view> --> |
||||||
|
</view> |
||||||
|
<uploadFile bind:file="handlePhoto"> |
||||||
|
<view class="upload-file"> |
||||||
|
<van-icon class="add" name="plus" /> |
||||||
|
</view> |
||||||
|
</uploadFile> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="card"> |
||||||
|
<view class="card-title"> |
||||||
|
病历相关文件 |
||||||
|
<uploadFile class="message-select-wrap" chooseMessage bind:file="handleFile"> |
||||||
|
<view class="message-select">从聊天记录选择文件</view> |
||||||
|
</uploadFile> |
||||||
|
</view> |
||||||
|
<view class="file-list" wx:if="{{files.length}}"> |
||||||
|
<view class="fl-row" wx:for="{{files}}" wx:key="name"> |
||||||
|
<view class="wrap"> |
||||||
|
<image class="icon" src="{{imageUrl}}icon-file{{item.fileType}}.png?t={{Timestamp}}"></image> |
||||||
|
<view class="name">{{item.name}}</view> |
||||||
|
</view> |
||||||
|
<view class="option"> |
||||||
|
<image |
||||||
|
class="icon" |
||||||
|
bind:tap="handleDelFile" |
||||||
|
data-index="{{index}}" |
||||||
|
src="{{imageUrl}}icon-del.png?t={{Timestamp}}" |
||||||
|
></image> |
||||||
|
<image |
||||||
|
class="icon" |
||||||
|
bind:tap="handlePreviewFile" |
||||||
|
data-index="{{index}}" |
||||||
|
src="{{imageUrl}}icon-eye.png?t={{Timestamp}}" |
||||||
|
></image> |
||||||
|
<image |
||||||
|
bind:tap="handleDownloadFile" |
||||||
|
data-index="{{index}}" |
||||||
|
class="icon" |
||||||
|
src="{{imageUrl}}icon-download.png?t={{Timestamp}}" |
||||||
|
></image> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="none-file" wx:else> |
||||||
|
<image class="nf-icon" src="{{imageUrl}}icon-nore-file.png?t={{Timestamp}}"></image> |
||||||
|
<view class="nf-title">还没有文件哦!</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
<view class="footer"> |
<view class="footer"> |
||||||
<view class="cancel">返回</view> |
<view class="cancel" bind:tap="handleCache">返回</view> |
||||||
<view class="submit" bind:tap="handleSubmit">保存并提交</view> |
<view class="submit">保存并提交</view> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
|
@ -1,11 +1,11 @@ |
|||||||
{ |
{ |
||||||
"navigationBarTitleText": "录入新病历", |
"navigationBarTitleText": "录入新病历", |
||||||
"navigationStyle": "default", |
|
||||||
"usingComponents": { |
"usingComponents": { |
||||||
"uploadFile": "/components/uploadFile/index", |
"uploadFile": "/components/uploadFile/index", |
||||||
"van-icon": "@vant/weapp/icon/index", |
"van-icon": "@vant/weapp/icon/index", |
||||||
"customRecord": "/components/customRecord/index", |
"customRecord": "/components/customRecord/index", |
||||||
"customAudioBar": "/components/customAudioBar/index", |
"customAudioBar": "/components/customAudioBar/index", |
||||||
"van-popup": "@vant/weapp/popup/index" |
"van-popup": "@vant/weapp/popup/index", |
||||||
|
"van-nav-bar": "@vant/weapp/nav-bar/index" |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,6 +1,26 @@ |
|||||||
const _app = getApp<IAppOption>(); |
const _app = getApp<IAppOption>(); |
||||||
|
|
||||||
Page({ |
Page({ |
||||||
data: {}, |
data: { |
||||||
onLoad() {}, |
caseId: "", |
||||||
|
codeUrl: "", |
||||||
|
isFollow: "", |
||||||
|
}, |
||||||
|
onLoad(options) { |
||||||
|
this.setData({ |
||||||
|
caseId: options.cid, |
||||||
|
codeUrl: options.wxi, |
||||||
|
isFollow: options.isf, |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleReSubmit() { |
||||||
|
wx.navigateTo({ |
||||||
|
url: "/module1/pages/entryCases/index", |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleDetail() { |
||||||
|
wx.navigateTo({ |
||||||
|
url: `/module1/pages/casesDetail/index?id=${this.data.caseId}`, |
||||||
|
}); |
||||||
|
}, |
||||||
}); |
}); |
||||||
|
@ -1,13 +1,8 @@ |
|||||||
<view class="page"> |
<view class="page"> |
||||||
<image class="badge" src="{{imageUrl}}icon-resolve.png?t={{Timestamp}}" mode="scaleToFill"></image> |
<image class="badge" src="{{imageUrl}}icon-resolve.png?t={{Timestamp}}" mode="scaleToFill"></image> |
||||||
<view class="desc">病历提交后医生将收到消息提醒</view> |
<view class="desc">病历提交后医生将收到消息提醒</view> |
||||||
<view class="btn1">查看我提交的病历</view> |
<view class="btn1" bind:tap="handleDetail">查看我提交的病历</view> |
||||||
<view class="btn2">继续录入新的病历</view> |
<view class="btn2" bind:tap="handleReSubmit">继续录入新的病历</view> |
||||||
<image |
<image class="code" src="{{codeUrl}}" mode="scaleToFill" show-menu-by-longpress></image> |
||||||
class="code" |
|
||||||
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567" |
|
||||||
mode="scaleToFill" |
|
||||||
show-menu-by-longpress |
|
||||||
></image> |
|
||||||
<view class="tip">关注公众号接收病例反馈消息</view> |
<view class="tip">关注公众号接收病例反馈消息</view> |
||||||
</view> |
</view> |
||||||
|
@ -0,0 +1,11 @@ |
|||||||
|
{ |
||||||
|
"navigationBarTitleText": "指派医生", |
||||||
|
"navigationStyle": "default", |
||||||
|
"usingComponents": { |
||||||
|
"popupDoctorDetail": "/components/popupDoctorDetail/index", |
||||||
|
"doctorAvatar": "/components/doctorAvatar/index", |
||||||
|
"van-cascader": "@vant/weapp/cascader/index", |
||||||
|
"van-popup": "@vant/weapp/popup/index", |
||||||
|
"van-dialog": "@vant/weapp/dialog/index" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,192 @@ |
|||||||
|
page { |
||||||
|
background-color: rgba(246, 246, 246, 1); |
||||||
|
} |
||||||
|
.page { |
||||||
|
.header { |
||||||
|
padding: 32rpx 32rpx 2rpx; |
||||||
|
background-color: #fff; |
||||||
|
.tip { |
||||||
|
font-size: 28rpx; |
||||||
|
color: rgba(20, 21, 21, 1); |
||||||
|
.link { |
||||||
|
color: rgba(0, 180, 197, 1); |
||||||
|
} |
||||||
|
} |
||||||
|
.search { |
||||||
|
margin-top: 32rpx; |
||||||
|
padding: 20rpx 30rpx; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
gap: 20rpx; |
||||||
|
border-radius: 122rpx; |
||||||
|
background-color: rgba(246, 246, 246, 1); |
||||||
|
.icon { |
||||||
|
width: 32rpx; |
||||||
|
height: 32rpx; |
||||||
|
} |
||||||
|
.input { |
||||||
|
flex: 1; |
||||||
|
text-align: center; |
||||||
|
font-size: 28rpx; |
||||||
|
color: #000; |
||||||
|
} |
||||||
|
.place-input { |
||||||
|
color: rgba(205, 205, 205, 1); |
||||||
|
} |
||||||
|
} |
||||||
|
.options { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: space-between; |
||||||
|
.option-wrap { |
||||||
|
flex: 1; |
||||||
|
.option { |
||||||
|
padding: 30rpx 10rpx; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
.option-text { |
||||||
|
max-width: 4em; |
||||||
|
font-size: 32rpx; |
||||||
|
color: rgba(20, 21, 21, 1); |
||||||
|
overflow: hidden; |
||||||
|
white-space: nowrap; |
||||||
|
text-overflow: ellipsis; |
||||||
|
} |
||||||
|
.icon { |
||||||
|
width: 24rpx; |
||||||
|
height: 24rpx; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.list { |
||||||
|
padding: 26rpx 32rpx; |
||||||
|
.list-item { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
.radio { |
||||||
|
transform: scale(0.7); |
||||||
|
} |
||||||
|
.card { |
||||||
|
flex: 1; |
||||||
|
padding: 32rpx; |
||||||
|
border-radius: 16rpx; |
||||||
|
background-color: #fff; |
||||||
|
display: flex; |
||||||
|
gap: 24rpx; |
||||||
|
.avatar { |
||||||
|
flex-shrink: 0; |
||||||
|
position: relative; |
||||||
|
width: 112rpx; |
||||||
|
height: 112rpx; |
||||||
|
} |
||||||
|
.wrap { |
||||||
|
flex: 1; |
||||||
|
.w-header { |
||||||
|
.name { |
||||||
|
margin-right: 10rpx; |
||||||
|
display: inline; |
||||||
|
font-size: 36rpx; |
||||||
|
color: rgba(20, 21, 21, 1); |
||||||
|
font-weight: bold; |
||||||
|
} |
||||||
|
.label { |
||||||
|
display: inline; |
||||||
|
font-size: 28rpx; |
||||||
|
color: rgba(20, 21, 21, 1); |
||||||
|
} |
||||||
|
.line { |
||||||
|
margin: 0 10rpx; |
||||||
|
display: inline-block; |
||||||
|
width: 1px; |
||||||
|
height: 24rpx; |
||||||
|
background-color: rgba(205, 205, 205, 1); |
||||||
|
} |
||||||
|
} |
||||||
|
.w-container { |
||||||
|
margin-top: 24rpx; |
||||||
|
.hostipal { |
||||||
|
margin-right: 12rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
color: rgba(20, 21, 21, 1); |
||||||
|
} |
||||||
|
.tag { |
||||||
|
margin-right: 12rpx; |
||||||
|
display: inline-block; |
||||||
|
padding: 0 8rpx; |
||||||
|
border-radius: 4rpx; |
||||||
|
font-size: 24rpx; |
||||||
|
color: rgba(255, 255, 255, 1); |
||||||
|
line-height: 32rpx; |
||||||
|
background-color: rgba(0, 180, 197, 1); |
||||||
|
} |
||||||
|
.site { |
||||||
|
display: inline-block; |
||||||
|
padding: 0 8rpx; |
||||||
|
font-size: 24rpx; |
||||||
|
color: rgba(148, 87, 30, 1); |
||||||
|
line-height: 32rpx; |
||||||
|
border-radius: 4rpx; |
||||||
|
background-color: rgba(250, 229, 206, 1); |
||||||
|
} |
||||||
|
} |
||||||
|
.w-footer { |
||||||
|
margin-top: 14rpx; |
||||||
|
display: flex; |
||||||
|
gap: 12rpx; |
||||||
|
flex-wrap: wrap; |
||||||
|
.wf-label { |
||||||
|
flex-shrink: 0; |
||||||
|
width: 48rpx; |
||||||
|
height: 32rpx; |
||||||
|
} |
||||||
|
.wf-tag { |
||||||
|
flex-shrink: 0; |
||||||
|
padding: 0 8rpx; |
||||||
|
font-size: 22rpx; |
||||||
|
color: rgba(0, 180, 197, 1); |
||||||
|
line-height: 32rpx; |
||||||
|
border: 1rpx solid rgba(191, 239, 244, 1); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.footer { |
||||||
|
position: fixed; |
||||||
|
bottom: 0; |
||||||
|
left: 0; |
||||||
|
padding: 32rpx 32rpx calc(env(safe-area-inset-bottom) + 32rpx); |
||||||
|
width: 100%; |
||||||
|
box-sizing: border-box; |
||||||
|
display: flex; |
||||||
|
gap: 26rpx; |
||||||
|
align-items: center; |
||||||
|
justify-content: space-between; |
||||||
|
background-color: #fff; |
||||||
|
box-shadow: 0 -10rpx 20rpx rgba(0, 0, 0, 0.1); |
||||||
|
.cancel { |
||||||
|
width: 230rpx; |
||||||
|
height: 84rpx; |
||||||
|
text-align: center; |
||||||
|
line-height: 88rpx; |
||||||
|
font-size: 32rpx; |
||||||
|
color: rgba(1, 180, 197, 1); |
||||||
|
border-radius: 96rpx 96rpx 96rpx 96rpx; |
||||||
|
border: 1rpx solid #01b4c5; |
||||||
|
} |
||||||
|
.submit { |
||||||
|
flex: 1; |
||||||
|
height: 88rpx; |
||||||
|
text-align: center; |
||||||
|
line-height: 88rpx; |
||||||
|
font-size: 32rpx; |
||||||
|
color: #fff; |
||||||
|
background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%); |
||||||
|
border-radius: 96rpx; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,252 @@ |
|||||||
|
const app = getApp<IAppOption>(); |
||||||
|
|
||||||
|
Page({ |
||||||
|
data: { |
||||||
|
showDetail: false, |
||||||
|
popupDoctorDetail: {}, |
||||||
|
|
||||||
|
showResolve: false, |
||||||
|
|
||||||
|
showArea: false, |
||||||
|
fieldNames: { text: "label", value: "value", children: "children" }, |
||||||
|
area: [], |
||||||
|
|
||||||
|
id: "", |
||||||
|
|
||||||
|
DoctorTitleType: {}, |
||||||
|
hospitalClassification: {}, |
||||||
|
hospitalLevel: {}, |
||||||
|
SpecialtyList: [], |
||||||
|
|
||||||
|
search: "", |
||||||
|
hospitalId: "", |
||||||
|
HospitalName: "", |
||||||
|
provinceId: "", |
||||||
|
cityId: "", |
||||||
|
countyId: "", |
||||||
|
ProvinceName: "", |
||||||
|
CityName: "", |
||||||
|
CountyName: "", |
||||||
|
specialtyId: "", |
||||||
|
SpecialtyName: "", |
||||||
|
|
||||||
|
list: [], |
||||||
|
|
||||||
|
DoctorId: "", |
||||||
|
|
||||||
|
params: {}, |
||||||
|
|
||||||
|
caseId: "", |
||||||
|
detailInvite: false, |
||||||
|
}, |
||||||
|
onLoad(options) { |
||||||
|
if (options.hid) { |
||||||
|
this.setData({ |
||||||
|
hospitalId: options.hid, |
||||||
|
HospitalName: options.hname, |
||||||
|
}); |
||||||
|
} |
||||||
|
const eventChannel = this.getOpenerEventChannel(); |
||||||
|
eventChannel.on("acceptDataFromOpenerPage", (data) => { |
||||||
|
this.setData({ |
||||||
|
params: data.params, |
||||||
|
caseId: data.caseId, |
||||||
|
detailInvite: data.detailInvite, |
||||||
|
}); |
||||||
|
}); |
||||||
|
app.waitLogin().then(() => { |
||||||
|
this.getList(); |
||||||
|
this.getDoctorDict(); |
||||||
|
this.getHostipalDict(); |
||||||
|
this.getArea(); |
||||||
|
}); |
||||||
|
}, |
||||||
|
getDoctorDict() { |
||||||
|
wx.ajax({ |
||||||
|
method: "GET", |
||||||
|
url: "?r=takeda/reg/doctor-dict", |
||||||
|
data: {}, |
||||||
|
}).then((res) => { |
||||||
|
const SpecialtyList: any = []; |
||||||
|
res.DoctorSpecialtyLabel.forEach((item: any) => { |
||||||
|
SpecialtyList.push(...item.options); |
||||||
|
}); |
||||||
|
this.setData({ |
||||||
|
DoctorTitleType: res.DoctorTitleType, |
||||||
|
SpecialtyList, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
getHostipalDict() { |
||||||
|
wx.ajax({ |
||||||
|
method: "GET", |
||||||
|
url: "?r=takeda/reg/hospital-dict", |
||||||
|
data: {}, |
||||||
|
}).then((res) => { |
||||||
|
this.setData({ |
||||||
|
hospitalClassification: res.hospitalClassification, |
||||||
|
hospitalLevel: res.hospitalLevel, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
getArea() { |
||||||
|
wx.ajax({ |
||||||
|
method: "GET", |
||||||
|
url: "/js/area.json", |
||||||
|
isJSON: true, |
||||||
|
}).then((res) => { |
||||||
|
this.setData({ |
||||||
|
area: res, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleSearch() { |
||||||
|
this.setData({ |
||||||
|
list: [], |
||||||
|
}); |
||||||
|
this.getList(); |
||||||
|
}, |
||||||
|
getList() { |
||||||
|
const { search, hospitalId, provinceId, cityId, countyId, specialtyId } = this.data; |
||||||
|
wx.ajax({ |
||||||
|
method: "GET", |
||||||
|
url: "?r=takeda/case/get-invite-doctor-list", |
||||||
|
data: { |
||||||
|
search, |
||||||
|
hospitalId, |
||||||
|
provinceId, |
||||||
|
cityId, |
||||||
|
countyId, |
||||||
|
specialtyId, |
||||||
|
}, |
||||||
|
}).then((res) => { |
||||||
|
this.setData({ |
||||||
|
list: res.list, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
handlePopupDetail(e) { |
||||||
|
const { index } = e.currentTarget.dataset; |
||||||
|
const { list, hospitalClassification } = this.data; |
||||||
|
const item: any = list[index]; |
||||||
|
this.setData({ |
||||||
|
showDetail: true, |
||||||
|
popupDoctorDetail: { |
||||||
|
DoctorLevel: item.doctorLevel, |
||||||
|
DoctorImg: item.doctorImg, |
||||||
|
DoctorName: item.doctorName, |
||||||
|
DoctorTitleName: item.doctorTitleName || item.doctorOtherTitle, |
||||||
|
HospitalName: item.hospitalName, |
||||||
|
HospitalClassificationName: hospitalClassification[item.HospitalClassification], |
||||||
|
HospitalLevelName: item.hospitalLevelName, |
||||||
|
CityName: item.cityName, |
||||||
|
CountyName: item.countyName, |
||||||
|
Introduce: item.doctorIntroduce, |
||||||
|
department: item.doctorDept, |
||||||
|
specialty: item.doctorSpecialty, |
||||||
|
}, |
||||||
|
}); |
||||||
|
}, |
||||||
|
handlePopupClose() { |
||||||
|
this.setData({ |
||||||
|
showDetail: false, |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleHostipal() { |
||||||
|
wx.navigateTo({ |
||||||
|
url: `/module1/pages/sHostipal/index`, |
||||||
|
events: { |
||||||
|
acceptDataFromOpenedPage: (data: any) => { |
||||||
|
this.setData({ |
||||||
|
HospitalId: data.hid, |
||||||
|
HospitalName: data.hname, |
||||||
|
}); |
||||||
|
this.handleSearch(); |
||||||
|
}, |
||||||
|
}, |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleArea() { |
||||||
|
this.setData({ |
||||||
|
showArea: true, |
||||||
|
}); |
||||||
|
}, |
||||||
|
onClose() { |
||||||
|
this.setData({ |
||||||
|
showArea: false, |
||||||
|
showResolve: false, |
||||||
|
}); |
||||||
|
}, |
||||||
|
onFinish(e: any) { |
||||||
|
this.setData({ |
||||||
|
provinceId: e.detail.selectedOptions[0].value, |
||||||
|
ProvinceName: e.detail.selectedOptions[0].label, |
||||||
|
cityId: e.detail.selectedOptions[1].value, |
||||||
|
CityName: e.detail.selectedOptions[1].label, |
||||||
|
countyId: e.detail.selectedOptions[2].value, |
||||||
|
CountyName: e.detail.selectedOptions[2].label, |
||||||
|
showArea: false, |
||||||
|
}); |
||||||
|
this.handleSearch(); |
||||||
|
}, |
||||||
|
handleSpecialChange(e: any) { |
||||||
|
const index = e.detail.value; |
||||||
|
const { SpecialtyList } = this.data; |
||||||
|
const item: any = SpecialtyList[index]; |
||||||
|
this.setData({ |
||||||
|
specialtyId: item.value, |
||||||
|
SpecialtyName: item.label, |
||||||
|
}); |
||||||
|
this.handleSearch(); |
||||||
|
}, |
||||||
|
|
||||||
|
handleRadio(e) { |
||||||
|
const { index } = e.currentTarget.dataset; |
||||||
|
const { list } = this.data; |
||||||
|
this.setData({ |
||||||
|
DoctorId: (list as any)[index].doctorId, |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleSubmit() { |
||||||
|
const { caseId, DoctorId, params, detailInvite } = this.data; |
||||||
|
if (!DoctorId) { |
||||||
|
wx.showToast({ |
||||||
|
title: "请选择指派医生", |
||||||
|
icon: "none", |
||||||
|
}); |
||||||
|
} |
||||||
|
if (detailInvite) { |
||||||
|
wx.ajax({ |
||||||
|
method: "POST", |
||||||
|
url: "?r=takeda/case/invite-doctor", |
||||||
|
data: { |
||||||
|
caseId, |
||||||
|
dealDoctorId: DoctorId, |
||||||
|
}, |
||||||
|
}).then((res) => { |
||||||
|
wx.navigateTo({ |
||||||
|
url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId}`, |
||||||
|
}); |
||||||
|
}); |
||||||
|
return; |
||||||
|
} |
||||||
|
wx.ajax({ |
||||||
|
method: "POST", |
||||||
|
url: "?r=takeda/case/create-case", |
||||||
|
data: { |
||||||
|
...params, |
||||||
|
isSubmit: 1, |
||||||
|
dealDoctorId: DoctorId, |
||||||
|
}, |
||||||
|
}).then((res) => { |
||||||
|
wx.navigateTo({ |
||||||
|
url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId}`, |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
handleBack() { |
||||||
|
wx.navigateBack(); |
||||||
|
}, |
||||||
|
}); |
||||||
|
|
||||||
|
export {}; |
@ -0,0 +1,92 @@ |
|||||||
|
<view class="page"> |
||||||
|
<view class="header"> |
||||||
|
<view class="tip">邀请医生进行病历反馈,提交后医生将收到消息提醒</view> |
||||||
|
<view class="search"> |
||||||
|
<image class="icon" src="{{imageUrl}}icon-search.png?t={{Timestamp}}"></image> |
||||||
|
<input |
||||||
|
model:value="{{search}}" |
||||||
|
class="input" |
||||||
|
placeholder-class="place-input" |
||||||
|
placeholder="搜索医生名" |
||||||
|
type="text" |
||||||
|
confirm-type="search" |
||||||
|
bindconfirm="handleSearch" |
||||||
|
/> |
||||||
|
</view> |
||||||
|
<view class="options"> |
||||||
|
<view class="option-wrap" bind:tap="handleHostipal"> |
||||||
|
<view class="option"> |
||||||
|
<text class="option-text">{{HospitalName || '医院'}}</text> |
||||||
|
<image class="icon" src="{{imageUrl}}triangle-down.png?t={{Timestamp}}"></image> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="option-wrap" bind:tap="handleArea"> |
||||||
|
<view class="option"> |
||||||
|
<text class="option-text">{{CountyName || '地区'}}</text> |
||||||
|
<image class="icon" src="{{imageUrl}}triangle-down.png?t={{Timestamp}}"></image> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<picker class="option-wrap" range="{{SpecialtyList}}" range-key="label" bindchange="handleSpecialChange"> |
||||||
|
<view class="option"> |
||||||
|
<text class="option-text">{{SpecialtyName || '医生专长'}}</text> |
||||||
|
<image class="icon" src="{{imageUrl}}triangle-down.png?t={{Timestamp}}"></image> |
||||||
|
</view> |
||||||
|
</picker> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="container"> |
||||||
|
<radio-group> |
||||||
|
<view class="list"> |
||||||
|
<view class="list-item" wx:for="{{list}}" wx:key="DoctorId"> |
||||||
|
<radio class="radio" value="{{item.DoctorId}}" bind:tap="handleRadio" data-index="{{index}}"></radio> |
||||||
|
<view class="card" bind:tap="handlePopupDetail" data-index="{{index}}"> |
||||||
|
<doctorAvatar class="avatar" src="{{item.doctorImg}}" level="{{item.doctorLevel}}"></doctorAvatar> |
||||||
|
<view class="wrap"> |
||||||
|
<view class="w-header"> |
||||||
|
<view class="name">{{item.doctorName}}</view> |
||||||
|
<view class="label">{{item.doctorTitleName || item.doctorOtherTitle}}</view> |
||||||
|
<block wx:for-item="depart" wx:for="{{item.doctorDept}}" wx:key="departmentId"> |
||||||
|
<view class="line"></view> |
||||||
|
<view class="label">{{depart.DepartmentName}}</view> |
||||||
|
</block> |
||||||
|
</view> |
||||||
|
<view class="w-container"> |
||||||
|
<text class="hostipal">{{item.hospitalName}}</text> |
||||||
|
<view class="tag">{{item.hospitalClassificationName}}{{item.hospitalLevelName}}</view> |
||||||
|
<view class="site">{{item.cityName}}/{{item.countyName}}</view> |
||||||
|
</view> |
||||||
|
<view class="w-footer"> |
||||||
|
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image> |
||||||
|
<view class="wf-tag" wx:for="{{item.doctorSpecialty}}" wx:for-item="spec" wx:key="SpecialtyId"> |
||||||
|
{{spec.SpecialtyName}} |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</radio-group> |
||||||
|
</view> |
||||||
|
<view class="footer"> |
||||||
|
<view class="cancel" bind:tap="handleBack">返回</view> |
||||||
|
<view class="submit" bind:tap="handleSubmit">确认提交</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
|
||||||
|
<popupDoctorDetail |
||||||
|
show="{{showDetail}}" |
||||||
|
params="{{popupDoctorDetail}}" |
||||||
|
bind:close="handlePopupClose" |
||||||
|
></popupDoctorDetail> |
||||||
|
|
||||||
|
<van-popup show="{{ showArea }}" round position="bottom"> |
||||||
|
<van-cascader |
||||||
|
wx:if="{{ showArea }}" |
||||||
|
value="{{ cascaderValue }}" |
||||||
|
title="请选择所在地区" |
||||||
|
options="{{ area }}" |
||||||
|
field-names="{{fieldNames}}" |
||||||
|
bind:close="onClose" |
||||||
|
bind:finish="onFinish" |
||||||
|
/> |
||||||
|
</van-popup> |
Loading…
Reference in new issue