Browse Source

首页联调

main
kola-web 4 months ago
parent
commit
9b7759edde
  1. 6
      src/components/doctorAvatar/index.wxml
  2. 38
      src/echart/components/homeLevel1/index.ts
  3. 52
      src/echart/components/homeLevel1/index.wxml
  4. 105
      src/echart/components/homeLevel2/index.ts
  5. 140
      src/echart/components/homeLevel2/index.wxml
  6. 74
      src/echart/components/homeLevel3/index.ts
  7. 91
      src/echart/components/homeLevel3/index.wxml
  8. 4
      src/echart/components/homeLevel4/index.scss
  9. 545
      src/echart/components/homeLevel4/index.ts
  10. 130
      src/echart/components/homeLevel4/index.wxml
  11. BIN
      src/images/doctor-level4.png
  12. BIN
      src/images/empty-3.png
  13. BIN
      src/images/empty-4.png
  14. 4
      src/module1/pages/doctorRankList/index.json
  15. 3
      src/module1/pages/doctorRankList/index.scss
  16. 45
      src/module1/pages/doctorRankList/index.ts
  17. 15
      src/module1/pages/doctorRankList/index.wxml
  18. 36
      src/module1/pages/org3/index.scss
  19. 43
      src/module1/pages/org3/index.ts
  20. 355
      src/module1/pages/org3/index.wxml
  21. 68
      src/module1/pages/org4/index.scss
  22. 130
      src/module1/pages/org4/index.ts
  23. 640
      src/module1/pages/org4/index.wxml
  24. 2
      src/pages/cases/index.ts
  25. 19
      src/pages/home/index.ts
  26. 32
      src/pages/home/index.wxml

6
src/components/doctorAvatar/index.wxml

@ -12,4 +12,10 @@ @@ -12,4 +12,10 @@
wx:elif="{{level==2}}"
src="{{imageUrl}}doctor-level2.png?t={{Timestamp}}"
></image>
<image
class="mask"
mode="aspectFill"
wx:if="{{level==4}}"
src="{{imageUrl}}doctor-level4.png?t={{Timestamp}}"
></image>
</view>

38
src/echart/components/homeLevel1/index.ts

@ -8,6 +8,8 @@ Component({ @@ -8,6 +8,8 @@ Component({
properties: {
userInfo: Object,
DoctorTitleType: Object,
hospitalClassification: Object,
hospitalLevel: Object,
},
/**
@ -17,13 +19,15 @@ Component({ @@ -17,13 +19,15 @@ Component({
fold1: false,
foldHeight1: 10000,
take: {},
case: {},
cooperateList: [],
},
lifetimes: {
attached() {
this.getHeight();
this.getTake();
this.getCase();
this.getCooperate();
},
},
/**
@ -44,6 +48,11 @@ Component({ @@ -44,6 +48,11 @@ Component({
fold1: !this.data.fold1,
});
},
handleEntryCase() {
wx.navigateTo({
url: "/module1/pages/entryCases/index",
});
},
getTake() {
wx.ajax({
method: "GET",
@ -66,5 +75,32 @@ Component({ @@ -66,5 +75,32 @@ Component({
});
});
},
getCooperate() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/cooperation-doctor-list",
data: {},
}).then((res) => {
this.setData({
cooperateList: res.list,
});
this.getHeight();
});
},
handleQuestion(e) {
const { index } = e.currentTarget.dataset;
const message = {
1: "属于您所在科室的公开的病历",
2: "平台所有优质的病历",
}[index];
wx.showModal({
confirmColor: "#00B4C5",
showCancel: false,
confirmText: "知道了",
content: message,
});
},
},
});
export {};

52
src/echart/components/homeLevel1/index.wxml

@ -36,13 +36,13 @@ @@ -36,13 +36,13 @@
<view
class="stat"
style="background: url({{imageUrl}}home-stat-bg.png?r={{Timestamp}}) no-repeat top center/100% 100%;"
wx:if="{{true}}"
wx:if="{{case.totalCaseCount>0}}"
>
<view class="title">我提交的病历</view>
<view class="s-container">
<view class="item">
<view class="name">总数</view>
<view class="num">54</view>
<view class="num">{{case.totalCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
新病历
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{case.newCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
讨论中
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{case.feedbackCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
已归档
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{case.archiveCaseCount}}</view>
</view>
</view>
</view>
@ -79,12 +79,12 @@ @@ -79,12 +79,12 @@
<view class="s-container">
<image class="none" src="{{imageUrl}}empty-3.png?t={{Timestamp}}"></image>
<view class="tip">还没有提交病历</view>
<view class="btn">提交病历</view>
<view class="btn" bind:tap="handleEntryCase">提交病历</view>
</view>
</view>
<view class="cooperate" wx:if="{{true}}">
<view class="cooperate" wx:if="{{cooperateList.length}}">
<view class="cooperate-header">
<view class="name">我合作的医生(2)</view>
<view class="name">我合作的医生({{inviteList.length}})</view>
<view class="fold" bind:tap="toggleFold1">
<block wx:if="{{fold1}}">
展开
@ -97,30 +97,30 @@ @@ -97,30 +97,30 @@
</view>
</view>
<view id="fold1" class="doctor-list {{fold1 && 'doctor-list-fold'}}" style="--fold-height: {{foldHeight1}}px;">
<view class="doctor">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<view class="doctor" wx:for="{{cooperateList}}" wx:key="DoctorId">
<doctorAvatar class="avatar" src="{{item.DoctorImg}}" level="{{item.DoctorLevel}}"></doctorAvatar>
<view class="wrap">
<view class="w-header">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
<view class="name">{{item.DoctorName}}</view>
<view class="label" wx:if="{{item.TitleType===99}}">{{item.DoctorOtherTitle}}</view>
<view class="label" wx:else>{{DoctorTitleType[item.DoctorTitleType]}}</view>
<block wx:for="{{item.department}}" wx:key="DepartmentId">
<view class="line"></view>
<view class="label">{{item.DepartmentName}}</view>
</block>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
<text class="hostipal">{{item.HospitalName}}</text>
<view class="tag">
{{hospitalClassification[item.HospitalClassification]}}{{hospitalLevel[item.HospitalLevel]}}
</view>
<view class="site" wx:if="{{item.CityName}}">
{{item.CityName}}{{item.CountyName?'/':''}}{{item.CountyName}}
</view>
</view>
<view class="w-footer">
<view class="w-footer" wx:if="{{item.specialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag" wx:for="{{item.specialty}}" wx:key="SpecialtyId">{{item.SpecialtyName}}</view>
</view>
</view>
</view>

105
src/echart/components/homeLevel2/index.ts

@ -1,11 +1,16 @@ @@ -1,11 +1,16 @@
const _app = getApp<IAppOption>()
const _app = getApp<IAppOption>();
// pages/story/a.ts
Component({
/**
*
*/
properties: {},
properties: {
userInfo: Object,
DoctorTitleType: Object,
hospitalClassification: Object,
hospitalLevel: Object,
},
/**
*
@ -15,35 +20,109 @@ Component({ @@ -15,35 +20,109 @@ Component({
foldHeight1: 10000,
fold2: false,
foldHeight2: 10000,
take: {},
case: {},
cooperateList: [],
inviteList: [],
},
attached() {
this.getHeight()
lifetimes: {
attached() {
this.getTake();
this.getCase();
this.getCooperate();
this.getInvite();
},
},
/**
*
*/
methods: {
getHeight() {
const query = wx.createSelectorQuery().in(this)
query.select('#fold1').boundingClientRect()
query.select('#fold2').boundingClientRect()
getHeight1() {
const query = wx.createSelectorQuery().in(this);
query.select("#fold1").boundingClientRect();
query.exec((res) => {
this.setData({
foldHeight1: res[0].height,
});
});
},
getHeight2() {
const query = wx.createSelectorQuery().in(this);
query.select("#fold2").boundingClientRect();
query.exec((res) => {
this.setData({
foldHeight2: res[1].height,
})
})
});
});
},
toggleFold1() {
this.setData({
fold1: !this.data.fold1,
})
});
},
toggleFold2() {
this.setData({
fold2: !this.data.fold2,
})
});
},
getTake() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/todo",
data: {},
}).then((res) => {
this.setData({
take: res,
});
});
},
getCase() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/case",
data: {},
}).then((res) => {
this.setData({
case: res,
});
});
},
getCooperate() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/cooperation-doctor-list",
data: {},
}).then((res) => {
this.setData({
cooperateList: res.list,
});
this.getHeight1();
});
},
getInvite() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/invite-doctor-list",
data: {},
}).then((res) => {
this.setData({
inviteList: res.list,
});
this.getHeight2();
});
},
handleInvite() {
wx.navigateTo({
url: "/module1/pages/invite/index",
});
},
handleEntryCase() {
wx.navigateTo({
url: "/module1/pages/entryCases/index",
});
},
},
})
});
export {};

140
src/echart/components/homeLevel2/index.wxml

