detail.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <view class="">
  3. <view class="card bg-white">
  4. <view class="top">
  5. <text class="title">{{dataDetail.residentialName}}</text>
  6. <view class="avatar">
  7. <u-avatar :sex-icon="userInfo.gender==1?'man':'woman'" show-sex="true" size="110" :src="userInfo.avatarUrl"></u-avatar>
  8. </view>
  9. <view class="text-center text-bold">
  10. <text v-text="userInfo.nickName"></text>
  11. </view>
  12. <view class="text-center text-blue padding-top-50 " style="font-size: 26rpx;">
  13. 请出示该通行证截图,由保安核检
  14. </view>
  15. </view>
  16. <view class="bottom">
  17. <view class="item">
  18. <text class="">姓名:</text>
  19. <text>{{memberName}}</text>
  20. </view>
  21. <view class="item">
  22. <text class="">出入原因:</text>
  23. <text>{{dataDetail.reason}}</text>
  24. </view>
  25. <view class="item">
  26. <text class="">体温是否异常:</text>
  27. <text v-if="dataDetail.temparetureException==0">否</text>
  28. <text v-if="dataDetail.temparetureException==1" class="text-red text-bold">异常</text>
  29. </view>
  30. <view class="item">
  31. <text class="">是否有异常症状:</text>
  32. <text v-if="dataDetail.symptomException==0">否</text>
  33. <text v-if="dataDetail.symptomException==1" class="text-red text-bold">异常</text>
  34. </view>
  35. <view class="item">
  36. <text class="">访问日期:</text>
  37. <text>{{dataDetail.createDate}}</text>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="text-center text-sm text-gray">
  42. 通行证仅当天有效,隔日需要再次登记出入信息
  43. </view>
  44. <view v-if="show==true" @click="goList" class=" text-center margin-top-50">
  45. <u-icon name="order" color="#0081ff"></u-icon>
  46. <text class="text-blue text-df padding-left-10" >登记记录</text>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default {
  52. data() {
  53. return {
  54. //如果是从列表跳过来的,隐藏登记记录
  55. show:true,
  56. memberName:'',
  57. userInfo:{},
  58. dataDetail:{}
  59. }
  60. },
  61. onLoad(options) {
  62. this.show=options.show || true
  63. this.fetchUserInfo()
  64. },
  65. onShow() {
  66. this.memberName=getApp().globalData.member.name
  67. this.dataDetail=getApp().globalData.pratiqueData
  68. },
  69. methods: {
  70. fetchUserInfo(){
  71. let that=this
  72. that.userInfo=uni.getStorageSync("userInfo")
  73. if (this.$isEmpty(that.userInfo)) {
  74. uni.login({
  75. success: function () {
  76. uni.getUserInfo({
  77. success: function (res) {
  78. that.userInfo=res.userInfo
  79. }
  80. });
  81. }
  82. });
  83. }
  84. },
  85. goList(){
  86. uni.navigateTo({
  87. url:"/pages/tool-list/epidemic-pass/list"
  88. })
  89. }
  90. },
  91. }
  92. </script>
  93. <style lang="scss">
  94. .card{
  95. display: flex;
  96. flex-direction: column;
  97. justify-content: space-between;
  98. width: 80%;
  99. height: 850rpx;
  100. border-radius: 18rpx;
  101. background-color: #FFFFFF;
  102. margin: 50rpx auto;
  103. .top{
  104. padding-top: 20rpx;
  105. margin: 30rpx;
  106. .title{
  107. font-size: 32rpx;
  108. font-weight: 800;
  109. display: flex;
  110. justify-content: center;
  111. }
  112. }
  113. .bottom{
  114. padding-bottom: 50rpx;
  115. .item{
  116. padding: 10rpx 0 10rpx 50rpx;
  117. text:first-child{
  118. padding-right: 20rpx;
  119. }
  120. }
  121. }
  122. .avatar{
  123. padding: 50rpx 0 20rpx 0;
  124. display: flex;
  125. justify-content: center;
  126. }
  127. }
  128. </style>