homeuserList.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view>
  3. <view class="listbox" v-for="(item,index) in list" :key="index" @tap="clickItems(item,index)">
  4. <view class="flex align-center justify-between">
  5. <!-- <view class="text-xl text-bold" style="color: #6696FF;">{{item.projectName}}</view> -->
  6. <view class="text-xl text-bold" v-if="types==true" style="color: rgba(105, 150, 255, 0.8);">{{item.address}}</view>
  7. <view class="text-xl text-bold" v-else style="color: rgba(105, 150, 255, 1);">{{item.address}}</view>
  8. <view class="text-lg text-bold" style="color: #FF4A28;">{{item.projectDayNum?item.projectDayNum:0}}个月</view>
  9. </view>
  10. <view class="flex align-center margin-top-sm flex-wrap">
  11. <view class="argrtn">{{item.projectType}}</view>
  12. <block v-if="item.projectAward && types==true">
  13. <view class="argrtn" style="background-color: #ffffff;color: #6996ff;border: 1rpx solid #6996ff;" v-for="(ite,index) in item.projectAward?item.projectAward.split(','):[]" :key="index">{{ite}}</view>
  14. </block>
  15. </view>
  16. <!-- <view class="flex align-center justify-between margin-top">
  17. <view class="" style="color: #666666;">{{item.companyName}}</view>
  18. <view>{{item.address}}</view>
  19. </view> -->
  20. <view class="flex align-center" style="margin-top: 10rpx;" v-if="item.postDetailsList.length>0" v-for="(ite,ind) in item.postDetailsList" :key="ind">
  21. <!-- <view class="" >
  22. {{ite.postAge}}
  23. </view>
  24. <view class="" style="height: 26rpx;width: 2rpx;border: 2rpx solid #cccccc;margin: 0 10rpx 0 10rpx;"></view>
  25. <view class="">
  26. {{ite.postSex}}
  27. </view>
  28. <view class="" style="height: 26rpx;width: 2rpx;border: 2rpx solid #cccccc;margin: 0 10rpx 0 10rpx;"></view> -->
  29. <view class="">
  30. {{ite.postName}}
  31. </view>
  32. <view class="" style="height: 26rpx;width: 2rpx;border: 2rpx solid #cccccc;margin: 0 10rpx 0 10rpx;"></view>
  33. <view class="">
  34. {{ite.postPeopleNum}}人
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. export default {
  42. name: 'taskHomeList',
  43. props: {
  44. list: {
  45. type: Array,
  46. default () {
  47. return [];
  48. }
  49. },
  50. //是否显示福利
  51. types: {
  52. type: Boolean,
  53. default: false
  54. },
  55. //背景颜色
  56. backgroundColor: {
  57. type: String,
  58. default: '#FFFFFF'
  59. },
  60. //是否需要下方横线
  61. splitLine: {
  62. type: Boolean,
  63. default: false
  64. },
  65. //下方20rpx margin
  66. bottomMargin: {
  67. type: Boolean,
  68. default: false
  69. },
  70. radius: {
  71. type: Boolean,
  72. default: false
  73. },
  74. },
  75. watch: {
  76. },
  77. data() {
  78. return {
  79. };
  80. },
  81. methods: {
  82. clickItems(item, index) {
  83. this.$emit('click', {
  84. item: item,
  85. index: index,
  86. });
  87. }
  88. }
  89. };
  90. </script>
  91. <style>
  92. .listbox {
  93. background: #FFFFFF;
  94. border-radius: 24upx;
  95. margin: 0upx 30upx 20upx 30upx;
  96. padding: 30upx;
  97. }
  98. .argrtn {
  99. background: #FFFFFF;
  100. color: #6996ff;
  101. font-size: 24upx;
  102. border: 1rpx solid #6996ff;
  103. border-radius: 8upx;
  104. padding: 10upx 20upx;
  105. margin-right: 20upx;
  106. margin-bottom: 10rpx;
  107. }
  108. </style>