@ -1,53 +1,54 @@ @@ -1,53 +1,54 @@
<view class="page">
<view class="user">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<image class="code" src="{{imageUrl}}icon-code.png?t={{Timestamp}}"></image>
<doctorAvatar class="avatar" src="{{userInfo.Img}}" level="{{userInfo.DoctorLevel}}"></doctorAvatar>
<image class="code" bind:tap="handleInvite" src="{{imageUrl}}icon-code.png?t={{Timestamp}}"></image>
<view class="wrap">
<view class="w-header">
<view class="name">徐萌</view>
<view class="name">{{userInfo.Name}}</view>
<view class="desc">
主治医师
<view class="line"></view>
心内科
<block wx:if="{{userInfo.TitleType === 99}}">{{userInfo.OtherTitle}}</block>
<block wx:else>{{DoctorTitleType[userInfo.TitleType]}}</block>
<block wx:for="{{userInfo.Department}}" wx:key="DepartmentId">
<view class="line"></view>
{{item.DepartmentName}}
</block>
</view>
</view>
<view class="w-container">
<view class="hostipal">北京天坛医院</view>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
<view class="hostipal">{{userInfo.HospitalName}}</view>
<view class="tag">{{userInfo.HospitalClassificationName}}{{userInfo.HospitalLevelName}}</view>
<view class="site" wx:if="{{userInfo.CityName}}">
{{userInfo.CityName}}{{userInfo.CountyName?'/':''}}{{userInfo.CountyName}}
</view>
</view>
<view class="w-footer">
<view class="w-footer" wx:if="{{userInfo.Specialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag" wx:for="{{userInfo.Specialty}}" wx:key="SpecialtyId">{{item.SpecialtyName}}</view>
</view>
</view>
</view>
<view class="banner">
<view class="title">待处理事项</view>
<view class="bg">
<view class="b-container" wx:if="{{false}}">
<view
class="b-container"
wx:if="{{take.dealCaseCount>0 || take.notReadFeedBackCount>0 || take.notReadChatRoomCount>0 || take.toAuditDoctorCount>0}}"
>
<view class="item">
<view class="name">待处理病历</view>
<view class="num">27</view>
<view class="num">{{take.dealCaseCount}}</view>
</view>
<view class="item">
<view class="name">病历更新</view>
<view class="num">1</view>
<view class="num">{{take.notReadFeedBackCount}}</view>
</view>
<view class="item">
<view class="name">聊天室消息</view>
<view class="num">1</view>
<view class="num">{{take.notReadChatRoomCount}}</view>
</view>
<view class="item">
<view class="name">医生待审核</view>
<view class="num">1</view>
<view class="num">{{take.toAuditDoctorCount}}</view>
</view>
</view>
<view class="b-container-none" wx:else>暂时没有需要处理的事项哦~</view>
@ -55,7 +56,7 @@ @@ -55,7 +56,7 @@
</view>
<view
class="stat"
wx:if="{{false}}"
wx:if="{{case.totalCaseCount>0}}"
style="background: url({{imageUrl}}home-stat-bg.png?r={{Timestamp}}) no-repeat top center/100% 100%;"
>
<view class="title">我管理的病历</view>
@ -66,7 +67,7 @@ @@ -66,7 +67,7 @@
<view class="s-container">
<view class="item">
<view class="name">全部</view>
<view class="num">54</view>
<view class="num">{{case.totalCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
@ -74,7 +75,7 @@ @@ -74,7 +75,7 @@
新病历
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{case.newCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
@ -82,7 +83,7 @@ @@ -82,7 +83,7 @@
讨论中
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{case.feedbackCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
@ -90,7 +91,7 @@ @@ -90,7 +91,7 @@
已归档
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{case.archiveCaseCount}}</view>
</view>
</view>
</view>
@ -103,12 +104,12 @@ @@ -103,12 +104,12 @@
<view class="s-container">
<image class="none" src="{{imageUrl}}empty-3.png?t={{Timestamp}}"></image>
<view class="tip">还没有提交病历</view>
<view class="btn">提交病历</view>
<view class="btn" bind:tap="handleEntryCase">提交病历</view>
</view>
</view>
<view class="cooperate" wx:if="{{false}}">
<view class="cooperate" wx:if="{{cooperateList.length}}">
<view class="cooperate-header">
<view class="name">我合作的医生(2)</view>
<view class="name">我合作的医生({{inviteList.length}})</view>
<view class="fold" bind:tap="toggleFold1">
<block wx:if="{{fold1}}">
展开
@ -121,30 +122,30 @@ @@ -121,30 +122,30 @@
</view>
</view>
<view id="fold1" class="doctor-list {{fold1 && 'doctor-list-fold'}}" style="--fold-height: {{foldHeight1}}px;">
<view class="doctor">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<view class="doctor" wx:for="{{cooperateList}}" wx:key="DoctorId">
<doctorAvatar class="avatar" src="{{item.DoctorImg}}" level="{{item.DoctorLevel}}"></doctorAvatar>
<view class="wrap">
<view class="w-header">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
<view class="name">{{item.DoctorName}}</view>
<view class="label" wx:if="{{item.TitleType===99}}">{{item.DoctorOtherTitle}}</view>
<view class="label" wx:else>{{DoctorTitleType[item.DoctorTitleType]}}</view>
<block wx:for="{{item.department}}" wx:key="DepartmentId">
<view class="line"></view>
<view class="label">{{item.DepartmentName}}</view>
</block>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
<text class="hostipal">{{item.HospitalName}}</text>
<view class="tag">
{{hospitalClassification[item.HospitalClassification]}}{{hospitalLevel[item.HospitalLevel]}}
</view>
<view class="site" wx:if="{{item.CityName}}">
{{item.CityName}}{{item.CountyName?'/':''}}{{item.CountyName}}
</view>
</view>
<view class="w-footer">
<view class="w-footer" wx:if="{{item.specialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag" wx:for="{{item.specialty}}" wx:key="SpecialtyId">{{item.SpecialtyName}}</view>
</view>
</view>
</view>
@ -162,9 +163,9 @@ @@ -162,9 +163,9 @@
</view>
</view>
</view>
<view class="invite" wx:if="{{false}}">
<view class="invite" wx:if="{{inviteList.length}}">
<view class="invite-header">
<view class="name">我邀约的医生(1)</view>
<view class="name">我邀约的医生({{inviteList.length}})</view>
<view class="fold" bind:tap="toggleFold2">
<block wx:if="{{fold2}}">
展开
@ -177,31 +178,30 @@ @@ -177,31 +178,30 @@
</view>
</view>
<view id="fold2" class="doctor-list {{fold2 && 'doctor-list-fold'}}" style="--fold-height: {{foldHeight2}}px;">
<view class="doctor">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<view class="assign">蒋亮医生指派</view>
<view class="doctor" wx:for="{{inviteList}}" wx:key="DoctorId">
<doctorAvatar class="avatar" src="{{item.DoctorImg}}" level="{{item.DoctorLevel}}"></doctorAvatar>
<view class="wrap">
<view class="w-header">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
<view class="name">{{item.DoctorName}}</view>
<view class="label" wx:if="{{item.TitleType===99}}">{{item.DoctorOtherTitle}}</view>
<view class="label" wx:else>{{DoctorTitleType[item.DoctorTitleType]}}</view>
<block wx:for="{{item.department}}" wx:key="DepartmentId">
<view class="line"></view>
<view class="label">{{item.DepartmentName}}</view>
</block>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
<text class="hostipal">{{item.HospitalName}}</text>
<view class="tag">
{{hospitalClassification[item.HospitalClassification]}}{{hospitalLevel[item.HospitalLevel]}}
</view>
<view class="site" wx:if="{{item.CityName}}">
{{item.CityName}}{{item.CountyName?'/':''}}{{item.CountyName}}
</view>
</view>
<view class="w-footer">
<view class="w-footer" wx:if="{{item.specialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag" wx:for="{{item.specialty}}" wx:key="SpecialtyId">{{item.SpecialtyName}}</view>
</view>
</view>
</view>

74
src/echart/components/homeLevel3/index.ts

@ -1,26 +1,86 @@ @@ -1,26 +1,86 @@
const _app = getApp<IAppOption>()
const _app = getApp<IAppOption>();
// pages/story/a.ts
Component({
/**
*
*/
properties: {},
properties: {
userInfo: Object,
DoctorTitleType: Object,
hospitalClassification: Object,
hospitalLevel: Object,
},
/**
*
*/
data: {},
data: {
take: {},
case: {},
doctorCount: {},
},
attached() {},
lifetimes: {
attached() {
this.getTake();
this.getCase();
this.getManageDoctor();
},
},
/**
*
*/
methods: {
getTake() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/todo",
data: {},
}).then((res) => {
this.setData({
take: res,
});
});
},
getCase() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/case",
data: {},
}).then((res) => {
this.setData({
case: res,
});
});
},
getManageDoctor() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/manage-doctor-count",
data: {},
}).then((res) => {
this.setData({
doctorCount: res.count,
});
});
},
handleInvite() {
wx.navigateTo({
url: "/module1/pages/invite/index",
});
},
handleOrg() {
wx.navigateTo({
url: '/module1/pages/org3/index',
})
url: "/module1/pages/org3/index",
});
},
handleEntryCase() {
wx.navigateTo({
url: "/module1/pages/entryCases/index",
});
},
},
})
});
export {};

91
src/echart/components/homeLevel3/index.wxml

@ -1,51 +1,54 @@ @@ -1,51 +1,54 @@
<view class="page">
<view class="user">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<image class="code" src="{{imageUrl}}icon-code.png?t={{Timestamp}}"></image>
<doctorAvatar class="avatar" src="{{userInfo.Img}}" level="{{userInfo.DoctorLevel}}"></doctorAvatar>
<image class="code" bind:tap="handleInvite" src="{{imageUrl}}icon-code.png?t={{Timestamp}}"></image>
<view class="wrap">
<view class="w-header">
<view class="name">徐萌</view>
<view class="name">{{userInfo.Name}}</view>
<view class="desc">
主治医师
<view class="line"></view>
心内科
<block wx:if="{{userInfo.TitleType === 99}}">{{userInfo.OtherTitle}}</block>
<block wx:else>{{DoctorTitleType[userInfo.TitleType]}}</block>
<block wx:for="{{userInfo.Department}}" wx:key="DepartmentId">
<view class="line"></view>
{{item.DepartmentName}}
</block>
</view>
</view>
<view class="w-container">
<view class="hostipal">北京天坛医院</view>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
<view class="hostipal">{{userInfo.HospitalName}}</view>
<view class="tag">{{userInfo.HospitalClassificationName}}{{userInfo.HospitalLevelName}}</view>
<view class="site" wx:if="{{userInfo.CityName}}">
{{userInfo.CityName}}{{userInfo.CountyName?'/':''}}{{userInfo.CountyName}}
</view>
</view>
<view class="w-footer">
<view class="w-footer" wx:if="{{userInfo.Specialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag" wx:for="{{userInfo.Specialty}}" wx:key="SpecialtyId">{{item.SpecialtyName}}</view>
</view>
</view>
</view>
<view class="banner">
<view class="title">待处理事项</view>
<view class="bg">
<view class="b-container" wx:if="{{false}}">
<view
class="b-container"
wx:if="{{take.dealCaseCount>0 || take.notReadFeedBackCount>0 || take.notReadChatRoomCount>0 || take.toAuditDoctorCount>0}}"
>
<view class="item">
<view class="name">待处理病历</view>
<view class="num">27</view>
<view class="num">{{take.dealCaseCount}}</view>
</view>
<view class="item">
<view class="name">病历更新</view>
<view class="num">{{take.notReadFeedBackCount}}</view>
</view>
<view class="line"></view>
<view class="item">
<view class="name">聊天室新消息</view>
<view class="num">1</view>
<view class="name">聊天室消息</view>
<view class="num">{{take.notReadChatRoomCount}}</view>
</view>
<view class="line"></view>
<view class="item">
<view class="name">医生待审核</view>
<view class="num">1</view>
<view class="num">{{take.toAuditDoctorCount}}</view>
</view>
</view>
<view class="b-container-none" wx:else>暂时没有需要处理的事项哦~</view>
@ -53,14 +56,18 @@ @@ -53,14 +56,18 @@
</view>
<view
class="stat"
wx:if="{{false}}"
wx:if="{{case.totalCaseCount>0}}"
style="background: url({{imageUrl}}home-stat-bg.png?r={{Timestamp}}) no-repeat top center/100% 100%;"
>
<view class="title">我管理的病历</view>
<!-- <view class="more">
查看全部
<van-icon name="arrow" />
</view> -->
<view class="s-container">
<view class="item">
<view class="name">全部</view>
<view class="num">54</view>
<view class="num">{{case.totalCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
@ -68,23 +75,21 @@ @@ -68,23 +75,21 @@
新病历
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{case.newCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
<view class="name">
讨论中
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{case.feedbackCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
<view class="name">
已归档
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{case.archiveCaseCount}}</view>
</view>
</view>
</view>
@ -97,12 +102,12 @@ @@ -97,12 +102,12 @@
<view class="s-container">
<image class="none" src="{{imageUrl}}empty-3.png?t={{Timestamp}}"></image>
<view class="tip">还没有提交病历</view>
<view class="btn">提交病历</view>
<view class="btn" bind:tap="handleEntryCase">提交病历</view>
</view>
</view>
<view
class="stat"
wx:if="{{fasle}}"
wx:if="{{doctorCount.TotalCount>0}}"
style="background: url({{imageUrl}}home-stat-bg.png?r={{Timestamp}}) no-repeat top center/100% 100%;"
>
<view class="title">我管理的医生</view>
@ -112,32 +117,26 @@ @@ -112,32 +117,26 @@
</view>
<view class="s-container">
<view class="item">
<view class="name">全部</view>
<view class="num">54</view>
</view>
<view class="line"></view>
<view class="item">
<view class="name">
新病历
全部
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{doctorCount.TotalCount}}</view>
</view>
<view class="line"></view>
<view class="item">
<view class="name">
讨论中
二级医生
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{doctorCount.TwoCount}}</view>
</view>
<view class="line"></view>
<view class="item">
<view class="name">
已归档
一级医生
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{doctorCount.OneCount}}</view>
</view>
</view>
</view>

