Browse Source

1.病例反馈增加缓存 2. 医生认证热区 3. bug处理

main
kola-web 3 months ago
parent
commit
0d3962fe69
  1. 7
      project.private.config.json
  2. BIN
      src/images/doctor-level2.png
  3. BIN
      src/images/doctor-level3.png
  4. BIN
      src/images/doctor-level4.png
  5. 83
      src/module1/pages/casesFeedback/index.ts
  6. 18
      src/module1/pages/casesFeedback/index.wxml
  7. 48
      src/module1/pages/entryCases/index.ts
  8. 13
      src/module1/pages/entryCases/index.wxml
  9. 8
      src/module1/pages/login/index.ts
  10. 2
      src/module1/pages/login/index.wxml
  11. 29
      src/module1/pages/loginProtool/index.ts
  12. 8
      src/module1/pages/loginProtool/index.wxml
  13. 11
      src/module1/pages/setInfo/index.scss
  14. 5
      src/module1/pages/setInfoDoctor/index.json
  15. 55
      src/module1/pages/setInfoDoctor/index.ts
  16. 9
      src/module1/pages/setInfoDoctor/index.wxml
  17. 6
      src/pages/chatRoomList/index.scss
  18. 6
      src/pages/chatRoomList/index.ts
  19. 7
      src/pages/chatRoomList/index.wxml

7
project.private.config.json

