card.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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 v-if="item.imageUri!=null" style="width: 60rpx;height: 60rpx; border-radius: calc(8rpx);" :src="'http://139.9.103.171:8888/'+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="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. call(phone){
  81. this.$util.callPhone(phone)
  82. },
  83. goDetail(item){
  84. getApp().globalData.userAuthData=item
  85. uni.navigateTo({
  86. url:"detail"
  87. })
  88. },
  89. copy(data){
  90. uni.setClipboardData({
  91. data:data
  92. })
  93. },
  94. pass(id){
  95. let params={
  96. id:id,
  97. checkState:1
  98. }
  99. this.$emit('pass',params)
  100. },
  101. fail(id){
  102. let params={
  103. id:id,
  104. checkState:2
  105. }
  106. this.$emit('fail',params)
  107. }
  108. }
  109. };
  110. </script>
  111. <style lang="scss">
  112. .data {
  113. width: 710rpx;
  114. background-color: #ffffff;
  115. margin: 20rpx auto;
  116. border-radius: 6rpx;
  117. box-sizing: border-box;
  118. padding: 20rpx 10rpx;
  119. font-size: 28rpx;
  120. .top {
  121. display: flex;
  122. justify-content: space-between;
  123. padding-bottom: 20rpx;
  124. border-bottom: 1rpx solid #dedede;
  125. .left {
  126. display: flex;
  127. align-items: center;
  128. .title {
  129. margin: 0 10rpx;
  130. font-size: 30rpx;
  131. }
  132. }
  133. .right{
  134. margin-right: 10rpx;
  135. }
  136. }
  137. .item {
  138. margin: 5rpx 0 20rpx 0;
  139. .content {
  140. border-bottom: 1rpx dashed #DDDDDD;
  141. padding: 30rpx 0;
  142. }
  143. }
  144. .bottom {
  145. display: flex;
  146. margin-top: 30rpx;
  147. justify-content: flex-end;
  148. align-items: center;
  149. }
  150. }
  151. </style>