home.wxml 11 KB

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