@ -9,6 +9,13 @@ @@ -9,6 +9,13 @@
"miniprogram": {
"list": [
{
"name": "医生认证-选择医生",
"pathName": "module1/pages/setInfoDoctor/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "学习窗",
"pathName": "module1/pages/chatRoom/index",
"query": "id=4",

BIN
src/images/doctor-level2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 15 KiB

BIN
src/images/doctor-level3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src/images/doctor-level4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 17 KiB

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

@ -14,12 +14,15 @@ Page({ @@ -14,12 +14,15 @@ Page({
DoctorLevel: 1,
auth: {} as any,
DeleteAttachmentIds: [] as any,
},
onLoad(options) {
this.setData({
caseId: options.id,
});
app.waitLogin().then(() => {
this.getCache();
app.getUserInfo(this, (res) => {
this.setData({
DoctorLevel: res.DoctorLevel,
@ -53,11 +56,53 @@ Page({ @@ -53,11 +56,53 @@ Page({
},
],
});
this.imageVerify(detail.fileUrl);
this.handleCache();
},
handleDelPhoto(e) {
const { index } = e.currentTarget.dataset;
const { images, DeleteAttachmentIds } = this.data;
if (images[index].attachmentId) {
DeleteAttachmentIds.push(images[index].attachmentId);
}
this.setData({
images: this.data.images.filter((_, i) => i !== Number(index)),
DeleteAttachmentIds,
});
this.handleCache();
},
imageVerify(url: string) {
const { images, DeleteAttachmentIds } = this.data;
const LastImagesHash: any = [];
images.forEach((item) => {
if (item.hash) {
LastImagesHash.push(item.hash);
}
});
wx.ajax({
method: "POST",
url: "?r=takeda/common/image-verify",
data: {
ImageUrl: url,
LastImagesHash,
DeleteAttachmentIds,
},
}).then((res) => {
const index = images.findIndex((item) => item.url === url);
const imageItem = images[index];
if (res.Hash) {
imageItem.hash = res.Hash;
}
if (res.code === 1001) {
wx.showToast({
title: res.msg,
icon: "none",
});
imageItem.repeat = true;
}
this.setData({
images,
});
});
},
handleAudio(e) {
@ -72,6 +117,7 @@ Page({ @@ -72,6 +117,7 @@ Page({
},
],
});
this.handleCache();
},
handleDelAudio(e) {
wx.showModal({
@ -84,6 +130,7 @@ Page({ @@ -84,6 +130,7 @@ Page({
this.setData({
audios: this.data.audios.filter((_, i) => i !== Number(index)),
});
this.handleCache();
}
},
});
@ -103,6 +150,7 @@ Page({ @@ -103,6 +150,7 @@ Page({
},
],
});
this.handleCache();
},
handleDelFile(e) {
wx.showModal({
@ -115,6 +163,7 @@ Page({ @@ -115,6 +163,7 @@ Page({
this.setData({
files: this.data.files.filter((_, i) => i !== Number(index)),
});
this.handleCache();
}
},
});
@ -214,7 +263,6 @@ Page({ @@ -214,7 +263,6 @@ Page({
handleBack() {
wx.navigateBack();
},
handleSubmit() {
const { caseId, isOpen } = this.data;
const params = this.formatParams();
@ -249,6 +297,39 @@ Page({ @@ -249,6 +297,39 @@ Page({
},
});
},
getCache() {
const { caseId } = this.data;
wx.ajax({
method: "GET",
url: "?r=takeda/case/get-feedback-cache",
data: {
caseId,
},
}).then((res) => {
this.setData({
images: res.images,
info: res.info,
audios: res.audios,
files: res.files,
});
});
},
handleCache() {
const { caseId, images, info, audios, files } = this.data;
const cacheParams = {
caseId,
images: JSON.stringify(images),
info: `${info}`,
audios: JSON.stringify(audios),
files: JSON.stringify(files),
};
wx.ajax({
method: "POST",
url: "?r=takeda/case/save-feedback-cache",
data: cacheParams,
showMsg: false,
});
},
});
export {};

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

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
placeholder="请输入您的病历备注"
auto-height
maxlength="{{1000}}"
bind:blur="handleCache"
></textarea>
<view class="limit">{{info.length}}/1000</view>
</view>
@ -42,10 +43,10 @@ @@ -42,10 +43,10 @@
<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 class="repeat" wx:if="{{item.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">
@ -62,7 +63,14 @@ @@ -62,7 +63,14 @@
</uploadFile>
</view>
<view class="file-list" wx:if="{{files.length}}">
<view class="fl-row" wx:for="{{files}}" wx:key="name" bind:tap="handlePreviewFile" bind:longpress="handlePreviewName" data-index="{{index}}">
<view
class="fl-row"
wx:for="{{files}}"
wx:key="name"
bind:tap="handlePreviewFile"
bind:longpress="handlePreviewName"
data-index="{{index}}"
>
<view class="wrap">
<image class="icon" src="{{imageUrl}}icon-file{{item.fileType}}.png?t={{Timestamp}}"></image>
<view class="name">{{item.name}}</view>

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

@ -23,6 +23,7 @@ Page({ @@ -23,6 +23,7 @@ Page({
caseId: "",
edit: true,
DeleteAttachmentIds: [] as any,
},
onLoad(options) {
app.waitLogin().then(async () => {
@ -123,11 +124,51 @@ Page({ @@ -123,11 +124,51 @@ Page({
},
],
});
this.imageVerify(detail.fileUrl);
},
handleDelPhoto(e) {
handleDelPhoto(e: any) {
const { index } = e.currentTarget.dataset;
const { images, DeleteAttachmentIds } = this.data;
if (images[index].attachmentId) {
DeleteAttachmentIds.push(images[index].attachmentId);
}
this.setData({
images: this.data.images.filter((_, i) => i !== Number(index)),
DeleteAttachmentIds,
});
},
imageVerify(url: string) {
const { images, DeleteAttachmentIds } = this.data;
const LastImagesHash: any = [];
images.forEach((item) => {
if (item.hash) {
LastImagesHash.push(item.hash);
}
});
wx.ajax({
method: "POST",
url: "?r=takeda/common/image-verify",
data: {
ImageUrl: url,
LastImagesHash,
DeleteAttachmentIds,
},
}).then((res) => {
const index = images.findIndex((item) => item.url === url);
const imageItem = images[index];
if (res.Hash) {
imageItem.hash = res.Hash;
}
if (res.code === 1001) {
wx.showToast({
title: res.msg,
icon: "none",
});
imageItem.repeat = true;
}
this.setData({
images,
});
});
},
handleAudio(e) {
@ -342,6 +383,11 @@ Page({ @@ -342,6 +383,11 @@ Page({
handleSave() {},
handleSubmit() {},
handleBack() {
const { images, description, audios, files, deptId, labelIds } = this.data;
if (!images.length && !description && !audios.length && !files.length && !deptId && !labelIds.length) {
wx.navigateBack()
return;
}
wx.showModal({
confirmColor: "#00B4C5",
cancelColor: "#141515",

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

@ -14,10 +14,10 @@ @@ -14,10 +14,10 @@
<view class="del" bind:tap="handleDelPhoto" data-index="{{index}}">
<van-icon name="cross" />
</view>
<!-- <view class="repeat">
<view class="repeat" wx:if="{{item.repeat}}">
<image class="icon" src="{{imageUrl}}icon-error.png?t={{Timestamp}}"></image>
<view class="r-title">重复图片</view>
</view> -->
</view>
</view>
<uploadFile obscure edit="{{edit}}" bind:file="handlePhoto" wx:if="{{images.length<9}}">
<view class="upload-file">
@ -66,7 +66,14 @@ @@ -66,7 +66,14 @@
</uploadFile>
</view>
<view class="file-list" wx:if="{{files.length}}">
<view class="fl-row" wx:for="{{files}}" wx:key="name" bind:tap="handlePreviewFile" catch:longpress="handlePreviewName" data-index="{{index}}">
<view
class="fl-row"
wx:for="{{files}}"
wx:key="name"
bind:tap="handlePreviewFile"
catch:longpress="handlePreviewName"
data-index="{{index}}"
>
<view class="wrap">
<image class="icon" src="{{imageUrl}}icon-file{{item.fileType}}.png?t={{Timestamp}}"></image>
<view class="name">{{item.name}}</view>

8
src/module1/pages/login/index.ts

@ -126,11 +126,9 @@ Page({ @@ -126,11 +126,9 @@ Page({
wx.navigateTo({ url: "/module1/pages/loginProtool/index" });
}
},
handleNavProtool() {
if (this.data.protool) {
return;
}
wx.navigateTo({ url: "/module1/pages/loginProtool/index" });
handleNavProtool(e) {
const phone = e?.currentTarget?.dataset?.phone;
wx.navigateTo({ url: `/module1/pages/loginProtool/index?phone=${phone}` });
},
});

2
src/module1/pages/login/index.wxml

@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
<image class="icon" src="{{imageUrl}}icon-tel.png?t={{Timestamp}}"></image>
手机号快捷登录
</button>
<button wx:else class="tel-btn" bind:tap="handleNavProtool">
<button wx:else class="tel-btn" bind:tap="handleNavProtool" data-phone="1">
<image class="icon" src="{{imageUrl}}icon-tel.png?t={{Timestamp}}"></image>
手机号快捷登录
</button>

29
src/module1/pages/loginProtool/index.ts

File diff suppressed because one or more lines are too long

8
src/module1/pages/loginProtool/index.wxml

@ -1,4 +1,7 @@ @@ -1,4 +1,7 @@
<view class="page" style="background: url({{imageUrl}}login-protool-bg.png?r={{Timestamp}}) no-repeat top center/100% 316rpx;">
<view
class="page"
style="background: url({{imageUrl}}login-protool-bg.png?r={{Timestamp}}) no-repeat top center/100% 316rpx;"
>
<view class="container" style="padding-top:{{menuButtonInfo.bottom}}px;">
<image class="title" src="{{imageUrl}}login-protool-title.png?t={{Timestamp}}"></image>
<scroll-view class="rule" scroll-y="{{true}}" bindscrolltolower="handleScrollToLower">
@ -10,6 +13,9 @@ @@ -10,6 +13,9 @@
<view class="footer" wx:else>
<view class="cancel" bind:tap="handleCancel">不同意</view>
<view wx:if="{{wait}}" class="wait">请上滑阅读完成</view>
<button wx:elif="{{phone}}" class="sure" open-type="getPhoneNumber" bindgetphonenumber="handleWxSubmit">
同意
</button>
<view wx:else class="sure" bind:tap="handleOk">同意</view>
</view>
</view>

11
src/module1/pages/setInfo/index.scss

@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
width: 128rpx;
height: 50rpx;
font-size: 28rpx;
color: #00B4C5;
color: #00b4c5;
background: #ffffff;
display: flex;
align-items: center;
@ -48,7 +48,6 @@ @@ -48,7 +48,6 @@
border-radius: 16rpx;
background-color: #fff;
.row {
padding: 32rpx 0;
display: flex;
align-items: top;
border-bottom: 1px solid rgba(224, 224, 224, 0.5);
@ -60,7 +59,7 @@ @@ -60,7 +59,7 @@
align-items: center;
}
.label {
padding-right: 10rpx;
padding: 32rpx 10rpx 32rpx 0;
flex-shrink: 0;
width: 5.5rem;
font-size: 32rpx;
@ -90,7 +89,7 @@ @@ -90,7 +89,7 @@
.content {
flex: 1;
.input {
padding: 0;
padding: 32rpx 0;
line-height: 1;
font-size: 32rpx;
color: #000;
@ -100,6 +99,7 @@ @@ -100,6 +99,7 @@
}
}
.select-wrap {
padding: 32rpx 0;
flex: 1;
display: flex;
align-items: center;
@ -119,6 +119,7 @@ @@ -119,6 +119,7 @@
}
}
.select-btn {
padding: 32rpx 0;
.wrap {
display: flex;
gap: 16rpx 20rpx;
@ -149,6 +150,7 @@ @@ -149,6 +150,7 @@
}
}
.credentials {
padding: 32rpx 0;
flex: 1;
.c-title {
display: flex;
@ -183,6 +185,7 @@ @@ -183,6 +185,7 @@
}
}
.avatar-wrap {
padding: 32rpx 0;
flex: 1;
display: flex;
align-items: center;

5
src/module1/pages/setInfoDoctor/index.json

@ -1,10 +1,11 @@ @@ -1,10 +1,11 @@
{
"navigationBarTitleText": "指派医生",
"navigationBarTitleText": "绑定医生",
"navigationStyle": "default",
"usingComponents": {
"popupDoctorDetail": "/components/popupDoctorDetail/index",
"doctorAvatar": "/components/doctorAvatar/index",
"van-popup": "@vant/weapp/popup/index",
"van-dialog": "@vant/weapp/dialog/index"
"van-dialog": "@vant/weapp/dialog/index",
"pagination": "/components/pagination/index"
}
}

55
src/module1/pages/setInfoDoctor/index.ts

@ -8,13 +8,47 @@ Page({ @@ -8,13 +8,47 @@ Page({
Search: "",
list: [],
pagination: {
page: 1,
pages: 1,
count: 1,
},
DoctorId: "",
DoctorName: "",
},
onLoad() {
app.waitLogin().then(() => {
app.waitLogin(true).then(() => {
this.getList();
this.getHostipalDict()
this.getDoctorDict()
});
},
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,
});
});
},
getHostipalDict() {
wx.ajax({
method: "GET",
url: "?r=takeda/reg/hospital-dict",
data: {},
}).then((res) => {
this.setData({
hospitalClassification: res.hospitalClassification,
hospitalLevel: res.hospitalLevel,
});
});
},
handleSearch() {
@ -29,20 +63,33 @@ Page({ @@ -29,20 +63,33 @@ Page({
});
this.handleSearch();
},
getList() {
getList(newPage = 1) {
const { Search } = this.data;
wx.ajax({
method: "GET",
url: "?r=takeda/reg/second-doctor-list",
data: {
Search,
page: newPage,
},
}).then((res) => {
const list = res.page === 1 ? res.list : [...this.data.list, ...res.list];
this.setData({
list: res.list,
list,
pagination: {
page: res.page,
pages: res.pages,
count: res.count,
},
});
});
},
onReachBottom() {
const { page, pages } = this.data.pagination;
if (pages > page) {
this.getList(page + 1);
}
},
handlePopupClose() {
this.setData({
showDetail: false,
@ -67,7 +114,7 @@ Page({ @@ -67,7 +114,7 @@ Page({
}
const eventChannel = this.getOpenerEventChannel();
eventChannel.emit("acceptDataFromOpenedPage", { DoctorId, DoctorName });
this.handleBack()
this.handleBack();
},
handleBack() {
wx.navigateBack();

9
src/module1/pages/setInfoDoctor/index.wxml

@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
<view class="name">{{item.DoctorName}}</view>
<view class="label" wx:if="{{item.DoctorTitleType==='99'}}">{{item.DoctorOtherTitle}}</view>
<view class="label" wx:else>{{DoctorTitleType[item.DoctorTitleType]}}</view>
<block wx:for-item="depart" wx:for="{{item.department}}" wx:key="DepartmentId">
<block wx:for-item="depart" wx:for="{{item.Department}}" wx:key="DepartmentId">
<view class="line"></view>
<view class="label">{{depart.DepartmentName}}</view>
</block>
@ -53,15 +53,10 @@ @@ -53,15 +53,10 @@
{{item.CityName}}{{item.CountyName?'/':''}}{{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.specialty}}" wx:for-item="spec" wx:key="SpecialtyId">
{{spec.SpecialtyName}}
</view>
</view>
</view>
</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
</view>
</radio-group>
</view>

6
src/pages/chatRoomList/index.scss

@ -161,6 +161,12 @@ page { @@ -161,6 +161,12 @@ page {
background: #00b4c5;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
.status{
display: inline-block;
font-size: 28rpx;
color: #999999;
margin-left: 12rpx;
}
}
.date {
font-size: 28rpx;

6
src/pages/chatRoomList/index.ts

@ -153,7 +153,9 @@ Page({ @@ -153,7 +153,9 @@ Page({
}).then((res) => {
res.list.forEach((item) => {
item.roomDoctors = item.roomDoctors.slice(0, 4);
item.createTime = dayjs(item.createTime).format("YYYY-MM-DD HH:mm");
if (item.createTime) {
item.createTime = dayjs(item.createTime).format("YYYY-MM-DD HH:mm");
}
});
const list = res.page === 1 ? res.list : [...this.data.list, ...res.list];
this.setData({
@ -440,7 +442,7 @@ Page({ @@ -440,7 +442,7 @@ Page({
this.setData({
[key]: "",
});
this.handleSearch()
this.handleSearch();
},
handleFold() {

7
src/pages/chatRoomList/index.wxml

@ -139,8 +139,11 @@ @@ -139,8 +139,11 @@
<view class="room-list">
<view class="card" wx:for="{{list}}" wx:key="msgId" bind:tap="handleRoom" data-params="{{item}}">
<view class="c-header">
<view class="id">ID:{{item.caseNo}}</view>
<view class="date">{{item.createTime}}</view>
<view class="id">
ID:{{item.caseNo}}
<view class="status" wx:if="{{item.caseStatus==='4'}}">已归档</view>
</view>
<view class="date" wx:if="{{item.caseStatus!=='4'}}">{{item.createTime}}</view>
</view>
<view class="c-container">
<view class="photos">

Loading…
Cancel
Save