Browse Source

病历联调

main
kola 4 months ago
parent
commit
6f2c56f738
  1. 14
      project.private.config.json
  2. BIN
      src/images/case-detail-footer-icon10.png
  3. BIN
      src/images/case-detail-footer-icon8.png
  4. BIN
      src/images/case-detail-footer-icon9.png
  5. BIN
      src/images/new.png
  6. 117
      src/module1/pages/casesDetail/index.scss
  7. 273
      src/module1/pages/casesDetail/index.ts
  8. 279
      src/module1/pages/casesDetail/index.wxml
  9. 45
      src/module1/pages/casesFeedback/index.scss
  10. 79
      src/module1/pages/casesFeedback/index.ts
  11. 19
      src/module1/pages/casesFeedback/index.wxml
  12. 39
      src/module1/pages/entryCases/index.ts
  13. 32
      src/module1/pages/setCaseDoctor/index.ts

14
project.private.config.json

@ -9,6 +9,13 @@ @@ -9,6 +9,13 @@
"miniprogram": {
"list": [
{
"name": "病例详情",
"pathName": "module1/pages/casesDetail/index",
"query": "id=25",
"launchMode": "default",
"scene": null
},
{
"name": "邀约码",
"pathName": "pages/start/index",
"query": "scene=doctorId%3D2%26inviteChan%3D1",
@ -72,13 +79,6 @@ @@ -72,13 +79,6 @@
"scene": null
},
{
"name": "病例详情",
"pathName": "module1/pages/casesDetail/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "录入病例结果",
"pathName": "module1/pages/entryCasesResult/index",
"query": "",

BIN
src/images/case-detail-footer-icon10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/images/case-detail-footer-icon8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
src/images/case-detail-footer-icon9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/images/new.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

117
src/module1/pages/casesDetail/index.scss

@ -175,6 +175,16 @@ page { @@ -175,6 +175,16 @@ page {
padding: 32rpx;
background-color: rgba(246, 246, 246, 1);
border-radius: 16rpx;
overflow: hidden;
max-height: 1000px;
transition: all 0.5s;
&.fold {
padding: 0;
max-height: 0;
}
> view:not(:last-of-type) {
margin-bottom: 32rpx;
}
.tags {
display: flex;
margin-bottom: 32rpx;
@ -197,6 +207,18 @@ page { @@ -197,6 +207,18 @@ page {
border: 1rpx solid #bfeff4;
}
}
.edit-tag {
margin-left: 20rpx;
font-size: 22rpx;
color: rgba(0, 180, 197, 1);
display: flex;
align-items: center;
gap: 5rpx;
.icon {
width: 32rpx;
height: 32rpx;
}
}
}
.photos {
display: grid;
@ -294,9 +316,6 @@ page { @@ -294,9 +316,6 @@ page {
}
}
}
> view:not(:last-of-type) {
margin-bottom: 32rpx;
}
}
}
.feedback-card {
@ -440,30 +459,17 @@ page { @@ -440,30 +459,17 @@ page {
padding: 32rpx;
background-color: rgba(246, 246, 246, 1);
border-radius: 16rpx;
.tags {
display: flex;
.t-label {
width: 3em;
font-size: 28rpx;
color: rgba(153, 153, 153, 1);
}
.wrap {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
.tag {
padding: 0 8rpx;
font-size: 22rpx;
color: rgba(0, 180, 197, 1);
line-height: 32rpx;
background: #ffffff;
border-radius: 4rpx 4rpx 4rpx 4rpx;
border: 1rpx solid #bfeff4;
}
}
overflow: hidden;
max-height: 1000px;
transition: all 0.5s;
&.fold {
padding: 0;
max-height: 0;
}
> view:not(:last-of-type) {
margin-bottom: 32rpx;
}
.photos {
margin-top: 32rpx;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12rpx;
@ -474,7 +480,6 @@ page { @@ -474,7 +480,6 @@ page {
}
}
.remark {
margin-top: 32rpx;
.r-title {
font-size: 32rpx;
color: rgba(20, 21, 21, 1);
@ -492,7 +497,6 @@ page { @@ -492,7 +497,6 @@ page {
}
}
.audio-list {
margin-top: 32rpx;
.audio-row {
display: flex;
gap: 28rpx;
@ -519,7 +523,6 @@ page { @@ -519,7 +523,6 @@ page {
}
}
.files {
margin-top: 32rpx;
.f-title {
font-size: 32rpx;
color: #000;
@ -689,7 +692,14 @@ page { @@ -689,7 +692,14 @@ page {
flex-shrink: 0;
display: flex;
align-items: center;
gap: 52rpx;
justify-content: center;
gap: 30rpx;
&.all-wrap {
flex: 1;
.w-item {
flex: 1;
}
}
.w-item {
position: relative;
text-align: center;
@ -740,6 +750,47 @@ page { @@ -740,6 +750,47 @@ page {
border-color: rgba(255, 247, 232, 1) transparent transparent transparent;
}
}
.more {
position: absolute;
top: -20rpx;
transform: translateY(-100%);
background-color: #fff;
box-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.1);
border-radius: 8rpx;
.m-item {
padding: 0 24rpx;
display: flex;
align-items: center;
gap: 20rpx;
.icon {
flex-shrink: 0;
width: 36rpx;
height: 36rpx;
}
.name {
padding: 24rpx 0;
white-space: nowrap;
font-size: 28rpx;
color: rgba(20, 21, 21, 1);
}
}
.m-item:not(:first-of-type) {
.name {
border-top: 1px solid #f3f3f3;
}
}
&::after {
position: absolute;
bottom: -12rpx;
left: 20rpx;
content: "";
width: 0;
height: 0;
border-style: solid;
border-width: 27rpx 27rpx 0 27rpx;
border-color: #fff transparent transparent transparent;
}
}
}
}
.btn-wrap {
@ -852,7 +903,7 @@ page { @@ -852,7 +903,7 @@ page {
.container {
padding: 160rpx 48rpx 48rpx;
background-color: #fff;
border-radius: 16rpx 16rpx 0 0;
border-radius: 36rpx 36rpx 0 0;
margin-top: -126rpx;
background: linear-gradient(180deg, #e5f5f7 0%, #ffffff 39%, #ffffff 100%);
.title {
@ -882,7 +933,7 @@ page { @@ -882,7 +933,7 @@ page {
.container {
padding: 160rpx 48rpx 48rpx;
background-color: #fff;
border-radius: 16rpx 16rpx 0 0;
border-radius: 36rpx 36rpx 0 0;
margin-top: -126rpx;
background: linear-gradient(180deg, #e5f5f7 0%, #ffffff 39%, #ffffff 100%);
.title {
@ -912,7 +963,7 @@ page { @@ -912,7 +963,7 @@ page {
.container {
padding: 160rpx 48rpx 48rpx;
background-color: #fff;
border-radius: 16rpx 16rpx 0 0;
border-radius: 36rpx 36rpx 0 0;
margin-top: -126rpx;
background: linear-gradient(180deg, #fff0ee 0%, #ffffff 39%, #ffffff 100%);
.title {
@ -942,7 +993,7 @@ page { @@ -942,7 +993,7 @@ page {
.container {
padding: 160rpx 48rpx 48rpx;
background-color: #fff;
border-radius: 16rpx 16rpx 0 0;
border-radius: 36rpx 36rpx 0 0;
margin-top: -126rpx;
background: linear-gradient(180deg, #fff0ee 0%, #ffffff 39%, #ffffff 100%);
.title {

273
src/module1/pages/casesDetail/index.ts

@ -11,6 +11,10 @@ Page({ @@ -11,6 +11,10 @@ Page({
show7: false, // 更改标签
showRejectReason: false,
more: false,
moreShow: false,
showMoreAuth: 0,
foldAuth: {},
deptList: [] as any,
labelList: [] as any,
@ -33,13 +37,35 @@ Page({ @@ -33,13 +37,35 @@ Page({
caseAudios: {},
caseFiles: {},
feedbackList: [],
},
} as any,
rejectReason: {},
fold: false,
},
onLoad(options) {
this.setData({
id: options.id,
beforeClose2: (e: any) => {
if (e === "confirm") {
this.handleQualitySubmit();
}
return true;
},
beforeClose3: (e: any) => {
if (e === "confirm") {
this.handleArchiveSubmit();
}
return true;
},
beforeClose5: (e: any) => {
if (e === "confirm") {
this.handleUnArchiveSubmit();
}
return true;
},
});
},
onShow() {
app.waitLogin().then(() => {
this.handleResoure();
this.getDoctorDict();
@ -63,6 +89,16 @@ Page({ @@ -63,6 +89,16 @@ Page({
dealDoctorInfo: res.dealCaseInfo.dealDoctorInfo,
dealInfo: res.dealCaseInfo.dealInfo,
});
this.readFeedback();
});
},
readFeedback() {
wx.ajax({
method: "POST",
url: "?r=takeda/case/read-feedback",
data: {
caseId: this.data.id,
},
});
},
getAuth() {
@ -71,8 +107,37 @@ Page({ @@ -71,8 +107,37 @@ Page({
url: "?r=takeda/case/get-case-detail-op-auth",
data: { caseId: this.data.id },
}).then((res) => {
let showMoreAuth = 0;
const moreAuth = [
"canReject",
"canViewRejectReason",
"canCreateChatRoom",
"canArchive",
"canCancelArchive",
"canEnterChatRoom",
"canSetHighQuality",
"canInvite",
"canDel",
"canEdit",
"canSetOpen",
];
const foldAuth: any = {};
moreAuth.forEach((item) => {
if (res[item]) {
showMoreAuth += 1;
if (showMoreAuth > 2) {
foldAuth[item] = true;
}
}
});
this.setData({
auth: res,
foldAuth,
showMoreAuth,
more: Boolean(Object.keys(foldAuth).length),
});
if (res.canViewRejectReason) {
this.getRejectReason();
@ -183,6 +248,55 @@ Page({ @@ -183,6 +248,55 @@ Page({
});
},
handlePreviewFile(e) {
const { item } = e.currentTarget.dataset;
wx.downloadFile({
url: item.url,
success(res) {
wx.openDocument({
filePath: res.tempFilePath,
showMenu: true,
fail() {
wx.showToast({
title: "该文件无法预览",
icon: "none",
});
},
});
},
});
},
handleDownloadFile(e) {
const { item } = e.currentTarget.dataset;
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({
icon: "none",
title: "保存成功",
});
},
fail() {
wx.showToast({
title: "下载失败,请重新尝试",
icon: "none",
mask: true,
});
},
});
}
},
});
},
handleInvite() {
wx.navigateTo({
url: `/module1/pages/setCaseDoctor/index`,
@ -194,12 +308,167 @@ Page({ @@ -194,12 +308,167 @@ Page({
},
});
},
handleFeedBack() {
wx.navigateTo({
url: `/module1/pages/casesFeedback/index?id=${this.data.id}`,
});
},
handleToggleMore() {
this.setData({
moreShow: !this.data.moreShow,
});
},
handleArchive() {
this.setData({
show3: true,
});
},
handleArchiveSubmit() {
const { id } = this.data;
wx.ajax({
method: "POST",
url: "?r=takeda/case/archive-case",
data: {
caseId: id,
},
}).then(() => {
this.handleResoure();
});
},
handleUnArchive() {
this.setData({
show5: true,
});
},
handleUnArchiveSubmit() {
const { id } = this.data;
wx.ajax({
method: "POST",
url: "?r=takeda/case/cancel-archive-case",
data: {
caseId: id,
},
}).then(() => {
this.handleResoure();
});
},
handleOpen() {
const { detail, id } = this.data;
const isOpen = detail.isOpen === "1";
wx.showModal({
title: `确认${isOpen ? "取消公开" : "公开"}?`,
success: (res) => {
if (res.confirm) {
wx.ajax({
method: "POST",
url: "?r=takeda/case/set-open",
data: {
caseId: id,
},
}).then(() => {
this.handleResoure();
});
}
},
});
},
handleQuality() {
const { detail } = this.data;
const isHighQuality = detail.isHighQuality === "1";
if (isHighQuality) {
this.setData({
show4: true,
});
} else {
this.setData({
show2: true,
});
}
},
handleQualitySubmit() {
const { id } = this.data;
wx.ajax({
method: "POST",
url: "?r=takeda/case/set-high-quality",
data: {
caseId: id,
},
}).then(() => {
this.handleResoure();
});
},
handleDel() {
const { id } = this.data;
wx.showModal({
title: `确认删除?`,
success: (res) => {
if (res.confirm) {
wx.ajax({
method: "POST",
url: "?r=takeda/case/delete-case",
data: {
caseId: id,
},
}).then(() => {
wx.reLaunch({
url: "/pages/cases/index",
});
});
}
},
});
},
handleEdit() {
wx.navigateTo({
url: `/module1/pages/entryCases/index?id=${this.data.id}`,
});
},
handleDelFeedBack(e) {
const { index } = e.currentTarget.dataset;
const { detail } = this.data;
const item = detail.feedbackList[index];
wx.showModal({
title: `确认删除该反馈?`,
success: (res) => {
if (res.confirm) {
wx.ajax({
method: "POST",
url: "?r=takeda/case/delete-feedback",
data: {
feedbackId: item.feedbackId,
},
}).then(() => {
this.handleResoure();
});
}
},
});
},
handleFold() {
this.setData({
fold: !this.data.fold,
});
},
handleFeedBackFold(e) {
const { index } = e.currentTarget.dataset;
const { detail } = this.data;
const feedbackList = detail.feedbackList;
feedbackList[index].fold = !feedbackList[index].fold;
this.setData({
detail: {
...detail,
feedbackList,
},
});
},
});
export {};

279
src/module1/pages/casesDetail/index.wxml

@ -10,9 +10,9 @@ @@ -10,9 +10,9 @@
<view class="status status1" wx:elif="{{detail.caseStatus==='4'}}">{{detail.caseStatusName}}</view>
<view class="status status3" wx:if="{{detail.isOpen==='1'}}">已公开</view>
</view>
<view class="fold">
收起
<image class="icon" src="{{imageUrl}}fold-down.png?t={{Timestamp}}"></image>
<view class="fold" bind:tap="handleFold">
{{fold ? '展开' : '收起'}}
<image class="icon" src="{{imageUrl}}fold-{{fold ? 'down' :'up'}}.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="li-row">
@ -41,13 +41,16 @@ @@ -41,13 +41,16 @@
</view>
</view>
</view>
<view class="cases">
<view class="cases {{fold && 'fold'}}">
<view class="tags" wx:if="{{detail.caseLabels.length}}">
<view class="t-label">标签</view>
<view class="wrap">
<view class="tag" wx:for="{{detail.caseLabels}}" wx:key="labelId">{{item.labelName}}</view>
</view>
<view wx:if="{{auth.canEditLabel}}" bind:tap="handleShowLable">编辑标签</view>
<view class="edit-tag" wx:if="{{auth.canEditLabel}}" bind:tap="handleShowLable">
<image class="icon" src="{{imageUrl}}icon-edit.png?t={{Timestamp}}"></image>
修改
</view>
</view>
<view class="photos">
<image
@ -81,8 +84,18 @@ @@ -81,8 +84,18 @@
<view class="name">{{item.name}}</view>
</view>
<view class="option">
<image class="icon" src="{{imageUrl}}icon-eye.png?t={{Timestamp}}"></image>
<image class="icon" src="{{imageUrl}}icon-download.png?t={{Timestamp}}"></image>
<image
class="icon"
bind:tap="handlePreviewFile"
data-item="{{item}}"
src="{{imageUrl}}icon-eye.png?t={{Timestamp}}"
></image>
<image
bind:tap="handleDownloadFile"
data-item="{{item}}"
class="icon"
src="{{imageUrl}}icon-download.png?t={{Timestamp}}"
></image>
</view>
</view>
</view>
@ -92,76 +105,88 @@ @@ -92,76 +105,88 @@
<view class="feedback-card" wx:for="{{detail.feedbackList}}" wx:key="index">
<view class="li-options">
<image class="quality" src="{{imageUrl}}new.png?t={{Timestamp}}" mode="scaleToFill"></image>
<image class="gather" src="{{imageUrl}}icon-gather.png?t={{Timestamp}}"></image>
<image
wx:if="{{item.canDel===1}}"
class="gather"
src="{{imageUrl}}icon-gather.png?t={{Timestamp}}"
bind:tap="handleDelFeedBack"
data-index="{{index}}"
></image>
</view>
<view class="li-row">
<view class="label">提交时间</view>
<view class="content">2024-02-09 12:04:23</view>
<view class="fold">
收起
<image class="icon" src="{{imageUrl}}fold-down.png?t={{Timestamp}}"></image>
<view class="content">{{item.createTime}}</view>
<view class="fold" bind:tap="handleFeedBackFold" data-index="{{index}}">
{{item.fold ? '展开' : '收起'}}
<image class="icon" src="{{imageUrl}}fold-{{item.fold ? 'down' :'up'}}.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="user">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
src="{{item.createDoctorInfo.doctorImg}}"
level="{{item.createDoctorInfo.doctorLevel}}"
></doctorAvatar>
<view class="wrap">
<view class="w-header">
<view class="name">徐萌</view>
<view class="desc">主治医师</view>
<view class="name">{{item.createDoctorInfo.doctorName}}</view>
<view class="desc">{{item.createDoctorInfo.doctorTitleName || item.createDoctorInfo.doctorOtherTitle}}</view>
</view>
<view class="w-footer">
<view class="hostipal">北京天坛医院</view>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
<view class="hostipal">{{item.hospitalName}}</view>
<view class="tag">
{{item.createDoctorInfo.hospitalClassificationName}}{{item.createDoctorInfo.hospitalLevelName}}
</view>
<view class="site">{{item.createDoctorInfo.cityName}}/{{item.createDoctorInfo.countyName}}</view>
</view>
</view>
</view>
<view class="cases">
<view class="tags">
<view class="t-label">标签</view>
<view class="wrap">
<view class="tag">心律失常</view>
<view class="tag">心衰</view>
<view class="cases {{item.fold && 'fold'}}">
<view class="remark" wx:if="{{item.info}}">
<view class="r-title">对病例的标注</view>
<view class="r-content">{{item.info}}</view>
</view>
<view class="audio-list" wx:if="{{item.feedbackAudios.length}}">
<view class="audio-row" wx:for="{{item.feedbackAudios}}" wx:key="url" wx:for-item="aItem">
<customAudioBar class="audio-bar" url="{{aItem.url}}" time="{{aItem.duration}}"></customAudioBar>
<view class="options">
<view class="trans">转文字</view>
</view>
</view>
</view>
<view class="photos">
<view class="photos" wx:if="{{item.feedbackImages.length}}">
<image
class="photo"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
src="{{cItem.url}}"
mode="aspectFill"
bind:tap="handleImagePreview"
data-url="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
data-url="{{cItem.url}}"
wx:for="{{item.feedbackImages}}"
wx:for-item="cItem"
wx:key="url"
></image>
</view>
<view class="remark">
<view class="r-title">病历备注</view>
<view class="r-content">
此患者已经做了基因检测,根据基因检测的流程判断已排除,但是其他的检测档案指向性较强,请帮忙判断
</view>
</view>
<view class="audio-list">
<view class="audio-row">
<customAudioBar class="audio-bar"></customAudioBar>
<view class="options">
<view class="trans">转文字</view>
</view>
</view>
</view>
<view class="files">
<view class="f-title">病历相关文件</view>
<view class="files" wx:if="{{item.feedbackFiles.length}}">
<view class="f-title">补充文件</view>
<view class="file-list">
<view class="fl-row">
<view class="fl-row" wx:for="{{item.feedbackFiles}}" wx:for-item="cItem" wx:key="url">
<view class="wrap">
<image class="icon" src="{{imageUrl}}icon-file.png?t={{Timestamp}}"></image>
<view class="name">基因检测报告.pdf</view>
<view class="name">{{cItem.name}}</view>
</view>
<view class="option">
<image class="icon" src="{{imageUrl}}icon-eye.png?t={{Timestamp}}"></image>
<image class="icon" src="{{imageUrl}}icon-download.png?t={{Timestamp}}"></image>
<image
class="icon"
bind:tap="handlePreviewFile"
data-item="{{cItem}}"
src="{{imageUrl}}icon-eye.png?t={{Timestamp}}"
></image>
<image
bind:tap="handleDownloadFile"
data-item="{{cItem}}"
class="icon"
src="{{imageUrl}}icon-download.png?t={{Timestamp}}"
></image>
</view>
</view>
</view>
@ -203,59 +228,113 @@ @@ -203,59 +228,113 @@
</view>
</view>
<view class="footer">
<block>
<view class="wrap">
<view class="w-item" wx:if="{{auth.canReject}}">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon1.png?t={{Timestamp}}"></image>
<view class="name">驳回</view>
</view>
<view class="w-item" wx:if="{{auth.canViewRejectReason}}" bind:tap="handleShowRejectReason">
<view class="tip" wx:if="{{showRejectReason}}">
<view class="t-header">
<view class="title">{{rejectReason.doctorName}}医生驳回了您的病历</view>
<view class="date">{{rejectReason.rejectTime}}</view>
</view>
<view class="content">原因:{{rejectReason.remark}}</view>
<view class="wrap {{!auth.canFeedback && 'all-wrap'}}" wx:if="{{showMoreAuth>0}}">
<view class="w-item" wx:if="{{more}}" bind:tap="handleToggleMore">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon3.png?t={{Timestamp}}"></image>
<view class="name">更多操作</view>
<view class="more" wx:if="{{moreShow}}">
<view class="m-item" wx:if="{{auth.canCreateChatRoom && foldAuth.canCreateChatRoom}}">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon2.png?t={{Timestamp}}"></image>
<view class="name">创建聊天室</view>
</view>
<view class="m-item" wx:if="{{auth.canEnterChatRoom && foldAuth.canCreateChatRoom}}">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon2.png?t={{Timestamp}}"></image>
<view class="name">进入聊天室</view>
</view>
<view class="m-item" wx:if="{{auth.canArchive && foldAuth.canArchive}}" bind:tap="handleArchive">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon4.png?t={{Timestamp}}"></image>
<view class="name">归档</view>
</view>
<view
class="m-item"
wx:if="{{auth.canCancelArchive && foldAuth.canCancelArchive}}"
bind:tap="handleUnArchive"
>
<image class="icon" src="{{imageUrl}}case-detail-footer-icon4.png?t={{Timestamp}}"></image>
<view class="name">取消归档</view>
</view>
<view
class="m-item"
wx:if="{{auth.canSetHighQuality && foldAuth.canSetHighQuality}}"
bind:tap="handleQuality"
>
<image class="icon" src="{{imageUrl}}case-detail-footer-icon6.png?t={{Timestamp}}"></image>
<view class="name">{{detail.isHighQuality==='1'?'取消优质':'标为优质'}}</view>
</view>
<view class="m-item" wx:if="{{auth.canInvite && foldAuth.canInvite}}" bind:tap="handleInvite">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon9.png?t={{Timestamp}}"></image>
<view class="name">邀约上级</view>
</view>
<view class="m-item" wx:if="{{auth.canDel && foldAuth.canDel}}" bind:tap="handleDel">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon10.png?t={{Timestamp}}"></image>
<view class="name">删除</view>
</view>
<view class="m-item" wx:if="{{auth.canEdit && foldAuth.canEdit}}" bind:tap="handleEdit">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon8.png?t={{Timestamp}}"></image>
<view class="name">编辑</view>
</view>
<view class="m-item" wx:if="{{auth.canSetOpen && foldAuth.canSetOpen}}" bind:tap="handleOpen">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon8.png?t={{Timestamp}}"></image>
<view class="name">{{detail.isOpen==='1'?'取消公开':'公开'}}</view>
</view>
<image class="icon" src="{{imageUrl}}case-detail-footer-icon1.png?t={{Timestamp}}"></image>
<view class="name">驳回原因</view>
</view>
<view class="w-item" wx:if="{{auth.canCreateChatRoom}}">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon2.png?t={{Timestamp}}"></image>
<view class="name">创建聊天室</view>
</view>
<view class="w-item" wx:if="{{auth.canArchive}}">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon5.png?t={{Timestamp}}"></image>
<view class="name">归档</view>
</view>
<view class="w-item" wx:if="{{auth.canEnterChatRoom}}">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon6.png?t={{Timestamp}}"></image>
<view class="name">进入聊天室</view>
</view>
<view class="w-item" wx:if="{{auth.canSetHighQuality}}">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon7.png?t={{Timestamp}}"></image>
<view class="name">标为优质</view>
</view>
<view class="w-item" wx:if="{{auth.canInvite}}" bind:tap="handleInvite">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon7.png?t={{Timestamp}}"></image>
<view class="name">邀约上级</view>
</view>
<view class="w-item" wx:if="{{ auth.canReject }}">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon1.png?t={{Timestamp}}"></image>
<view class="name">驳回</view>
</view>
<view class="w-item" wx:if="{{ auth.canViewRejectReason }}" bind:tap="handleShowRejectReason">
<view class="tip" wx:if="{{showRejectReason}}">
<view class="t-header">
<view class="title">{{rejectReason.doctorName}}医生驳回了您的病历</view>
<view class="date">{{rejectReason.rejectTime}}</view>
</view>
<view class="content">原因:{{rejectReason.remark}}</view>
</view>
<!-- <view class="w-item"> -->
<!-- <image class="icon" src="{{imageUrl}}case-detail-footer-icon4.png?t={{Timestamp}}"></image> -->
<!-- <view class="name">更多操作</view> -->
<!-- </view> -->
<image class="icon" src="{{imageUrl}}case-detail-footer-icon1.png?t={{Timestamp}}"></image>
<view class="name">驳回原因</view>
</view>
<view class="btn-wrap">
<view class="btn1" wx:if="{{auth.canFeedback}}" bind:tap="handleFeedBack">提交反馈</view>
<view class="w-item" wx:if="{{auth.canCreateChatRoom && !foldAuth.canCreateChatRoom}}">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon2.png?t={{Timestamp}}"></image>
<view class="name">创建聊天室</view>
</view>
<view class="w-item" wx:if="{{auth.canEnterChatRoom && !foldAuth.canCreateChatRoom}}">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon2.png?t={{Timestamp}}"></image>
<view class="name">进入聊天室</view>
</view>
<view class="w-item" wx:if="{{auth.canArchive && !foldAuth.canArchive}}" bind:tap="handleArchive">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon4.png?t={{Timestamp}}"></image>
<view class="name">归档</view>
</view>
</block>
<!-- <view class="one-wrap"> -->
<!-- <view class="content">{{rejectReason.reasonName}}:{{rejectReason.remark}}</view> -->
<!-- </view> -->
<!-- <view class="cancel">驳回记录</view> -->
<!-- <view class="sure">提交</view> -->
<!-- </view> -->
<view class="w-item" wx:if="{{auth.canCancelArchive && !foldAuth.canCancelArchive}}" bind:tap="handleUnArchive">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon4.png?t={{Timestamp}}"></image>
<view class="name">取消归档</view>
</view>
<view class="w-item" wx:if="{{auth.canSetHighQuality && !foldAuth.canSetHighQuality}}" bind:tap="handleQuality">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon6.png?t={{Timestamp}}"></image>
<view class="name">{{detail.isHighQuality==='1'?'取消优质':'标为优质'}}</view>
</view>
<view class="w-item" wx:if="{{auth.canInvite && !foldAuth.canInvite}}" bind:tap="handleInvite">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon9.png?t={{Timestamp}}"></image>
<view class="name">邀约上级</view>
</view>
<view class="w-item" wx:if="{{auth.canDel && !foldAuth.canDel}}" bind:tap="handleDel">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon10.png?t={{Timestamp}}"></image>
<view class="name">删除</view>
</view>
<view class="w-item" wx:if="{{auth.canEdit && !foldAuth.canEdit}}" bind:tap="handleEdit">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon8.png?t={{Timestamp}}"></image>
<view class="name">编辑</view>
</view>
<view class="w-item" wx:if="{{auth.canSetOpen && !foldAuth.canSetOpen}}" bind:tap="handleOpen">
<image class="icon" src="{{imageUrl}}case-detail-footer-icon8.png?t={{Timestamp}}"></image>
<view class="name">{{detail.isOpen==='1'?'公开':'取消公开'}}</view>
</view>
</view>
<view class="btn-wrap" wx:if="{{auth.canFeedback}}">
<view class="btn1" bind:tap="handleFeedBack">提交反馈</view>
</view>
</view>
</view>
@ -287,9 +366,9 @@ @@ -287,9 +366,9 @@
title=""
show="{{ show2 }}"
show-cancel-button
bind:close="onClose"
confirm-button-color="rgba(0, 180, 197, 1)"
custom-style="background:transparent"
beforeClose="{{beforeClose2}}"
>
<view class="dialog2">
<image class="badge" src="{{imageUrl}}case-detail-dialog1.png?t={{Timestamp}}"></image>
@ -304,9 +383,9 @@ @@ -304,9 +383,9 @@
title=""
show="{{ show3 }}"
show-cancel-button
bind:close="onClose"
confirm-button-color="rgba(0, 180, 197, 1)"
custom-style="background:transparent"
beforeClose="{{beforeClose3}}"
>
<view class="dialog3">
<image class="badge" src="{{imageUrl}}case-detail-dialog2.png?t={{Timestamp}}"></image>
@ -321,9 +400,9 @@ @@ -321,9 +400,9 @@
title=""
show="{{ show4 }}"
show-cancel-button
bind:close="onClose"
confirm-button-color="rgba(0, 180, 197, 1)"
custom-style="background:transparent"
beforeClose="{{beforeClose2}}"
>
<view class="dialog4">
<image class="badge" src="{{imageUrl}}case-detail-dialog3.png?t={{Timestamp}}"></image>
@ -338,9 +417,9 @@ @@ -338,9 +417,9 @@
title=""
show="{{ show5 }}"
show-cancel-button
bind:close="onClose"
confirm-button-color="rgba(0, 180, 197, 1)"
custom-style="background:transparent"
beforeClose="{{beforeClose5}}"
>
<view class="dialog5">
<image class="badge" src="{{imageUrl}}case-detail-dialog4.png?t={{Timestamp}}"></image>

45
src/module1/pages/casesFeedback/index.scss

@ -466,3 +466,48 @@ page { @@ -466,3 +466,48 @@ page {
}
}
}
.popup1 {
padding: 64rpx 52rpx 34rpx;
width: 580rpx;
box-sizing: border-box;
.title {
font-size: 36rpx;
color: rgba(29, 33, 41, 1);
font-weight: bold;
line-height: 56rpx;
text-align: center;
}
.btn1 {
margin-top: 24rpx;
padding: 14rpx;
font-size: 32rpx;
color: #fff;
line-height: 44rpx;
text-align: center;
background: linear-gradient(90deg, #00b4c5 0%, #54e2b4 100%);
border-radius: 60rpx 60rpx 60rpx 60rpx;
}
.btn2 {
margin-top: 24rpx;
padding: 12rpx 14rpx;
font-size: 32rpx;
color: rgba(1, 180, 197, 1);
line-height: 44rpx;
text-align: center;
border: 1px solid rgba(1, 180, 197, 1);
border-radius: 60rpx 60rpx 60rpx 60rpx;
}
.public {
margin-top: 32rpx;
.radio {
font-size: 28rpx;
color: rgba(153, 153, 153, 1);
.wx-radio-input {
flex-shrink: 0;
align-self: self-start;
transform: scale(0.7);
}
}
}
}

79
src/module1/pages/casesFeedback/index.ts

@ -3,8 +3,9 @@ const app = getApp<IAppOption>(); @@ -3,8 +3,9 @@ const app = getApp<IAppOption>();
Page({
data: {
show1: false,
show2: false,
isOpen: 2,
caseId: "",
images: [] as any,
info: "",
audios: [] as any,
@ -12,7 +13,10 @@ Page({ @@ -12,7 +13,10 @@ Page({
DoctorLevel: 1,
},
onLoad() {
onLoad(options) {
this.setData({
caseId: options.id,
});
app.waitLogin().then(() => {
app.getUserInfo(this, (res) => {
this.setData({
@ -133,66 +137,67 @@ Page({ @@ -133,66 +137,67 @@ Page({
},
formatParams() {
const { images, info, audios, files } = this.data;
return {
images: JSON.stringify(images),
info,
audios: JSON.stringify(audios),
files: JSON.stringify(files),
};
return { images: JSON.stringify(images), info, audios: JSON.stringify(audios), files: JSON.stringify(files) };
},
onClose() {
this.setData({
show1: false,
});
},
handleCache() {
handleTogleOpen() {
this.setData({
isOpen: this.data.isOpen === 1 ? 2 : 1,
});
},
handleSave() {
const { images, audios, files, info } = this.data;
if (images.length === 0 && audios.length === 0 && files.length === 0 && !info) {
wx.showToast({
title: "请填写或上传反馈信息",
icon: "none",
});
return;
}
this.setData({
show1: true,
});
},
handleBack() {
wx.navigateBack();
},
handleSubmit() {
const { caseId, isOpen } = this.data;
const params = this.formatParams();
wx.ajax({
method: "POST",
url: "?r=takeda/case/create-case",
url: "?r=takeda/case/add-feedback",
data: {
...params,
isSubmit: 2,
caseId,
isOpen,
},
}).then(() => {
wx.navigateBack();
});
},
handleInvite() {
const { caseId, isOpen } = this.data;
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) {
success: (res) => {
res.eventChannel.emit("acceptDataFromOpenerPage", {
params,
params: {
...params,
isOpen,
},
caseId,
feedBackInvite: true,
});
},
});
},
handleSave() {},
handleSubmit() {},
handleBack() {
wx.showModal({
title: "您的病历还未保存,是否要存为草稿?",
confirmText: "存为草稿",
cancelColor: "退出",
success: (res) => {
if (res.confirm) {
this.handleCache();
} else {
wx.navigateBack();
}
},
});
},
});
export {};

19
src/module1/pages/casesFeedback/index.wxml

@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
</view>
</view>
<view class="card">
<view class="card-title required">
<view class="card-title">
上传图片建议
<text class="limit">(0/9)</text>
</view>
@ -95,7 +95,20 @@ @@ -95,7 +95,20 @@
</view>
</view>
<view class="footer">
<view class="cancel" bind:tap="handleCache">返回</view>
<view class="submit">保存并提交</view>
<view class="cancel" bind:tap="handleBack">返回</view>
<view class="submit" bind:tap="handleSave">保存并提交</view>
</view>
</view>
<van-popup show="{{ show1 }}" bind:close="onClose" round closeable>
<view class="popup1">
<view class="title">确认提交您的反馈信息</view>
<view class="btn1" bind:tap="handleSubmit">直接提交我的反馈信息</view>
<view class="btn2" bind:tap="handleInvite">提交并邀约质控医生</view>
<view class="public">
<radio class="radio" checked="{{isOpen===1}}" bind:tap="handleTogleOpen">
病例公开(选择公开后,本科室医生均查看病例)
</radio>
</view>
</view>
</van-popup>

39
src/module1/pages/entryCases/index.ts

@ -18,8 +18,10 @@ Page({ @@ -18,8 +18,10 @@ Page({
labelIds: [] as any,
DoctorLevel: 1,
caseId: "",
},
onLoad() {
onLoad(options) {
app.waitLogin().then(() => {
this.getDoctorDict();
this.getInviteDoctorList();
@ -28,6 +30,30 @@ Page({ @@ -28,6 +30,30 @@ Page({
DoctorLevel: res.DoctorLevel,
});
});
if (options.id) {
this.setData({
caseId: options.id,
});
this.getDetail();
}
});
},
getDetail() {
wx.ajax({
method: "GET",
url: "?r=takeda/case/get-case-detail",
data: {
caseId: this.data.caseId,
},
}).then((res) => {
this.setData({
images: res.caseImages,
description: res.description,
audios: res.caseAudios,
files: res.caseFiles,
deptId: res.deptId,
labelIds: res.caseLabels.map((item) => item.labelId),
});
});
},
getDoctorDict() {
@ -121,6 +147,7 @@ Page({ @@ -121,6 +147,7 @@ Page({
success(res) {
wx.openDocument({
filePath: res.tempFilePath,
showMenu: true,
fail() {
wx.showToast({
title: "该文件无法预览",
@ -198,13 +225,16 @@ Page({ @@ -198,13 +225,16 @@ Page({
});
},
handleCache() {
const { caseId } = this.data;
const params = this.formatParams();
const url = caseId ? "?r=takeda/case/save-case" : "?r=takeda/case/create-case";
wx.ajax({
method: "POST",
url: "?r=takeda/case/create-case",
url,
data: {
...params,
isSubmit: 2,
isSubmit: 0,
caseId,
},
}).then(() => {
wx.navigateBack();
@ -222,8 +252,9 @@ Page({ @@ -222,8 +252,9 @@ Page({
}
wx.navigateTo({
url: `/module1/pages/setCaseDoctor/index`,
success(res) {
success: (res) => {
res.eventChannel.emit("acceptDataFromOpenerPage", {
caseId: this.data.caseId,
params,
});
},

32
src/module1/pages/setCaseDoctor/index.ts

@ -38,6 +38,7 @@ Page({ @@ -38,6 +38,7 @@ Page({
caseId: "",
detailInvite: false,
feedBackInvite: false,
},
onLoad(options) {
if (options.hid) {
@ -52,6 +53,7 @@ Page({ @@ -52,6 +53,7 @@ Page({
params: data.params,
caseId: data.caseId,
detailInvite: data.detailInvite,
feedBackInvite: data.feedBackInvite,
});
});
app.waitLogin().then(() => {
@ -208,39 +210,53 @@ Page({ @@ -208,39 +210,53 @@ Page({
});
},
handleSubmit() {
const { caseId, DoctorId, params, detailInvite } = this.data;
const { feedBackInvite, caseId, DoctorId, params, detailInvite } = this.data;
if (!DoctorId) {
wx.showToast({
title: "请选择指派医生",
icon: "none",
});
}
if (detailInvite) {
if (feedBackInvite) {
wx.ajax({
method: "POST",
url: "?r=takeda/case/invite-doctor",
url: "?r=takeda/case/add-feedback",
data: {
caseId,
dealDoctorId: DoctorId,
...params,
},
}).then((res) => {
wx.navigateTo({
url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId}`,
}).then(() => {
wx.redirectTo({
url: `/module1/pages/casesDetail/index?id=${caseId}`,
});
});
return;
}
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;
}
const url = caseId ? "?r=takeda/case/save-case" : "?r=takeda/case/create-case";
wx.ajax({
method: "POST",
url: "?r=takeda/case/create-case",
url,
data: {
...params,
caseId,
isSubmit: 1,
dealDoctorId: DoctorId,
},
}).then((res) => {
wx.navigateTo({
url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId}`,
url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}`,
});
});
},

Loading…
Cancel
Save