Browse Source

首页联调

main
kola-web 7 months ago
parent
commit
9b7759edde
  1. 6
      src/components/doctorAvatar/index.wxml
  2. 38
      src/echart/components/homeLevel1/index.ts
  3. 50
      src/echart/components/homeLevel1/index.wxml
  4. 103
      src/echart/components/homeLevel2/index.ts
  5. 134
      src/echart/components/homeLevel2/index.wxml
  6. 74
      src/echart/components/homeLevel3/index.ts
  7. 89
      src/echart/components/homeLevel3/index.wxml
  8. 4
      src/echart/components/homeLevel4/index.scss
  9. 541
      src/echart/components/homeLevel4/index.ts
  10. 128
      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. 24
      src/module1/pages/org3/index.scss
  19. 41
      src/module1/pages/org3/index.ts
  20. 25
      src/module1/pages/org3/index.wxml
  21. 56
      src/module1/pages/org4/index.scss
  22. 130
      src/module1/pages/org4/index.ts
  23. 438
      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 @@
wx:elif="{{level==2}}" wx:elif="{{level==2}}"
src="{{imageUrl}}doctor-level2.png?t={{Timestamp}}" src="{{imageUrl}}doctor-level2.png?t={{Timestamp}}"
></image> ></image>
<image
class="mask"
mode="aspectFill"
wx:if="{{level==4}}"
src="{{imageUrl}}doctor-level4.png?t={{Timestamp}}"
></image>
</view> </view>

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

