userList.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view>
  3. <view class="item" v-for="item in list" :key="item.userid" hover-class="navigator-hover" @click="itemClick(item)">
  4. <u--image
  5. :src="item.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'"
  6. :width="tovw(44)" :height="tovw(44)" shape="circle">
  7. <template v-slot:loading>
  8. <u-loading-icon color="red"></u-loading-icon>
  9. </template>
  10. </u--image>
  11. <view class="content">
  12. <view class="title u-line-1">
  13. {{ item.name }}
  14. </view>
  15. <view class="row u-line-1">
  16. {{ item.rolenames }}
  17. </view>
  18. <view class="row">
  19. <text class="iconfont icon-dianhua-hui" />
  20. {{ item.phonenumber }}
  21. </view>
  22. <view class="row u-line-1">
  23. <text class="iconfont icon-morenmendian" />
  24. {{ item.storenames || '--' }}
  25. </view>
  26. <view class="row">
  27. 状态:
  28. <text :style="{ color: item.status == '启用' ? '#009270' : '#E3041F' }">
  29. {{ item.status }}
  30. </text>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. props: {
  39. list: {
  40. type: Array,
  41. default: []
  42. },
  43. onClick: {
  44. type: Function
  45. }
  46. },
  47. methods: {
  48. itemClick(item) {
  49. this.$emit("onClick", item)
  50. }
  51. },
  52. }
  53. </script>
  54. <style lang="scss" scoped>
  55. .item {
  56. width: 355px;
  57. background: #FFFFFF;
  58. border-radius: 8px;
  59. padding: 10px;
  60. box-sizing: border-box;
  61. background: #fff;
  62. margin: 0 auto 10px;
  63. display: flex;
  64. .content {
  65. margin-left: 10px;
  66. .title {
  67. line-height: 24px;
  68. font-family: Source Han Sans SC, Source Han Sans SC;
  69. font-weight: bold;
  70. font-size: 16px;
  71. color: #333333;
  72. }
  73. .row {
  74. margin-top: 5px;
  75. font-family: Source Han Sans SC, Source Han Sans SC;
  76. font-size: 12px;
  77. color: #888888;
  78. .iconfont {
  79. margin-right: 5px;
  80. }
  81. }
  82. }
  83. }
  84. .item:last-child {
  85. margin-bottom: 0;
  86. }
  87. </style>