微信

index.vue 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <div class="mainPage" v-if="showPage">
  3. <img :src="title" class="title" alt="">
  4. <div v-if="result && result.length">
  5. <div class="userInfo flex-h">
  6. <div class="flex-item">
  7. <span>{{user.Name}}</span>
  8. <!-- <span>{{user.Sex=='0' ? '先生' : '女士'}}</span> -->
  9. </div>
  10. <div>
  11. <span>体检时间</span>
  12. <span>{{toolClass.dateFormat(mainInfo.CreateDate)}}</span>
  13. </div>
  14. </div>
  15. <ul>
  16. <li v-for="(item,index) in result" @click="linkTo(item.ReportUrl)" :key="index" class="flex-h">
  17. <div class="flex-item">
  18. <h1>{{item.TypeName}}:</h1>
  19. <span v-for="(subItem,subIndex) in item.Details" :key="subIndex">{{subItem.SpecName}}({{subItem.CheckName}}):{{subItem.CheckVal}}</span>
  20. </div>
  21. <i class="iconfont icon-buoumaotubiao52"></i>
  22. </li>
  23. </ul>
  24. <span class="tip">本报告单仅提供临床参考,不作为诊断依据</span>
  25. <div class="view-report">
  26. <i class="iconfont icon-shuoming" style="font-size: 1.2em"></i> <a :href="mainInfo.ReportUrl">点击查看完整报告</a>
  27. </div>
  28. </div>
  29. <div v-else class="nodata">
  30. 暂无体检数据 .
  31. </div>
  32. <div class="bg-white" :hidden="ishidden">
  33. </div>
  34. </div>
  35. </template>
  36. <script>
  37. // import { Indicator } from 'mint-ui'
  38. import title from '../../../common/icon/title.png'
  39. import { createNamespacedHelpers } from 'vuex'
  40. const { mapState: mapBodyCheckState, mapActions: mapBodyCheckActions } = createNamespacedHelpers('bodyCheck')
  41. export default {
  42. data () {
  43. return {
  44. title,
  45. ishidden: true,
  46. showPage: false
  47. }
  48. },
  49. computed: {
  50. ...mapBodyCheckState({
  51. result: x => x.result,
  52. mainInfo: x => x.mainInfo,
  53. user: x => x.user
  54. })
  55. },
  56. methods: {
  57. ...mapBodyCheckActions(['getBodyCheck']),
  58. linkTo (url) {
  59. window.location.href = url
  60. },
  61. loaded () {
  62. var _that = this
  63. setTimeout(() => {
  64. // Indicator.close()
  65. _that.ishidden = true
  66. }, 500)
  67. },
  68. },
  69. beforeMount () {
  70. // Indicator.open()
  71. },
  72. created () {
  73. this.getBodyCheck().then(() => {
  74. this.showPage = true
  75. }).catch(() => {
  76. this.showPage = true
  77. })
  78. }
  79. }
  80. </script>
  81. <style lang="scss" scoped>
  82. @import 'page.scss';
  83. .bg-white {
  84. width: 100%;
  85. height: 100%;
  86. position: absolute;
  87. left: 0;
  88. top: 0;
  89. background-color: #fff;
  90. }
  91. </style>