card.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <view class="">
  3. <view class="data" v-for="(item, index) in list" :key="index">
  4. <view class="top">
  5. <view class="left">
  6. <view class="title">
  7. <u-icon name="fangjian" custom-prefix="custom-icon" size="30" color="#50baca"></u-icon>
  8. <text style="padding: 0 10rpx;font-weight: 800;">小区名称:</text>
  9. {{item.name}}
  10. </view>
  11. </view>
  12. <!-- 物业 -->
  13. <view class="right">
  14. <text>{{item.estatePidName}}</text>
  15. </view>
  16. </view>
  17. <view class="item">
  18. <view class="left">
  19. <view class=" flex" style="padding: 20rpx 40rpx;">
  20. <u-icon name="xiaoqu" custom-prefix="custom-icon" size="30" color="#2fc500"></u-icon>
  21. <text class="padding-left-10">所属社区:</text>
  22. <text>{{item.agencyName}}</text>
  23. </view>
  24. <view class=" flex" style="padding: 20rpx 35rpx;">
  25. <u-icon name="map-fill" size="40" color="#55aaff"></u-icon>
  26. <text class="padding-left-10">详细地址:</text>
  27. <text>{{item.address}}</text>
  28. </view>
  29. <view class="cu-list grid col-5 no-border" >
  30. <view class="cu-item" >
  31. <text style="color: #cb2d5d;font-size: 32rpx;">{{item.buildingNumber}}</text>
  32. <text class="count">楼栋总数</text>
  33. </view>
  34. <view class="cu-item" >
  35. <text style="color: #cb2d5d;font-size: 32rpx;">{{item.totalUnitNumber}}</text>
  36. <text class="count">单元总数</text>
  37. </view>
  38. <view class="cu-item" >
  39. <text style="color: #cb2d5d;font-size: 32rpx;">{{item.floorNumber}}</text>
  40. <text class="count">楼层总数</text>
  41. </view>
  42. <view class="cu-item" >
  43. <text style="color: #cb2d5d;font-size: 32rpx;">{{item.totalRoomNumber}}</text>
  44. <text class="count">房间总数</text>
  45. </view>
  46. <view class="cu-item" >
  47. <text style="color: #cb2d5d;font-size: 32rpx;">{{item.totalUserNumber}}</text>
  48. <text class="count">住户总数</text>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="bottom">
  54. <view @click.stop="edit(item)" class="cuIcon cu-btn round bg-blue light text-bold">
  55. <text class="cuIcon-edit"></text>
  56. </view>
  57. <!-- <view @click="delItem(item)" class="cuIcon cu-btn round bg-red light margin-left-20 text-bold">
  58. <text class="cuIcon-delete"></text>
  59. </view> -->
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. export default {
  66. name: 'card',
  67. props:{
  68. list:{
  69. type:Array,
  70. default:()=>{
  71. []
  72. }
  73. }
  74. },
  75. data() {
  76. return {
  77. loading:false
  78. };
  79. },
  80. created() {
  81. },
  82. methods:{
  83. copy(data){
  84. uni.setClipboardData({
  85. data:data
  86. })
  87. },
  88. goDetail(item){
  89. console.log(item)
  90. uni.navigateTo({
  91. url:"/pages/residential/detail?item="+JSON.stringify(item)
  92. })
  93. },
  94. edit(item){
  95. this.$emit('edit',item)
  96. // uni.navigateTo({
  97. // url:"/pages/residential/add?item="+JSON.stringify(item)
  98. // })
  99. },
  100. delItem(item){
  101. this.$emit('delItem',item)
  102. }
  103. }
  104. };
  105. </script>
  106. <style lang="scss">
  107. .count{
  108. font-weight: 800;
  109. padding-top: 10rpx;
  110. }
  111. .data {
  112. background-color: #ffffff;
  113. margin: 10rpx ;
  114. border-radius: 6rpx;
  115. box-sizing: border-box;
  116. padding: 20rpx 10rpx;
  117. font-size: 28rpx;
  118. .top {
  119. display: flex;
  120. justify-content: space-between;
  121. padding-bottom: 20rpx;
  122. border-bottom: 1rpx dashed #dedede;
  123. .left {
  124. display: flex;
  125. align-items: center;
  126. .title {
  127. margin: 0 10rpx;
  128. font-size: 30rpx;
  129. }
  130. }
  131. .right{
  132. margin-left: 30rpx;
  133. margin-right: 10rpx;
  134. }
  135. }
  136. .item {
  137. margin: 5rpx 0 10rpx 0;
  138. .content {
  139. border-bottom: 1rpx dashed #DDDDDD;
  140. padding: 10rpx 0;
  141. }
  142. }
  143. .bottom {
  144. display: flex;
  145. justify-content: flex-end;
  146. align-items: center;
  147. }
  148. }
  149. </style>