diff --git a/project.private.config.json b/project.private.config.json
index 7853185..fd3731e 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -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 @@
"scene": null
},
{
- "name": "病例详情",
- "pathName": "module1/pages/casesDetail/index",
- "query": "",
- "launchMode": "default",
- "scene": null
- },
- {
"name": "录入病例结果",
"pathName": "module1/pages/entryCasesResult/index",
"query": "",
diff --git a/src/images/case-detail-footer-icon10.png b/src/images/case-detail-footer-icon10.png
new file mode 100644
index 0000000..9ef815e
Binary files /dev/null and b/src/images/case-detail-footer-icon10.png differ
diff --git a/src/images/case-detail-footer-icon8.png b/src/images/case-detail-footer-icon8.png
new file mode 100644
index 0000000..eb4f04b
Binary files /dev/null and b/src/images/case-detail-footer-icon8.png differ
diff --git a/src/images/case-detail-footer-icon9.png b/src/images/case-detail-footer-icon9.png
new file mode 100644
index 0000000..006b286
Binary files /dev/null and b/src/images/case-detail-footer-icon9.png differ
diff --git a/src/images/new.png b/src/images/new.png
new file mode 100644
index 0000000..3faff2d
Binary files /dev/null and b/src/images/new.png differ
diff --git a/src/module1/pages/casesDetail/index.scss b/src/module1/pages/casesDetail/index.scss
index 83a1a98..ea9cfa6 100644
--- a/src/module1/pages/casesDetail/index.scss
+++ b/src/module1/pages/casesDetail/index.scss
@@ -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 {
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 {
}
}
}
- > view:not(:last-of-type) {
- margin-bottom: 32rpx;
- }
}
}
.feedback-card {
@@ -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 {
}
}
.remark {
- margin-top: 32rpx;
.r-title {
font-size: 32rpx;
color: rgba(20, 21, 21, 1);
@@ -492,7 +497,6 @@ page {
}
}
.audio-list {
- margin-top: 32rpx;
.audio-row {
display: flex;
gap: 28rpx;
@@ -519,7 +523,6 @@ page {
}
}
.files {
- margin-top: 32rpx;
.f-title {
font-size: 32rpx;
color: #000;
@@ -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 {
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 {
.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 {
.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 {
.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 {
.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 {
diff --git a/src/module1/pages/casesDetail/index.ts b/src/module1/pages/casesDetail/index.ts
index 60f33a2..2b02688 100644
--- a/src/module1/pages/casesDetail/index.ts
+++ b/src/module1/pages/casesDetail/index.ts
@@ -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({
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({
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({
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({
});
},
+ 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({
},
});
},
-
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 {};
diff --git a/src/module1/pages/casesDetail/index.wxml b/src/module1/pages/casesDetail/index.wxml
index 1c1f4fe..accaf2f 100644
--- a/src/module1/pages/casesDetail/index.wxml
+++ b/src/module1/pages/casesDetail/index.wxml
@@ -10,9 +10,9 @@
{{detail.caseStatusName}}
已公开
-
- 收起
-
+
+ {{fold ? '展开' : '收起'}}
+
@@ -41,13 +41,16 @@
-
+
标签
{{item.labelName}}
- 编辑标签
+
+
+ 修改
+
{{item.name}}
-
-
+
+
@@ -92,76 +105,88 @@
-
+
提交时间
- 2024-02-09 12:04:23
-
- 收起
-
+ {{item.createTime}}
+
+ {{item.fold ? '展开' : '收起'}}
+
-
-
- 标签
-
- 心律失常
- 心衰
+
+
+
+
+
+
+ 转文字
+
-
+
-
-
-
-
-
- 转文字
-
-
-
-
- 病历相关文件
+
+ 补充文件
-
+
- 基因检测报告.pdf
+ {{cItem.name}}
-
-
+
+
@@ -203,59 +228,113 @@
+
+
+ 提交反馈
+
@@ -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}}"
>
@@ -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}}"
>
@@ -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}}"
>
@@ -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}}"
>
diff --git a/src/module1/pages/casesFeedback/index.scss b/src/module1/pages/casesFeedback/index.scss
index f095546..b3fb850 100644
--- a/src/module1/pages/casesFeedback/index.scss
+++ b/src/module1/pages/casesFeedback/index.scss
@@ -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);
+ }
+ }
+ }
+}
diff --git a/src/module1/pages/casesFeedback/index.ts b/src/module1/pages/casesFeedback/index.ts
index 778c324..04e0a48 100644
--- a/src/module1/pages/casesFeedback/index.ts
+++ b/src/module1/pages/casesFeedback/index.ts
@@ -3,8 +3,9 @@ const app = getApp();
Page({
data: {
show1: false,
- show2: false,
+ isOpen: 2,
+ caseId: "",
images: [] as any,
info: "",
audios: [] as any,
@@ -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({
},
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 {};
diff --git a/src/module1/pages/casesFeedback/index.wxml b/src/module1/pages/casesFeedback/index.wxml
index 1d222e0..c836a40 100644
--- a/src/module1/pages/casesFeedback/index.wxml
+++ b/src/module1/pages/casesFeedback/index.wxml
@@ -32,7 +32,7 @@
-
+
上传图片建议
(0/9)
@@ -95,7 +95,20 @@
+
+
+
+
diff --git a/src/module1/pages/entryCases/index.ts b/src/module1/pages/entryCases/index.ts
index 78c7ec9..e4d99fd 100644
--- a/src/module1/pages/entryCases/index.ts
+++ b/src/module1/pages/entryCases/index.ts
@@ -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({
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({
success(res) {
wx.openDocument({
filePath: res.tempFilePath,
+ showMenu: true,
fail() {
wx.showToast({
title: "该文件无法预览",
@@ -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({
}
wx.navigateTo({
url: `/module1/pages/setCaseDoctor/index`,
- success(res) {
+ success: (res) => {
res.eventChannel.emit("acceptDataFromOpenerPage", {
+ caseId: this.data.caseId,
params,
});
},
diff --git a/src/module1/pages/setCaseDoctor/index.ts b/src/module1/pages/setCaseDoctor/index.ts
index 072a1aa..93c5a3a 100644
--- a/src/module1/pages/setCaseDoctor/index.ts
+++ b/src/module1/pages/setCaseDoctor/index.ts
@@ -38,6 +38,7 @@ Page({
caseId: "",
detailInvite: false,
+ feedBackInvite: false,
},
onLoad(options) {
if (options.hid) {
@@ -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({
});
},
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}`,
});
});
},