userInfo.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view :class="['userInfoCard', 'initial', bgClass]">
  3. <view class="userInfo_box displayFlexRow">
  4. <view class="userInfo_left_box displayFlexCol">
  5. <view class="">
  6. <text>{{ userInfo.memberName }}</text>
  7. <text>{{ userInfo.sex == '1' ? '男' : userInfo.sex == '2' ? '女' : '未知' }} {{ userInfo.age }}岁</text>
  8. </view>
  9. <text v-if="type == 'member'">手机号: {{ userInfo.mobile || "--" }}</text>
  10. <text class="ellipsis" v-if="type != 'member'">{{ userInfo.cardType == '14' ? "住院号" : "就诊卡" }}
  11. {{ userInfo.cardNo || "--" }}</text>
  12. </view>
  13. <view v-if="showBtn" class="userInfo_right_box displayFlexRow" @click="jumpChoiseVisitingCard">
  14. <text v-if="type == 'member'">换个就诊人</text>
  15. <text v-if="userInfo.cardType == '1' && type == 'card'">换个就诊卡</text>
  16. <text v-if="userInfo.cardType == '14' && type == 'hospital'">换个住院号</text>
  17. <image class="arrow" :src="iconUrl.icon_rightWhite"></image>
  18. </view>
  19. </view>
  20. <image class="userInfo_bg_icon" :src="iconUrl.userInfo_bg"></image>
  21. </view>
  22. </template>
  23. <script lang="ts" setup>
  24. import { common } from '@/utils';
  25. import icon from '@/utils/icon';
  26. const props = withDefaults(defineProps<{
  27. bgClass?: string;
  28. pageType?: string;
  29. userInfo?: any;
  30. showBtn?: boolean;
  31. type?: string;
  32. }>(), {
  33. bgClass: 'bgWhite',
  34. pageType: '1',
  35. userInfo: () => ({}),
  36. showBtn: true,
  37. type: 'card'
  38. });
  39. const iconUrl = ref(icon)
  40. // 选择就诊卡
  41. const jumpChoiseVisitingCard = () => {
  42. let type = props.type;
  43. common.goToUrl(`/pagesPersonal/st1/business/patientManagement/selecteCardOrHos/selecteCardOrHos?type=${type}&fromComponent=true`);
  44. }
  45. </script>
  46. <style lang="scss" scoped>
  47. /* 通用 */
  48. .arrow {
  49. width: 14upx;
  50. height: 24upx;
  51. margin-right: 0;
  52. }
  53. .displayFlexRow {
  54. display: flex;
  55. flex-direction: row;
  56. justify-content: center;
  57. align-items: center;
  58. }
  59. .displayFlexCol {
  60. display: flex;
  61. flex-direction: column;
  62. justify-content: center;
  63. align-items: center;
  64. }
  65. /* 普通 */
  66. .initial.userInfoCard {
  67. padding: 30upx;
  68. padding-bottom: 0;
  69. box-sizing: border-box;
  70. position: relative;
  71. }
  72. .initial .userInfo_box {
  73. width: 100%;
  74. height: 194upx;
  75. padding: 30upx;
  76. padding-bottom: 0;
  77. box-sizing: border-box;
  78. justify-content: space-between;
  79. align-items: flex-end;
  80. position: absolute;
  81. top: 0;
  82. left: 0;
  83. }
  84. .initial .userInfo_box text {
  85. color: white;
  86. }
  87. .initial .userInfo_left_box {
  88. width: 59%;
  89. height: 100%;
  90. font-size: 30upx;
  91. padding-left: 30upx;
  92. align-items: flex-start;
  93. }
  94. .initial .userInfo_left_box view {
  95. margin-bottom: 28upx;
  96. }
  97. .initial .userInfo_left_box view text {
  98. font-size: 28upx;
  99. opacity: 0.6;
  100. }
  101. .initial .userInfo_left_box view text:nth-child(1) {
  102. font-size: 36upx;
  103. font-weight: bold;
  104. margin-right: 16upx;
  105. opacity: 1;
  106. }
  107. .initial .userInfo_right_box {
  108. width: 35%;
  109. height: 67%;
  110. }
  111. .initial .userInfo_right_box text {
  112. font-size: 30upx;
  113. font-weight: bold;
  114. }
  115. .initial .userInfo_right_box image {
  116. margin-left: 20upx;
  117. }
  118. .initial .userInfo_bg_icon {
  119. width: 100%;
  120. height: 164upx;
  121. }
  122. .bgWhite {
  123. background: #fff !important;
  124. }
  125. .bgLinGra {
  126. background: linear-gradient(180deg, #FFFFFF 0%, #F1F1F6 100%) !important;
  127. }
  128. </style>