home.wxml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <!--pages/home/home.wxml-->
  2. <view class="fullscreen-bg">
  3. <t-navbar title="中医健康管家" t-class-title="nav-title" />
  4. <scroll-view class="page-scroll__container" type="list" scroll-y style="height: {{pageHeight}};">
  5. <view class="follow-container">
  6. <view class="follow-box" bind:tap="showFollowPopup">
  7. <image src="../../assets/bg/icon_notice@3x.png" mode="heightFix" class="notice-icon" />
  8. <view class="pieces">{{popupList.length}}</view>
  9. <view class="follow-text" wx:if="{{popupList.length>0}}">{{popupList[0].title}}</view>
  10. </view>
  11. <view class="tool-bar-wrapper">
  12. <view class="tool" wx:if="{{location.description}}">
  13. <text>{{location.description}}</text>
  14. </view>
  15. <view class="tool" wx:if="{{solarTerms.description}}">
  16. <text>{{solarTerms.description}}</text>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="body-img">
  21. <!-- 咨询中的状态-->
  22. <view class="chat-status" wx:if="{{isConsulting}}" bind:tap="goToConsultation">
  23. <view class="chat-status__dot" wx:if="{{hasNewMessage}}"></view>
  24. <text class="chat-status__text">咨询中...</text>
  25. </view>
  26. <!-- 使用 image 标签确保图片清晰度 -->
  27. <image class="body-bg-image" src="../../assets/bg/pic_body@2x.png" mode="aspectFit" />
  28. <view class="header-container">
  29. <view class="user-info-wrapper" wx:if="{{patient}}">
  30. <view class="user-box">
  31. <text class="user-name">{{patient.name}}</text>
  32. <t-icon color="{{patientIconColor}}" name="{{patientIcon}}" size="20px"></t-icon>
  33. </view>
  34. <view class="user-pageBox">
  35. <text class="user-age" wx:if="{{patient.age}}">{{patient.age}}岁</text>
  36. <text class="user-description" overflow="fade" max-lines="1">{{patientDescription}}</text>
  37. </view>
  38. </view>
  39. </view>
  40. <view wx:if="{{healthReport.loading}}" class="loading-center">
  41. <t-loading theme="circular" size="48px" color="#2d92fd" />
  42. </view>
  43. <view class="healthyAnalyze" bindtap="goHealthAnalyze" wx:elif="{{isShowComplete}}">
  44. 请完成健康评估
  45. </view>
  46. <view class="steps-container" wx:else>
  47. <vertical-steps statusList="{{statusList}}" dataset="{{healthReport.data}}" bind:position="onBodyModel" />
  48. <view class="warn-box" wx:if="{{healthIndex.data.length>0}}">
  49. <image src="../../assets/bg/icon_warning@3x.png" class="warn-img" />
  50. <view class="right-box" bind:tap="tabValue">
  51. <view style="margin-bottom:10rpx" wx:for="{{healthIndex.data}}" wx:key="{{item.quotaId}}">{{item}}</view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="report-container" bindtap="toReportPage" wx:if="{{healthReport.data.reportTime}}">
  56. <view class="report-box">
  57. <view>
  58. <image src="../../assets/bg/icon_file@3x.png" class="report-img" />
  59. </view>
  60. <view class="text-box" wx:if="{{healthReport.data.reportTime}}">
  61. <view class="text-one">健康分析报告</view>
  62. <view class="text-two">日期:{{healthReport.data.reportTime}}</view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. <view class="care-container" wx:if="{{displayList.length>0}}">
  68. <view class="care-box">
  69. <view class="care-header">
  70. <image src="../../assets/icon/icon_plan@3x.png" class="care-icon" />
  71. <text>调养计划</text>
  72. </view>
  73. <view class="care-list">
  74. <block wx:for="{{displayList}}" wx:key="id">
  75. <view class="care-item">
  76. <view class="item-main" bindtap="toggleItem" data-index="{{index}}">
  77. <text class="dot"></text>
  78. <text class="item-title">{{item.conditioningProgramName}}</text>
  79. <text class="item-next-time" wx:if="{{item.arrangeDate && item.isOffline==='Y'}}">下一次时间:{{item.arrangeDate}}</text>
  80. <t-icon name="{{item.expanded ? 'chevron-up' : 'chevron-down'}}" size="24rpx" class="item-arrow" color="#C0C4CC" />
  81. </view>
  82. <!-- 这里放详细内容 -->
  83. <view class="item-detail" wx:if="{{item.expanded}}">
  84. <view style="width: 60%;">
  85. <!-- 轮播媒体容器 -->
  86. <view class="carousel-container" wx:if="{{item.carouselMediaList && item.carouselMediaList.length > 0}}">
  87. <!-- 轮播组件 -->
  88. <media-carousel
  89. mediaList="{{item.carouselMediaList}}"
  90. showIndicator="{{true}}" autoplay="{{true}}"
  91. interval="{{4000}}" circular="{{true}}"
  92. bind:fullscreenchange="onCarouselFullscreenChange"
  93. itemId="{{item.id}}" />
  94. </view>
  95. <view class="item-box">
  96. <view class="flex" wx:if="{{item.arrangeDate && item.isOffline==='Y'}}"><text>下一次时间:</text><text>{{item.arrangeDate}}</text></view>
  97. <view class="flex">
  98. <text wx:if="{{item.isOffline==='Y'}}">已完成:<text style="color:#2ec4b6">{{item.finishCount}}次</text><text style="margin:0 5px">/</text>
  99. <text>{{item.totalMeasure}}次</text></text>
  100. </view>
  101. <view>频次:每{{item.frequencyType}}天{{item.frequencyMeasure}}{{item.convertUnit}}</view>
  102. <view>开具医生:{{item.operateBy}}</view>
  103. <view wx:if="{{item.isOffline==='Y'}}">机构:{{item.conditioningProgramSupplierName}}</view>
  104. </view>
  105. </view>
  106. <view data-id="{{item.id}}" wx:if="{{item.isOffline==='N'}}" class="verify-record" bindtap="isGoPunchcard" data-signinTime="{{item.signinTime}}">{{
  107. item.signinTime?'已打卡':'打卡'
  108. }}</view>
  109. <view catchtap="onRecord" data-id="{{item.id}}" wx:if="{{item.isOffline==='Y'}}" class="verify-record">核销记录</view>
  110. </view>
  111. </view>
  112. </block>
  113. </view>
  114. <view class="expand-all" wx:if="{{careList.length > 4}}" bindtap="toggleAll">
  115. <t-icon name="{{allExpanded ? 'chevron-up' : 'chevron-down'}}" size="32rpx" class="expand-arrow" color="#C0C4CC" />
  116. </view>
  117. </view>
  118. </view>
  119. <view class="science-list-wrapper" wx:if="{{scienceList.length}}">
  120. <view class="list-title" bind:tap="toSciencePage">
  121. <view class="missionary">健康宣教</view>
  122. <view class="title-box serch">
  123. <text>查询</text>
  124. <t-icon name="chevron-right-double"></t-icon>
  125. </view>
  126. </view>
  127. <science-card wx:for="{{scienceList}}" wx:key="id" item="{{item}}" index="{{index}}"></science-card>
  128. </view>
  129. <science-card style="display: none;">
  130. <!--?-->
  131. </science-card>
  132. <view style="height: {{container.safeBottomOffset}}px;flex: none;"></view>
  133. </scroll-view>
  134. </view>
  135. <!-- 将 tabbar 移到最外层 -->
  136. <view class="tabbar-container" wx:if="{{false}}">
  137. <tabbar wx:if="{{!tabbarHidden}}" tabbarValue="{{tabbarValue}}" patientId="{{patient.patientId}}"></tabbar>
  138. </view>
  139. <view wx:if="{{sheet}}" class="draggable-sheet-shade" catch:tap="hideDraggableSheet"></view>
  140. <draggable-sheet class="draggable-sheet-wrapper" style="height: {{container.height}}px;" initial-child-size="0" min-child-size="0" max-child-size="1" snap="{{true}}" snap-sizes="{{[0.5]}}" worklet:onsizeupdate="onDraggableSizeUpdate">
  141. <scroll-view class="scrollable draggable-sheet-container" type="custom" scroll-y associative-container="draggable-sheet" show-scrollbar="{{false}}" bounces="{{false}}">
  142. <sticky-section>
  143. <sticky-header>
  144. <view class="draggable-sheet-bar">
  145. <view class="indicator" />
  146. </view>
  147. <view wx:if="{{position.CT}}" style="text-align: center;">预警信息</view>
  148. </sticky-header>
  149. <block wx:if="{{position.LT}}">
  150. <view class="card-wrapper" wx:for="{{position.LT}}" wx:key="*this">
  151. <t-cell wx:if="{{item.title}}" t-class="card-header cell-border-gradient" title="{{item.title}}" />
  152. <view wx:if="{{item.description}}" class="card-body">&emsp;&emsp;{{item.description}}</view>
  153. </view>
  154. </block>
  155. <block wx:if="{{position.RB}}">
  156. <view class="card-wrapper">
  157. <t-cell t-class="card-header cell-border-gradient" title="中医证素解释" />
  158. <view class="card-body">
  159. <view class="row" wx:for="{{position.RB.factorItems}}" wx:key="*this">
  160. <view class="primary">{{item.factorItemName}}</view>
  161. <view style="margin-top: 4px;" wx:if="{{item.factorItemDescription}}">&emsp;&emsp;{{item.factorItemDescription}}</view>
  162. </view>
  163. </view>
  164. </view>
  165. <view class="card-wrapper">
  166. <t-cell t-class="card-header cell-border-gradient" title="中医证型解释" />
  167. <view class="card-body">
  168. <view class="row" wx:for="{{position.RB.diagnoseSyndromes}}" wx:key="*this">
  169. <view class="primary">{{item.diagnoseSyndromeName}}</view>
  170. <view style="margin-top: 4px;" wx:if="{{item.diagnoseSyndromeAnalysis}}">&emsp;&emsp;{{item.diagnoseSyndromeAnalysis}}</view>
  171. </view>
  172. </view>
  173. </view>
  174. </block>
  175. <block wx:if="{{position.RT}}">
  176. <view class="card-wrapper">
  177. <t-cell t-class="card-header cell-border-gradient" title="{{position.RT.constitutionGroupName}}" />
  178. <view class="card-body">
  179. <span class="row">{{position.RT.constitutionGroupDefinition}}</span>
  180. </view>
  181. </view>
  182. <view class="card-wrapper">
  183. <t-cell t-class="card-header cell-border-gradient" title="舌象解释" />
  184. <view class="card-body">
  185. <view>&emsp;&emsp;{{position.RT.tongueAnalysisResult}}</view>
  186. <view class="picture-wrapper">
  187. <image src="{{position.RT.upImg}}" mode="aspectFit" />
  188. <image src="{{position.RT.downImg}}" mode="aspectFit" />
  189. </view>
  190. </view>
  191. </view>
  192. <view class="card-wrapper">
  193. <t-cell t-class="card-header cell-border-gradient" title="面象解释" />
  194. <view class="card-body">
  195. <view>&emsp;&emsp;{{position.RT.faceAnalysisResult}}</view>
  196. <view wx:if="{{position.RT.faceImg}}" class="picture-wrapper">
  197. <image src="{{position.RT.faceImg}}" mode="aspectFit" />
  198. </view>
  199. </view>
  200. </view>
  201. </block>
  202. <block wx:if="{{position.CT}}">
  203. <view class="CT row" wx:for="{{position.CT}}" wx:key="*this">{{item}}</view>
  204. </block>
  205. <view class="bottom-wrapper">
  206. <form-button index="2" bind:tap="hideDraggableSheet" disableOnClick="{{false}}"></form-button>
  207. </view>
  208. </sticky-section>
  209. </scroll-view>
  210. <tabbar tabbarValue="{{tabbarValue}}" patientId="{{patient.patientId}}" wx:if="{{!tabbarHidden}}"></tabbar>
  211. <t-popup visible="{{isShowPopup}}" usingCustomNavbar bind:visible-change="onVisibleChange" placement="center">
  212. <view class="popup-container">
  213. <view class="popup-block">
  214. <scroll-view class="scroll_live" scroll-y="{{true}}" show-scrollbar="{{false}}" enhanced="{{true}}" animation="{{animationData}}">
  215. <view class="popup-item" wx:for="{{popupList}}" wx:key="{{id}}">
  216. <text class="popup-text">{{index+1}}.{{item.title}}</text>
  217. <text class="popup-action" bind:tap="goComplete" data-page="{{item.page}}" data-id="{{item.pendingWorkId}}" data-title="{{item.title}}">{{item.button}}</text>
  218. </view>
  219. </scroll-view>
  220. </view>
  221. <t-icon t-class="close-btn" name="close-circle" size="64rpx" color="#fff" bind:tap="onClose" />
  222. </view>
  223. </t-popup>
  224. </draggable-sheet>