Browse Source

录入病例自定义返回

dev
kola-web 2 months ago
parent
commit
36c8cd7f31
  1. 5
      src/module1/pages/casesDetail/index.ts
  2. 9
      src/module1/pages/casesFeedback/index.ts
  3. 2
      src/module1/pages/chatRoom/index.ts
  4. 2
      src/module1/pages/entryCasesResult/index.scss
  5. 47
      src/module1/pages/entryCasesResult/index.ts
  6. 13
      src/module1/pages/entryCasesResult/index.wxml
  7. 10
      src/module1/pages/setCaseDoctor/index.ts

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

@ -24,6 +24,7 @@ Page({
labelIds: [] as any, labelIds: [] as any,
id: "", id: "",
rid: "",
auth: {}, auth: {},
userInfo: {}, userInfo: {},
dealDoctorInfo: {}, dealDoctorInfo: {},
@ -49,6 +50,7 @@ Page({
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
id: options.id, id: options.id,
rid: options.rid,
beforeClose1: (e: any) => { beforeClose1: (e: any) => {
if (e === "confirm") { if (e === "confirm") {
if (!this.data.remark) { if (!this.data.remark) {
@ -355,6 +357,7 @@ Page({
success: (res) => { success: (res) => {
res.eventChannel.emit("acceptDataFromOpenerPage", { res.eventChannel.emit("acceptDataFromOpenerPage", {
caseId: this.data.id, caseId: this.data.id,
rid: this.data.rid,
detailInvite: true, detailInvite: true,
}); });
}, },
@ -362,7 +365,7 @@ Page({
}, },
handleFeedBack() { handleFeedBack() {
wx.navigateTo({ wx.navigateTo({
url: `/module1/pages/casesFeedback/index?id=${this.data.id}`, url: `/module1/pages/casesFeedback/index?id=${this.data.id}&rid=${this.data.rid}`,
}); });
}, },
handleToggleMore() { handleToggleMore() {

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

@ -2,6 +2,7 @@ const app = getApp<IAppOption>();
Page({ Page({
data: { data: {
rid: "",
show1: false, show1: false,
isOpen: 2, isOpen: 2,
@ -20,6 +21,7 @@ Page({
onLoad(options) { onLoad(options) {
this.setData({ this.setData({
caseId: options.id, caseId: options.id,
rid: options.rid,
}); });
app.waitLogin().then(() => { app.waitLogin().then(() => {
this.getCache(); this.getCache();
@ -264,7 +266,7 @@ Page({
wx.navigateBack(); wx.navigateBack();
}, },
handleSubmit() { handleSubmit() {
const { caseId, isOpen } = this.data; const { caseId, isOpen, rid } = this.data;
const params = this.formatParams(); const params = this.formatParams();
wx.ajax({ wx.ajax({
method: "POST", method: "POST",
@ -276,12 +278,12 @@ Page({
}, },
}).then((res) => { }).then((res) => {
wx.reLaunch({ wx.reLaunch({
url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}`, url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}&rid=${rid}`,
}); });
}); });
}, },
handleInvite() { handleInvite() {
const { caseId, isOpen } = this.data; const { caseId, isOpen, rid } = this.data;
const params = this.formatParams(); const params = this.formatParams();
wx.navigateTo({ wx.navigateTo({
url: `/module1/pages/setCaseDoctor/index`, url: `/module1/pages/setCaseDoctor/index`,
@ -292,6 +294,7 @@ Page({
isOpen, isOpen,
}, },
caseId, caseId,
rid,
feedBackInvite: true, feedBackInvite: true,
}); });
}, },

2
src/module1/pages/chatRoom/index.ts

@ -154,7 +154,7 @@ Page({
}, },
handleCaseDetail() { handleCaseDetail() {
wx.navigateTo({ wx.navigateTo({
url: `/module1/pages/casesDetail/index?id=${this.data.case.caseId}`, url: `/module1/pages/casesDetail/index?id=${this.data.case.caseId}&rid=${this.data.id}`,
}); });
}, },

2
src/module1/pages/entryCasesResult/index.scss

@ -22,7 +22,7 @@
text-align: center; text-align: center;
} }
.block-code { .block-code {
height: 400rpx; height: 180rpx;
} }
.code { .code {
margin: 90rpx auto 0; margin: 90rpx auto 0;

47
src/module1/pages/entryCasesResult/index.ts

@ -1,21 +1,16 @@
import { getCurrentPage } from "@/miniprogram_npm/@vant/weapp/common/utils";
const _app = getApp<IAppOption>(); const _app = getApp<IAppOption>();
// 返回逻辑 // 返回逻辑
// 1、一级医生和二级医生录入病历、提交反馈后,提交成功页面 // 1、一级医生和二级医生录入病历、提交反馈后,提交成功页面 按钮: 查看病历详情 返回病历列表
// 按钮: 查看病历详情 返回病历列表 // 2、二级医生在病历详情页,选择邀请上级后,成功页面:查看病历详情 返回病历列表 从学习窗:
//
// 2、二级医生在病历详情页,选择邀请上级后,成功页面:查看病历详情 返回病历列表
//
// 从学习窗:
// 3、学习窗顶部进入病历详情:选择邀请上级后,成功页面,按钮:返回学习窗; // 3、学习窗顶部进入病历详情:选择邀请上级后,成功页面,按钮:返回学习窗;
//
// 4、学习窗顶部进入病历详情:提交反馈后,按钮:返回学习窗 // 4、学习窗顶部进入病历详情:提交反馈后,按钮:返回学习窗
Page({ Page({
data: { data: {
caseId: "", caseId: "",
rid: "",
codeUrl: "", codeUrl: "",
isFollow: "", isFollow: "",
@ -25,6 +20,7 @@ Page({
this.setData({ this.setData({
caseId: options.cid, caseId: options.cid,
isFollow: options.isf, isFollow: options.isf,
rid: options.rid && options.rid !== "undefined" ? options.rid : "",
}); });
if (options.wxi) { if (options.wxi) {
this.setData({ this.setData({
@ -38,21 +34,26 @@ Page({
}); });
}, },
handleDetail() { handleDetail() {
// console.log(getCurrentPage());
wx.reLaunch({
url: `/module1/pages/casesDetail/index?id=${this.data.caseId}`,
});
// wx.reLaunch({ // wx.reLaunch({
// url: "/pages/cases/index", // url: `/module1/pages/casesDetail/index?id=${this.data.caseId}`,
// success: () => {
// wx.navigateTo({
// url: `/module1/pages/casesDetail/index?id=${this.data.caseId}`,
// fail(err){
// console.log(err)
// }
// });
// },
// }); // });
wx.reLaunch({
url: "/pages/cases/index",
success: () => {
wx.navigateTo({
url: `/module1/pages/casesDetail/index?id=${this.data.caseId}`,
});
},
});
},
handleBackRoom() {
wx.reLaunch({
url: "/pages/chatRoomList/index",
success: () => {
wx.navigateTo({
url: `/module1/pages/chatRoom/index?id=${this.data.rid}`,
});
},
});
}, },
handleBackRoom() {},
}); });

13
src/module1/pages/entryCasesResult/index.wxml

@ -6,19 +6,12 @@
<image wx:if="{{codeUrl}}" class="code" src="{{codeUrl}}" mode="scaleToFill" show-menu-by-longpress></image> <image wx:if="{{codeUrl}}" class="code" src="{{codeUrl}}" mode="scaleToFill" show-menu-by-longpress></image>
<view wx:if="{{codeUrl}}" class="tip">关注公众号接收病历反馈消息</view> <view wx:if="{{codeUrl}}" class="tip">关注公众号接收病历反馈消息</view>
<view class="wrap-btns"> <view class="wrap-btns">
<block wx:if="{{btnType==='1'}}"> <block wx:if="{{rid}}">
<view class="btn2" bind:tap="handleDetail">查看病历详情</view> <view class="btn1" bind:tap="handleBackRoom">返回学习窗</view>
<view class="btn1" bind:tap="handleBackCase">返回病历列表</view>
</block> </block>
<block wx:if="{{btnType==='2'}}"> <block wx:else>
<view class="btn2" bind:tap="handleDetail">查看病历详情</view> <view class="btn2" bind:tap="handleDetail">查看病历详情</view>
<view class="btn1" bind:tap="handleBackCase">返回病历列表</view> <view class="btn1" bind:tap="handleBackCase">返回病历列表</view>
</block> </block>
<block wx:if="{{btnType==='3'}}">
<view class="btn1" bind:tap="handleBackRoom">返回学习窗</view>
</block>
<block wx:if="{{btnType==='4'}}">
<view class="btn1" bind:tap="handleBackRoom">返回学习窗</view>
</block>
</view> </view>
</view> </view>

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

@ -12,6 +12,7 @@ Page({
area: [], area: [],
id: "", id: "",
rid: "",
DoctorTitleType: {}, DoctorTitleType: {},
hospitalClassification: {}, hospitalClassification: {},
@ -57,6 +58,7 @@ Page({
this.setData({ this.setData({
params: data.params, params: data.params,
caseId: data.caseId, caseId: data.caseId,
rid: data.rid,
detailInvite: data.detailInvite, detailInvite: data.detailInvite,
feedBackInvite: data.feedBackInvite, feedBackInvite: data.feedBackInvite,
}); });
@ -244,7 +246,7 @@ Page({
}); });
}, },
handleSubmit() { handleSubmit() {
const { feedBackInvite, caseId, DoctorId, params, detailInvite } = this.data; const { feedBackInvite, caseId, DoctorId, params, detailInvite, rid } = this.data;
if (!DoctorId) { if (!DoctorId) {
wx.showToast({ wx.showToast({
title: "请选择医生", title: "请选择医生",
@ -263,7 +265,7 @@ Page({
}, },
}).then((res) => { }).then((res) => {
wx.reLaunch({ wx.reLaunch({
url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}`, url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}&rid=${rid}`,
}); });
}); });
return; return;
@ -273,7 +275,7 @@ Page({
wx.ajax({ method: "POST", url: "?r=takeda/case/invite-doctor", data: { caseId, dealDoctorId: DoctorId } }).then( wx.ajax({ method: "POST", url: "?r=takeda/case/invite-doctor", data: { caseId, dealDoctorId: DoctorId } }).then(
(res) => { (res) => {
wx.reLaunch({ wx.reLaunch({
url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}`, url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}&rid=${rid}`,
}); });
}, },
); );
@ -291,7 +293,7 @@ Page({
}, },
}).then((res) => { }).then((res) => {
wx.reLaunch({ wx.reLaunch({
url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}`, url: `/module1/pages/entryCasesResult/index?isf=${res.isSubscribe}&wxi=${encodeURIComponent(res.wxImg)}&cid=${res.caseId || caseId}&rid=${rid}`,
}); });
}); });
}, },

Loading…
Cancel
Save