card.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <!-- 删除,单元,修改,添加,管理功能皆未实现 -->
  2. <template>
  3. <view class="">
  4. <view @click="goDetail(item)" class="data" v-for="(item, index) in list" :key="index">
  5. <view class="top">
  6. <view class="left">
  7. <view class="title flex align-center justify-center">
  8. <image @click.stop="preview(item)" v-if="item.imageUri" style="width: 60rpx;height: 60rpx; border-radius: calc(8rpx);" :src="$global.getImgBaseUrl()+item.imageUri"></image>
  9. <u-icon v-else name="man-add-fill" size="34" color="#50baca"></u-icon>
  10. <text class="padding-left-10" >姓名:{{item.name}}</text>
  11. </view>
  12. </view>
  13. <view class="right">
  14. <text class="text-orange" v-if="item.checkState==0">待审核</text>
  15. <text class="text-green " v-else-if="item.checkState==1">审核通过</text>
  16. <text class="text-red" v-else="item.checkState==2">审核未通过</text>
  17. </view>
  18. </view>
  19. <view class="item">
  20. <view class="left">
  21. <view style="padding: 0 30rpx;">
  22. <view class="content flex">
  23. <u-icon v-if="item.sex==1" name="man" size="30" color="#fdb524"></u-icon>
  24. <u-icon v-else name="woman" size="30" color="#fdb524"></u-icon>
  25. <text class="text-bold padding-left-10">性别:</text>
  26. <text v-text="item.sex==1?'男':'女'"></text>
  27. </view>
  28. <view class="content flex">
  29. <u-icon name="bookmark" size="30" color="#5ca8f0"></u-icon>
  30. <text class="text-bold padding-left-10">住户类型:</text>
  31. <text class="" v-if="item.type==0">业主</text>
  32. <text class="" v-else-if="item.type==1">成员</text>
  33. <text class="" v-else="item.type==2">租客</text>
  34. </view>
  35. <view class="content flex align-center">
  36. <u-icon name="xiaoqu" custom-prefix="custom-icon" size="30" color="#2fc500"></u-icon>
  37. <text style="width: 25%;" class="text-bold padding-left-10">房屋信息:</text>
  38. <text style="line-height: 42rpx;">{{item.residentialName}} - {{item.buildingName}} - {{item.unitName}} - {{item.roomName}}</text>
  39. </view>
  40. <view class="content flex">
  41. <text class="cuIcon-mobile" style="color: #007AFF;font-size: 32rpx;"></text>
  42. <text class="text-bold padding-left-10">联系方式:</text>
  43. <text class="text-bold" style="padding-top: 6rpx;" v-text="item.tel" ></text>
  44. <text @click="$util.call(item.tel)" class="padding-left-10 text-blue" style="text-decoration: underline;">拨打</text>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="bottom flex" >
  50. <!-- 待审核 -->
  51. <view @click.stop="pass(item.id)" v-if="item.checkState==0" class="cu-btn sm round line-blue" style="margin: 0 10rpx;">
  52. 审核通过
  53. </view>
  54. <view @click.stop="fail(item.id)" v-if="item.checkState==0" class="cu-btn sm round bg-base" style="margin: 0 10rpx;">
  55. 审核不通过
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. name: 'card',
  64. props:{
  65. list:{
  66. type:Array,
  67. default:()=>{
  68. []
  69. }
  70. }
  71. },
  72. data() {
  73. return {
  74. loading:false
  75. };
  76. },
  77. created() {
  78. },
  79. methods:{
  80. preview(item){
  81. let img=this.$global.getImgBaseUrl()+item.imageUri
  82. this.$util.preview(img)
  83. },
  84. goDetail(item){
  85. getApp().globalData.userAuthData=item
  86. uni.navigateTo({
  87. url:"detail"
  88. })
  89. },
  90. copy(data){
  91. uni.setClipboardData({
  92. data:data
  93. })
  94. },
  95. pass(id){
  96. let params={
  97. id:id,
  98. checkState:1
  99. }
  100. this.$emit('pass',params)
  101. },
  102. fail(id){
  103. let params={
  104. id:id,
  105. checkState:2
  106. }
  107. this.$emit('fail',params)
  108. }
  109. }
  110. };
  111. </script>
  112. <style lang="scss">
  113. .data {
  114. width: 710rpx;
  115. background-color: #ffffff;
  116. margin: 20rpx auto;
  117. border-radius: 6rpx;
  118. box-sizing: border-box;
  119. padding: 20rpx 10rpx;
  120. font-size: 28rpx;
  121. .top {
  122. display: flex;
  123. justify-content: space-between;
  124. padding-bottom: 20rpx;
  125. border-bottom: 1rpx solid #dedede;
  126. .left {
  127. display: flex;
  128. align-items: center;
  129. .title {
  130. margin: 0 10rpx;
  131. font-size: 30rpx;
  132. }
  133. }
  134. .right{
  135. margin-right: 10rpx;
  136. }
  137. }
  138. .item {
  139. margin: 5rpx 0 20rpx 0;
  140. .content {
  141. border-bottom: 1rpx dashed #DDDDDD;
  142. padding: 30rpx 0;
  143. }
  144. }
  145. .bottom {
  146. display: flex;
  147. margin-top: 30rpx;
  148. justify-content: flex-end;
  149. align-items: center;
  150. }
  151. }
  152. </style>