@ -8,6 +8,8 @@ Component({
properties: { properties: {
userInfo: Object, userInfo: Object,
DoctorTitleType: Object, DoctorTitleType: Object,
hospitalClassification: Object,
hospitalLevel: Object,
}, },
/** /**
@ -17,13 +19,15 @@ Component({
fold1: false, fold1: false,
foldHeight1: 10000, foldHeight1: 10000,
take: {}, take: {},
case: {},
cooperateList: [],
}, },
lifetimes: { lifetimes: {
attached() { attached() {
this.getHeight();
this.getTake(); this.getTake();
this.getCase(); this.getCase();
this.getCooperate();
}, },
}, },
/** /**
@ -44,6 +48,11 @@ Component({
fold1: !this.data.fold1, fold1: !this.data.fold1,
}); });
}, },
handleEntryCase() {
wx.navigateTo({
url: "/module1/pages/entryCases/index",
});
},
getTake() { getTake() {
wx.ajax({ wx.ajax({
method: "GET", method: "GET",
@ -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 {};

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

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

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

@ -1,11 +1,16 @@
const _app = getApp<IAppOption>() const _app = getApp<IAppOption>();
// pages/story/a.ts // pages/story/a.ts
Component({ Component({
/** /**
* *
*/ */
properties: {}, properties: {
userInfo: Object,
DoctorTitleType: Object,
hospitalClassification: Object,
hospitalLevel: Object,
},
/** /**
* *
@ -15,35 +20,109 @@ Component({
foldHeight1: 10000, foldHeight1: 10000,
fold2: false, fold2: false,
foldHeight2: 10000, foldHeight2: 10000,
take: {},
case: {},
cooperateList: [],
inviteList: [],
}, },
lifetimes: {
attached() { attached() {
this.getHeight() this.getTake();
this.getCase();
this.getCooperate();
this.getInvite();
},
}, },
/** /**
* *
*/ */
methods: { methods: {
getHeight() { getHeight1() {
const query = wx.createSelectorQuery().in(this) const query = wx.createSelectorQuery().in(this);
query.select('#fold1').boundingClientRect() query.select("#fold1").boundingClientRect();
query.select('#fold2').boundingClientRect()
query.exec((res) => { query.exec((res) => {
this.setData({ this.setData({
foldHeight1: res[0].height, foldHeight1: res[0].height,
});
});
},
getHeight2() {
const query = wx.createSelectorQuery().in(this);
query.select("#fold2").boundingClientRect();
query.exec((res) => {
this.setData({
foldHeight2: res[1].height, foldHeight2: res[1].height,
}) });
}) });
}, },
toggleFold1() { toggleFold1() {
this.setData({ this.setData({
fold1: !this.data.fold1, fold1: !this.data.fold1,
}) });
}, },
toggleFold2() { toggleFold2() {
this.setData({ this.setData({
fold2: !this.data.fold2, 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 {};

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

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

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

@ -1,26 +1,86 @@
const _app = getApp<IAppOption>() const _app = getApp<IAppOption>();
// pages/story/a.ts // pages/story/a.ts
Component({ 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: { 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() { handleOrg() {
wx.navigateTo({ wx.navigateTo({
url: '/module1/pages/org3/index', url: "/module1/pages/org3/index",
}) });
},
handleEntryCase() {
wx.navigateTo({
url: "/module1/pages/entryCases/index",
});
}, },
}, },
}) });
export {};

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

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

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

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

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

@ -1,12 +1,18 @@
const app = getApp<IAppOption>() import dayjs from "dayjs";
const echarts = require('../ec-canvas/echarts.js')
const echarts = require("../ec-canvas/echarts.js");
// pages/story/a.ts // pages/story/a.ts
Component({ Component({
/** /**
* *
*/ */
properties: {}, properties: {
userInfo: Object,
DoctorTitleType: Object,
hospitalClassification: Object,
hospitalLevel: Object,
},
/** /**
* *
@ -15,14 +21,46 @@ Component({
ec: { ec: {
lazyLoad: true, 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: [],
}, },
lifetimes: {
attached() { 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.waitEchart(async () => {
const chart1: any = await this.initChart1() this.getChat1();
const chart2: any = await this.initChart2() this.getChat2();
const chart3: any = await this.initChart3() 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({
ecDataTrendComponent3: null as any, ecDataTrendComponent3: null as any,
waitEchart(callback) { waitEchart(callback) {
const time = setInterval(() => { const time = setInterval(() => {
if (this.selectComponent('#chart1')) { if (this.selectComponent("#chart1")) {
console.log(this.selectComponent('#chart1')) clearInterval(time);
clearInterval(time) callback();
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) => { return new Promise((reslove) => {
this.ecDataTrendComponent1 = this.selectComponent('#chart1') this.ecDataTrendComponent1 = this.selectComponent("#chart1");
this.ecDataTrendComponent1.init((canvas, width, height, dpr) => { this.ecDataTrendComponent1.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, { const chart = echarts.init(canvas, null, {
width, width,
height, height,
devicePixelRatio: dpr, // new devicePixelRatio: dpr, // new
}) });
canvas.setChart(chart) canvas.setChart(chart);
const x: string[] = ['2024-09', '2024-10'] const x: string[] = [];
const y1: string[] = ['10', '30'] const y1: string[] = [];
const y2: string[] = ['10', '30'] const y2: string[] = [];
const y3: string[] = ['10', '30'] const y3: string[] = [];
const y4: string[] = ['30', '90'] 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 = { const option = {
legend: { legend: {
bottom: 0, bottom: 0,
itemWidth: 8, itemWidth: 8,
itemHeight: 8, itemHeight: 8,
icon: 'circle', icon: "circle",
lineStyle: { lineStyle: {
width: '0', width: "0",
}, },
textStyle: { textStyle: {
color: 'rgba(103, 113, 114, 1)', color: "rgba(103, 113, 114, 1)",
fontSize: '12', fontSize: "12",
}, },
data: ['一级医生', '核心医生', '质控医生'], data: ["一级医生", "核心医生", "质控医生"],
}, },
grid: { grid: {
top: '10%', top: "10%",
left: '3%', left: "3%",
right: '4%', right: "4%",
bottom: '30', bottom: "30",
containLabel: true, containLabel: true,
}, },
xAxis: [ xAxis: [
{ {
type: 'category', type: "category",
axisTick: { axisTick: {
show: false, show: false,
}, },
@ -89,148 +154,175 @@ Component({
}, },
axisLabel: { axisLabel: {
fontSize: 10, fontSize: 10,
color: 'rgba(40, 48, 49, 1)', color: "rgba(40, 48, 49, 1)",
}, },
data: x, data: x,
}, },
], ],
yAxis: [ yAxis: [
{ {
type: 'value', type: "value",
minInterval: 1, minInterval: 1,
splitLine: { splitLine: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
fontSize: 10, fontSize: 10,
color: 'rgba(40, 48, 49, 1)', color: "rgba(40, 48, 49, 1)",
formatter(value) { formatter(value) {
return Math.abs(value) return Math.abs(value);
}, },
}, },
}, },
], ],
series: [ series: [
{ {
name: '质控医生', name: "质控医生",
type: 'bar', type: "bar",
stack: 'a', stack: "a",
label: { label: {
show: true, show: true,
color: '#fff', color: "#fff",
fontSize: 10, fontSize: 10,
overflow: 'truncate', overflow: "truncate",
width: 30, width: 30,
formatter(params) { 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, data: y3,
}, },
{ {
name: '核心医生', name: "核心医生",
type: 'bar', type: "bar",
stack: 'a', stack: "a",
label: { label: {
show: true, show: true,
color: '#fff', color: "#fff",
fontSize: 10, fontSize: 10,
overflow: 'truncate', overflow: "truncate",
width: 30, width: 30,
formatter(params) { 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, data: y2,
}, },
{ {
name: '一级医生', name: "一级医生",
type: 'bar', type: "bar",
stack: 'a', stack: "a",
label: { label: {
show: true, show: true,
color: 'rgba(0, 180, 197, 1)', color: "rgba(0, 180, 197, 1)",
fontSize: 10, fontSize: 10,
overflow: 'truncate', overflow: "truncate",
width: 30, width: 30,
}, },
color: 'rgba(225, 248, 242, 1)', color: "rgba(225, 248, 242, 1)",
data: y1, data: y1,
}, },
{ {
name: '总数', // 总数显示,生成一个总数的柱状图,将颜色设为透明, name: "总数", // 总数显示,生成一个总数的柱状图,将颜色设为透明,
type: 'line', // label将位置设备内部底部,造成一个总数显示在 type: "line", // label将位置设备内部底部,造成一个总数显示在
stack: '', // 柱状图上方的假象 stack: "", // 柱状图上方的假象
color: 'rgba(0, 0, 0, 0)', color: "rgba(0, 0, 0, 0)",
data: y4, data: y4,
symbolSize: 0, symbolSize: 0,
label: { label: {
normal: { normal: {
show: true, show: true,
position: 'top', position: "top",
color: 'rgba(133, 133, 133, 1)', color: "rgba(133, 133, 133, 1)",
fontSize: 10, fontSize: 10,
formatter: '{c}', formatter: "{c}",
}, },
}, },
}, },
], ],
dataZoom: { dataZoom: {
type: 'inside', // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。 type: "inside", // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。
startValue: x.length - 6, startValue: x.length - 6,
endValue: x.length - 1, endValue: x.length - 1,
filterMode: 'none', filterMode: "none",
}, },
} };
chart.setOption(option) chart.setOption(option);
reslove(chart) reslove(chart);
return chart return chart;
}) });
}) });
},
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() { initChart2(list) {
return new Promise((reslove) => { return new Promise((reslove) => {
this.ecDataTrendComponent2 = this.selectComponent('#chart2') this.ecDataTrendComponent2 = this.selectComponent("#chart2");
this.ecDataTrendComponent2.init((canvas, width, height, dpr) => { this.ecDataTrendComponent2.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, { const chart = echarts.init(canvas, null, {
width, width,
height, height,
devicePixelRatio: dpr, // new devicePixelRatio: dpr, // new
}) });
canvas.setChart(chart) canvas.setChart(chart);
const x: string[] = ['2024-09', '2024-10'] const x: string[] = ["2024-09", "2024-10"];
const y1: string[] = ['10', '30'] const y1: string[] = ["10", "30"];
const y2: string[] = ['10', '30'] const y2: string[] = ["10", "30"];
const y3: string[] = ['20', '60'] 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 = { const option = {
legend: { legend: {
bottom: 0, bottom: 0,
itemWidth: 8, itemWidth: 8,
itemHeight: 8, itemHeight: 8,
icon: 'circle', icon: "circle",
lineStyle: { lineStyle: {
width: '0', width: "0",
}, },
textStyle: { textStyle: {
color: 'rgba(103, 113, 114, 1)', color: "rgba(103, 113, 114, 1)",
fontSize: '12', fontSize: "12",
}, },
data: ['一级医生提交', '核心医生提交'], data: ["一级医生提交", "核心医生提交"],
}, },
grid: { grid: {
top: '10%', top: "10%",
left: '3%', left: "3%",
right: '4%', right: "4%",
bottom: '30', bottom: "30",
containLabel: true, containLabel: true,
}, },
xAxis: [ xAxis: [
{ {
type: 'category', type: "category",
axisTick: { axisTick: {
show: false, show: false,
}, },
@ -239,131 +331,158 @@ Component({
}, },
axisLabel: { axisLabel: {
fontSize: 10, fontSize: 10,
color: 'rgba(40, 48, 49, 1)', color: "rgba(40, 48, 49, 1)",
}, },
data: x, data: x,
}, },
], ],
yAxis: [ yAxis: [
{ {
type: 'value', type: "value",
minInterval: 1, minInterval: 1,
splitLine: { splitLine: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
fontSize: 10, fontSize: 10,
color: 'rgba(40, 48, 49, 1)', color: "rgba(40, 48, 49, 1)",
formatter(value) { formatter(value) {
return Math.abs(value) return Math.abs(value);
}, },
}, },
}, },
], ],
series: [ series: [
{ {
name: '核心医生提交', name: "核心医生提交",
type: 'bar', type: "bar",
stack: 'a', stack: "a",
label: { label: {
show: true, show: true,
color: '#fff', color: "#fff",
fontSize: 10, fontSize: 10,
overflow: 'truncate', overflow: "truncate",
width: 30, width: 30,
formatter(params) { 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, data: y2,
}, },
{ {
name: '一级医生提交', name: "一级医生提交",
type: 'bar', type: "bar",
stack: 'a', stack: "a",
label: { label: {
show: true, show: true,
color: 'rgba(0, 180, 197, 1)', color: "rgba(0, 180, 197, 1)",
fontSize: 10, fontSize: 10,
overflow: 'truncate', overflow: "truncate",
width: 30, width: 30,
}, },
color: 'rgba(225, 248, 242, 1)', color: "rgba(225, 248, 242, 1)",
data: y1, data: y1,
}, },
{ {
name: '总数', // 总数显示,生成一个总数的柱状图,将颜色设为透明, name: "总数", // 总数显示,生成一个总数的柱状图,将颜色设为透明,
type: 'line', // label将位置设备内部底部,造成一个总数显示在 type: "line", // label将位置设备内部底部,造成一个总数显示在
stack: '', // 柱状图上方的假象 stack: "", // 柱状图上方的假象
color: 'rgba(0, 0, 0, 0)', color: "rgba(0, 0, 0, 0)",
data: y3, data: y3,
symbolSize: 0, symbolSize: 0,
label: { label: {
normal: { normal: {
show: true, show: true,
position: 'top', position: "top",
color: 'rgba(133, 133, 133, 1)', color: "rgba(133, 133, 133, 1)",
fontSize: 10, fontSize: 10,
formatter: '{c}', formatter: "{c}",
}, },
}, },
}, },
], ],
dataZoom: { dataZoom: {
type: 'inside', // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。 type: "inside", // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。
startValue: x.length - 6, startValue: x.length - 6,
endValue: x.length - 1, endValue: x.length - 1,
filterMode: 'none', filterMode: "none",
}, },
} };
chart.setOption(option) chart.setOption(option);
reslove(chart) reslove(chart);
return chart return chart;
}) });
}) });
},
handleYear3(e) {
this.setData({
year3: e.detail.value,
});
this.getChat3();
},
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() { initChart3(list) {
return new Promise((reslove) => { return new Promise((reslove) => {
this.ecDataTrendComponent3 = this.selectComponent('#chart3') this.ecDataTrendComponent3 = this.selectComponent("#chart3");
this.ecDataTrendComponent3.init((canvas, width, height, dpr) => { this.ecDataTrendComponent3.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, { const chart = echarts.init(canvas, null, {
width, width,
height, height,
devicePixelRatio: dpr, // new devicePixelRatio: dpr, // new
}) });
canvas.setChart(chart) canvas.setChart(chart);
const x: string[] = ['2024-09', '2024-10'] const x: string[] = ["2024-09", "2024-10"];
const y1: string[] = ['10', '30'] const y1: string[] = ["10", "30"];
const y2: string[] = ['10', '30'] const y2: string[] = ["10", "30"];
const y3: string[] = ['20', '60'] 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 = { const option = {
legend: { legend: {
bottom: 0, bottom: 0,
itemWidth: 8, itemWidth: 8,
itemHeight: 8, itemHeight: 8,
icon: 'circle', icon: "circle",
lineStyle: { lineStyle: {
width: '0', width: "0",
}, },
textStyle: { textStyle: {
color: 'rgba(103, 113, 114, 1)', color: "rgba(103, 113, 114, 1)",
fontSize: '12', fontSize: "12",
}, },
data: ['一级医生提交', '核心医生提交'], data: ["一级医生提交", "核心医生提交"],
}, },
grid: { grid: {
top: '10%', top: "10%",
left: '3%', left: "3%",
right: '4%', right: "4%",
bottom: '30', bottom: "30",
containLabel: true, containLabel: true,
}, },
xAxis: [ xAxis: [
{ {
type: 'category', type: "category",
axisTick: { axisTick: {
show: false, show: false,
}, },
@ -372,95 +491,171 @@ Component({
}, },
axisLabel: { axisLabel: {
fontSize: 10, fontSize: 10,
color: 'rgba(40, 48, 49, 1)', color: "rgba(40, 48, 49, 1)",
}, },
data: x, data: x,
}, },
], ],
yAxis: [ yAxis: [
{ {
type: 'value', type: "value",
minInterval: 1, minInterval: 1,
splitLine: { splitLine: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
fontSize: 10, fontSize: 10,
color: 'rgba(40, 48, 49, 1)', color: "rgba(40, 48, 49, 1)",
formatter(value) { formatter(value) {
return Math.abs(value) return Math.abs(value);
}, },
}, },
}, },
], ],
series: [ series: [
{ {
name: '核心医生提交', name: "核心医生提交",
type: 'bar', type: "bar",
stack: 'a', stack: "a",
label: { label: {
show: true, show: true,
color: '#fff', color: "#fff",
fontSize: 10, fontSize: 10,
overflow: 'truncate', overflow: "truncate",
width: 30, width: 30,
formatter(params) { 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, data: y2,
}, },
{ {
name: '一级医生提交', name: "一级医生提交",
type: 'bar', type: "bar",
stack: 'a', stack: "a",
label: { label: {
show: true, show: true,
color: 'rgba(0, 180, 197, 1)', color: "rgba(0, 180, 197, 1)",
fontSize: 10, fontSize: 10,
overflow: 'truncate', overflow: "truncate",
width: 30, width: 30,
}, },
color: 'rgba(225, 248, 242, 1)', color: "rgba(225, 248, 242, 1)",
data: y1, data: y1,
}, },
{ {
name: '总数', // 总数显示,生成一个总数的柱状图,将颜色设为透明, name: "总数", // 总数显示,生成一个总数的柱状图,将颜色设为透明,
type: 'line', // label将位置设备内部底部,造成一个总数显示在 type: "line", // label将位置设备内部底部,造成一个总数显示在
stack: '', // 柱状图上方的假象 stack: "", // 柱状图上方的假象
color: 'rgba(0, 0, 0, 0)', color: "rgba(0, 0, 0, 0)",
data: y3, data: y3,
symbolSize: 0, symbolSize: 0,
label: { label: {
normal: { normal: {
show: true, show: true,
position: 'top', position: "top",
color: 'rgba(133, 133, 133, 1)', color: "rgba(133, 133, 133, 1)",
fontSize: 10, fontSize: 10,
formatter: '{c}', formatter: "{c}",
}, },
}, },
}, },
], ],
dataZoom: { dataZoom: {
type: 'inside', // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。 type: "inside", // 有type这个属性,滚动条在最下面,也可以不行,写y:36,这表示距离顶端36px,一般就是在图上面。
startValue: x.length - 6, startValue: x.length - 6,
endValue: x.length - 1, endValue: x.length - 1,
filterMode: 'none', filterMode: "none",
}, },
} };
chart.setOption(option) chart.setOption(option);
reslove(chart) reslove(chart);
return 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() { handleRankDetail() {
wx.navigateTo({ 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 {};

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

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

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

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

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

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

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

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

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

@ -1,6 +1,43 @@
const _app = getApp<IAppOption>(); const app = getApp<IAppOption>();
Page({ Page({
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: {}, data: {},
onLoad() {}, }).then((res) => {
this.setData({
tree: res.tree,
}); });
});
},
handleInvite() {
wx.navigateTo({
url: "/module1/pages/invite/index",
});
},
});
export {};

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

@ -1,17 +1,17 @@
<view class="page"> <view class="page">
<view class="header"> <view class="header">
<view class="banner"> <view class="banner" wx:if="{{doctorCount.TotalCount>0}}">
<view class="item"> <view class="item">
<view class="name">全部医生</view> <view class="name">全部医生</view>
<view class="num">9</view> <view class="num">{{doctorCount.TotalCount}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">二级医生</view> <view class="name">二级医生</view>
<view class="num">9</view> <view class="num">{{doctorCount.TwoCount}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">一级医生</view> <view class="name">一级医生</view>
<view class="num">9</view> <view class="num">{{doctorCount.OneCount}}</view>
</view> </view>
</view> </view>
<view class="operate"> <view class="operate">
@ -19,11 +19,13 @@
<image class="icon" src="{{imageUrl}}icon-search.png?t={{Timestamp}}"></image> <image class="icon" src="{{imageUrl}}icon-search.png?t={{Timestamp}}"></image>
<input type="text" class="input" placeholder-class="place-input" placeholder="搜索医院名称" /> <input type="text" class="input" placeholder-class="place-input" placeholder="搜索医院名称" />
</view> </view>
<view class="invite">邀约新医生</view> <view class="invite" bind:tap="handleInvite">邀约新医生</view>
</view> </view>
</view> </view>
<view class="me"> <block wx:for="{{tree}}" wx:key="DoctorId">
<view class="container" wx:if="{{item.DoctorLevel==='3'}}">
<view class="level-three">
<view class="doctor"> <view class="doctor">
<view class="avatar-wrap"> <view class="avatar-wrap">
<doctorAvatar <doctorAvatar
@ -60,7 +62,7 @@
</view> </view>
</view> </view>
</view> </view>
</view>
<view class="container"> <view class="container">
<view class="level-two"> <view class="level-two">
<view class="aside"> <view class="aside">
@ -105,7 +107,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="level-three"> <view class="level-one">
<view class="aside"> <view class="aside">
<view class="vertical"></view> <view class="vertical"></view>
<view class="across"></view> <view class="across"></view>
@ -143,7 +145,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="level-three"> <view class="level-one">
<view class="aside"> <view class="aside">
<view class="vertical"></view> <view class="vertical"></view>
<view class="across"></view> <view class="across"></view>
@ -183,7 +185,7 @@
</view> </view>
</view> </view>
<view class="container"> <view class="container">
<view class="level-three-only"> <view class="level-one-only">
<view class="aside"> <view class="aside">
<view class="vertical"></view> <view class="vertical"></view>
<view class="across"></view> <view class="across"></view>
@ -221,8 +223,9 @@
</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> <image class="empty" src="{{imageUrl}}empty-1.png?t={{Timestamp}}" mode="scaleToFill"></image>
<view class="e-title">没有找到您搜索的医院哦!</view> <view class="e-title">没有找到您搜索的医院哦!</view>
</view> </view>

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

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

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

@ -1,6 +1,130 @@
const _app = getApp<IAppOption>(); const app = getApp<IAppOption>();
Page({ Page({
data: {}, data: {
onLoad() {}, 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 {};

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

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

2
src/pages/cases/index.ts

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

19
src/pages/home/index.ts

@ -10,6 +10,9 @@ Page({
userInfo: {}, userInfo: {},
DoctorTitleType: {}, DoctorTitleType: {},
hospitalClassification: {},
hospitalLevel: {},
}, },
onLoad() { onLoad() {
this.getTabBar().setData({ this.getTabBar().setData({
@ -17,9 +20,11 @@ Page({
}); });
app.waitLogin().then(() => { app.waitLogin().then(() => {
this.handleBindDoctor(); this.handleBindDoctor();
this.getDoctorDict();
this.getHostipalDict();
app.getUserInfo(this, (userInfo) => { app.getUserInfo(this, (userInfo) => {
this.setData({ this.setData({
level: userInfo.DoctorLevel, level: userInfo.IsSuper === 1 ? 4 : userInfo.DoctorLevel,
}); });
this.getTabBar().setData({ this.getTabBar().setData({
userInfo, userInfo,
@ -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() { handleSure() {
this.setData({ this.setData({
show1: false, show1: false,

32
src/pages/home/index.wxml

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

Loading…
Cancel
Save