card.vue 3.9 KB

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