inspectTestReportDetails.vue 8.8 KB

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