4
src/echart/components/homeLevel4/index.scss

@ -388,7 +388,6 @@ @@ -388,7 +388,6 @@
}
}
.table {
margin-top: 40rpx;
.thead {
padding: 22rpx 0;
display: flex;
@ -422,8 +421,9 @@ @@ -422,8 +421,9 @@
background-color: rgba(248, 248, 248, 1);
}
.td1 {
padding: 12rpx 0;
padding: 12rpx 10rpx;
width: 338rpx;
text-align-last: left;
}
.td2,
.td3,

545
src/echart/components/homeLevel4/index.ts

@ -1,12 +1,18 @@ @@ -1,12 +1,18 @@
const app = getApp<IAppOption>()
const echarts = require('../ec-canvas/echarts.js')
import dayjs from "dayjs";
const echarts = require("../ec-canvas/echarts.js");
// pages/story/a.ts
Component({
/**
*
*/
properties: {},
properties: {
userInfo: Object,
DoctorTitleType: Object,
hospitalClassification: Object,
hospitalLevel: Object,
},
/**
*
@ -15,14 +21,46 @@ Component({ @@ -15,14 +21,46 @@ Component({
ec: {
lazyLoad: true,
},
take: {},
case: {},
doctorCount: {},
DepartmentId: "",
DepartmentName: "",
endYear: dayjs().year(),
year1: dayjs().year(),
year2: dayjs().year(),
year3: dayjs().year(),
empty1: false,
empty2: false,
empty3: false,
rankList: [],
},
attached() {
this.waitEchart(async () => {
const chart1: any = await this.initChart1()
const chart2: any = await this.initChart2()
const chart3: any = await this.initChart3()
})
lifetimes: {
attached() {
const { DepartmentId, DepartmentName } = this.data.userInfo.Department[0];
this.setData({
Department: this.data.userInfo.Department,
DepartmentId,
DepartmentName,
});
this.getTake();
this.getCase();
this.getManageDoctor();
this.getRankList();
this.waitEchart(async () => {
this.getChat1();
this.getChat2();
this.getChat3();
// const chart1: any = await this.initChart1();
// const chart2: any = await this.initChart2();
// const chart3: any = await this.initChart3();
});
},
},
/**
*
@ -33,54 +71,81 @@ Component({ @@ -33,54 +71,81 @@ Component({
ecDataTrendComponent3: null as any,
waitEchart(callback) {
const time = setInterval(() => {
if (this.selectComponent('#chart1')) {
console.log(this.selectComponent('#chart1'))
clearInterval(time)
callback()
if (this.selectComponent("#chart1")) {
clearInterval(time);
callback();
}
}, 30)
}, 30);
},
handleYear1(e) {
this.setData({
year1: e.detail.value,
});
this.getChat1();
},
getChat1() {
wx.ajax({
method: "GET",
url: "?r=takeda/stat/department-doctor-list",
data: {
Year: this.data.year1,
DepartmentId: this.data.DepartmentId,
},
}).then((res) => {
this.setData({
empty1: Boolean(res.list.length === 0),
});
this.initChart1(res.list);
});
},
initChart1() {
initChart1(list) {
return new Promise((reslove) => {
this.ecDataTrendComponent1 = this.selectComponent('#chart1')
this.ecDataTrendComponent1 = this.selectComponent("#chart1");
this.ecDataTrendComponent1.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, {
width,
height,
devicePixelRatio: dpr, // new
})
canvas.setChart(chart)
const x: string[] = ['2024-09', '2024-10']
const y1: string[] = ['10', '30']
const y2: string[] = ['10', '30']
const y3: string[] = ['10', '30']
const y4: string[] = ['30', '90']
});
canvas.setChart(chart);
const x: string[] = [];
const y1: string[] = [];
const y2: string[] = [];
const y3: string[] = [];
const y4: string[] = [];
list.forEach((item) => {
x.push(item.YearMonth);
y1.push(item.DoctorLevel1Count);
y2.push(item.DoctorLevel2Count);
y3.push(item.DoctorLevel3Count);
y4.push(item.DoctorCount);
});
const option = {
legend: {
bottom: 0,
itemWidth: 8,
itemHeight: 8,
icon: 'circle',
icon: "circle",
lineStyle: {
width: '0',
width: "0",
},
textStyle: {
color: 'rgba(103, 113, 114, 1)',
fontSize: '12',
color: "rgba(103, 113, 114, 1)",
fontSize: "12",
},
data: ['一级医生', '核心医生', '质控医生'],
data: ["一级医生", "核心医生", "质控医生"],
},
grid: {
top: '10%',
left: '3%',
right: '4%',
bottom: '30',
top: "10%",
left: "3%",
right: "4%",
bottom: "30",
containLabel: true,
},
xAxis: [
{
type: 'category',
type: "category",
axisTick: {
show: false,
},
@ -89,148 +154,175 @@ Component({ @@ -89,148 +154,175 @@ Component({
},
axisLabel: {
fontSize: 10,
color: 'rgba(40, 48, 49, 1)',
color: "rgba(40, 48, 49, 1)",
},
data: x,
},
],
yAxis: [
{
type: 'value',
type: "value",
minInterval: 1,
splitLine: {
show: false,
},
axisLabel: {
fontSize: 10,
color: 'rgba(40, 48, 49, 1)',
color: "rgba(40, 48, 49, 1)",
formatter(value) {
return Math.abs(value)
return Math.abs(value);
},
},
},
],
series: [
{
name: '质控医生',
type: 'bar',
stack: 'a',
name: "质控医生",
type: "bar",
stack: "a",
label: {
show: true,
color: '#fff',
color: "#fff",
fontSize: 10,
overflow: 'truncate',
overflow: "truncate",
width: 30,
formatter(params) {
return Math.abs(params.value)
return Math.abs(params.value);
},
},
color: 'rgba(0, 180, 197, 1)',
color: "rgba(0, 180, 197, 1)",
data: y3,
},
{
name: '核心医生',
type: 'bar',
stack: 'a',
name: "核心医生",
type: "bar",
stack: "a",
label: {
show: true,
color: '#fff',
color: "#fff",
fontSize: 10,
overflow: 'truncate',
overflow: "truncate",
width: 30,
formatter(params) {
return Math.abs(params.value)
return Math.abs(params.value);
},
},
color: 'rgba(84, 226, 180, 1)',
color: "rgba(84, 226, 180, 1)",
data: y2,
},
{
name: '一级医生',
type: 'bar',
stack: 'a',
name: "一级医生",
type: "bar",
stack: "a",
label: {
show: true,
color: 'rgba(0, 180, 197, 1)',
color: "rgba(0, 180, 197, 1)",
fontSize: 10,
overflow: 'truncate',
overflow: "truncate",
width: 30,
},
color: 'rgba(225, 248, 242, 1)',
color: "rgba(225, 248, 242, 1)",
data: y1,
},
{
name: '总数', // 总数显示,生成一个总数的柱状图,将颜色设为透明,
type: 'line', // label将位置设备内部底部,造成一个总数显示在
stack: '', // 柱状图上方的假象
color: 'rgba(0, 0, 0, 0)',
name: "总数", // 总数显示,生成一个总数的柱状图,将颜色设为透明,
type: "line", // label将位置设备内部底部,造成一个总数显示在
stack: "", // 柱状图上方的假象
color: "rgba(0, 0, 0, 0)",
data: y4,
symbolSize: 0,
label: {
normal: {
show: true,
position: 'top',
color: 'rgba(133, 133, 133, 1)',
position: "top",
color: "rgba(133, 133, 133, 1)",
fontSize: 10,
formatter: '{c}',
formatter: "{c}",
},
},
},
],
dataZoom: {
type: 'inside', // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。
type: "inside", // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。
startValue: x.length - 6,
endValue: x.length - 1,
filterMode: 'none',
filterMode: "none",
},
}
};
chart.setOption(option)
reslove(chart)
return chart
})
})
chart.setOption(option);
reslove(chart);
return chart;
});
});
},
initChart2() {
handleYear2(e) {
this.setData({
year2: e.detail.value,
});
this.getChat2();
},
getChat2() {
wx.ajax({
method: "GET",
url: "?r=takeda/stat/department-doctor-total-case-list",
data: {
Year: this.data.year2,
DepartmentId: this.data.DepartmentId,
},
}).then((res) => {
this.setData({
empty2: Boolean(res.list.length === 0),
});
this.initChart2(res.list);
});
},
initChart2(list) {
return new Promise((reslove) => {
this.ecDataTrendComponent2 = this.selectComponent('#chart2')
this.ecDataTrendComponent2 = this.selectComponent("#chart2");
this.ecDataTrendComponent2.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, {
width,
height,
devicePixelRatio: dpr, // new
})
canvas.setChart(chart)
const x: string[] = ['2024-09', '2024-10']
const y1: string[] = ['10', '30']
const y2: string[] = ['10', '30']
const y3: string[] = ['20', '60']
});
canvas.setChart(chart);
const x: string[] = ["2024-09", "2024-10"];
const y1: string[] = ["10", "30"];
const y2: string[] = ["10", "30"];
const y3: string[] = ["20", "60"];
list.forEach((item) => {
x.push(item.YearMonth);
y1.push(item.DoctorLevel1TotalCases);
y2.push(item.DoctorLevel2TotalCases);
y3.push(item.TotalCaseCount);
});
const option = {
legend: {
bottom: 0,
itemWidth: 8,
itemHeight: 8,
icon: 'circle',
icon: "circle",
lineStyle: {
width: '0',
width: "0",
},
textStyle: {
color: 'rgba(103, 113, 114, 1)',
fontSize: '12',
color: "rgba(103, 113, 114, 1)",
fontSize: "12",
},
data: ['一级医生提交', '核心医生提交'],
data: ["一级医生提交", "核心医生提交"],
},
grid: {
top: '10%',
left: '3%',
right: '4%',
bottom: '30',
top: "10%",
left: "3%",
right: "4%",
bottom: "30",
containLabel: true,
},
xAxis: [
{
type: 'category',
type: "category",
axisTick: {
show: false,
},
@ -239,131 +331,158 @@ Component({ @@ -239,131 +331,158 @@ Component({
},
axisLabel: {
fontSize: 10,
color: 'rgba(40, 48, 49, 1)',
color: "rgba(40, 48, 49, 1)",
},
data: x,
},
],
yAxis: [
{
type: 'value',
type: "value",
minInterval: 1,
splitLine: {
show: false,
},
axisLabel: {
fontSize: 10,
color: 'rgba(40, 48, 49, 1)',
color: "rgba(40, 48, 49, 1)",
formatter(value) {
return Math.abs(value)
return Math.abs(value);
},
},
},
],
series: [
{
name: '核心医生提交',
type: 'bar',
stack: 'a',
name: "核心医生提交",
type: "bar",
stack: "a",
label: {
show: true,
color: '#fff',
color: "#fff",
fontSize: 10,
overflow: 'truncate',
overflow: "truncate",
width: 30,
formatter(params) {
return Math.abs(params.value)
return Math.abs(params.value);
},
},
color: 'rgba(84, 226, 180, 1)',
color: "rgba(84, 226, 180, 1)",
data: y2,
},
{
name: '一级医生提交',
type: 'bar',
stack: 'a',
name: "一级医生提交",
type: "bar",
stack: "a",
label: {
show: true,
color: 'rgba(0, 180, 197, 1)',
color: "rgba(0, 180, 197, 1)",
fontSize: 10,
overflow: 'truncate',
overflow: "truncate",
width: 30,
},
color: 'rgba(225, 248, 242, 1)',
color: "rgba(225, 248, 242, 1)",
data: y1,
},
{
name: '总数', // 总数显示,生成一个总数的柱状图,将颜色设为透明,
type: 'line', // label将位置设备内部底部,造成一个总数显示在
stack: '', // 柱状图上方的假象
color: 'rgba(0, 0, 0, 0)',
name: "总数", // 总数显示,生成一个总数的柱状图,将颜色设为透明,
type: "line", // label将位置设备内部底部,造成一个总数显示在
stack: "", // 柱状图上方的假象
color: "rgba(0, 0, 0, 0)",
data: y3,
symbolSize: 0,
label: {
normal: {
show: true,
position: 'top',
color: 'rgba(133, 133, 133, 1)',
position: "top",
color: "rgba(133, 133, 133, 1)",
fontSize: 10,
formatter: '{c}',
formatter: "{c}",
},
},
},
],
dataZoom: {
type: 'inside', // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。
type: "inside", // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。
startValue: x.length - 6,
endValue: x.length - 1,
filterMode: 'none',
filterMode: "none",
},
}
};
chart.setOption(option)
reslove(chart)
return chart
})
})
chart.setOption(option);
reslove(chart);
return chart;
});
});
},
handleYear3(e) {
this.setData({
year3: e.detail.value,
});
this.getChat3();
},
initChart3() {
getChat3() {
wx.ajax({
method: "GET",
url: "?r=takeda/stat/department-doctor-month-case-list",
data: {
Year: this.data.year3,
DepartmentId: this.data.DepartmentId,
},
}).then((res) => {
this.setData({
empty3: Boolean(res.list.length === 0),
});
this.initChart3(res.list);
});
},
initChart3(list) {
return new Promise((reslove) => {
this.ecDataTrendComponent3 = this.selectComponent('#chart3')
this.ecDataTrendComponent3 = this.selectComponent("#chart3");
this.ecDataTrendComponent3.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, {
width,
height,
devicePixelRatio: dpr, // new
})
canvas.setChart(chart)
const x: string[] = ['2024-09', '2024-10']
const y1: string[] = ['10', '30']
const y2: string[] = ['10', '30']
const y3: string[] = ['20', '60']
});
canvas.setChart(chart);
const x: string[] = ["2024-09", "2024-10"];
const y1: string[] = ["10", "30"];
const y2: string[] = ["10", "30"];
const y3: string[] = ["20", "60"];
list.forEach((item) => {
x.push(item.YearMonth);
y1.push(item.DoctorLevel1MonthCases);
y2.push(item.DoctorLevel2MonthCases);
y3.push(item.TotalCaseCount);
});
const option = {
legend: {
bottom: 0,
itemWidth: 8,
itemHeight: 8,
icon: 'circle',
icon: "circle",
lineStyle: {
width: '0',
width: "0",
},
textStyle: {
color: 'rgba(103, 113, 114, 1)',
fontSize: '12',
color: "rgba(103, 113, 114, 1)",
fontSize: "12",
},
data: ['一级医生提交', '核心医生提交'],
data: ["一级医生提交", "核心医生提交"],
},
grid: {
top: '10%',
left: '3%',
right: '4%',
bottom: '30',
top: "10%",
left: "3%",
right: "4%",
bottom: "30",
containLabel: true,
},
xAxis: [
{
type: 'category',
type: "category",
axisTick: {
show: false,
},
@ -372,95 +491,171 @@ Component({ @@ -372,95 +491,171 @@ Component({
},
axisLabel: {
fontSize: 10,
color: 'rgba(40, 48, 49, 1)',
color: "rgba(40, 48, 49, 1)",
},
data: x,
},
],
yAxis: [
{
type: 'value',
type: "value",
minInterval: 1,
splitLine: {
show: false,
},
axisLabel: {
fontSize: 10,
color: 'rgba(40, 48, 49, 1)',
color: "rgba(40, 48, 49, 1)",
formatter(value) {
return Math.abs(value)
return Math.abs(value);
},
},
},
],
series: [
{
name: '核心医生提交',
type: 'bar',
stack: 'a',
name: "核心医生提交",
type: "bar",
stack: "a",
label: {
show: true,
color: '#fff',
color: "#fff",
fontSize: 10,
overflow: 'truncate',
overflow: "truncate",
width: 30,
formatter(params) {
return Math.abs(params.value)
return Math.abs(params.value);
},
},
color: 'rgba(84, 226, 180, 1)',
color: "rgba(84, 226, 180, 1)",
data: y2,
},
{
name: '一级医生提交',
type: 'bar',
stack: 'a',
name: "一级医生提交",
type: "bar",
stack: "a",
label: {
show: true,
color: 'rgba(0, 180, 197, 1)',
color: "rgba(0, 180, 197, 1)",
fontSize: 10,
overflow: 'truncate',
overflow: "truncate",
width: 30,
},
color: 'rgba(225, 248, 242, 1)',
color: "rgba(225, 248, 242, 1)",
data: y1,
},
{
name: '总数', // 总数显示,生成一个总数的柱状图,将颜色设为透明,
type: 'line', // label将位置设备内部底部,造成一个总数显示在
stack: '', // 柱状图上方的假象
color: 'rgba(0, 0, 0, 0)',
name: "总数", // 总数显示,生成一个总数的柱状图,将颜色设为透明,
type: "line", // label将位置设备内部底部,造成一个总数显示在
stack: "", // 柱状图上方的假象
color: "rgba(0, 0, 0, 0)",
data: y3,
symbolSize: 0,
label: {
normal: {
show: true,
position: 'top',
color: 'rgba(133, 133, 133, 1)',
position: "top",
color: "rgba(133, 133, 133, 1)",
fontSize: 10,
formatter: '{c}',
formatter: "{c}",
},
},
},
],
dataZoom: {
type: 'inside', // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。
type: "inside", // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。
startValue: x.length - 6,
endValue: x.length - 1,
filterMode: 'none',
filterMode: "none",
},
}
};
chart.setOption(option)
reslove(chart)
return chart
})
})
chart.setOption(option);
reslove(chart);
return chart;
});
});
},
getTake() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/todo",
data: {},
}).then((res) => {
this.setData({
take: res,
});
});
},
handleChangeDept(e) {
const index = e.detail.value;
const { DepartmentId, DepartmentName } = this.data.userInfo.Department[index];
this.setData({
DepartmentId,
DepartmentName,
});
this.getCase();
this.getManageDoctor();
this.getChat1();
this.getChat2();
this.getChat3();
},
getCase() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/case",
data: {},
}).then((res) => {
this.setData({
case: res,
});
});
},
getManageDoctor() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/manage-doctor-count",
data: { DepartmentId: this.data.DepartmentId },
}).then((res) => {
this.setData({
doctorCount: res.count,
});
});
},
getRankList() {
wx.ajax({
method: "GET",
url: "?r=takeda/stat/hospital-doctor-rank-list",
data: {
count: 5,
},
}).then((res) => {
this.setData({
rankList: res.list,
});
});
},
handleRankDetail() {
wx.navigateTo({
url: '/module1/pages/doctorRankList/index',
})
url: "/module1/pages/doctorRankList/index",
});
},
handleInvite() {
wx.navigateTo({
url: "/module1/pages/invite/index",
});
},
handleCase() {
wx.switchTab({
url: "/pages/cases/index",
});
},
handleAllDoctor() {
wx.navigateTo({
url: "/module1/pages/org4/index",
});
},
},
})
});
export {};

130
src/echart/components/homeLevel4/index.wxml

@ -1,53 +1,55 @@ @@ -1,53 +1,55 @@
<view class="page">
<view class="user">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<image class="code" src="{{imageUrl}}icon-code.png?t={{Timestamp}}"></image>
<doctorAvatar class="avatar" src="{{userInfo.Img}}" level="4"></doctorAvatar>
<image class="code" bind:tap="handleInvite" src="{{imageUrl}}icon-code.png?t={{Timestamp}}"></image>
<view class="wrap">
<view class="w-header">
<view class="name">徐萌</view>
<view class="name">{{userInfo.Name}}</view>
<view class="desc">
主治医师
<view class="line"></view>
心内科
<block wx:if="{{userInfo.TitleType === 99}}">{{userInfo.OtherTitle}}</block>
<block wx:else>{{DoctorTitleType[userInfo.TitleType]}}</block>
<block wx:for="{{userInfo.Department}}" wx:key="DepartmentId">
<view class="line"></view>
{{item.DepartmentName}}
</block>
</view>
</view>
<view class="w-container">
<view class="hostipal">北京天坛医院</view>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
<view class="hostipal">{{userInfo.HospitalName}}</view>
<view class="tag">{{userInfo.HospitalClassificationName}}{{userInfo.HospitalLevelName}}</view>
<view class="site" wx:if="{{userInfo.CityName}}">
{{userInfo.CityName}}{{userInfo.CountyName?'/':''}}{{userInfo.CountyName}}
</view>
</view>
<view class="w-footer">
<view class="w-footer" wx:if="{{userInfo.Specialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag" wx:for="{{userInfo.Specialty}}" wx:key="SpecialtyId">{{item.SpecialtyName}}</view>
</view>
</view>
</view>
<view class="banner">
<view class="title">待处理事项</view>
<view class="bg">
<view class="b-container">
<view
class="b-container"
wx:if="{{take.dealCaseCount>0 || take.notReadChatRoomCount>0 || take.toAuditDoctorCount>0}}"
>
<view class="item">
<view class="name">待处理病历</view>
<view class="num">27</view>
<view class="num">{{take.dealCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
<view class="name">聊天室新消息</view>
<view class="num">1</view>
<view class="num">{{take.notReadChatRoomCount}}</view>
</view>
<view class="line"></view>
<view class="item">
<view class="name">医生待审核</view>
<view class="num">1</view>
<view class="num">{{take.toAuditDoctorCount}}</view>
</view>
</view>
<view class="b-container-none" wx:else>暂时没有需要处理的事项哦~</view>
</view>
</view>
<view
@ -55,20 +57,20 @@ @@ -55,20 +57,20 @@
style="background: url({{imageUrl}}home-stat-bg.png?r={{Timestamp}}) no-repeat top center/100% 100%;"
>
<view class="title">本科室全部病历</view>
<picker class="picker">
<picker class="picker" range="{{Department}}" range-key="DepartmentName" bind:change="handleChangeDept">
<view class="picker-content">
<view class="text">全部</view>
<view class="text">{{DepartmentName}}</view>
<van-icon name="arrow-down" />
</view>
</picker>
<view class="more">
<view class="more" bind:tap="handleCase">
查看全部
<van-icon name="arrow" />
</view>
<view class="s-container" wx:if="{{false}}">
<view class="s-container" wx:if="{{case.totalCaseCount>0}}">
<view class="item">
<view class="name">全部</view>
<view class="num">54</view>
<view class="num">{{case.totalCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
@ -76,23 +78,21 @@ @@ -76,23 +78,21 @@
新病历
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{case.newCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
<view class="name">
讨论中
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{case.feedbackCaseCount}}</view>
</view>
<view class="line"></view>
<view class="item">
<view class="name">
已归档
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<view class="num">54</view>
<view class="num">{{case.archiveCaseCount}}</view>
</view>
</view>
<view class="s-container-none" wx:else>
@ -100,10 +100,10 @@ @@ -100,10 +100,10 @@
<view class="tip">暂时还没有医生提交病历哦~</view>
</view>
</view>
<view class="department">
<view class="department" wx:if="{{doctorCount.TotalCount>0}}">
<view class="d-header">
<view class="name">本科室医生</view>
<view class="more">
<view class="more" bind:tap="handleAllDoctor">
查看全部
<van-icon name="arrow" />
</view>
@ -111,24 +111,24 @@ @@ -111,24 +111,24 @@
<view class="d-container">
<view class="item">
<view class="name">医生总数</view>
<view class="num">54</view>
<view class="num">{{doctorCount.TotalCount}}</view>
</view>
<view class="item">
<view class="name">质控医生</view>
<view class="num">54</view>
<view class="num">{{doctorCount.ThreeCount}}</view>
</view>
<view class="item">
<view class="name">核心医生</view>
<view class="num">54</view>
<view class="num">{{doctorCount.TwoCount}}</view>
</view>
<view class="item">
<view class="name">一级医生</view>
<view class="num">54</view>
<view class="num">{{doctorCount.OneCount}}</view>
</view>
</view>
<view class="tip">注:一级医生为平台全部医生,不区分科室</view>
</view>
<view class="department-none">
<view class="department-none" wx:else>
<view class="d-header">
<view class="name">本科室医生</view>
</view>
@ -143,23 +143,25 @@ @@ -143,23 +143,25 @@
科室医生入驻情况
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<picker class="picker">
<picker class="picker" mode="date" end="{{endYear}}" fields="year" bindchange="handleYear1">
<view class="picker-content">
<view class="text">2024年</view>
<view class="text">{{year1}}年</view>
<van-icon name="arrow-down" />
</view>
</picker>
</view>
<view class="chart">
<ec-canvas id="chart1" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
<view class="tip">注:一级医生为平台全部医生,不区分科室</view>
<view class="chart-none">
<view class="chart-none" wx:if="{{empty1}}">
<view class="d-container">
<image class="none-img" src="{{imageUrl}}empty-4.png?t={{Timestamp}}"></image>
<view class="none-title">暂无数据</view>
</view>
</view>
<block wx:else>
<view class="chart">
<ec-canvas id="chart1" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
<view class="tip">注:一级医生为平台全部医生,不区分科室</view>
</block>
</view>
<view class="chart-card">
<view class="c-header">
@ -167,22 +169,22 @@ @@ -167,22 +169,22 @@
累计病历统计
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<picker class="picker">
<picker class="picker" mode="date" end="{{endYear}}" fields="year" bindchange="handleYear2">
<view class="picker-content">
<view class="text">2024年</view>
<view class="text">{{year2}}年</view>
<van-icon name="arrow-down" />
</view>
</picker>
</view>
<view class="chart">
<ec-canvas id="chart2" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
<view class="chart-none">
<view class="chart-none" wx:if="{{empty2}}">
<view class="d-container">
<image class="none-img" src="{{imageUrl}}empty-4.png?t={{Timestamp}}"></image>
<view class="none-title">暂无数据</view>
</view>
</view>
<view class="chart" wx:else>
<ec-canvas id="chart2" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
</view>
<view class="chart-card">
<view class="c-header">
@ -190,22 +192,22 @@ @@ -190,22 +192,22 @@
科室新增病历统计
<van-icon name="question" color="rgba(224, 224, 224, 1)" />
</view>
<picker class="picker">
<picker class="picker" mode="date" end="{{endYear}}" fields="year" bindchange="handleYear3">
<view class="picker-content">
<view class="text">2024年</view>
<view class="text">{{year3}}年</view>
<van-icon name="arrow-down" />
</view>
</picker>
</view>
<view class="chart">
<ec-canvas id="chart3" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
<view class="chart-none">
<view class="chart-none" wx:if="{{empty3}}">
<view class="d-container">
<image class="none-img" src="{{imageUrl}}empty-4.png?t={{Timestamp}}"></image>
<view class="none-title">暂无数据</view>
</view>
</view>
<view class="chart" wx:else>
<ec-canvas id="chart3" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
</view>
</view>
<view class="rank">
<view class="r-header">
@ -227,12 +229,12 @@ @@ -227,12 +229,12 @@
<view class="th5">S3</view>
</view>
<view class="tbody">
<view class="tr" wx:for="{{4}}" wx:key="index">
<view class="td1">1 中山大学附属医院</view>
<view class="td2">888</view>
<view class="td3">888</view>
<view class="td4">888</view>
<view class="td5">888</view>
<view class="tr" wx:for="{{rankList}}" wx:key="HospitalId">
<view class="td1">{{index+1}} {{item.HospitalName}}</view>
<view class="td2">{{item.TotalDoctorCount}}</view>
<view class="td3">{{item.DoctorLevel1Count}}</view>
<view class="td4">{{item.DoctorLevel2Count}}</view>
<view class="td5">{{item.DoctorLevel3Count}}</view>
</view>
</view>
</view>

BIN
src/images/doctor-level4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
src/images/empty-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
src/images/empty-4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

4
src/module1/pages/doctorRankList/index.json

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
{
"navigationBarTitleText": "医院活跃排行榜",
"navigationStyle": "default",
"usingComponents": {}
"usingComponents": {
"pagination": "/components/pagination/index"
}
}

3
src/module1/pages/doctorRankList/index.scss

@ -42,8 +42,9 @@ page { @@ -42,8 +42,9 @@ page {
background-color: rgba(248, 248, 248, 1);
}
.td1 {
padding: 12rpx 0;
padding: 12rpx 10rpx;
width: 338rpx;
text-align-last: left;
}
.td2,
.td3,

45
src/module1/pages/doctorRankList/index.ts

@ -1,6 +1,45 @@ @@ -1,6 +1,45 @@
const _app = getApp<IAppOption>();
const app = getApp<IAppOption>();
Page({
data: {},
onLoad() {},
data: {
list: [],
pagination: {
page: 1,
pages: 1,
count: 1,
},
},
onLoad() {
app.waitLogin().then(() => {
this.getList();
});
},
getList(newPage = 1) {
wx.ajax({
method: "GET",
url: "?r=takeda/stat/hospital-doctor-rank-list",
data: {
page: newPage,
count: 20,
},
}).then((res) => {
const list = res.page === 1 ? res.list : [...this.data.list, ...res.list];
this.setData({
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);
}
},
});
export {};

15
src/module1/pages/doctorRankList/index.wxml

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
style="background: url({{imageUrl}}doctor-rank-bg.png?r={{Timestamp}}) no-repeat top center/100% 326rpx;"
>
<view class="container">
<view class="table">
<view class="table" wx:if="{{list.length}}">
<view class="thead">
<view class="th1">医院</view>
<view class="th2">医生总数</view>
@ -12,14 +12,15 @@ @@ -12,14 +12,15 @@
<view class="th5">S3</view>
</view>
<view class="tbody">
<view class="tr" wx:for="{{4}}" wx:key="index">
<view class="td1">1 中山大学附属医院</view>
<view class="td2">888</view>
<view class="td3">888</view>
<view class="td4">888</view>
<view class="td5">888</view>
<view class="tr" wx:for="{{list}}" wx:key="HospitalId">
<view class="td1">{{index+1}} {{item.HospitalName}}</view>
<view class="td2">{{item.TotalDoctorCount}}</view>
<view class="td3">{{item.DoctorLevel1Count}}</view>
<view class="td4">{{item.DoctorLevel2Count}}</view>
<view class="td5">{{item.DoctorLevel3Count}}</view>
</view>
</view>
</view>
<pagination pagination="{{pagination}}"></pagination>
</view>
</view>

36
src/module1/pages/org3/index.scss

@ -182,21 +182,21 @@ page { @@ -182,21 +182,21 @@ page {
}
}
.me {
margin: 24rpx 24rpx 0;
.doctor {
padding: 24rpx;
background: linear-gradient(180deg, #e5f5f7 0%, #ffffff 50%);
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #ffffff;
}
}
.container {
margin: 24rpx 24rpx 0;
border-radius: 16rpx;
background-color: #fff;
.level-three {
margin: 24rpx 0 0;
.doctor {
padding: 24rpx;
background: linear-gradient(180deg, #e5f5f7 0%, #ffffff 50%);
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #ffffff;
}
}
.level-two {
display: flex;
.aside {
@ -240,7 +240,7 @@ page { @@ -240,7 +240,7 @@ page {
}
}
}
.level-three {
.level-one {
display: flex;
.aside {
margin-left: 60rpx;
@ -250,7 +250,7 @@ page { @@ -250,7 +250,7 @@ page {
.vertical {
flex-shrink: 0;
margin-left: 56rpx;
width: 1px;
width: 2rpx;
height: 80rpx;
background-color: rgba(0, 180, 197, 1);
}
@ -258,13 +258,13 @@ page { @@ -258,13 +258,13 @@ page {
flex-shrink: 0;
margin-left: 56rpx;
width: 42rpx;
height: 1px;
height: 2rpx;
background-color: rgba(0, 180, 197, 1);
}
.vertical-grow {
flex: 1;
margin-left: 56rpx;
width: 1px;
width: 2rpx;
background-color: rgba(0, 180, 197, 1);
}
}
@ -272,7 +272,7 @@ page { @@ -272,7 +272,7 @@ page {
padding: 24rpx 24rpx 24rpx 0;
}
}
.level-three-only {
.level-one-only {
display: flex;
.aside {
padding-left: 60rpx;
@ -280,14 +280,14 @@ page { @@ -280,14 +280,14 @@ page {
flex-direction: column;
.vertical {
flex-shrink: 0;
width: 1px;
width: 2rpx;
height: 80rpx;
background-color: rgba(0, 180, 197, 1);
}
.across {
flex-shrink: 0;
width: 144rpx;
height: 1px;
height: 2rpx;
background-color: rgba(0, 180, 197, 1);
}
}

43
src/module1/pages/org3/index.ts

@ -1,6 +1,43 @@ @@ -1,6 +1,43 @@
const _app = getApp<IAppOption>();
const app = getApp<IAppOption>();
Page({
data: {},
onLoad() {},
data: {
doctorCount: {},
tree: [],
},
onLoad() {
app.waitLogin().then(() => {
this.getManageDoctor();
this.getTree();
});
},
getManageDoctor() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/manage-doctor-count",
data: {},
}).then((res) => {
this.setData({
doctorCount: res.count,
});
});
},
getTree() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/doctor-tree-list",
data: {},
}).then((res) => {
this.setData({
tree: res.tree,
});
});
},
handleInvite() {
wx.navigateTo({
url: "/module1/pages/invite/index",
});
},
});
export {};

355
src/module1/pages/org3/index.wxml

@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
<view class="page">
<view class="header">
<view class="banner">
<view class="banner" wx:if="{{doctorCount.TotalCount>0}}">
<view class="item">
<view class="name">全部医生</view>
<view class="num">9</view>
<view class="num">{{doctorCount.TotalCount}}</view>
</view>
<view class="item">
<view class="name">二级医生</view>
<view class="num">9</view>
<view class="num">{{doctorCount.TwoCount}}</view>
</view>
<view class="item">
<view class="name">一级医生</view>
<view class="num">9</view>
<view class="num">{{doctorCount.OneCount}}</view>
</view>
</view>
<view class="operate">
@ -19,210 +19,213 @@ @@ -19,210 +19,213 @@
<image class="icon" src="{{imageUrl}}icon-search.png?t={{Timestamp}}"></image>
<input type="text" class="input" placeholder-class="place-input" placeholder="搜索医院名称" />
</view>
<view class="invite">邀约新医生</view>
<view class="invite" bind:tap="handleInvite">邀约新医生</view>
</view>
</view>
<view class="me">
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
<block wx:for="{{tree}}" wx:key="DoctorId">
<view class="container" wx:if="{{item.DoctorLevel==='3'}}">
<view class="level-three">
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
</view>
<view class="fold">
收起
<image class="f-icon" src="{{imageUrl}}fold-down.png?t={{Timestamp}}"></image>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
</view>
<view class="fold">
收起
<image class="f-icon" src="{{imageUrl}}fold-down.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
</view>
</view>
</view>
</view>
<view class="container">
<view class="level-two">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<view class="num">2人</view>
<view class="line"></view>
<view class="container">
<view class="level-two">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<view class="num">2人</view>
<view class="line"></view>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
</view>
<view class="fold">
收起
<image class="f-icon" src="{{imageUrl}}fold-down.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="fold">
收起
<image class="f-icon" src="{{imageUrl}}fold-down.png?t={{Timestamp}}"></image>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
</view>
</view>
</view>
</view>
<view class="level-three">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
<view class="vertical-grow"></view>
</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<view class="level-one">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
<view class="vertical-grow"></view>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
</view>
</view>
</view>
</view>
</view>
<view class="level-three">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
<view class="vertical-grow"></view>
</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<view class="level-one">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
<view class="vertical-grow"></view>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="container">
<view class="level-three-only">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<view class="container">
<view class="level-one-only">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
</view>
</view>
</view>
</view>
</view>
</view>
</block>
<view class="empty-wrap">
<view class="empty-wrap" wx:if="{{!tree.length}}">
<image class="empty" src="{{imageUrl}}empty-1.png?t={{Timestamp}}" mode="scaleToFill"></image>
<view class="e-title">没有找到您搜索的医院哦!</view>
</view>

68
src/module1/pages/org4/index.scss

@ -124,6 +124,7 @@ page { @@ -124,6 +124,7 @@ page {
display: flex;
align-items: baseline;
gap: 16rpx;
flex-wrap: wrap;
.name {
font-size: 36rpx;
color: rgba(20, 21, 21, 1);
@ -201,23 +202,43 @@ page { @@ -201,23 +202,43 @@ page {
}
}
.me {
margin: 24rpx 24rpx 0;
.doctor {
padding: 24rpx;
background: linear-gradient(180deg, #e5f5f7 0%, #ffffff 50%);
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #ffffff;
}
}
.container {
margin: 24rpx 24rpx 0;
border-radius: 16rpx;
background-color: #fff;
overflow: hidden;
.level-three {
&.active {
background: #f7feff;
.doctor {
background: #f7feff;
}
}
.doctor {
padding: 24rpx;
background: linear-gradient(180deg, #e5f5f7 0%, #ffffff 50%);
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(0, 0, 0, 0.1);
border-radius: 16rpx 16rpx 16rpx 16rpx;
border: 2rpx solid #ffffff;
.avatar-wrap {
.num {
flex-shrink: 0;
margin-top: 8rpx;
padding: 0 20rpx;
font-size: 22rpx;
color: rgba(255, 255, 255, 1);
border-radius: 64rpx;
background-color: rgba(0, 180, 197, 1);
}
}
}
}
.level-two {
display: flex;
&.active {
background-color: #f7feff;
}
.aside {
padding-left: 60rpx;
display: flex;
@ -259,8 +280,11 @@ page { @@ -259,8 +280,11 @@ page {
}
}
}
.level-three {
.level-one {
display: flex;
&.active {
background-color: #f7feff;
}
.aside {
margin-left: 60rpx;
padding-left: 42rpx;
@ -269,7 +293,7 @@ page { @@ -269,7 +293,7 @@ page {
.vertical {
flex-shrink: 0;
margin-left: 56rpx;
width: 1px;
width: 2rpx;
height: 80rpx;
background-color: rgba(0, 180, 197, 1);
}
@ -277,13 +301,13 @@ page { @@ -277,13 +301,13 @@ page {
flex-shrink: 0;
margin-left: 56rpx;
width: 42rpx;
height: 1px;
height: 2rpx;
background-color: rgba(0, 180, 197, 1);
}
.vertical-grow {
flex: 1;
margin-left: 56rpx;
width: 1px;
width: 2rpx;
background-color: rgba(0, 180, 197, 1);
}
}
@ -291,22 +315,25 @@ page { @@ -291,22 +315,25 @@ page {
padding: 24rpx 24rpx 24rpx 0;
}
}
.level-three-only {
.level-one-only {
display: flex;
&.active {
background-color: #f7feff;
}
.aside {
padding-left: 60rpx;
display: flex;
flex-direction: column;
.vertical {
flex-shrink: 0;
width: 1px;
width: 2rpx;
height: 80rpx;
background-color: rgba(0, 180, 197, 1);
}
.across {
flex-shrink: 0;
width: 144rpx;
height: 1px;
height: 2rpx;
background-color: rgba(0, 180, 197, 1);
}
}
@ -315,6 +342,11 @@ page { @@ -315,6 +342,11 @@ page {
}
}
}
.fold-wrap {
&.fold {
display: none;
}
}
.empty-wrap {
.empty {

130
src/module1/pages/org4/index.ts

@ -1,6 +1,130 @@ @@ -1,6 +1,130 @@
const _app = getApp<IAppOption>();
const app = getApp<IAppOption>();
Page({
data: {},
onLoad() {},
data: {
DepartmentId: "",
DepartmentName: "",
Department: [],
doctorCount: {},
tree: [] as any,
search: "",
userInfo: {} as any,
},
onLoad() {
app.waitLogin().then(() => {
app.getUserInfo(this, (userInfo) => {
const { DepartmentId, DepartmentName } = userInfo.Department[0];
this.setData({
Department: userInfo.Department,
DepartmentId,
DepartmentName,
});
this.getManageDoctor();
this.getTree();
});
});
},
getManageDoctor() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/manage-doctor-count",
data: { DepartmentId: this.data.DepartmentId },
}).then((res) => {
this.setData({
doctorCount: res.count,
});
});
},
getTree() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/doctor-tree-list",
data: { DepartmentId: this.data.DepartmentId },
}).then((res) => {
this.setData({
tree: res.tree,
});
});
},
handleChange(e) {
const index = e.detail.value;
const { DepartmentId, DepartmentName } = this.data.Department[index];
this.setData({
DepartmentId,
DepartmentName,
});
},
handleInvite() {
wx.navigateTo({
url: "/module1/pages/invite/index",
});
},
handleSearch() {
const { tree, search } = this.data;
let newTree: any = null;
if (search) {
newTree = this.sourceTree(tree, search);
} else {
newTree = this.clearTree(tree, search);
}
this.setData({
tree: newTree,
});
},
sourceTree(tree: any[], search: string): any[] {
return tree.map((item) => {
if (item.Children?.length) {
this.sourceTree(item.Children, search);
}
if (item.DoctorInfo.doctorName.includes(search)) {
item.active = true;
} else {
item.active = false;
}
return item;
});
},
clearTree(tree: any[], search: string): any[] {
return tree.map((item) => {
if (item.Children?.length) {
this.clearTree(item.Children, search);
}
item.active = false;
return item;
});
},
handleFold(e) {
const { index } = e.currentTarget.dataset;
const { tree } = this.data;
tree[index].fold = !tree[index].fold;
this.setData({
tree,
});
},
handleSubFold(e) {
const { index, subindex } = e.currentTarget.dataset;
const { tree } = this.data;
tree[index].Children[subindex].fold = !tree[index].Children[subindex].fold;
this.setData({
tree,
});
},
handleFoldAll() {
const { tree } = this.data;
this.toggleFoldAll(tree);
},
toggleFoldAll(tree) {
return tree.map((item) => {
if (item.Children?.length) {
this.toggleFoldAll(item.Children);
}
item.fold = !item.fold;
return item;
});
},
});
export {};

640
src/module1/pages/org4/index.wxml

@ -2,277 +2,499 @@ @@ -2,277 +2,499 @@
<view class="header">
<view class="select">
<view class="label">所在科室:</view>
<picker class="picker">
<picker class="picker" range="{{Department}}" range-key="DepartmentName" bindchange="handleChange">
<view class="picker-content">
心血管内科
{{DepartmentName}}
<van-icon name="arrow-down" />
</view>
</picker>
</view>
<view class="banner">
<view class="banner" wx:if="{{doctorCount.TotalCount}}">
<view class="item">
<view class="name">全部医生</view>
<view class="num">9</view>
<view class="num">{{doctorCount.TotalCount}}</view>
</view>
<view class="item">
<view class="name">三级医生</view>
<view class="num">9</view>
<view class="num">{{doctorCount.ThreeCount}}</view>
</view>
<view class="item">
<view class="name">二级医生</view>
<view class="num">9</view>
<view class="num">{{doctorCount.TwoCount}}</view>
</view>
<view class="item">
<view class="name">一级医生</view>
<view class="num">9</view>
<view class="num">{{doctorCount.OneCount}}</view>
</view>
</view>
<view class="operate">
<view class="search">
<image class="icon" src="{{imageUrl}}icon-search.png?t={{Timestamp}}"></image>
<input type="text" class="input" placeholder-class="place-input" placeholder="搜索医院名称" />
<input
type="text"
model:value="{{search}}"
class="input"
placeholder-class="place-input"
placeholder="搜索医院名称"
confirm-type="search"
bindconfirm="handleSearch"
/>
</view>
<view class="invite">邀约新医生</view>
<view class="invite" bind:tap="handleInvite">邀约新医生</view>
</view>
</view>
<view class="me">
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
<block wx:for="{{tree}}" wx:key="DoctorId">
<view class="container" wx:if="{{userInfo.DoctorId == item.DoctorId}}">
<view class="level-three {{item.active && 'active'}}">
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="{{item.DoctorInfo.doctorImg}}"
level="{{item.DoctorInfo.doctorLevel}}"
></doctorAvatar>
<block wx:if="{{item.Children.length}}">
<view class="num">{{item.Children.length}}人</view>
<view class="line"></view>
</block>
</view>
<view class="fold">
全部收起
<image class="f-icon" src="{{imageUrl}}fold-down.png?t={{Timestamp}}"></image>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">{{item.DoctorInfo.doctorName}}</view>
<view class="label" wx:if="{{item.DoctorInfo.doctorTitle==='99'}}">
{{item.DoctorInfo.doctorOtherTitle}}
</view>
<view class="label" wx:else>{{item.DoctorInfo.doctorTitleName}}</view>
<block wx:for="{{item.DoctorInfo.doctorDept}}" wx:key="DepartmentId" wx:for-item="dept">
<view class="line"></view>
<view class="label">{{dept.DepartmentName}}</view>
</block>
</view>
<view class="fold" bind:tap="handleFoldAll">
{{item.fold ? '全部展开':'全部收起'}}
<image class="f-icon" src="{{imageUrl}}fold-{{item.fold?'down':'top'}}.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="w-container">
<text class="hostipal">{{item.DoctorInfo.hospitalName}}</text>
<view class="tag">
{{item.DoctorInfo.hospitalClassificationName}}{{item.DoctorInfo.hospitalLevelName}}
</view>
<view class="site" wx:if="{{item.DoctorInfo.cityName}}">
{{item.DoctorInfo.cityName}}{{item.DoctorInfo.countyName ? '/':''}}{{item.DoctorInfo.countyName}}
</view>
</view>
<view class="w-footer" wx:if="{{item.DoctorInfo.doctorSpecialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag" wx:for="{{item.DoctorInfo.doctorSpecialty}}" wx:for-item="spec" wx:key="SpecialtyId">
{{spec.SpecialtyName}}
</view>
</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
</view>
</view>
</view>
</view>
<view class="me">
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
<view class="container" wx:elif="{{item.DoctorLevel=='3'}}">
<view class="level-three {{item.active && 'active'}}">
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="{{item.DoctorInfo.doctorImg}}"
level="{{item.DoctorInfo.doctorLevel}}"
></doctorAvatar>
<block wx:if="{{item.Children.length}}">
<view class="num">{{item.Children.length}}人</view>
<view class="line"></view>
</block>
</view>
<view class="fold">
收起
<image class="f-icon" src="{{imageUrl}}fold-down.png?t={{Timestamp}}"></image>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">{{item.DoctorInfo.doctorName}}</view>
<view class="label" wx:if="{{item.DoctorInfo.doctorTitle==='99'}}">
{{item.DoctorInfo.doctorOtherTitle}}
</view>
<view class="label" wx:else>{{item.DoctorInfo.doctorTitleName}}</view>
<block wx:for="{{item.DoctorInfo.doctorDept}}" wx:key="DepartmentId" wx:for-item="dept">
<view class="line"></view>
<view class="label">{{dept.DepartmentName}}</view>
</block>
</view>
<view class="fold" bind:tap="handleFold" data-index="{{index}}">
{{item.fold ? '展开':'收起'}}
<image class="f-icon" src="{{imageUrl}}fold-{{item.fold?'down':'top'}}.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="w-container">
<text class="hostipal">{{item.DoctorInfo.hospitalName}}</text>
<view class="tag">
{{item.DoctorInfo.hospitalClassificationName}}{{item.DoctorInfo.hospitalLevelName}}
</view>
<view class="site" wx:if="{{item.DoctorInfo.cityName}}">
{{item.DoctorInfo.cityName}}{{item.DoctorInfo.countyName ? '/':''}}{{item.DoctorInfo.countyName}}
</view>
</view>
<view class="w-footer" wx:if="{{item.DoctorInfo.doctorSpecialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag" wx:for="{{item.DoctorInfo.doctorSpecialty}}" wx:for-item="spec" wx:key="SpecialtyId">
{{spec.SpecialtyName}}
</view>
</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
</view>
</view>
</view>
</view>
<view class="container">
<view class="level-two">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<view class="num">2人</view>
<view class="line"></view>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
<view
class="fold-wrap {{item.fold && 'fold'}}"
wx:for="{{item.Children}}"
wx:key="DoctorId"
wx:for-item="subItem"
wx:for-index="subIndex"
>
<view class="container" wx:if="{{subItem.DoctorLevel=='2'}}">
<view class="level-two {{subItem.active && 'active'}}">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="{{subItem.DoctorInfo.doctorImg}}"
level="{{subItem.DoctorInfo.doctorLevel}}"
></doctorAvatar>
<block wx:if="{{subItem.Children.length}}">
<view class="num">{{subItem.Children.length}}人</view>
<view class="line"></view>
</block>
</view>
<view class="fold">
收起
<image class="f-icon" src="{{imageUrl}}fold-down.png?t={{Timestamp}}"></image>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">{{subItem.DoctorInfo.doctorName}}</view>
<view class="label" wx:if="{{subItem.DoctorInfo.doctorTitle==='99'}}">
{{subItem.DoctorInfo.doctorOtherTitle}}
</view>
<view class="label" wx:else>{{subItem.DoctorInfo.doctorTitleName}}</view>
<block wx:for="{{subItem.DoctorInfo.doctorDept}}" wx:key="DepartmentId" wx:for-item="dept">
<view class="line"></view>
<view class="label">{{dept.DepartmentName}}</view>
</block>
</view>
<view class="fold" bind:tap="handleSubFold" data-index="{{index}}" data-subindex="{{subIndex}}">
{{subItem.fold ? '展开':'收起'}}
<image
class="f-icon"
src="{{imageUrl}}fold-{{subItem.fold?'down':'top'}}.png?t={{Timestamp}}"
></image>
</view>
</view>
<view class="w-container">
<text class="hostipal">{{subItem.DoctorInfo.hospitalName}}</text>
<view class="tag">
{{subItem.DoctorInfo.hospitalClassificationName}}{{subItem.DoctorInfo.hospitalLevelName}}
</view>
<view class="site" wx:if="{{subItem.DoctorInfo.cityName}}">
{{subItem.DoctorInfo.cityName}} {{subItem.DoctorInfo.countyName ? '/':''}}
{{subItem.DoctorInfo.countyName}}
</view>
</view>
<view class="w-footer" wx:if="{{subItem.DoctorInfo.doctorSpecialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view
class="wf-tag"
wx:for="{{subItem.DoctorInfo.doctorSpecialty}}"
wx:for-item="spec"
wx:key="SpecialtyId"
>
{{spec.SpecialtyName}}
</view>
</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
</view>
</view>
</view>
</view>
<view class="level-three">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
<view class="vertical-grow"></view>
</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
<view
class="fold-wrap {{subItem.fold && 'fold'}}"
wx:for="{{subItem.Children}}"
wx:key="DoctorId"
wx:for-item="subSubItem"
>
<view class="level-one {{subSubItem.active && 'active'}}">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
<view class="vertical-grow" wx:if="{{subItem.Children.length > index+1}}"></view>
</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="{{subSubItem.DoctorInfo.doctorImg}}"
level="{{subSubItem.DoctorInfo.doctorLevel}}"
></doctorAvatar>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">{{subSubItem.DoctorInfo.doctorName}}</view>
<view class="label" wx:if="{{subSubItem.DoctorInfo.doctorTitle==='99'}}">
{{subSubItem.DoctorInfo.doctorOtherTitle}}
</view>
<view class="label" wx:else>{{subSubItem.DoctorInfo.doctorTitleName}}</view>
<block wx:for="{{subSubItem.DoctorInfo.doctorDept}}" wx:key="DepartmentId" wx:for-item="dept">
<view class="line"></view>
<view class="label">{{dept.DepartmentName}}</view>
</block>
</view>
</view>
<view class="w-container">
<text class="hostipal">{{subSubItem.DoctorInfo.hospitalName}}</text>
<view class="tag">
{{subSubItem.DoctorInfo.hospitalClassificationName}}{{subSubItem.DoctorInfo.hospitalLevelName}}
</view>
<view class="site" wx:if="{{subSubItem.DoctorInfo.cityName}}">
{{subSubItem.DoctorInfo.cityName}}{{subSubItem.DoctorInfo.countyName ?
'/':''}}{{subSubItem.DoctorInfo.countyName}}
</view>
</view>
<view class="w-footer" wx:if="{{subSubItem.DoctorInfo.doctorSpecialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view
class="wf-tag"
wx:for="{{subSubItem.DoctorInfo.doctorSpecialty}}"
wx:for-item="spec"
wx:key="SpecialtyId"
>
{{spec.SpecialtyName}}
</view>
</view>
</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
</view>
</view>
<view class="container" wx:if="{{subItem.DoctorLevel=='1'}}">
<view class="level-one-only {{subItem.active && 'active'}}">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="{{subItem.DoctorInfo.doctorImg}}"
level="{{subItem.DoctorInfo.doctorLevel}}"
></doctorAvatar>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">{{subItem.DoctorInfo.doctorName}}</view>
<view class="label" wx:if="{{subItem.DoctorInfo.doctorTitle==='99'}}">
{{subItem.DoctorInfo.doctorOtherTitle}}
</view>
<view class="label" wx:else>{{subItem.DoctorInfo.doctorTitleName}}</view>
<block wx:for="{{subItem.DoctorInfo.doctorDept}}" wx:key="DepartmentId" wx:for-item="dept">
<view class="line"></view>
<view class="label">{{dept.DepartmentName}}</view>
</block>
</view>
</view>
<view class="w-container">
<text class="hostipal">{{subItem.DoctorInfo.hospitalName}}</text>
<view class="tag">
{{subItem.DoctorInfo.hospitalClassificationName}}{{subItem.DoctorInfo.hospitalLevelName}}
</view>
<view class="site" wx:if="{{subItem.DoctorInfo.cityName}}">
{{subItem.DoctorInfo.cityName}} {{subItem.DoctorInfo.countyName ? '/':''}}
{{subItem.DoctorInfo.countyName}}
</view>
</view>
<view class="w-footer" wx:if="{{subItem.DoctorInfo.doctorSpecialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view
class="wf-tag"
wx:for="{{subItem.DoctorInfo.doctorSpecialty}}"
wx:for-item="spec"
wx:key="SpecialtyId"
>
{{spec.SpecialtyName}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="level-three">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
<view class="vertical-grow"></view>
</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<view class="container" wx:if="{{item.DoctorLevel=='2'}}">
<view class="level-two {{item.active && 'active'}}">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="{{item.DoctorInfo.doctorImg}}"
level="{{item.DoctorInfo.doctorLevel}}"
></doctorAvatar>
<block wx:if="{{item.Children.length}}">
<view class="num">{{item.Children.length}}人</view>
<view class="line"></view>
<view class="label">心内科</view>
</block>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">{{item.DoctorInfo.doctorName}}</view>
<view class="label" wx:if="{{item.DoctorInfo.doctorTitle==='99'}}">
{{item.DoctorInfo.doctorOtherTitle}}
</view>
<view class="label" wx:else>{{item.DoctorInfo.doctorTitleName}}</view>
<block wx:for="{{item.DoctorInfo.doctorDept}}" wx:key="DepartmentId" wx:for-item="dept">
<view class="line"></view>
<view class="label">{{dept.DepartmentName}}</view>
</block>
</view>
<view class="fold" bind:tap="handleFold" data-index="{{index}}">
{{item.fold ? '展开':'收起'}}
<image class="f-icon" src="{{imageUrl}}fold-{{item.fold?'down':'top'}}.png?t={{Timestamp}}"></image>
</view>
</view>
<view class="w-container">
<text class="hostipal">{{item.DoctorInfo.hospitalName}}</text>
<view class="tag">
{{item.DoctorInfo.hospitalClassificationName}}{{item.DoctorInfo.hospitalLevelName}}
</view>
<view class="site" wx:if="{{item.DoctorInfo.cityName}}">
{{item.DoctorInfo.cityName}} {{item.DoctorInfo.countyName ? '/':''}} {{item.DoctorInfo.countyName}}
</view>
</view>
<view class="w-footer" wx:if="{{item.DoctorInfo.doctorSpecialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag" wx:for="{{item.DoctorInfo.doctorSpecialty}}" wx:for-item="spec" wx:key="SpecialtyId">
{{spec.SpecialtyName}}
</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
</view>
</view>
<view
class="fold-wrap {{item.fold && 'fold'}}"
wx:for="{{item.Children}}"
wx:key="DoctorId"
wx:for-item="subSubItem"
>
<view class="level-one {{subSubItem.active && 'active'}}">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
<view class="vertical-grow"></view>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="{{subSubItem.DoctorInfo.doctorImg}}"
level="{{subSubItem.DoctorInfo.doctorLevel}}"
></doctorAvatar>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">{{subSubItem.DoctorInfo.doctorName}}</view>
<view class="label" wx:if="{{subSubItem.DoctorInfo.doctorTitle==='99'}}">
{{subSubItem.DoctorInfo.doctorOtherTitle}}
</view>
<view class="label" wx:else>{{subSubItem.DoctorInfo.doctorTitleName}}</view>
<block wx:for="{{subSubItem.DoctorInfo.doctorDept}}" wx:key="DepartmentId" wx:for-item="dept">
<view class="line"></view>
<view class="label">{{dept.DepartmentName}}</view>
</block>
</view>
</view>
<view class="w-container">
<text class="hostipal">{{subSubItem.DoctorInfo.hospitalName}}</text>
<view class="tag">
{{subSubItem.DoctorInfo.hospitalClassificationName}}{{subSubItem.DoctorInfo.hospitalLevelName}}
</view>
<view class="site" wx:if="{{subSubItem.DoctorInfo.cityName}}">
{{subSubItem.DoctorInfo.cityName}}{{subSubItem.DoctorInfo.countyName ?
'/':''}}{{subSubItem.DoctorInfo.countyName}}
</view>
</view>
<view class="w-footer" wx:if="{{subSubItem.DoctorInfo.doctorSpecialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view
class="wf-tag"
wx:for="{{subSubItem.DoctorInfo.doctorSpecialty}}"
wx:for-item="spec"
wx:key="SpecialtyId"
>
{{spec.SpecialtyName}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="container">
<view class="level-three-only">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c26e567"
level="{{1}}"
></doctorAvatar>
<view class="container" wx:if="{{item.DoctorLevel=='1'}}">
<view class="level-one-only {{item.active && 'active'}}">
<view class="aside">
<view class="vertical"></view>
<view class="across"></view>
</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">徐萌</view>
<view class="label">主任医师</view>
<view class="line"></view>
<view class="label">心内科</view>
</view>
</view>
<view class="w-container">
<text class="hostipal">北京天坛医院</text>
<view class="tag">三甲</view>
<view class="site">广州市/番禺区</view>
<view class="doctor">
<view class="avatar-wrap">
<doctorAvatar
class="avatar"
src="{{item.DoctorInfo.doctorImg}}"
level="{{item.DoctorInfo.doctorLevel}}"
></doctorAvatar>
</view>
<view class="w-footer">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wf-tag">心律失常</view>
<view class="wrap">
<view class="w-header">
<view class="wh-wrap">
<view class="name">{{item.DoctorInfo.doctorName}}</view>
<view class="label" wx:if="{{item.DoctorInfo.doctorTitle==='99'}}">
{{item.DoctorInfo.doctorOtherTitle}}
</view>
<view class="label" wx:else>{{item.DoctorInfo.doctorTitleName}}</view>
<block wx:for="{{item.DoctorInfo.doctorDept}}" wx:key="DepartmentId" wx:for-item="dept">
<view class="line"></view>
<view class="label">{{dept.DepartmentName}}</view>
</block>
</view>
</view>
<view class="w-container">
<text class="hostipal">{{item.DoctorInfo.hospitalName}}</text>
<view class="tag">
{{item.DoctorInfo.hospitalClassificationName}}{{item.DoctorInfo.hospitalLevelName}}
</view>
<view class="site" wx:if="{{item.DoctorInfo.cityName}}">
{{item.DoctorInfo.cityName}} {{item.DoctorInfo.countyName ? '/':''}} {{item.DoctorInfo.countyName}}
</view>
</view>
<view class="w-footer" wx:if="{{item.DoctorInfo.doctorSpecialty.length}}">
<image class="wf-label" src="{{imageUrl}}text-specialty.png?t={{Timestamp}}" mode="aspectFit"></image>
<view class="wf-tag" wx:for="{{item.DoctorInfo.doctorSpecialty}}" wx:for-item="spec" wx:key="SpecialtyId">
{{spec.SpecialtyName}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</block>
<view class="empty-wrap">
<view class="empty-wrap" wx:if="{{!tree.length}}">
<image class="empty" src="{{imageUrl}}empty-1.png?t={{Timestamp}}" mode="scaleToFill"></image>
<view class="e-title">没有找到您搜索的医院哦!</view>
</view>

2
src/pages/cases/index.ts

@ -123,7 +123,7 @@ Page({ @@ -123,7 +123,7 @@ Page({
getList(newPage = 1) {
wx.ajax({
method: "POST",
url: "?r=takeda/case/get-list",
url: `?r=takeda/case/get-list&type=${Number(this.data.nav) + 1}`,
data: {
page: newPage,
search: this.data.search,

19
src/pages/home/index.ts

@ -10,6 +10,9 @@ Page({ @@ -10,6 +10,9 @@ Page({
userInfo: {},
DoctorTitleType: {},
hospitalClassification: {},
hospitalLevel: {},
},
onLoad() {
this.getTabBar().setData({
@ -17,9 +20,11 @@ Page({ @@ -17,9 +20,11 @@ Page({
});
app.waitLogin().then(() => {
this.handleBindDoctor();
this.getDoctorDict();
this.getHostipalDict();
app.getUserInfo(this, (userInfo) => {
this.setData({
level: userInfo.DoctorLevel,
level: userInfo.IsSuper === 1 ? 4 : userInfo.DoctorLevel,
});
this.getTabBar().setData({
userInfo,
@ -58,6 +63,18 @@ Page({ @@ -58,6 +63,18 @@ Page({
});
});
},
getHostipalDict() {
wx.ajax({
method: "GET",
url: "?r=takeda/reg/hospital-dict",
data: {},
}).then((res) => {
this.setData({
hospitalClassification: res.hospitalClassification,
hospitalLevel: res.hospitalLevel,
});
});
},
handleSure() {
this.setData({
show1: false,

32
src/pages/home/index.wxml

@ -3,10 +3,34 @@ @@ -3,10 +3,34 @@
style="background: url({{imageUrl}}home-bg.png?r={{Timestamp}}) no-repeat top center/100% 560rpx;padding-top:{{menuButtonInfo.top}}px;"
>
<image class="logo" src="{{imageUrl}}home-logo.png?t={{Timestamp}}"></image>
<homeLevel1 wx:if="{{level===1}}" DoctorTitleType="{{DoctorTitleType}}" userInfo="{{userInfo}}"></homeLevel1>
<homeLevel2 wx:elif="{{level===2}}" DoctorTitleType="{{DoctorTitleType}}" userInfo="{{userInfo}}"></homeLevel2>
<homeLevel3 wx:elif="{{level===3}}" DoctorTitleType="{{DoctorTitleType}}" userInfo="{{userInfo}}"></homeLevel3>
<homeLevel4 wx:elif="{{level===4}}" DoctorTitleType="{{DoctorTitleType}}" userInfo="{{userInfo}}"></homeLevel4>
<homeLevel1
wx:if="{{level===1}}"
hospitalClassification="{{hospitalClassification}}"
hospitalLevel="{{hospitalLevel}}"
DoctorTitleType="{{DoctorTitleType}}"
userInfo="{{userInfo}}"
></homeLevel1>
<homeLevel2
wx:elif="{{level===2}}"
hospitalClassification="{{hospitalClassification}}"
hospitalLevel="{{hospitalLevel}}"
DoctorTitleType="{{DoctorTitleType}}"
userInfo="{{userInfo}}"
></homeLevel2>
<homeLevel3
wx:elif="{{level===3}}"
hospitalClassification="{{hospitalClassification}}"
hospitalLevel="{{hospitalLevel}}"
DoctorTitleType="{{DoctorTitleType}}"
userInfo="{{userInfo}}"
></homeLevel3>
<homeLevel4
wx:elif="{{level===4}}"
hospitalClassification="{{hospitalClassification}}"
hospitalLevel="{{hospitalLevel}}"
DoctorTitleType="{{DoctorTitleType}}"
userInfo="{{userInfo}}"
></homeLevel4>
</view>
<van-popup show="{{ show1 }}" bind:close="onClose" round custom-style="background:transparent">

Loading…
Cancel
Save