Browse Source

医患互动迁移

dev
kola-web 4 weeks ago
parent
commit
9a7452e174
  1. 14
      src/app.json
  2. 8
      src/pages/d_interactive/index.json
  3. 161
      src/pages/d_interactive/index.scss
  4. 123
      src/pages/d_interactive/index.ts
  5. 62
      src/pages/d_interactive/index.wxml
  6. 8
      src/pages/d_interactiveDoctor/index.json
  7. 642
      src/pages/d_interactiveDoctor/index.scss
  8. 443
      src/pages/d_interactiveDoctor/index.ts
  9. 293
      src/pages/d_interactiveDoctor/index.wxml
  10. 10
      src/pages/d_patientDetail/index.json
  11. 884
      src/pages/d_patientDetail/index.scss
  12. 1075
      src/pages/d_patientDetail/index.ts
  13. 588
      src/pages/d_patientDetail/index.wxml
  14. 8
      src/pages/d_userInfo/index.json
  15. 214
      src/pages/d_userInfo/index.scss
  16. 231
      src/pages/d_userInfo/index.ts
  17. 121
      src/pages/d_userInfo/index.wxml
  18. 8
      src/pages/login/index.wxml

14
src/app.json

@ -8,7 +8,11 @@
"pages/information/index", "pages/information/index",
"pages/informationDetail/index", "pages/informationDetail/index",
"pages/message/index", "pages/message/index",
"pages/webview/index" "pages/webview/index",
"pages/d_interactive/index",
"pages/d_interactiveDoctor/index",
"pages/d_patientDetail/index",
"pages/d_userInfo/index"
], ],
"subPackages": [ "subPackages": [
{ {
@ -72,9 +76,9 @@
}, },
{ {
"root": "gift", "root": "gift",
"independent": true,
"pages": [ "pages": [
"pages/giftList/index", "pages/giftList/index",
"pages/giftDetail/index",
"pages/conformOrder/index", "pages/conformOrder/index",
"pages/siteList/index", "pages/siteList/index",
"pages/siteEdit/index", "pages/siteEdit/index",
@ -127,6 +131,12 @@
"text": "资料库" "text": "资料库"
}, },
{ {
"iconPath": "/images/tabbar/tab2.png",
"selectedIconPath": "/images/tabbar/tab-active2.png",
"pagePath": "pages/d_interactive/index",
"text": "互动"
},
{
"iconPath": "/images/tabbar/tab3.png", "iconPath": "/images/tabbar/tab3.png",
"selectedIconPath": "/images/tabbar/tab-active3.png", "selectedIconPath": "/images/tabbar/tab-active3.png",
"pagePath": "pages/my/index", "pagePath": "pages/my/index",

8
src/pages/d_interactive/index.json

@ -0,0 +1,8 @@
{
"navigationStyle": "custom",
"usingComponents": {
"zd-navBar": "/components/zd-navBar/navBar",
"van-icon": "@vant/weapp/icon/index",
"van-popup": "@vant/weapp/popup/index"
}
}

161
src/pages/d_interactive/index.scss

@ -0,0 +1,161 @@
page {
background-color: rgba(242, 244, 245, 1);
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
}
.page {
min-height: 100vh;
.page-header {
position: sticky;
top: 0;
padding: 30rpx;
box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04);
z-index: 10;
.wrap {
display: flex;
align-items: center;
.search {
flex: 1;
padding: 18rpx 32rpx;
display: flex;
align-items: center;
gap: 16rpx;
background: linear-gradient(to top, #ffffff 0%, #ebf3f4 100%);
box-shadow: 0rpx 8rpx 8rpx 0rpx rgba(40, 48, 49, 0.04);
border-radius: 140rpx 140rpx 140rpx 140rpx;
border: 2rpx solid #ffffff;
.icon {
width: 40rpx;
height: 40rpx;
}
.input {
flex: 1;
font-size: 28rpx;
}
.input-place {
color: rgba(173, 179, 180, 1);
}
}
.clear {
margin-left: 32rpx;
width: 44rpx;
height: 44rpx;
}
}
.navbar {
margin-top: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
.nav {
position: relative;
flex: 1;
text-align: center;
font-size: 32rpx;
color: rgba(103, 113, 114, 1);
transition: all 0.3s;
.dot {
padding: 0 4rpx;
position: absolute;
left: 50%;
transform: translateX(35rpx);
top: 0;
min-width: 18rpx;
height: 26rpx;
font-size: 18rpx;
line-height: 26rpx;
color: rgba(255, 255, 255, 1);
border-radius: 50%;
background: rgba(215, 108, 108, 1);
}
&.active {
font-size: 32rpx;
color: rgba(98, 190, 208, 1);
font-weight: bold;
&::after {
position: absolute;
bottom: -30rpx;
left: 50%;
transform: translateX(-50%);
content: '';
width: 52rpx;
height: 8rpx;
border-radius: 24rpx 24rpx 0 0;
background: #62bed0;
}
}
}
}
}
.list {
margin: 30rpx;
.list-item {
margin-bottom: 24rpx;
padding: 30rpx;
border-radius: 24rpx;
background-color: #fff;
display: flex;
.avatar {
flex-shrink: 0;
position: relative;
width: 92rpx;
height: 92rpx;
.a-img {
width: 100%;
height: 100%;
border-radius: 50%;
}
.dot {
position: absolute;
top: 0;
right: 0;
width: 18rpx;
height: 18rpx;
border: 2rpx solid #ffffff;
border-radius: 50%;
background: #d76c6c;
}
}
.wrap {
flex: 1;
padding-left: 24rpx;
.w-header {
display: flex;
align-items: center;
justify-content: space-between;
.name {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
}
.date {
font-size: 24rpx;
color: rgba(154, 161, 162, 1);
}
}
.tags {
margin-top: 12rpx;
display: flex;
flex-wrap: wrap;
gap: 12rpx;
.tag {
padding: 4rpx 16rpx;
border-radius: 8rpx;
border-color: rgba(242, 244, 245, 1);
font-size: 22rpx;
color: rgba(103, 113, 114, 1);
background-color: rgba(242, 244, 245, 1);
}
}
.content {
margin-top: 20rpx;
max-width: 18em;
font-size: 28rpx;
color: rgba(154, 161, 162, 1);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
}

123
src/pages/d_interactive/index.ts

@ -0,0 +1,123 @@
const app = getApp<IAppOption>();
Page({
data: {
list: [] as any,
unReadCount: 0,
pagination: {
page: 1,
pages: 1,
count: 1,
},
active: '',
search: '',
},
onShow() {
app.waitLogin({ type: [2] }).then((_res) => {
this.getList();
});
},
handleTapSearch() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONSEARCH' });
},
handleSearch() {
this.setData({
list: [],
pagination: {
page: 1,
pages: 1,
count: 1,
},
});
this.getList();
},
handleNav(e) {
const { active } = e.currentTarget.dataset;
this.setData({
active,
});
this.getList();
},
getList(newPage = 1) {
const { active } = this.data;
if (active == '' && newPage == 1) {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONALL' });
}
if (active == '1' && newPage == 1) {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONREAD' });
}
if (active == '2' && newPage == 1) {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONUNREAD' });
}
wx.ajax({
method: 'GET',
url: '?r=zd/doctor/message-interact/get-interact-patient-list',
data: {
page: newPage,
search: this.data.search,
readStatus: this.data.active,
},
}).then((res) => {
const list = res.page === 1 ? res.list : [...this.data.list, ...res.list];
this.setData({
list,
unReadCount: res.unReadCount,
pagination: {
page: res.page,
pages: res.pages,
count: res.count,
},
});
});
},
onReachBottom() {
const { page, pages } = this.data.pagination;
if (pages > page) {
this.getList(page + 1);
}
},
handleDetail(e) {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONVIEW' });
const { index } = e.currentTarget.dataset;
const { list } = this.data;
const listItem: any = list[index];
wx.navigateTo({
url: `/pages/d_interactiveDoctor/index?patientId=${listItem.patientId}`,
});
},
hancleClaer() {
if (Number(this.data.unReadCount) === 0) {
wx.showToast({
title: '暂无未读消息',
icon: 'none',
});
return;
}
wx.showModal({
title: '提示',
content: '确认清空消息吗?',
confirmColor: '#62bed0',
success: (res) => {
if (res.confirm) {
wx.ajax({
method: 'POST',
url: '?r=zd/doctor/message-interact/read-history',
data: {},
}).then((_res) => {
this.setData({
unReadCount: 0,
list: this.data.list.map((item: any) => {
return {
...item,
msgReadStatus: '1',
};
}),
});
const header = this.selectComponent('#tabbar');
header.getList(); //子组件的方法
});
}
},
});
},
});

62
src/pages/d_interactive/index.wxml

@ -0,0 +1,62 @@
<view class="page">
<view
class="page-header"
style="background:#fff url({{imageUrl}}za-images/doctor/d_patient-bg.png?t={{Timestamp}}) no-repeat top center/100% 456rpx"
>
<zd-navBar title="互动" back home="{{false}}" bind:back="handleBack"></zd-navBar>
<view class="wrap">
<view class="search">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-search.png?t={{Timestamp}}"></image>
<input
type="text"
class="input"
placeholder-class="input-place"
placeholder="搜索姓名、手机号"
model:value="{{search}}"
confirm-type="search"
bindconfirm="handleSearch"
bind:tap="handleTapSearch"
/>
</view>
<image
class="clear"
src="{{imageUrl}}za-images/doctor/icon-clear.png?t={{Timestamp}}"
bind:tap="hancleClaer"
></image>
</view>
<!-- <view class="navbar"> -->
<!-- <view class="nav {{!active && 'active'}}" bind:tap="handleNav" data-active=""> -->
<!-- 全部 -->
<!-- <view class="dot" wx:if="{{unReadCount>0}}">{{unReadCount}}</view> -->
<!-- </view> -->
<!-- <view class="nav {{active===1 && 'active'}}" bind:tap="handleNav" data-active="{{1}}">已读</view> -->
<!-- <view class="nav {{active===2 && 'active'}}" bind:tap="handleNav" data-active="{{2}}"> -->
<!-- 未读 -->
<!-- <view class="dot" wx:if="{{unReadCount>0}}">{{unReadCount}}</view> -->
<!-- </view> -->
<!-- </view> -->
</view>
<view class="list">
<view class="list-item" wx:for="{{list}}" wx:key="index" bind:tap="handleDetail" data-index="{{index}}">
<view class="avatar">
<image class="a-img" src="{{item.userAvatar}}"></image>
<view class="dot" wx:if="{{item.msgReadStatus==='2'}}"></view>
</view>
<view class="wrap">
<view class="w-header">
<view class="name" wx:if="{{item.patientName}}">{{item.patientName}}</view>
<view class="name" wx:else>{{item.Telephone}}</view>
<view class="date">{{item.msgCreateTime}}</view>
</view>
<view class="tags">
<view class="tag" wx:for="{{item.Tags}}" wx:for-item="tag" wx:for-index="tIndex" wx:key="tIndex">
{{tag}}
</view>
</view>
<view class="content">{{item.msgContent}}</view>
</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
</view>
</view>

8
src/pages/d_interactiveDoctor/index.json

@ -0,0 +1,8 @@
{
"navigationBarTitleText": "互动",
"navigationStyle": "default",
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-popup": "@vant/weapp/popup/index"
}
}

642
src/pages/d_interactiveDoctor/index.scss

@ -0,0 +1,642 @@
page {
background-color: rgba(242, 244, 245, 1);
}
.page {
height: 100vh;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
.page-header {
padding-bottom: 30rpx;
border-radius: 0 0 24rpx 24rpx;
background-color: #fff;
.user {
flex-shrink: 0;
padding: 36rpx 30rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
.avatar {
width: 104rpx;
height: 104rpx;
border-radius: 50%;
}
.wrap {
flex: 1;
padding: 0 20rpx;
.name {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 40rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
.tip {
display: block;
padding: 2rpx 16rpx;
font-size: 24rpx;
color: #fff;
border-radius: 0 30rpx 30rpx 30rpx;
background-color: #67baca;
}
.detail {
flex-shrink: 0;
font-size: 28rpx;
color: rgba(103, 186, 202, 1);
font-weight: normal;
}
}
.tags {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
gap: 12rpx;
.tag {
padding: 4rpx 16rpx;
font-size: 22rpx;
color: rgba(103, 113, 114, 1);
border-radius: 8rpx;
background-color: rgba(242, 244, 245, 1);
}
}
}
}
.adl {
margin: 32rpx 30rpx 0;
background: #ffffff;
box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(40, 48, 49, 0.04);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #f8f9f9;
.a-header {
display: flex;
align-items: flex-start;
flex-direction: column;
.content {
border-radius: 24rpx 0 24rpx 0;
padding: 14rpx 28rpx;
font-size: 28rpx;
line-height: 1;
color: rgba(98, 190, 208, 1);
background-color: rgba(242, 248, 249, 1);
}
.box {
width: 40rpx;
height: 40rpx;
background-color: rgba(242, 248, 249, 1);
}
}
.a-content {
position: relative;
z-index: 1;
margin-top: -40rpx;
padding: 32rpx 30rpx;
background-color: #fff;
border-radius: 24rpx;
.row {
display: flex;
align-items: center;
gap: 20rpx;
&:first-of-type {
margin-bottom: 24rpx;
}
.label {
flex-shrink: 0;
font-size: 28rpx;
color: rgba(154, 161, 162, 1);
}
.num {
min-width: 3em;
font-size: 28rpx;
color: rgba(40, 48, 49, 1);
}
.tag {
display: flex;
align-items: center;
background-color: rgba(232, 245, 248, 1);
border-radius: 12rpx;
.t-label {
padding: 8rpx 12rpx;
font-size: 24rpx;
color: rgba(255, 255, 255, 1);
background-color: rgba(103, 186, 202, 1);
border-radius: 12rpx;
display: flex;
align-items: center;
gap: 8rpx;
flex-shrink: 0;
.icon {
width: 24rpx;
height: 24rpx;
}
}
.t-content {
padding: 0 16rpx 0 8rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: rgba(103, 186, 202, 1);
display: flex;
align-items: center;
gap: 4rpx;
flex-shrink: 0;
.icon {
width: 24rpx;
height: 28rpx;
}
}
&.tag-warn {
background-color: rgba(227, 220, 64, 0.1);
.t-label {
background-color: rgba(225, 217, 45, 1);
}
.t-content {
color: rgba(225, 217, 45, 1);
}
}
&.tag-error {
background-color: rgba(248, 234, 234, 1);
.t-label {
background-color: rgba(215, 108, 108, 1);
}
.t-content {
color: rgba(215, 108, 108, 1);
}
}
}
}
}
}
}
.page-container {
flex: 1;
overflow: hidden;
.scroll-view {
height: 100%;
.date {
padding-top: 20rpx;
font-size: 28rpx;
color: rgba(173, 179, 180, 1);
text-align: center;
}
.patient {
padding: 15rpx 30rpx;
display: flex;
.avatar {
padding-right: 16rpx;
flex-shrink: 0;
.a-img {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
}
.p-container {
flex: 1;
margin-right: 74rpx;
display: flex;
flex-direction: column;
align-items: start;
.guide {
margin-bottom: 32rpx;
padding: 32rpx 30rpx;
border-radius: 0 32rpx 32rpx;
background: linear-gradient(13deg, #ffffff 8%, #e8f0f1 100%);
border: 2rpx solid #ffffff;
.title {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
}
.sub-title {
font-size: 28rpx;
color: rgba(154, 161, 162, 1);
margin-bottom: 30rpx;
}
.list {
.l-item {
display: flex;
align-items: center;
gap: 16rpx;
margin-bottom: 30rpx;
.order {
flex-shrink: 0;
width: 28rpx;
height: 28rpx;
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 1);
border-radius: 6rpx;
background: #67baca;
}
.content {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
}
}
}
.tip {
font-size: 28rpx;
color: rgba(103, 113, 114, 1);
display: flex;
align-items: center;
.icon {
width: 44rpx;
height: 44rpx;
}
}
}
.message {
margin-bottom: 32rpx;
padding: 26rpx 32rpx;
background-color: #fff;
border-radius: 0 32rpx 32rpx;
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
white-space: pre-line;
}
.referral-replay {
margin-bottom: 32rpx;
padding: 18rpx 32rpx;
border-radius: 32rpx;
background-color: #fff;
.title {
font-size: 32rpx;
color: #283031;
line-height: 48rpx;
}
.sub-title {
margin-top: 32rpx;
font-size: 32rpx;
color: #67baca;
font-weight: bold;
display: flex;
align-items: center;
&::before {
margin-right: 8rpx;
content: '';
width: 6rpx;
height: 32rpx;
background-color: #67baca;
border-radius: 84rpx;
}
}
.r-list {
margin-top: 12rpx;
.item {
padding: 24rpx 0;
font-size: 32rpx;
color: #283031;
line-height: 36rpx;
border-bottom: 1px solid #eaeced;
&:last-of-type {
border: none;
}
}
}
}
}
}
.doctor {
padding: 15rpx 30rpx;
display: flex;
justify-content: flex-end;
.avatar {
padding-left: 16rpx;
flex-shrink: 0;
.a-img {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
}
.d-container {
flex: 1;
margin-left: 74rpx;
display: flex;
flex-direction: column;
align-items: flex-end;
.guide {
margin-bottom: 32rpx;
padding: 32rpx 30rpx;
border-radius: 32rpx 0 32rpx 32rpx;
background: linear-gradient(13deg, #ffffff 8%, #e8f0f1 100%);
border: 2rpx solid #ffffff;
.title {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
}
.sub-title {
font-size: 28rpx;
color: rgba(154, 161, 162, 1);
margin-bottom: 30rpx;
}
.list {
.l-item {
display: flex;
align-items: center;
gap: 16rpx;
margin-bottom: 30rpx;
.order {
flex-shrink: 0;
width: 28rpx;
height: 28rpx;
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 1);
border-radius: 6rpx;
background: #67baca;
}
.content {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
}
}
}
.tip {
font-size: 28rpx;
color: rgba(103, 113, 114, 1);
display: flex;
align-items: center;
.icon {
width: 44rpx;
height: 44rpx;
}
}
}
.message {
margin-bottom: 32rpx;
padding: 26rpx 32rpx;
background: #67baca;
border-radius: 32rpx 0 32rpx 32rpx;
font-size: 32rpx;
color: #fff;
white-space: pre-line;
}
.week {
margin-bottom: 32rpx;
padding: 26rpx 32rpx;
background-color: #fff;
border-radius: 32rpx 0 32rpx 32rpx;
.w-title {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
text-align: right;
}
.w-container {
margin-top: 24rpx;
.w-content {
padding: 32rpx;
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
line-height: 48rpx;
border-radius: 24rpx;
background-color: rgba(247, 248, 249, 1);
}
.row {
display: flex;
.label {
width: 156rpx;
height: 76rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: rgba(255, 255, 255, 1);
background-color: rgba(103, 186, 202, 1);
}
.content {
width: 156rpx;
height: 76rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
background-color: rgba(242, 244, 245, 1);
}
&:first-of-type {
.label {
border-radius: 24rpx 0 0 0;
}
.content {
border-radius: 0 24rpx 0 0;
}
}
&:last-of-type {
.label {
border-radius: 0 0 0 24rpx;
}
.content {
border-radius: 0 0 24rpx 0;
}
}
&:not(:last-of-type) {
border-bottom: 2rpx solid #fff;
}
}
}
}
.adl {
margin-bottom: 32rpx;
padding: 32rpx 156rpx 34rpx 30rpx;
border-radius: 0 32rpx 32rpx;
background: linear-gradient(141deg, #edfcff 0%, #d4f3f9 100%);
border: 2rpx solid #fff;
.title {
width: 324rpx;
height: 40rpx;
}
.sub-title {
margin-top: 18rpx;
line-height: 1;
font-size: 28rpx;
color: rgba(255, 255, 255, 0.8);
}
.btn {
margin-top: 20rpx;
width: 220rpx;
height: 56rpx;
text-align: center;
line-height: 56rpx;
font-size: 28rpx;
color: #e04775;
background: #ffffff;
border-radius: 102rpx 102rpx 102rpx 102rpx;
}
.tip {
margin-top: 10rpx;
font-size: 24rpx;
color: #fff;
}
}
.audio {
margin-bottom: 32rpx;
padding: 22rpx 24rpx;
border-radius: 32rpx 0 32rpx 32rpx;
background: #67baca;
min-width: 218rpx;
font-size: 32rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 12rpx;
box-sizing: border-box;
.icon {
width: 32rpx;
height: 40rpx;
}
}
.info {
margin-bottom: 32rpx;
padding: 26rpx 32rpx;
background-color: #fff;
border-radius: 32rpx 0 32rpx 32rpx;
.content {
font-size: 28rpx;
color: #283031;
}
.btn {
margin-top: 24rpx;
padding: 22rpx;
font-size: 32rpx;
color: #283031;
line-height: 40rpx;
text-align: center;
background: #67baca;
color: #ffffff;
border-radius: 104rpx 104rpx 104rpx 104rpx;
border: 1rpx solid #f8f9f9;
}
}
.referral {
margin-bottom: 32rpx;
width: 502rpx;
height: 262rpx;
background: linear-gradient(223deg, #59b0c2 0%, #94e2f1 100%);
box-shadow: 0rpx 4rpx 24rpx 0rpx rgba(0, 0, 0, 0.07);
border-radius: 24rpx 24rpx 24rpx 24rpx;
.r-header {
padding: 20rpx 24rpx 0 32rpx;
display: flex;
.title {
font-size: 32rpx;
color: #ffffff;
line-height: 48rpx;
}
.icon {
flex-shrink: 0;
width: 138rpx;
height: 122rpx;
}
}
.r-footer {
padding: 32rpx;
background: linear-gradient(11deg, #ffffff 8%, rgba(255, 255, 255, 0.79) 100%);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #ffffff;
.btn {
width: 438rpx;
height: 64rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
line-height: 64rpx;
background: #67baca;
border-radius: 104rpx 104rpx 104rpx 104rpx;
}
}
}
}
}
.place {
height: 200rpx;
}
}
}
.page-footer {
padding: 32rpx 30rpx calc(32rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
display: flex;
gap: 28rpx;
border-radius: 32rpx 32rpx 0 0;
box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04);
border: 2rpx solid #ffffff;
background-color: #fff;
.send {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
height: 76rpx;
background: #ffffff;
box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(40, 48, 49, 0.04);
border-radius: 140rpx 140rpx 140rpx 140rpx;
border: 2rpx solid #f2f4f5;
.icon {
width: 36rpx;
height: 36rpx;
}
}
.send-date {
flex-shrink: 0;
font-size: 24rpx;
color: #283031;
text-align: center;
.icon {
width: 40rpx;
height: 40rpx;
}
}
}
}
.popup-message {
padding: 30rpx;
background-color: rgba(242, 244, 245, 1);
.title {
padding: 0 32rpx 32rpx;
font-size: 36rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
text-align: center;
}
.list {
max-height: 50vh;
overflow-y: auto;
overflow-x: hidden;
.l-item {
margin-bottom: 24rpx;
padding: 30rpx;
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
border-radius: 24rpx;
background-color: #fff;
&.active {
color: #fff;
background-color: rgba(103, 186, 202, 1);
}
}
}
.submit {
margin-top: 24rpx;
width: 690rpx;
height: 84rpx;
font-size: 36rpx;
color: rgba(255, 255, 255, 1);
font-weight: bold;
background: #67baca;
display: flex;
align-items: center;
justify-content: center;
border-radius: 64rpx 64rpx 64rpx 64rpx;
}
}

443
src/pages/d_interactiveDoctor/index.ts

@ -0,0 +1,443 @@
import dayjs from 'dayjs';
const app = getApp<IAppOption>();
interface IMessageItem {
msgId: string;
msgContentType: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'; // 1:文本 2: 出诊时间 3: adl卡片 4: 语音 5: 欢迎语 6:补充真实姓名 7: 提醒完善信息 8: 复诊卡片 9:患者恢复复诊消息
msgContent: any;
msgVisitTime: string;
msgVisitTimeType?: string;
msgFromType: '1' | '2'; // 1: 患者 2: 医生
isPlay?: boolean;
msgCreateTime: string; // 消息创建时间
msgCreateTimeName?: string; // 消息创建时间
showTime?: boolean;
}
interface Item {
wordId: string;
word: string;
}
Page({
data: {
doctor: {} as any,
patientId: '',
messageListShow: false,
patientDetail: {},
isLoad: false,
isFinish: false,
scrollTop: 0,
scrollIntoView: '',
messageList: [] as IMessageItem[],
nextMsgId: '',
wordIndex: 0,
wordList: [] as Item[],
week: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
timeDay: { 1: '上午', 2: '下午' },
},
innerAudioContext: null as WechatMiniprogram.InnerAudioContext | null,
onLoad(options) {
this.innerAudioContext = wx.createInnerAudioContext({
useWebAudioImplement: true,
});
this.setData({
patientId: options.patientId,
});
},
onShow() {
app.waitLogin({ type: [2] }).then((_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORINTERACTIONDETAIL' });
this.getDoctorDetail();
this.getPatientDetail();
this.getMessageList();
this.getWordList();
});
},
onUnload() {
if (this.innerAudioContext) {
this.innerAudioContext.stop();
}
},
getDoctorDetail() {
wx.ajax({
method: 'GET',
url: '?r=zd/doctor/account/info',
data: {},
}).then((res) => {
this.setData({
doctor: res.doctor,
});
});
},
getPatientDetail() {
wx.ajax({
method: 'GET',
url: '?r=zd/doctor/message-interact/get-patient-info',
data: {
patientId: this.data.patientId,
},
}).then((res) => {
if (res.LastAdlTime) {
res.LastAdlTimeName = dayjs(res.LastAdlTime).from(dayjs().format('YYYY-MM-DD')).replace(' ', '');
}
this.setData({
patientDetail: res,
});
});
},
getMessageList() {
if (this.data.isLoad || this.data.isFinish) return;
this.setData({
isLoad: true,
});
const nextMsgId = this.data.nextMsgId;
wx.ajax({
method: 'GET',
url: '?r=zd/doctor/message-interact/doctor-get-message-list',
data: {
nextMsgId,
patientId: this.data.patientId,
},
}).then((res) => {
res.messageList.map((item) => {
if (item.msgContentType === '4') {
item.msgContent = JSON.parse(item.msgContent);
}
if (item.msgContentType === '2') {
item.msgVisitTime = item.msgVisitTimeType == 2 ? item.msgVisitTime : JSON.parse(item.msgVisitTime);
}
if (item.msgContentType === '5') {
item.welcomeMsg = JSON.parse(item.welcomeMsg);
}
if (item.msgContentType === '9') {
item.ReVisitInfo = JSON.parse(item.ReVisitInfo);
item.ReVisitInfo.visitDateName = dayjs(item.ReVisitInfo.visitDate).format('YYYY年M月DD日');
}
return item;
});
if (!this.data.nextMsgId && !res.messageList.length) {
res.messageList = [
{
msgId: '0',
msgContentType: '0',
msgContent: '',
msgVisitTime: '',
msgFromType: '2',
},
];
}
this.setData({
messageList: [...res.messageList.reverse(), ...this.data.messageList],
nextMsgId: res.nextMsgId,
unReadCount: res.unReadCount,
firstNotReadMsgId: res.firstNotReadMsgId,
isVisitAdl: res.isVisitAdl,
adlMsgId: res.adlMsgId,
isLoad: false,
isFinish: nextMsgId === res.nextMsgId,
});
this.filterCreateTime();
if (!nextMsgId) {
this.handleView();
}
});
},
scrolltoupper(e) {
if (e.detail.direction === 'top') {
this.getMessageList();
}
},
getWordList() {
wx.ajax({
method: 'GET',
url: '?r=zd/doctor/message-interact/get-common-word-list',
data: {},
}).then((res) => {
this.setData({
wordList: res,
});
});
},
handleSendDate() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILMYCLINICTIME' });
const {
messageList,
doctor: { Clinic },
} = this.data;
if (!Clinic || (Array.isArray(Clinic) && !Clinic.length)) {
wx.showModal({
title: '完善出诊时间?',
content: '您还没有录入出诊时间',
confirmText: '录入',
confirmColor: '#62bed0',
success: (res) => {
if (res.confirm) {
wx.navigateTo({
url: '/pages/d_userInfo/index',
});
}
},
});
return;
}
wx.showModal({
title: '提示',
content: '将您的出诊时间发送给患者?',
confirmColor: '#62bed0',
success: (res) => {
if (res.confirm) {
this.setData({
messageList: [
...messageList,
{
msgId: '',
msgContentType: '2',
msgContent: '',
msgVisitTime: this.data.doctor.Clinic,
msgVisitTimeType: this.data.doctor.ClinicType,
msgFromType: '2',
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
},
],
});
this.filterCreateTime();
wx.ajax({
method: 'POST',
url: '?r=zd/doctor/message-interact/send-visit-time',
data: {
patientId: this.data.patientId,
},
});
this.handleView();
}
},
});
},
handleSendShow() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILSENDMESSAGE' });
this.setData({
messageListShow: true,
});
},
handlePopupMessageClose() {
this.setData({
messageListShow: false,
});
},
handleWord(e) {
const { index } = e.currentTarget.dataset;
this.setData({
wordIndex: index,
});
},
handleSendWord() {
const { messageList, wordList, wordIndex } = this.data;
const { wordId, word } = wordList[wordIndex];
this.setData({
messageList: [
...messageList,
{
msgId: '',
msgContentType: '1',
msgContent: word,
msgVisitTime: '',
msgFromType: '2',
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
},
],
});
this.filterCreateTime();
this.handlePopupMessageClose();
this.handleView();
wx.ajax({
method: 'POST',
url: '?r=zd/doctor/message-interact/send-word-message',
data: {
patientId: this.data.patientId,
wordId,
},
});
},
handleSendUserConform(e) {
const { id } = e.currentTarget.dataset;
const title = {
6: '发送后患者将收到补充姓名通知',
7: '发送后患者将收到完善信息通知',
}[id];
wx.showModal({
title,
confirmColor: '#62bed0',
success: (res) => {
if (res.confirm) {
this.handleSendUser(id);
}
},
});
},
handleSendUser(id) {
const { messageList } = this.data;
const content = {
6: '请完善您的真实姓名,以便我清楚了解您的病情',
7: '请完善您的个人信息,以便我清楚了解您的病情',
}[id];
this.setData({
messageList: [
...messageList,
{
msgId: '',
msgContentType: id,
msgContent: content,
msgVisitTime: '',
msgFromType: '2',
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
},
],
});
this.filterCreateTime();
this.handlePopupMessageClose();
this.handleView();
const url = {
6: '?r=zd/doctor/message-interact/send-remind-name',
7: '?r=zd/doctor/message-interact/send-remind-init',
}[id];
wx.ajax({
method: 'POST',
url,
data: {
patientId: this.data.patientId,
},
});
},
formatTime(date: string) {
let msgCreateTimeName = '';
if (dayjs().format('YYYY-MM-DD') === dayjs(date).format('YYYY-MM-DD')) {
msgCreateTimeName = dayjs(date).format('HH:mm');
} else if (dayjs().format('YYYY-MM-DD') === dayjs(date).add(1, 'day').format('YYYY-MM-DD')) {
msgCreateTimeName = `昨天 ${dayjs(date).format('HH:mm')}`;
} else if (dayjs().diff(date, 'day') < 7) {
msgCreateTimeName = dayjs(date).format(`dddd HH:mm`);
} else {
msgCreateTimeName = dayjs(date).format('YYYY-MM-DD HH:mm');
}
return msgCreateTimeName;
},
filterCreateTime() {
const gapTime = 5 * 60 * 1000;
const { messageList } = this.data;
let preTime = 0;
messageList.forEach((item, index) => {
if (index === 0) {
item.showTime = true;
preTime = dayjs(item.msgCreateTime).valueOf();
item.msgCreateTimeName = this.formatTime(item.msgCreateTime);
} else {
const curTime = dayjs(item.msgCreateTime).valueOf();
if (curTime - preTime > gapTime) {
item.showTime = true;
item.msgCreateTimeName = this.formatTime(item.msgCreateTime);
preTime = dayjs(item.msgCreateTime).valueOf();
}
}
});
this.setData({
messageList,
});
},
handleView(index = -1) {
this.setData({
scrollIntoView: index > -1 ? `view${index}` : `place`,
});
},
handlePatientDetail() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORINTERACTIONDETAILPATIENTFILE' });
wx.navigateTo({
url: `/pages/d_patientDetail/index?id=${this.data.patientId}`,
});
},
handleAudio(e) {
const { index } = e.currentTarget.dataset;
const { messageList } = this.data;
const messageItem = messageList[index];
const { url } = messageItem.msgContent[0];
if (this.innerAudioContext) {
if (messageItem.isPlay) {
this.innerAudioContext.stop();
messageItem.isPlay = false;
this.setData({
messageList,
});
return;
}
this.innerAudioContext.stop();
this.innerAudioContext.src = url;
this.innerAudioContext.play();
messageItem.isPlay = true;
this.innerAudioContext.onEnded(() => {
messageItem.isPlay = false;
this.setData({
messageList,
});
});
this.innerAudioContext.onStop(() => {
messageItem.isPlay = false;
this.setData({
messageList,
});
});
this.setData({
messageList,
});
}
},
handleAdl() {
wx.showToast({
title: '患者点击此按钮可进入ADL测评页面',
icon: 'none',
});
},
handleReferral() {
wx.showModal({
title: '',
content: '您将给患者发送复诊时间填写卡片?',
confirmText: '发送',
confirmColor: '#62bed0',
success: (res) => {
if (res.confirm) {
wx.ajax({
method: 'POST',
url: '?r=zd/doctor/message-interact/send-re-visit',
data: {
patientId: this.data.patientId,
},
}).then(() => {
this.setData({
messageList: [
...this.data.messageList,
{
msgId: '',
msgContentType: '8',
msgVisitTime: '',
msgContent: '',
msgFromType: '2',
msgCreateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
},
],
});
this.handleView();
});
}
},
});
},
});

293
src/pages/d_interactiveDoctor/index.wxml

@ -0,0 +1,293 @@
<view class="page">
<view class="page-header">
<view class="user">
<image class="avatar" src="{{patientDetail.userAvatar}}"></image>
<view class="wrap">
<view class="name">
<view class="left">
{{patientDetail.patientName}}
<view
class="tip"
wx:if="{{patientDetail.patientNameInit==='2'}}"
bind:tap="handleSendUserConform"
data-id="6"
>
提醒补充真实姓名
</view>
</view>
<view class="detail" bind:tap="handlePatientDetail">
患者档案
<van-icon name="arrow" />
</view>
</view>
<view class="tags">
<view class="tag" wx:for="{{patientDetail.Tags}}" wx:for-item="tag" wx:for-index="tIndex" wx:key="tIndex">
{{tag}}
</view>
</view>
</view>
</view>
<view class="adl" wx:if="{{patientDetail.LastAdlTime}}">
<view class="a-header">
<view class="content">最近一次测评:{{patientDetail.LastAdlTimeName}}</view>
<view class="box"></view>
</view>
<view class="a-content">
<view class="row" wx:if="{{patientDetail.AdlScore}}">
<view class="label">最新ADL评分</view>
<view class="num">{{patientDetail.AdlScore}}</view>
<view class="tag" wx:if="{{patientDetail.AdlScore<=1}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-success.png?t={{Timestamp}}"></image>
已达标
</view>
<view class="t-content" wx:if="{{patientDetail.TotalScoreChange*1!=0}}">
<image
wx:if="{{patientDetail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-success.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-success.png?t={{Timestamp}}"></image>
{{patientDetail.TotalScoreChange}}
</view>
</view>
<view class="tag tag-warn" wx:elif="{{patientDetail.AdlScore<=5}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-warn.png?t={{Timestamp}}"></image>
接近达标
</view>
<view class="t-content" wx:if="{{patientDetail.TotalScoreChange*1!=0}}">
<image
wx:if="{{patientDetail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-warn.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-warn.png?t={{Timestamp}}"></image>
{{patientDetail.TotalScoreChange}}
</view>
</view>
<view class="tag tag-error" wx:else>
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-error.png?t={{Timestamp}}"></image>
待达标
</view>
<view class="t-content" wx:if="{{patientDetail.TotalScoreChange*1!=0}}">
<image
wx:if="{{patientDetail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-error.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-error.png?t={{Timestamp}}"></image>
{{patientDetail.TotalScoreChange}}
</view>
</view>
</view>
<view class="row" wx:if="{{patientDetail.SteroidDailyDose}}">
<view class="label">最新激素用量</view>
<view class="num">{{patientDetail.SteroidDailyDose}}mg</view>
<view class="tag" wx:if="{{patientDetail.SteroidDailyDose<=5}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-success.png?t={{Timestamp}}"></image>
已达标
</view>
<view class="t-content" wx:if="{{patientDetail.SteroidDailyDoseChange*1!=0}}">
<image
wx:if="{{patientDetail.SteroidDailyDoseChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-success.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-success.png?t={{Timestamp}}"></image>
{{patientDetail.SteroidDailyDoseChange}}mg
</view>
</view>
<view class="tag tag-error" wx:else>
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-error.png?t={{Timestamp}}"></image>
待达标
</view>
<view class="t-content" wx:if="{{patientDetail.SteroidDailyDoseChange*1!=0}}">
<image
wx:if="{{patientDetail.SteroidDailyDoseChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-error.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-error.png?t={{Timestamp}}"></image>
{{patientDetail.SteroidDailyDoseChange}}mg
</view>
</view>
</view>
</view>
</view>
</view>
<view class="page-container" id="page-container">
<scroll-view
class="scroll-view"
scroll-y="{{true}}"
scroll-top="{{scrollTop}}"
scroll-into-view="{{scrollIntoView}}"
scroll-with-animation
bindscrolltoupper="scrolltoupper"
>
<van-loading wx:if="{{isLoad && !isFinish}}" />
<view
class="view-wrap"
wx:for="{{messageList}}"
wx:key="msgId"
wx:for-item="message"
wx:for-index="mIndex"
id="view{{mIndex}}"
>
<view class="date" wx:if="{{message.showTime}}">{{message.msgCreateTimeName}}</view>
<view class="patient" wx:if="{{message.msgFromType==='1'}}">
<view class="avatar">
<image class="a-img" src="{{patientDetail.userAvatar}}"></image>
</view>
<view class="p-container">
<view class="message" wx:if="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
<view class="referral-replay" wx:if="{{message.msgContentType==='9'}}">
<view class="title">我最近一次复诊时间是{{message.ReVisitInfo.visitDateName}}</view>
<view class="sub-title">我的方案是</view>
<view class="r-list">
<view class="item" wx:if="{{message.ReVisitInfo.hormone==1}}">1.激素</view>
<view class="item" wx:if="{{message.ReVisitInfo.traditionalInhibitor==1}}">2.传统免疫抑制剂(如他克莫司、吗 替麦考酚酯等)</view>
<view class="item" wx:if="{{message.ReVisitInfo.gammaGlobulin==1}}">3.静脉输注丙种球蛋白</view>
<view class="item" wx:if="{{message.ReVisitInfo.plasmaExchange==1}}">4.血浆置换</view>
<view class="item" wx:if="{{message.ReVisitInfo.bCellInhibitor==1}}">5.B细胞抑制剂(如:利妥昔单抗、泰 它西普、伊奈利珠单抗)</view>
<view class="item" wx:if="{{message.ReVisitInfo.fcRnAntagonists==1}}">6.FcRn拮抗剂(如:艾加莫德)</view>
<view class="item" wx:if="{{message.ReVisitInfo.c5ComplementInhibitor==1}}">7.C5补体抑制剂(如:依库珠单抗)</view>
<view class="item" wx:if="{{message.ReVisitInfo.chineseMedicine==1}}">8.中药或中成药</view>
<view class="item" wx:if="{{message.ReVisitInfo.other==1}}">9.其他</view>
</view>
</view>
</view>
</view>
<view class="doctor" wx:if="{{message.msgFromType==='2'}}">
<view class="d-container">
<view class="guide" wx:if="{{message.msgContentType==='5'}}">
<view class="title">{{message.welcomeMsg.title}}</view>
<view class="sub-title">{{message.welcomeMsg.questionDes}}</view>
<view class="list">
<view class="l-item" wx:for="{{message.welcomeMsg.hotQuestion}}" wx:key="questionId">
<view class="order">{{index+1}}</view>
<view class="content">{{item.question}}</view>
</view>
</view>
<view class="tip">
{{message.welcomeMsg.guideClick}}
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-down1.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="message" wx:elif="{{message.msgContentType==='1'}}">{{message.msgContent}}</view>
<view class="week" wx:elif="{{message.msgContentType==='2'}}">
<view class="w-title">以下是我的出诊时间</view>
<view class="w-container">
<view wx:if="{{message.msgVisitTimeType==2}}" class="w-content pre-line">{{message.msgVisitTime}}</view>
<block wx:else>
<view class="row" wx:for="{{message.msgVisitTime}}" wx:key="index">
<view class="label">{{week[item.weekday-1]}}</view>
<view class="content">{{timeDay[item.timeType]}}</view>
</view>
</block>
</view>
</view>
<view
class="adl"
wx:elif="{{message.msgContentType==='3'}}"
style="padding-top: {{top+25}}px;background: url({{imageUrl}}za-images/doctor/d_interactive-adl-bg.png?t={{Timestamp}}) no-repeat bottom right / 268rpx 222rpx,#D74D75;"
>
<image
class="title"
src="{{imageUrl}}za-images/doctor/d_interactiveTitle1.png?t={{Timestamp}}"
mode="aspectFit"
></image>
<view class="sub-title">ADL+激素双达标</view>
<view class="btn" bind:tap="handleAdl">点击进入ADL</view>
<view class="tip">建议您定期做ADL测评</view>
</view>
<view
class="audio"
wx:elif="{{message.msgContentType==='4'}}"
bind:tap="handleAudio"
data-index="{{mIndex}}"
>
{{message.msgContent[0].duration}}''
<image
class="icon"
wx:if="{{message.isPlay}}"
src="{{imageUrl}}za-images/doctor/audio-left.gif?t={{Timestamp}}"
mode="aspectFit"
></image>
<image
class="icon"
wx:else
src="{{imageUrl}}za-images/doctor/audio-left.png?t={{Timestamp}}"
mode="aspectFit"
></image>
</view>
<view class="info" wx:elif="{{message.msgContentType==='6'}}">
<view class="content">{{message.msgContent}}</view>
<view class="btn">提交您的真实姓名</view>
</view>
<view class="info" wx:elif="{{message.msgContentType==='7'}}">
<view class="content">{{message.msgContent}}</view>
<view class="btn">完善个人信息</view>
</view>
<view class="referral" wx:elif="{{message.msgContentType==='8'}}">
<view class="r-header">
<view class="title">您最近有按照医生的 提醒,定期复诊吗?</view>
<image class="icon" src="{{imageUrl}}za-images5/hostipal.png?t={{Timestamp}}"></image>
</view>
<view class="r-footer">
<view class="btn">已复诊</view>
</view>
</view>
</view>
<view class="avatar">
<image class="a-img" mode="aspectFill" src="{{imageUrl}}za-images/5/doctor.png?t={{Timestamp}}"></image>
</view>
</view>
</view>
<view id="place" class="place"></view>
</scroll-view>
</view>
<view class="page-footer">
<view class="send" bind:tap="handleSendShow">发送消息</view>
<view class="send-date" wx:if="{{patientDetail.patientInit==='2'}}" bind:tap="handleSendUserConform" data-id="7">
<image class="icon" src="{{imageUrl}}za-images/3/icon-user.png?t={{Timestamp}}"></image>
<view>完善个人信息</view>
</view>
<view class="send-date" bind:tap="handleSendDate">
<image class="icon" src="{{imageUrl}}za-images/3/icon-send-date.png?t={{Timestamp}}"></image>
<view>我的出诊时间</view>
</view>
<view class="send-date" bind:tap="handleReferral">
<image class="icon" src="{{imageUrl}}za-images/5/icon-referral.png?t={{Timestamp}}"></image>
<view style="color: #67baca">复诊提醒</view>
</view>
</view>
</view>
<van-popup
show="{{ messageListShow }}"
style="--popup-close-icon-color: #283031"
position="bottom"
round
bind:close="handlePopupMessageClose"
closeable
>
<view class="popup-message">
<view class="title">发送消息</view>
<view class="list">
<view
class="l-item {{wordIndex===index && 'active'}}"
wx:for="{{wordList}}"
wx:key="wordId"
bind:tap="handleWord"
data-index="{{index}}"
>
{{item.word}}
</view>
</view>
<view class="submit" bind:tap="handleSendWord">发送</view>
</view>
</van-popup>

10
src/pages/d_patientDetail/index.json

@ -0,0 +1,10 @@
{
"navigationStyle": "custom",
"usingComponents": {
"zd-navBar": "/components/zd-navBar/navBar",
"van-icon": "@vant/weapp/icon/index",
"van-popup": "@vant/weapp/popup/index",
"ec-canvas": "/components/ec-canvas/ec-canvas",
"toast": "/components/toast/index"
}
}

884
src/pages/d_patientDetail/index.scss

@ -0,0 +1,884 @@
page {
background-color: rgba(242, 244, 245, 1);
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
}
.page {
width: 100vw;
overflow-x: hidden;
min-height: 100vh;
.banner {
margin: 40rpx 30rpx 32rpx;
padding: 36rpx 20rpx;
background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
position: relative;
.watermark {
position: absolute;
top: 80rpx;
z-index: 2;
font-size: 36rpx;
line-height: 58rpx;
color: rgba(0, 0, 0, 0.05);
transform: rotate(-12deg);
text-align: center;
.p {
white-space: wrap;
}
}
.banner-container {
.user {
display: flex;
.avatar {
.avatar-img {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
}
.wrap {
padding-left: 20rpx;
.w-header {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8rpx;
.name {
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
}
.icon {
width: 32rpx;
height: 32rpx;
}
.tel {
position: relative;
z-index: 3;
font-size: 32rpx;
color: rgba(154, 161, 162, 1);
display: flex;
align-items: center;
.tel-icon {
margin-left: 10rpx;
width: 32rpx;
height: 32rpx;
}
}
.send {
margin-left: 32rpx;
width: 92rpx;
height: 32rpx;
font-size: 22rpx;
color: rgba(103, 186, 202, 1);
text-align: center;
border: 1px solid #67baca;
border-radius: 58rpx 58rpx 58rpx 58rpx;
}
}
.w-tags {
margin-top: 28rpx;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 12rpx;
.label {
width: 164rpx;
height: 40rpx;
}
.tag {
padding: 6rpx 16rpx;
font-size: 24rpx;
line-height: 28rpx;
color: rgba(103, 113, 114, 1);
background-color: rgba(242, 244, 245, 1);
border-radius: 8rpx;
}
}
}
}
.adl {
margin-top: 32rpx;
background: #ffffff;
box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(40, 48, 49, 0.04);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #f8f9f9;
.a-header {
display: flex;
align-items: flex-start;
flex-direction: column;
.content {
position: relative;
.sub-content1 {
position: relative;
z-index: 1;
border-radius: 24rpx 0 24rpx 0;
padding: 14rpx 28rpx;
font-size: 28rpx;
color: rgba(98, 190, 208, 1);
background-color: rgba(242, 248, 249, 1);
}
.sub-content2 {
position: absolute;
right: 20rpx;
top: 0;
transform: translateX(100%);
border-radius: 0 0 24rpx 0;
padding: 14rpx 28rpx 14rpx 40rpx;
font-size: 28rpx;
color: #e59a29;
background-color: #fff5df;
}
}
.box {
width: 40rpx;
height: 40rpx;
background-color: rgba(242, 248, 249, 1);
}
}
.a-content {
position: relative;
z-index: 1;
margin-top: -40rpx;
padding: 32rpx 30rpx;
background-color: #fff;
border-radius: 24rpx;
.row {
display: flex;
align-items: center;
gap: 20rpx;
&:first-of-type {
margin-bottom: 24rpx;
}
.label {
flex-shrink: 0;
font-size: 28rpx;
color: rgba(154, 161, 162, 1);
width: 6em;
}
.num {
min-width: 3em;
font-size: 28rpx;
color: rgba(40, 48, 49, 1);
}
.tag {
display: flex;
align-items: center;
background-color: rgba(232, 245, 248, 1);
border-radius: 12rpx;
.t-label {
padding: 8rpx 12rpx;
font-size: 24rpx;
color: rgba(255, 255, 255, 1);
background-color: rgba(103, 186, 202, 1);
border-radius: 12rpx;
display: flex;
align-items: center;
gap: 8rpx;
flex-shrink: 0;
.icon {
width: 24rpx;
height: 24rpx;
}
}
.t-content {
padding: 0 16rpx 0 8rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: rgba(103, 186, 202, 1);
display: flex;
align-items: center;
gap: 4rpx;
flex-shrink: 0;
.icon {
width: 24rpx;
height: 28rpx;
}
}
&.tag-warn {
background-color: rgba(227, 220, 64, 0.1);
.t-label {
background-color: rgba(225, 217, 45, 1);
}
.t-content {
color: rgba(225, 217, 45, 1);
}
}
&.tag-error {
background-color: rgba(248, 234, 234, 1);
.t-label {
background-color: rgba(215, 108, 108, 1);
}
.t-content {
color: rgba(215, 108, 108, 1);
}
}
}
}
.d-row {
margin-top: 22rpx;
display: flex;
gap: 20rpx;
.label {
flex-shrink: 0;
width: 6em;
font-size: 28rpx;
color: rgba(154, 161, 162, 1);
}
.content {
min-width: 3em;
font-size: 28rpx;
color: rgba(40, 48, 49, 1);
}
}
}
}
.info-card {
position: relative;
margin-top: 16rpx;
padding: 32rpx 30rpx;
border-radius: 24rpx;
box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(40, 48, 49, 0.04);
border: 2rpx solid #f8f9f9;
background-color: #fff;
display: grid;
gap: 32rpx 22rpx;
grid-template-columns: repeat(auto-fit, minmax(40%, 1fr));
.ic-item {
display: flex;
.label {
font-size: 28rpx;
color: #9aa1a2;
white-space: nowrap;
}
.content {
font-size: 28rpx;
color: #283031;
white-space: nowrap;
}
}
.edit {
position: absolute;
bottom: 0;
right: 0;
padding: 6rpx 18rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: #fff;
border-radius: 32rpx 0 24rpx 0;
background-color: #67baca;
.icon {
width: 32rpx;
height: 32rpx;
}
}
}
.b-footer {
margin: 32rpx auto 0;
display: flex;
align-items: center;
justify-content: center;
.send {
margin: 0 42rpx;
width: 200rpx;
height: 60rpx;
font-size: 32rpx;
color: rgba(98, 190, 208, 1);
display: flex;
align-items: center;
justify-content: center;
background: #ffffff;
border-radius: 64rpx 64rpx 64rpx 64rpx;
border: 2rpx solid #62bed0;
}
.remark {
width: 200rpx;
height: 60rpx;
font-size: 32rpx;
color: rgba(98, 190, 208, 1);
display: flex;
align-items: center;
justify-content: center;
background: #ffffff;
border-radius: 64rpx 64rpx 64rpx 64rpx;
border: 2rpx solid #62bed0;
}
}
}
}
.chart-container {
margin: 30rpx;
padding: 30rpx;
border-radius: 24rpx;
background-color: #fff;
position: relative;
.watermark {
position: absolute;
top: 80rpx;
z-index: 2;
font-size: 36rpx;
line-height: 58rpx;
color: rgba(0, 0, 0, 0.05);
transform: rotate(-12deg);
text-align: center;
.p {
max-width: 90vw;
white-space: wrap;
}
}
.container {
.c-nav {
position: relative;
z-index: 3;
display: flex;
padding: 8rpx;
border-radius: 98rpx;
background-color: #f2f4f5;
.nav-item {
flex: 1;
padding: 12rpx;
font-size: 32rpx;
color: #677172;
text-align: center;
&.active {
color: #fff;
border-radius: 62rpx;
background-color: #62bed0;
}
}
}
.filter {
position: relative;
z-index: 3;
margin-top: 32rpx;
display: flex;
gap: 16rpx;
align-items: center;
border-radius: 80rpx 80rpx 80rpx 80rpx;
.type {
padding: 10rpx 32rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: rgba(103, 113, 114, 1);
background-color: rgba(242, 244, 245, 1);
border-radius: 34rpx;
.icon {
width: 24rpx;
height: 24rpx;
}
}
.range {
padding: 10rpx 32rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: rgba(103, 113, 114, 1);
border-radius: 34rpx;
background-color: rgba(242, 244, 245, 1);
.icon {
width: 24rpx;
height: 24rpx;
}
}
}
.card {
margin: 32rpx 0 0;
padding: 20rpx;
background: #ffffff;
box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(40, 48, 49, 0.04);
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #f8f9f9;
.pie {
height: 376rpx;
}
.line {
border-top: 1px dashed rgba(242, 244, 245, 1);
}
.w-header {
padding-top: 32rpx;
display: flex;
justify-content: space-between;
.title {
font-size: 32rpx;
color: #484848;
}
.legend {
display: flex;
align-items: center;
gap: 25rpx;
.item {
font-size: 20rpx;
color: #4f4f4f;
display: flex;
align-items: center;
.logo {
margin-right: 8rpx;
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background-color: #cf5375;
&.hormone {
background-color: #3192a1;
}
}
.icon {
margin-right: 8rpx;
width: 17rpx;
height: 24rpx;
}
}
}
}
.column {
height: 400rpx;
}
}
.module {
margin-top: 30rpx;
.module-header {
display: flex;
.date {
flex-shrink: 0;
font-size: 24rpx;
color: #333333;
}
.tags {
margin-left: 14rpx;
flex: 1;
display: flex;
flex-wrap: nowrap;
overflow-x: scroll;
white-space: nowrap;
&::-webkit-scrollbar {
display: none;
}
.tag1 {
margin-left: 14rpx;
padding: 0 12rpx;
background: #d86687;
border-radius: 6rpx;
font-size: 24rpx;
line-height: 36rpx;
text-align: center;
color: #ffffff;
}
.tag2 {
margin-left: 14rpx;
padding: 0 12rpx;
background: #0b184f;
border-radius: 6rpx;
font-size: 24rpx;
line-height: 36rpx;
text-align: center;
color: #ffffff;
}
.tag3 {
margin-left: 14rpx;
padding: 0 12rpx;
background: #24d8c8;
border-radius: 6rpx;
font-size: 24rpx;
line-height: 36rpx;
text-align: center;
color: #ffffff;
}
}
}
.module-container {
margin-top: 24rpx;
display: flex;
.aside {
margin-right: 30rpx;
padding-left: 14rpx;
border-right: 1px dashed #dddddd;
}
.m-card {
flex: 1;
box-shadow: 0 4rpx 29rpx 0rpx rgba(207, 83, 116, 0.25);
border-radius: 24rpx;
.card-header {
padding: 20rpx 18rpx 4rpx 48rpx;
border-radius: 24rpx 24rpx 0 0;
display: flex;
align-items: center;
justify-content: space-between;
box-shadow: 8rpx 8rpx 16rpx 0rpx rgba(143, 217, 226, 0.1);
&.grade1 {
background: linear-gradient(90deg, #26dac9 7%, rgba(143, 217, 226, 0) 70%, rgba(143, 217, 226, 0) 100%);
}
&.grade2 {
background: linear-gradient(
90deg,
rgba(235, 111, 87, 1) 7%,
rgba(143, 217, 226, 0) 70%,
rgba(143, 217, 226, 0) 100%
);
}
&.grade3 {
background: linear-gradient(
90deg,
rgba(207, 83, 117, 1) 7%,
rgba(143, 217, 226, 0) 70%,
rgba(143, 217, 226, 0) 100%
);
}
.num {
display: flex;
align-items: baseline;
font-size: 96rpx;
line-height: 1;
color: #ffffff;
letter-spacing: 4rpx;
.sub {
font-size: 24rpx;
color: #fff;
}
}
.num-detail {
display: flex;
.n-item {
width: 73rpx;
&.active {
.box {
background-color: #cf5375;
}
}
.box {
width: 45rpx;
height: 45rpx;
width: 45rpx;
height: 45rpx;
font-size: 32rpx;
color: #fff;
text-align: center;
line-height: 45rpx;
background: #333333;
border-radius: 12rpx 12rpx 12rpx 12rpx;
}
.name {
font-size: 24rpx;
line-height: 48rpx;
color: rgba(51, 51, 51, 0.5);
}
}
}
.status {
font-size: 24rpx;
color: #989898;
text-align: right;
.s-num {
font-size: 32rpx;
}
.s-core {
font-size: 24rpx;
color: #989898;
// background: #484848;
border-radius: 6rpx;
}
}
}
.card-container {
padding: 8rpx 23rpx 20rpx;
border-radius: 0 0 24rpx 24rpx;
background-color: #fff;
.cc-title {
text-indent: 22rpx;
font-size: 24rpx;
color: rgba(79, 79, 79, 1);
}
.cc-content {
margin-top: 12rpx;
padding: 16rpx 20rpx;
border-radius: 24rpx;
background-color: rgba(249, 249, 249, 1);
.line {
font-size: 24rpx;
color: #666666;
line-height: 36rpx;
.dot {
color: #666666;
font-weight: bold;
}
.red {
color: #cf5375;
}
.green {
color: #25d9c8;
}
}
}
.fold {
margin-top: 16rpx;
.fold-header {
display: flex;
justify-content: flex-end;
font-size: 24rpx;
color: rgba(204, 204, 204, 1);
}
.fold-container {
padding-top: 10rpx;
height: 500rpx;
overflow: hidden;
transition: all 0.5s;
&.hide {
padding: 0;
height: 0;
}
.fold-img {
width: 100%;
}
.scurt {
width: 100%;
border: 1px solid rgba(0, 0, 0, 0.1);
box-sizing: border-box;
.s-header {
display: flex;
height: 40rpx;
margin-bottom: -1px;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
.none {
flex-shrink: 0;
width: 226rpx;
background-color: rgba(228, 228, 228, 1);
}
.bar {
flex: 1;
display: flex;
.num {
flex: 1;
text-align: center;
font-size: 24rpx;
color: #fff;
line-height: 40rpx;
}
}
}
.s-body {
display: flex;
.s-aside {
width: 28rpx;
background-color: rgba(102, 102, 102, 0.15);
flex-shrink: 0;
.sa-item {
display: flex;
text-align: center;
justify-content: center;
align-items: center;
font-size: 18rpx;
color: rgba(102, 102, 102, 1);
line-height: 1;
overflow: hidden;
&:not(:last-of-type) {
margin-bottom: -1px;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
}
.sa-item1 {
height: 158rpx;
}
.sa-item2 {
height: 54rpx;
}
.sa-item3 {
height: 106rpx;
}
.sa-item4 {
height: 108rpx;
}
}
.s-container {
flex: 1;
.sc-row {
display: flex;
height: 54rpx;
overflow: hidden;
.sc-title {
width: 198rpx;
font-size: 18rpx;
color: rgba(102, 102, 102, 1);
text-align: center;
line-height: 53rpx;
}
.sc-col {
margin-left: -1px;
border-left: 1px solid rgba(0, 0, 0, 0.1);
flex: 1;
text-align: center;
.icon {
margin-top: 11rpx;
width: 32rpx;
height: 32rpx;
}
}
}
.sc-row:not(:last-of-type) {
margin-bottom: -1px;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.sc-row:nth-of-type(2n-1) {
background-color: rgba(217, 217, 217, 0.2);
}
}
}
}
}
}
}
}
.drug-card {
margin-top: 30rpx;
flex: 1;
box-shadow: 0 4rpx 29rpx 0rpx rgba(207, 83, 116, 0.25);
border-radius: 24rpx;
.d-header {
border-radius: 24rpx 0 0 0;
padding: 20rpx 50rpx;
display: flex;
align-items: center;
justify-content: space-between;
background: linear-gradient(95deg, #26dac9 7%, rgba(143, 217, 226, 0) 100%);
.name {
font-size: 28rpx;
color: #ffffff;
}
.status {
font-size: 22rpx;
color: #5b6363;
.num {
font-size: 22rpx;
color: #cf5375;
}
}
}
.content {
padding: 20rpx 50rpx;
font-size: 22rpx;
color: #666666;
}
}
}
}
}
}
}
.popup-remark {
padding: 32rpx 30rpx 84rpx;
.title {
display: flex;
justify-content: center;
font-size: 36rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
}
.textarea {
padding: 30rpx;
margin-top: 32rpx;
width: 100%;
height: 216rpx;
box-sizing: border-box;
background: #f7f8f9;
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #f8f9f9;
font-size: 32rx;
}
.submit {
margin-top: 32rpx;
height: 84rpx;
display: flex;
justify-content: center;
align-items: center;
background: #67baca;
font-size: 36rpx;
color: #fff;
border-radius: 64rpx 64rpx 64rpx 64rpx;
}
}
.popup-edit {
width: 650rpx;
background-color: #fff;
.title {
padding-top: 46rpx;
font-size: 40rpx;
color: #283031;
font-weight: bold;
text-align: center;
}
.popup-container {
padding: 0 32rpx 32rpx;
min-height: 20vh;
max-height: 50vh;
overflow-y: auto;
.row {
margin-top: 48rpx;
.row-header {
display: flex;
align-items: center;
justify-content: space-between;
.label {
font-size: 32rpx;
color: #283031;
font-weight: bold;
}
.change-phone {
font-size: 32rpx;
color: #cf5375;
}
}
.row-content {
padding-top: 24rpx;
.radio-btns {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 22rpx;
.btn {
padding: 18rpx 24rpx;
font-size: 32rpx;
color: #677172;
text-align: center;
line-height: 40rpx;
background: #f7f8f9;
border-radius: 12rpx 12rpx 12rpx 12rpx;
&.active {
color: #fff;
background-color: #67baca;
}
}
}
}
}
}
.popup-footer {
box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(0, 0, 0, 0.15);
padding: 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
gap: 18rpx;
.cancel {
flex: 1;
height: 74rpx;
border-radius: 98rpx 98rpx 98rpx 98rpx;
border: 1px solid #67baca;
font-size: 36rpx;
line-height: 74rpx;
color: #67baca;
text-align: center;
}
.conform {
flex: 1;
height: 74rpx;
border-radius: 98rpx 98rpx 98rpx 98rpx;
border: 1px solid #67baca;
background-color: #67baca;
font-size: 36rpx;
line-height: 74rpx;
color: #fff;
text-align: center;
}
}
}

1075
src/pages/d_patientDetail/index.ts

File diff suppressed because it is too large Load Diff

588
src/pages/d_patientDetail/index.wxml

@ -0,0 +1,588 @@
<view
class="page"
style="background: url({{imageUrl}}za-images/doctor/d_patient-detail-bg.png?t={{Timestamp}}) no-repeat top center/100% 640rpx"
>
<zd-navBar background="{{background}}" title="患者档案" back bind:back="handleBack"></zd-navBar>
<view class="banner">
<view class="watermark">
<view class="p">本页面内容涉及患者个人信息</view>
<view class="p">仅用于{{hospital.Name}}{{doctor.Name}}医生进行患者随访管理</view>
<view class="p">不可用于其他用途</view>
<view class="p">【gMG给力加油站】</view>
</view>
<view class="banner-container">
<view class="user">
<view class="avatar">
<image class="avatar-img" src="{{detail.UserImg}}"></image>
</view>
<view class="wrap">
<view class="w-header">
<view class="name">{{showTel ? detail.Name : detail.hideName}}</view>
<image
wx:if="{{detail.Gender==='1'}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-man.png?t={{Timestamp}}"
></image>
<image
wx:if="{{detail.Gender==='2'}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-woman.png?t={{Timestamp}}"
></image>
<view class="tel" bind:tap="handleToggleTel">
{{showTel ? detail.Telephone : '***********'}}
<image wx:if="{{showTel}}" class="tel-icon" src="{{imageUrl}}za-images/5/eye2.png?t={{Timestamp}}"></image>
<image wx:else class="tel-icon" src="{{imageUrl}}za-images/5/eye1.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="w-tags">
<image
wx:if="{{detail.UserType===4}}"
class="label"
src="{{imageUrl}}za-images/doctor/drug-label.png?t={{Timestamp}}"
></image>
<view class="tag" wx:for="{{detail.Tags}}" wx:for-item="tag" wx:for-index="tIndex" wx:key="tIndex">
{{tag}}
</view>
</view>
</view>
</view>
<view class="adl" wx:if="{{detail.LastAdlTime}}">
<view class="a-header">
<view class="content">
<view class="sub-content1">最近一次测评:{{detail.LastAdlTimeName}}</view>
<view class="sub-content2" wx:if="{{detail.LastAdlNeedFollowStatus==1}}">需随访</view>
</view>
<view class="box"></view>
</view>
<view class="a-content">
<view class="row" wx:if="{{detail.AdlScore}}">
<view class="label">最新ADL评分</view>
<view class="num">{{detail.AdlScore}}</view>
<view class="tag" wx:if="{{detail.AdlScore<=1}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-success.png?t={{Timestamp}}"></image>
已达标
</view>
<view class="t-content" wx:if="{{detail.TotalScoreChange*1!=0}}">
<image
wx:if="{{detail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-success.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-success.png?t={{Timestamp}}"></image>
{{detail.TotalScoreChange}}
</view>
</view>
<view class="tag tag-warn" wx:elif="{{detail.AdlScore<=5}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-warn.png?t={{Timestamp}}"></image>
接近达标
</view>
<view class="t-content" wx:if="{{detail.TotalScoreChange*1!=0}}">
<image
wx:if="{{detail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-warn.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-warn.png?t={{Timestamp}}"></image>
{{detail.TotalScoreChange}}
</view>
</view>
<view class="tag tag-error" wx:else>
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-error.png?t={{Timestamp}}"></image>
待达标
</view>
<view class="t-content" wx:if="{{detail.TotalScoreChange*1!=0}}">
<image
wx:if="{{detail.TotalScoreChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-error.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-error.png?t={{Timestamp}}"></image>
{{detail.TotalScoreChange}}
</view>
</view>
</view>
<view class="row" wx:if="{{detail.SteroidDailyDose}}">
<view class="label">最新激素用量</view>
<view class="num">{{detail.SteroidDailyDose}}mg</view>
<view class="tag" wx:if="{{detail.SteroidDailyDose<=5}}">
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-success.png?t={{Timestamp}}"></image>
已达标
</view>
<view class="t-content" wx:if="{{detail.SteroidDailyDoseChange*1!=0}}">
<image
wx:if="{{detail.SteroidDailyDoseChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-success.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-success.png?t={{Timestamp}}"></image>
{{detail.SteroidDailyDoseChange}}mg
</view>
</view>
<view class="tag tag-error" wx:else>
<view class="t-label">
<image class="icon" src="{{imageUrl}}za-images/doctor/icon-error.png?t={{Timestamp}}"></image>
待达标
</view>
<view class="t-content" wx:if="{{detail.SteroidDailyDoseChange*1!=0}}">
<image
wx:if="{{detail.SteroidDailyDoseChange<=0}}"
class="icon"
src="{{imageUrl}}za-images/doctor/icon-down-error.png?t={{Timestamp}}"
></image>
<image wx:else class="icon" src="{{imageUrl}}za-images/doctor/icon-up-error.png?t={{Timestamp}}"></image>
{{detail.SteroidDailyDoseChange}}mg
</view>
</view>
</view>
<view class="d-row" wx:if="{{detail.LastUseDrugsTime}}">
<view class="label">最近用药</view>
<view class="content">
{{detail.LastUseDrugsTime}}
<block wx:if="{{detail.LastUseDrugsTimeName}}">({{detail.LastUseDrugsTimeName}})</block>
</view>
</view>
<view class="d-row" wx:if="{{detail.DoctorRemark}}">
<view class="label">备注</view>
<view class="content">{{detail.DoctorRemark}}</view>
</view>
</view>
</view>
<view class="info-card">
<view class="ic-item">
<view class="label">抗体类型:</view>
<view class="content">{{antibodyTypeRangeList[detail.AntibodyType-1].value}}</view>
</view>
<view class="ic-item">
<view class="label">既往发生危象:</view>
<view class="content">{{previousConvulsionRangeList[detail.PreviousConvulsion-1].value}}</view>
</view>
<view class="ic-item">
<view class="label">胸腺异常:</view>
<view class="content">{{thyroidAbnormalRangeList[detail.ThyroidAbnormal-1].value}}</view>
</view>
<view class="ic-item">
<view class="label">医保类型:</view>
<view class="content">{{medicalInsuranceTypeRangeList[detail.MedicalInsuranceType-1].value}}</view>
</view>
<view class="ic-item">
<view class="label">免疫抑制剂:</view>
<view class="content">
{{traditionalImmunosuppressantRangeList[detail.TraditionalImmunosuppressant-1].value}}
</view>
</view>
<view class="edit" bind:tap="handleEditUser">
<image class="icon" src="{{imageUrl}}za-images/3/icon-edit-white.png?t={{Timestamp}}"></image>
编辑
</view>
</view>
<view class="b-footer">
<view class="send" bind:tap="handleSend">发消息</view>
<view class="remark" bind:tap="handleRemark">备注</view>
</view>
</view>
</view>
<view class="chart-container">
<view class="watermark">
<view class="p">本页面内容涉及患者个人信息</view>
<view class="p">仅用于{{hospital.Name}}{{doctor.Name}}医生进行患者随访管理</view>
<view class="p">不可用于其他用途</view>
<view class="p">【gMG给力加油站】</view>
</view>
<view class="container">
<view class="c-nav">
<view class="nav-item {{nav ==='0' && 'active'}}" data-index="0" bind:tap="handleNav">双达标测评报告</view>
<view class="nav-item {{nav ==='1' && 'active'}}" data-index="1" bind:tap="handleNav">双达标笔记</view>
</view>
<view class="filter">
<picker class="type" mode="selector" range="{{typeRange}}" range-key="value" bind:change="handleTypeChange">
{{typeName}}
<image class="icon" src="{{imageUrl}}za-images/doctor/triangle-down.png?t={{Timestamp}}"></image>
</picker>
<view class="range">
<picker
mode="date"
end="{{EndDate}}"
fields="{{fields[type]}}"
mode="date"
model:value="{{StartDate}}"
bindchange="handleChange"
>
{{StartDate}}
</picker>
~
<picker
mode="date"
start="{{StartDate}}"
fields="{{fields[type]}}"
mode="date"
model:value="{{EndDate}}"
bindchange="handleChange"
>
{{EndDate}}
</picker>
<image class="icon" src="{{imageUrl}}za-images/doctor/triangle-down.png?t={{Timestamp}}"></image>
</view>
</view>
<view hidden="{{nav!=='0'}}">
<view class="card">
<view class="w-header">
<view class="title">ADL评分记录曲线</view>
<view class="legend">
<view class="item">
<view class="logo"></view>
ADL分数
</view>
<view class="item">
<image class="icon" src="{{imageUrl}}za-imagesdouble-standard/adl-cure.png?t={{Timestamp}}"></image>
用药时间
</view>
</view>
</view>
<view class="column">
<ec-canvas id="chart3" type="2d" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
<view class="w-header">
<view class="title">激素日用量记录曲线</view>
<view class="legend">
<view class="item">
<view class="logo hormone"></view>
激素用量
</view>
</view>
</view>
<view class="column">
<ec-canvas id="chart4" type="2d" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
</view>
<view class="card">
<view class="pie">
<ec-canvas id="chart1" type="2d" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
<view class="line"></view>
<view class="pie">
<ec-canvas id="chart2" type="2d" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
</view>
</view>
<view hidden="{{nav !== '1'}}">
<view class="module" wx:for="{{adlList}}" wx:key="index">
<view class="module-header">
<view class="date">{{item.CreateTime || item.InjectionDate}}</view>
<view class="tags">
<view class="tag3" wx:if="{{item.IsInsuranceProject==1}}">商保项目记录</view>
</view>
</view>
<view class="module-container">
<view class="aside"></view>
<view style="flex: 1">
<view
class="m-card"
bind:tap="handleAdlDetail"
data-id="{{item.Id}}"
data-isi="{{item.IsInsuranceProject}}"
data-index="{{index}}"
>
<view class="card-header grade{{item.grade}}">
<view class="num">
{{item.TotalScore}}
<view class="sub">分</view>
</view>
<view class="num-detail">
<view class="n-item {{item.MedullaTypeScore >=7 && 'active'}}">
<view class="box">{{item.MedullaTypeScore}}</view>
<view class="name">延髓</view>
</view>
<view class="n-item {{item.BreathTypeScore>=3 && 'active'}}">
<view class="box">{{item.BreathTypeScore}}</view>
<view class="name">呼吸</view>
</view>
<view class="n-item {{item.LimbsTypeScore>=5 && 'active'}}">
<view class="box">{{item.LimbsTypeScore}}</view>
<view class="name">四肢</view>
</view>
<view class="n-item {{item.EyeTypeScore >=5 && 'active'}}">
<view class="box">{{item.EyeTypeScore}}</view>
<view class="name">眼睛</view>
</view>
</view>
</view>
<view class="card-container">
<view class="cc-title">注意事项</view>
<view class="cc-content">
<view class="line" wx:if="{{item.TotalScore < 5}}">
1 总分
<text decode="true ">&lt;</text>
<text class="red">5分</text>
,日常请注意观察
</view>
<view class="line" wx:elif="{{item.TotalScore >= 5}}">
1 总分
<text decode="true ">&gt;=</text>
<text class="red">5分</text>
,您的症状控制欠佳,建议必要时就医
</view>
<block wx:if="{{item.LastTotalScore !== null}}">
<view class="line" wx:if="{{item.TotalScore - item.LastTotalScore < 0 }}">
2 较上次得分变化
<text class="green">{{item.TotalScore - item.LastTotalScore }},有进步,加油!</text>
</view>
<view class="line" wx:elif="{{item.TotalScore - item.LastTotalScore == 0 }}">
2 与上次得分一致,请继续保持
</view>
<view class="line" wx:elif="{{item.TotalScore - item.LastTotalScore == 1 }}">
2 较上次得分变化
<text class="red">+{{item.TotalScore - item.LastTotalScore }},请继续关注!</text>
</view>
<view class="line" wx:elif="{{item.TotalScore - item.LastTotalScore >= 0 }}">
2 较上次得分变化
<text class="red">+{{item.TotalScore - item.LastTotalScore }},需要重点关注!</text>
</view>
</block>
<view class="line" wx:if="{{item.EyeTypeScore / item.TotalScore < 0.5}}">
{{item.LastTotalScore === null ? 2 : 3}} 您的眼肌类占比
<text decode="true ">&lt;</text>
50%,以全身症状为主,应注意休息警惕病情加重
</view>
<view class="line" wx:elif="{{item.EyeTypeScore / item.TotalScore > 0.5}}">
{{item.LastTotalScore === null ? 2 : 3}} 您的眼肌类占比
<text decode="true ">&gt;</text>
50%,危象风险不高,请继续关注
</view>
<view class="line" wx:elif="{{item.EyeTypeScore / item.TotalScore == 0.5}}">
{{item.LastTotalScore === null ? 2 : 3}} 您的眼肌类占比=50%,危象风险不高,请继续关注
</view>
</view>
<view class="fold" wx:if="{{item.ResultsImgUrl}}">
<view class="fold-header" catch:tap="handleFold" data-index="{{index}}">
{{item.fold ? '展开':'收起'}}详细评测报告
<van-icon name="arrow-{{!item.fold ? 'up' : 'down'}}" />
</view>
<view class="fold-container {{item.fold && 'hide'}}">
<!-- <image class="fold-img" mode="widthFix" src="{{item.ResultsImgUrl}}" show-menu-by-longpress></image> -->
<view class="scurt">
<view class="s-header">
<view class="none"></view>
<view
class="bar"
style="background: url({{imageUrl}}za-images/1/adl-scurt.png?t={{Timestamp}}) no-repeat center / 100% 100% ;"
>
<view class="num">0分</view>
<view class="num">1分</view>
<view class="num">2分</view>
<view class="num">3分</view>
</view>
</view>
<view class="s-body">
<view class="s-aside">
<view class="sa-item sa-item1">延髓</view>
<view class="sa-item sa-item2">呼吸</view>
<view class="sa-item sa-item3">四肢</view>
<view class="sa-item sa-item4">眼肌</view>
</view>
<view class="s-container">
<view class="sc-row" wx:for="{{tableData}}" wx:for-item="subItem" wx:key="index">
<view class="sc-title">{{subItem.title}}</view>
<view class="sc-col">
<image
wx:if="{{item[subItem.key] == 0}}"
class="icon"
src="{{imageUrl}}za-images1/adl-scurt-icon.png?t={{Timestamp}}"
></image>
</view>
<view class="sc-col">
<image
wx:if="{{item[subItem.key] == 1}}"
class="icon"
src="{{imageUrl}}za-images1/adl-scurt-icon.png?t={{Timestamp}}"
></image>
</view>
<view class="sc-col">
<image
wx:if="{{item[subItem.key] == 2}}"
class="icon"
src="{{imageUrl}}za-images1/adl-scurt-icon.png?t={{Timestamp}}"
></image>
</view>
<view class="sc-col">
<image
wx:if="{{item[subItem.key] == 3}}"
class="icon"
src="{{imageUrl}}za-images1/adl-scurt-icon.png?t={{Timestamp}}"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class="drug-card"
wx:if="{{item.SteroidDailyDose}}"
bind:tap="handleAdlDetail"
data-id="{{item.Id}}"
data-isi="{{item.IsInsuranceProject}}"
data-index="{{index}}"
>
<view class="d-header">
<view class="name">激素用量</view>
<view class="status">
本次激素用量为
<text class="num">{{item.SteroidDailyDose}}mg</text>
/天
</view>
</view>
<view class="content" wx:if="{{item.SteroidDailyDose>5}}">距离达标还需努力,请遵医嘱规律治疗</view>
<view class="content" wx:else>恭喜达标,您的激素用量已少于95% 的患友</view>
</view>
</view>
</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
</view>
</view>
</view>
</view>
<van-popup
show="{{ popupRemarkShow }}"
style="--popup-close-icon-color: #283031"
position="bottom"
round
closeable
bind:close="handleRemarkClose"
>
<view class="popup-remark">
<view class="title">备注</view>
<textarea
class="textarea"
focus="{{remarkFocus}}"
model:value="{{remark}}"
cursor-spacing="{{100}}"
placeholder-style="color: rgba(194, 201, 202, 1)"
placeholder="请输入备注"
></textarea>
<view class="submit" bind:tap="handleRemarkSubmit">保存</view>
</view>
</van-popup>
<van-popup show="{{ popupEditShow }}" position="center" round bind:close="handleRemarkClose">
<view class="popup-edit">
<view class="title">编辑患者信息</view>
<view class="popup-container">
<view class="row">
<view class="row-header">
<view class="label">抗体类型</view>
</view>
<view class="row-content">
<view class="radio-btns">
<view
wx:for="{{antibodyTypeRangeList}}"
wx:key="index"
class="btn {{detail.AntibodyType + '' === item.id && 'active'}}"
data-key="AntibodyType"
data-id="{{item.id}}"
bind:tap="handleRadio"
>
{{item.value}}
</view>
</view>
</view>
</view>
<view class="row">
<view class="row-header">
<view class="label">胸腺异常</view>
</view>
<view class="row-content">
<view class="radio-btns">
<view
wx:for="{{thyroidAbnormalRangeList}}"
wx:key="index"
class="btn {{detail.ThyroidAbnormal + '' === item.id && 'active'}}"
data-key="ThyroidAbnormal"
data-id="{{item.id}}"
bind:tap="handleRadio"
>
{{item.value}}
</view>
</view>
</view>
</view>
<view class="row">
<view class="row-header">
<view class="label">既往发生危象</view>
</view>
<view class="row-content">
<view class="radio-btns">
<view
wx:for="{{previousConvulsionRangeList}}"
wx:key="index"
class="btn {{detail.PreviousConvulsion + '' === item.id && 'active'}}"
data-key="PreviousConvulsion"
data-id="{{item.id}}"
bind:tap="handleRadio"
>
{{item.value}}
</view>
</view>
</view>
</view>
<view class="row">
<view class="row-header">
<view class="label">传统免疫抑制剂</view>
</view>
<view class="row-content">
<view class="radio-btns">
<view
wx:for="{{traditionalImmunosuppressantRangeList}}"
wx:key="index"
class="btn {{detail.TraditionalImmunosuppressant + '' === item.id && 'active'}}"
data-key="TraditionalImmunosuppressant"
data-id="{{item.id}}"
bind:tap="handleRadio"
>
{{item.value}}
</view>
</view>
</view>
</view>
<view class="row">
<view class="row-header">
<view class="label">医保类型</view>
</view>
<view class="row-content">
<view class="radio-btns">
<view
wx:for="{{medicalInsuranceTypeRangeList}}"
wx:key="index"
class="btn {{detail.MedicalInsuranceType + '' === item.id && 'active'}}"
data-key="MedicalInsuranceType"
data-id="{{item.id}}"
bind:tap="handleRadio"
>
{{item.value}}
</view>
</view>
</view>
</view>
</view>
<view class="popup-footer">
<view class="cancel" bind:tap="handleUserCancel">取消</view>
<view class="conform" bind:tap="handleUserSubmit">保存</view>
</view>
</view>
</van-popup>
<toast
bind:cancel="handleToastCancel"
bind:ok="handleToastOk"
show="{{toastShow}}"
type="{{toastType}}"
params="{{toastParams}}"
></toast>

8
src/pages/d_userInfo/index.json

@ -0,0 +1,8 @@
{
"navigationBarTitleText": "个人信息",
"navigationStyle": "default",
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-popup": "@vant/weapp/popup/index"
}
}

214
src/pages/d_userInfo/index.scss

@ -0,0 +1,214 @@
page {
background: #f2f4f5;
}
.page {
padding: 164rpx 30rpx 40rpx;
.container {
position: relative;
padding: 92rpx 30rpx 64rpx;
background: #ffffff;
border-radius: 24rpx 24rpx 24rpx 24rpx;
.avatar {
position: absolute;
top: -90rpx;
left: 50%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.avatar-user {
flex-shrink: 0;
width: 156rpx;
height: 156rpx;
border-radius: 50%;
}
.edit {
margin-top: -15rpx;
padding: 8rpx 24rpx;
background: #f2f4f5;
border-radius: 108rpx 108rpx 108rpx 108rpx;
font-size: 24rpx;
color: rgba(40, 48, 49, 1);
display: flex;
align-items: center;
line-height: 1;
.icon {
margin-right: 8rpx;
width: 24rpx;
height: 24rpx;
}
}
}
.row {
margin-top: 64rpx;
display: flex;
justify-content: space-between;
.label {
flex-shrink: 0;
font-size: 32rpx;
color: rgba(154, 161, 162, 1);
width: 6em;
}
.switch-row {
display: flex;
justify-content: flex-end;
.switch {
transform: scale(0.8);
}
}
.content {
flex: 1;
font-size: 32rpx;
color: rgba(40, 48, 49, 1);
}
.option {
flex-shrink: 0;
display: flex;
align-items: center;
.change {
font-size: 32rpx;
color: rgba(98, 190, 208, 1);
}
.icon {
color: #d4d9da;
}
}
}
}
.switch-btn {
margin: 64rpx 0;
font-size: 36rpx;
color: rgba(255, 255, 255, 1);
display: flex;
align-items: center;
justify-content: center;
height: 84rpx;
background: #67baca;
border-radius: 64rpx 64rpx 64rpx 64rpx;
}
}
.popup-date {
padding: 32rpx 30rpx 84rpx;
.title {
display: flex;
justify-content: center;
font-size: 36rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
}
.textarea {
padding: 30rpx;
margin-top: 32rpx;
width: 100%;
height: 180rpx;
box-sizing: border-box;
background: #f7f8f9;
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #f8f9f9;
font-size: 32rx;
}
.week {
margin-top: 32rpx;
.w-row {
display: grid;
grid-template-columns: 156rpx repeat(2, 1fr);
background-color: rgba(242, 244, 245, 1);
&:nth-of-type(2n) {
background-color: rgba(247, 248, 249, 1);
}
&:not(:last-of-type) {
border-bottom: 1px solid #fff;
}
&:first-of-type {
border-radius: 24rpx 24rpx 0 0;
.name {
border-radius: 24rpx 0 0 0;
}
}
&:last-of-type {
border-radius: 0 0 24rpx 24rpx;
.name {
border-radius: 0 0 0 24rpx;
}
}
.name {
height: 76rpx;
font-size: 32rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(103, 186, 202, 1);
}
.item {
position: relative;
font-size: 32rpx;
color: rgba(103, 113, 114, 1);
display: flex;
align-items: center;
justify-content: center;
border-left: 1px solid #fff;
.icon {
position: absolute;
bottom: 0;
right: 0;
width: 32rpx;
height: 32rpx;
display: none;
}
&.active {
background-color: rgba(237, 252, 255, 1);
.icon {
display: block;
}
}
}
}
}
.submit {
margin-top: 32rpx;
height: 84rpx;
display: flex;
justify-content: center;
align-items: center;
background: #67baca;
font-size: 36rpx;
color: #fff;
border-radius: 64rpx 64rpx 64rpx 64rpx;
}
}
.popup-brief {
padding: 32rpx 30rpx 84rpx;
.title {
display: flex;
justify-content: center;
font-size: 36rpx;
color: rgba(40, 48, 49, 1);
font-weight: bold;
}
.textarea {
padding: 30rpx;
margin-top: 32rpx;
width: 100%;
height: 280rpx;
box-sizing: border-box;
background: #f7f8f9;
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 2rpx solid #f8f9f9;
font-size: 32rx;
}
.submit {
margin-top: 32rpx;
height: 84rpx;
display: flex;
justify-content: center;
align-items: center;
background: #67baca;
font-size: 36rpx;
color: #fff;
border-radius: 64rpx 64rpx 64rpx 64rpx;
}
}

231
src/pages/d_userInfo/index.ts

@ -0,0 +1,231 @@
const app = getApp<IAppOption>();
Page({
data: {
doctor: {} as any,
hospital: {},
popupDateShow: false,
popupDateFocus: false,
popupBriefShow: false,
popupBriefFocus: false,
ClinicList: [
{
name: '周一',
weekday: 1,
timeTypeActive1: false,
timeTypeActive2: false,
},
{
name: '周二',
weekday: 2,
timeTypeActive1: false,
timeTypeActive2: false,
},
{
name: '周三',
weekday: 3,
timeTypeActive1: false,
timeTypeActive2: false,
},
{
name: '周四',
weekday: 4,
timeTypeActive1: false,
timeTypeActive2: false,
},
{
name: '周五',
weekday: 5,
timeTypeActive1: false,
timeTypeActive2: false,
},
{
name: '周六',
weekday: 6,
timeTypeActive1: false,
timeTypeActive2: false,
},
{
name: '周日',
weekday: 7,
timeTypeActive1: false,
timeTypeActive2: false,
},
],
PopupClinic: '',
},
onLoad() {},
onShow() {
app.waitLogin({ type: [2] }).then((_res) => {
app.zdMpBehavior({ doctor: true, PageName: 'PG_DOCTORPERSONALINFO' });
this.getDetail();
});
},
getDetail() {
wx.ajax({
method: 'GET',
url: '?r=zd/doctor/account/info',
data: {},
}).then((res) => {
const { ClinicList } = this.data;
let weekName = '';
if (res.doctor.ClinicType == 2) {
weekName = res.doctor.Clinic;
} else {
(res.doctor.Clinic ? res.doctor.Clinic : []).forEach((subItem: any) => {
if (subItem.timeType == 1) {
ClinicList[subItem.weekday - 1].timeTypeActive1 = true;
}
if (subItem.timeType == 2) {
ClinicList[subItem.weekday - 1].timeTypeActive2 = true;
}
});
weekName = (res.doctor.Clinic ? res.doctor.Clinic : [])
.map((subItem: { weekday: string | number; timeType: string | number }) => {
const week = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'];
const timeDay = { 1: '上午', 2: '下午' };
return `${week[Number(subItem.weekday) - 1]}${timeDay[subItem.timeType]}`;
})
.join(',');
}
this.setData({
doctor: {
weekName,
...res.doctor,
Telephone: res.doctor.Telephone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2'),
},
hospital: res.hospital,
ClinicList,
});
});
},
handleChangeClinicType(e) {
const value = e.detail.value;
if (value) {
this.setData({
'doctor.ClinicType': 2,
'doctor.Clinic': '',
'doctor.weekName': '',
});
} else {
this.setData({
'doctor.ClinicType': 1,
'doctor.Clinic': [],
'doctor.weekName': '',
});
}
this.handleWeekIntroduceSubmit();
},
handleChangePhone() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOCHANGEPHONE' });
wx.navigateTo({
url: '/doctor/pages/d_changePhone/index',
});
},
handleWeek() {
const { doctor } = this.data;
this.setData({
PopupClinic: Array.isArray(doctor.Clinic) ? '' : doctor.Clinic,
popupDateShow: true,
});
setTimeout(() => {
this.setData({
popupDateFocus: true,
});
}, 300);
},
handleWeekSelect(e) {
const { type, index } = e.currentTarget.dataset;
const ClinicList = this.data.ClinicList;
ClinicList[index][`timeTypeActive${type}`] = !ClinicList[index][`timeTypeActive${type}`];
this.setData({
ClinicList,
});
},
handleWeekIntroduceSubmit() {
const { doctor, PopupClinic } = this.data;
let Clinic = '';
if (doctor.ClinicType == 2) {
Clinic = PopupClinic;
} else {
const ClinicList = this.data.ClinicList;
Clinic = ClinicList.reduce((pre, cur) => {
if (cur.timeTypeActive1) {
pre.push({ weekday: cur.weekday, timeType: 1 });
}
if (cur.timeTypeActive2) {
pre.push({ weekday: cur.weekday, timeType: 2 });
}
return pre;
}, [] as any);
}
wx.ajax({
method: 'POST',
url: '?r=zd/doctor/account/update-info',
data: {
Introduce: this.data.doctor.Introduce,
Clinic,
ClinicType: doctor.ClinicType,
},
}).then(() => {
this.onClose();
});
},
handleBrief() {
this.setData({
popupBriefShow: true,
});
setTimeout(() => {
this.setData({
popupBriefFocus: true,
});
}, 300);
},
handleBriefInput(e) {
const doctor = this.data.doctor;
doctor.Introduce = e.detail.value;
this.setData({
doctor,
});
},
onClose() {
this.setData({
popupDateShow: false,
popupBriefShow: false,
popupBriefFocus: false,
popupDateFocus: false,
});
this.getDetail();
},
handleSwitch() {
app.zdMpBehavior({ doctor: true, PageName: 'BTN_DOCTORPERSONALINFOSWITCHACCOUNT' });
wx.navigateTo({
url: '/doctor/pages/d_changeDoctor/index',
});
},
handleLoginOut() {
wx.showModal({
title: '确认退出?',
confirmColor: '#62bed0',
success: (res) => {
if (res.confirm) {
wx.ajax({
method: 'POST',
url: '?r=zd/doctor/account/reg-logout',
data: {},
}).then((_res) => {
app.globalData.loginType = 1;
app.globalData.anyWhere = true;
app.globalData.first = true;
wx.reLaunch({
url: '/pages/login/index',
});
});
}
},
});
},
});

121
src/pages/d_userInfo/index.wxml

@ -0,0 +1,121 @@
<view class="page">
<view class="container">
<view class="avatar">
<image class="avatar-user" mode="aspectFill" src="{{doctor.Img}}"></image>
<!-- <view class="edit"> -->
<!-- <image class="icon" src="{{imageUrl}}/doctor/icon-edit.png?t={{Timestamp}}"></image> -->
<!-- 更换 -->
<!-- </view> -->
</view>
<view class="row">
<view class="label">姓名</view>
<view class="content">{{doctor.Name}}</view>
<view class="option"></view>
</view>
<view class="row" bind:tap="handleChangePhone">
<view class="label">电话</view>
<view class="content">{{doctor.Telephone}}</view>
<view class="option"><view class="change">更换</view></view>
</view>
<view class="row">
<view class="label">医院</view>
<view class="content">{{hospital.Name}}</view>
<view class="option"></view>
</view>
<view class="row">
<view class="label">多院区出诊</view>
<view class="switch-row">
<switch
class="switch"
checked="{{doctor.ClinicType==2}}"
color="#67baca"
bind:change="handleChangeClinicType"
></switch>
</view>
</view>
<view class="row" bind:tap="handleWeek">
<view class="label">门诊时间</view>
<view class="content pre-line">{{doctor.weekName || '暂无'}}</view>
<view class="option"><van-icon class="icon" name="arrow" /></view>
</view>
<view class="row" bind:tap="handleBrief">
<view class="label">个人简介</view>
<view class="content">{{doctor.Introduce || '暂无'}}</view>
<view class="option"><van-icon class="icon" name="arrow" /></view>
</view>
</view>
<!-- <view class="switch-btn" bind:tap="handleSwitch">切换账号</view> -->
<!-- <view class="switch-btn" bind:tap="handleLoginOut"> -->
<!-- 退出登录 -->
<!-- </view> -->
</view>
<van-popup
show="{{ popupDateShow }}"
style="--popup-close-icon-color: #283031"
position="bottom"
round
closeable
bind:close="onClose"
>
<view class="popup-date">
<view class="title">门诊时间</view>
<textarea
wx:if="{{doctor.ClinicType == 2}}"
class="textarea"
model:value="{{PopupClinic}}"
maxlength="{{50}}"
focus="{{popupDateFocus}}"
cursor-spacing="{{200}}"
></textarea>
<view class="week" wx:else>
<view class="w-row" wx:for="{{ClinicList}}" wx:key="index">
<view class="name">{{item.name}}</view>
<view
class="item {{item.timeTypeActive1 && 'active'}}"
bind:tap="handleWeekSelect"
data-type="1"
data-index="{{index}}"
>
上午
<image class="icon" src="{{imageUrl}}/doctor/icon-select.png?t={{Timestamp}}"></image>
</view>
<view
class="item {{item.timeTypeActive2 && 'active'}}"
bind:tap="handleWeekSelect"
data-type="2"
data-index="{{index}}"
>
下午
<image class="icon" src="{{imageUrl}}/doctor/icon-select.png?t={{Timestamp}}"></image>
</view>
</view>
</view>
<view class="submit" bind:tap="handleWeekIntroduceSubmit">保存</view>
</view>
</van-popup>
<van-popup
show="{{ popupBriefShow }}"
style="--popup-close-icon-color: #283031"
position="bottom"
round
closeable
bind:close="onClose"
>
<view class="popup-brief" wx:if="{{popupBriefShow}}">
<view class="title">医生简介</view>
<textarea
class="textarea"
value="{{doctor.Introduce}}"
focus="{{popupBriefFocus}}}"
placeholder-style="color: rgba(194, 201, 202, 1)"
placeholder="请输入医生简介信息"
maxlength="{{200}}"
bind:input="handleBriefInput"
cursor-spacing="200"
></textarea>
<view class="submit" bind:tap="handleWeekIntroduceSubmit">保存</view>
</view>
</van-popup>

8
src/pages/login/index.wxml

@ -26,10 +26,10 @@
<image class="icon" src="{{imageUrl}}icon1.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon1.png?t={{Timestamp}}"></image>
手机号验证码 手机号验证码
</view> </view>
<view class="tel-btn" bind:tap="handlePatient"> <!-- <view class="tel-btn" bind:tap="handlePatient"> -->
<image class="icon" src="{{imageUrl}}icon1.png?t={{Timestamp}}"></image> <!-- <image class="icon" src="{{imageUrl}}icon1.png?t={{Timestamp}}"></image> -->
我是患者 <!-- 我是患者 -->
</view> <!-- </view> -->
</view> </view>
<view class="form" wx:if="{{showTel}}"> <view class="form" wx:if="{{showTel}}">
<view class="form-row"> <view class="form-row">

Loading…
Cancel
Save