home.wxml 13 KB

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