card.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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 justify-center align-center">
  8. <image v-if="item.imageUri!=null" style="width: 60rpx;height: 60rpx;border-radius: calc(8rpx);" :src="item.fastDfsServer+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 flex justify-center align-center">
  14. <text>人脸审核状态:</text>
  15. <text class="text-yellow" v-if="item.checkState==-1">待上传</text>
  16. <text class="text-orange" v-else-if="item.checkState==0">待审核</text>
  17. <text class="text-green " v-else-if="item.checkState==1">审核通过</text>
  18. <text class="text-red" v-else="item.checkState==2">审核未通过</text>
  19. </view>
  20. </view>
  21. <view class="item">
  22. <view class="left">
  23. <view style="padding: 0 30rpx;">
  24. <view class="content flex">
  25. <u-icon v-if="item.sex==1" name="man" size="30" color="#fdb524"></u-icon>
  26. <u-icon v-else name="woman" size="30" color="#fdb524"></u-icon>
  27. <text class="text-bold padding-left-10">性别:</text>
  28. <text v-text="item.sex==1?'男':'女'"></text>
  29. </view>
  30. <view class="content flex">
  31. <u-icon name="bookmark" size="30" color="#5ca8f0"></u-icon>
  32. <text class="text-bold padding-left-10">住户类型:</text>
  33. <text class="" v-if="item.type==0">业主</text>
  34. <text class="" v-else-if="item.type==1">成员</text>
  35. <text class="" v-else="item.type==2">租客</text>
  36. </view>
  37. <view class="content flex">
  38. <u-icon name="xiaoqu" custom-prefix="custom-icon" size="30" color="#2fc500"></u-icon>
  39. <text class="text-bold padding-left-10">房屋信息:</text>
  40. <text >{{item.residentialName}},{{item.buildingName}},{{item.unitName}},{{item.roomName}}</text>
  41. </view>
  42. <view class="content flex">
  43. <text class="cuIcon-mobile" style="color: #007AFF;font-size: 32rpx;"></text>
  44. <text class="text-bold padding-left-10">联系方式:</text>
  45. <text class="text-bold" style="padding-top: 6rpx;" v-text="item.tel" ></text>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="bottom flex" >
  51. <view @click.stop="edit(item)" class="cu-btn sm round line-blue" style="margin: 0 10rpx;">
  52. 修改信息
  53. </view>
  54. <!-- <view @click.stop="deleteItem(item)" class="cu-btn sm round bg-red" 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. copy(data){
  81. uni.setClipboardData({
  82. data:data
  83. })
  84. },
  85. deleteItem(item){
  86. this.$emit('deleteItem',item)
  87. },
  88. edit(item){
  89. getApp().globalData.userDetail=item
  90. uni.navigateTo({
  91. url:"add?id="+item.id
  92. })
  93. },
  94. goDetail(item){
  95. getApp().globalData.userDetail=item
  96. uni.navigateTo({
  97. url:"./detail?id="+item.id
  98. })
  99. }
  100. }
  101. };
  102. </script>
  103. <style lang="scss">
  104. .data {
  105. width: 710rpx;
  106. background-color: #ffffff;
  107. margin: 20rpx auto;
  108. border-radius: 6rpx;
  109. box-sizing: border-box;
  110. padding: 20rpx 10rpx;
  111. font-size: 28rpx;
  112. .top {
  113. display: flex;
  114. justify-content: space-between;
  115. padding-bottom: 20rpx;
  116. border-bottom: 1rpx solid #dedede;
  117. .left {
  118. display: flex;
  119. align-items: center;
  120. .title {
  121. margin: 0 10rpx;
  122. font-size: 30rpx;
  123. }
  124. }
  125. .right{
  126. margin-right: 10rpx;
  127. }
  128. }
  129. .item {
  130. margin: 5rpx 0 20rpx 0;
  131. .content {
  132. border-bottom: 1rpx dashed #DDDDDD;
  133. padding: 30rpx 0;
  134. }
  135. }
  136. .bottom {
  137. display: flex;
  138. margin-top: 30rpx;
  139. justify-content: flex-end;
  140. align-items: center;
  141. }
  142. }
  143. </style>