inspectCheckReportDetails.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. <template>
  2. <view>
  3. <healthCardQueryComp
  4. :env="healthCardData.env"
  5. :hospitalId="healthCardData.hospitalId"
  6. :channel="healthCardData.channel"
  7. :openId="healthCardData.openId"
  8. :scene="healthCardData.scene"
  9. :healthCardId="healthCardData.healthCardId"
  10. :pos="healthCardData.pos"
  11. v-if="healthCardData.healthCardId != ''"
  12. ></healthCardQueryComp>
  13. <view class="container">
  14. <view class="bg_gary"></view>
  15. <view class="time_box">
  16. <view class="time_box_list">
  17. <text>患者姓名</text>
  18. <view class="nameTel">
  19. <text>{{currentUser.memberName}}</text>
  20. <text class="user_info_text border_color border_left"></text>
  21. <text class="user_info_text">{{currentUser.sex=='1'?'男':(currentUser.sex=='2'?'女':'未知')}}</text>
  22. <text class="user_info_text border_color border_left"></text>
  23. <text class="user_info_text">{{currentUser.age}}岁</text>
  24. </view>
  25. </view>
  26. <view class="time_box_list">
  27. <text>{{currentUser.cardType == "1"? "就诊卡" : "住院号"}}</text>
  28. <text class="bor_bottom">{{currentUser.cardNo}}</text>
  29. </view>
  30. <view class="time_box_list">
  31. <text>报告单号</text>
  32. <text >{{queryBean.ReportId==''?currentUser.applyNo:queryBean.ReportId}}</text>
  33. </view>
  34. <view class="time_box_list" v-if="!reportInfo.YyxUrl || reportInfo.YyxUrl.length == 0">
  35. <text>审核医生</text>
  36. <text>{{reportInfo.Checker}}</text>
  37. </view>
  38. <view class="time_box_list" v-if="!reportInfo.YyxUrl || reportInfo.YyxUrl.length == 0">
  39. <text>审核时间</text>
  40. <text>{{reportInfo.SubmissionTime}}</text>
  41. </view>
  42. </view>
  43. <view class="bg_gary"></view>
  44. <view class="inspect_info padding_none" v-if="queryBean.ReportType == 1">
  45. <view class="table_box border_bottom" v-if="!reportInfo.YyxUrl || reportInfo.YyxUrl.length == 0">
  46. <view class="border-right">
  47. <text>检测指标</text>
  48. </view>
  49. <view class="border-right">
  50. <text>结果</text>
  51. </view>
  52. <view class="border-right">
  53. <text>状态</text>
  54. </view>
  55. <view class="border-right">
  56. <text>参考值</text>
  57. </view>
  58. <view class="border-right">
  59. <text>单位</text>
  60. </view>
  61. </view>
  62. <template v-if="!reportInfo.YyxUrl || reportInfo.YyxUrl.length == 0">
  63. <view class="table_box border_bottom tableCentent" v-for="(item, index) in reportInfo.Data_1" :key="index">
  64. <view class="border-right"><text class="textInfo">{{item.ItemDetailsName}}</text></view>
  65. <view class="border-right"><text class="textInfo">{{item.ResultValue}}</text></view>
  66. <view class="border-right" v-if="item.ExFlag == 'H'"><text class="textInfo">↑</text></view>
  67. <view class="border-right" v-else-if="item.ExFlag == 'L'"><text class="textInfo">↓</text></view>
  68. <view class="border-right" v-else><text class="textInfo">正常</text></view>
  69. <view class="border-right"><text class="textInfo">{{item.ReferenceValues}}</text></view>
  70. <view class="border-right"><text class="textInfo">{{item.Unit}}</text></view>
  71. </view>
  72. </template>
  73. <!-- 报告单(图片) -->
  74. <view v-if="reportInfo.YyxUrl && reportInfo.YyxUrl.length > 0">
  75. <swiper :indicator-dots="indicatorDots">
  76. <block v-for="(item, index) in reportInfo.YyxUrl" :key="index">
  77. <swiper-item>
  78. <image class="report_img" :src="item" @click="preview(index)"></image>
  79. </swiper-item>
  80. </block>
  81. </swiper>
  82. </view>
  83. </view>
  84. </view>
  85. </view>
  86. </template>
  87. <script setup lang="ts">
  88. import { ref } from 'vue';
  89. import { onLoad } from '@dcloudio/uni-app';
  90. import { common } from '@/utils';
  91. import { getReportInfo, getHealthCard } from '@/pagesPatient/service/report/index';
  92. import { useStore } from 'vuex';
  93. const app = getApp();
  94. const store = useStore();
  95. const currentUser = ref<any>({});
  96. const reportInfo = ref<any>({});
  97. const queryBean = ref<any>({});
  98. const showCon = ref(false);
  99. const indicatorDots = ref(true);
  100. const healthCardData = ref({
  101. env: 'prod',
  102. // 0101081检查 0101082检验
  103. scene: '0101082',
  104. hospitalId: '39880',
  105. healthCardId: '',
  106. channel: '0402',
  107. pos: 'bottom',
  108. openId: store.state.openid || uni.getStorageSync("openid")
  109. });
  110. onLoad((options: any) => {
  111. let qBean = options.queryBean ? JSON.parse(options.queryBean) : {};
  112. currentUser.value = app.globalData.currentUser;
  113. queryBean.value = qBean;
  114. healthCardData.value.scene = qBean.ReportType == 1 ? '0101082' : qBean.ReportType == 2 ? '0101081' : '';
  115. uni.setNavigationBarTitle({
  116. title: `检验报告单(${qBean.ItemName || ''})`,
  117. });
  118. main();
  119. });
  120. const main = async () => {
  121. let queryData = {
  122. MemberId: currentUser.value.memberId,
  123. ReportId: queryBean.value.ReportId,
  124. ReportType: queryBean.value.ReportType,
  125. CardNo: currentUser.value.cardNo,
  126. CardType: '1',
  127. SampleNo: queryBean.value.SampleNo,
  128. EventNo: queryBean.value.EventNo,
  129. Store: {
  130. cardEncryptionStore: currentUser.value.encryptionStore || '',
  131. baseMemberEncryptionStore: currentUser.value.baseMemberEncryptionStore
  132. }
  133. };
  134. let resp = await getReportInfo(queryData);
  135. if (!common.isEmpty(resp)) {
  136. for (let i = 0; i < resp.length; i++) {
  137. if (resp[i].YyxUrl) {
  138. let imgArr = resp[i].YyxUrl.split(",");
  139. for (let j = 0; j < imgArr.length; j++) {
  140. // 若图片更新后,地址不变,wx.previewImage打开图片有缓存,需要加上时间戳
  141. imgArr[j] = imgArr[j] + "?time=" + Date.now();
  142. }
  143. resp[i].YyxUrl = imgArr;
  144. } else {
  145. resp[i].YyxUrl = [];
  146. }
  147. }
  148. }
  149. reportInfo.value = !common.isEmpty(resp) ? resp[0] : {};
  150. showCon.value = !common.isEmpty(resp);
  151. let resp2 = await getHealthCard({ memberId: currentUser.value.memberId });
  152. if (!common.isEmpty(resp2)) {
  153. healthCardData.value.healthCardId = resp2[0].cardNo;
  154. }
  155. };
  156. const preview = (index: number) => {
  157. uni.previewImage({
  158. current: reportInfo.value.YyxUrl[index], // 当前显示图片的http链接
  159. urls: reportInfo.value.YyxUrl // 需要预览的图片http链接列表
  160. });
  161. };
  162. </script>
  163. <style>
  164. .container {
  165. /* padding-top: 20upx; */
  166. background: white;
  167. }
  168. .bg_gary {
  169. width: 100%;
  170. height: 20upx;
  171. background: #f1f1f6;
  172. }
  173. .time_box {
  174. width: 100%;
  175. background: white;
  176. padding: 26upx 0 0 30upx;
  177. /* margin-top: 20upx; */
  178. /* position: fixed; */
  179. overflow: auto;
  180. }
  181. .time_box_list {
  182. margin-bottom: 24upx;
  183. display: flex;
  184. flex-direction: row;
  185. justify-content: flex-start;
  186. align-items: flex-start;
  187. }
  188. .time_box_list:nth-last-child(2) {
  189. margin-top: 24upx;
  190. }
  191. .time_box_list text:nth-child(1){
  192. width: 31%;
  193. display: inline-block;
  194. font-size: 28upx;
  195. color: #999;
  196. }
  197. .time_box_list text:nth-child(2){
  198. width: 69%;
  199. font-size: 28upx;
  200. color: #333;
  201. }
  202. .nameTel {
  203. display: inline-block;
  204. }
  205. .nameTel text:nth-child(1) {
  206. width: auto !important;
  207. font-size: 28upx;
  208. color: #333;
  209. margin-right: 16upx;
  210. }
  211. .user_info_text {
  212. font-size: 28upx;
  213. color: #333;
  214. }
  215. .border_color {
  216. width: 1px;
  217. height: 20upx;
  218. }
  219. .nameTel text:nth-child(3) {
  220. font-size: 28upx;
  221. padding: 0 16upx;
  222. }
  223. .nameTel text:nth-child(5) {
  224. font-size: 28upx;
  225. padding-left: 16upx;
  226. }
  227. .bor_bottom {
  228. padding-bottom: 36upx;
  229. display: inline-block;
  230. }
  231. .view_cloud_film_btn {
  232. width: 188upx;
  233. line-height: 60upx;
  234. text-align: center;
  235. display: inline-block;
  236. font-size: 28upx;
  237. color: var(--dominantColor);
  238. border-radius: 60upx;
  239. position: absolute;
  240. top: 98upx;
  241. right: 60upx;
  242. z-index: 50;
  243. }
  244. /* .clickBtn {
  245. position: relative;
  246. z-index: 10;
  247. } */
  248. .clickBtn::after {
  249. content: "";
  250. position: absolute;
  251. top: -50%;
  252. bottom: -50%;
  253. left: -50%;
  254. right: -50%;
  255. width: 200%;
  256. height: 200%;
  257. -webkit-transform: scale(0.5);
  258. transform: scale(0.5);
  259. border: solid 1px var(--dominantColor);
  260. border-radius: 66px;
  261. box-sizing:border-box;
  262. }
  263. .inspect_info {
  264. width: 100%;
  265. padding: 30upx;
  266. box-sizing: border-box;
  267. background: white;
  268. /* position: fixed;
  269. top: 430upx;
  270. bottom: 0; */
  271. overflow: auto;
  272. }
  273. .report_info {
  274. margin-bottom: 30upx;
  275. }
  276. .report_info text:nth-child(1){
  277. display: block;
  278. font-size: 32upx;
  279. font-weight: bold;
  280. }
  281. .report_text {
  282. font-size: 30upx;
  283. color: #333;
  284. line-height: 45upx;
  285. margin-top: 20upx;
  286. display: block;
  287. }
  288. .padding_none {
  289. padding: 0;
  290. }
  291. .table_box {
  292. width: 100%;
  293. background: white;
  294. display: flex;
  295. flex-direction: row;
  296. justify-content: space-between;
  297. align-items: center;
  298. }
  299. .table_box view {
  300. width: 20%;
  301. text-align: center;
  302. font-size: 28upx;
  303. color: #666;
  304. padding: 36upx 15upx;
  305. box-sizing: border-box;
  306. }
  307. .table_box view:nth-child(1) {
  308. width: 27%;
  309. }
  310. .table_box view:nth-child(2) {
  311. width: 16%;
  312. }
  313. .table_box view:nth-child(3) {
  314. width: 16%;
  315. }
  316. .table_box view:nth-child(4) {
  317. width: 25%;
  318. }
  319. .table_box view:nth-child(5) {
  320. width: 16%;
  321. }
  322. .table_box view:nth-child(5n) {
  323. border-right: none;
  324. }
  325. .textInfo {
  326. word-wrap: break-word;
  327. word-break: normal;
  328. padding: 0 10upx;
  329. }
  330. .tableCentent {
  331. line-height: 120upx;
  332. }
  333. .tableCentent text {
  334. color: #333 !important;
  335. height: 100%;
  336. display: inline-block;
  337. }
  338. .border_left::before {
  339. height: 70% !important;
  340. top: 7upx !important;
  341. }
  342. .report_img {
  343. width: 100%;
  344. margin-top: 30upx;
  345. }
  346. </style>