apply-item.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view class="apply-item" @tap="tapItemHandle">
  3. <view class="apply-item-tag"
  4. :class="[`apply-item-tag${item.dealStatus??1}`]">{{statusText}}</view>
  5. <view class="flex-row">
  6. <u-image class="apply-item-image1" width="51.2rpx" height="51.2rpx" bgColor="transparent"
  7. src="@/pages/subpack/static/images/app/avatar-mini.png" />
  8. <view class="apply-item-name">{{item.personName}}</view>
  9. </view>
  10. <view class="apply-item-content">
  11. <view class="flex-row align-center">
  12. <u-image class="apply-item-image2" width="36rpx" height="36rpx" bgColor="transparent"
  13. src="@/pages/subpack/static/images/app/cat-icon.png" />
  14. <view class="apply-item-tips text-overflow">
  15. <text>需求:</text>
  16. <text>{{item.careNeeds??'-'}}</text>
  17. </view>
  18. </view>
  19. <view class="flex-row align-center mt-08">
  20. <u-image class="apply-item-image2" width="36rpx" height="36rpx" bgColor="transparent"
  21. src="@/pages/subpack/static/images/app/time-icon.png" />
  22. <view class="apply-item-tips1">
  23. <text>申请日期:</text>
  24. <text>{{item.applyDate??'-'}}</text>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script setup>
  31. import { computed } from 'vue'
  32. import {
  33. getDict
  34. } from '@/common/status/index.js'
  35. const emit = defineEmits(['tapItem'])
  36. const props = defineProps({
  37. item: {
  38. type: Object,
  39. default () {
  40. return {
  41. personName: '张三🤩', //申请人姓名
  42. careNeeds: 'sdasad', //护理需求详情
  43. applyDate: '2025-01-01 12:23:12', //申请日期
  44. status: 1, //申请状态
  45. dealStatus: 1, //处理状态
  46. }
  47. }
  48. },
  49. })
  50. const tapItemHandle = () => {
  51. emit('tapItem', props.item)
  52. }
  53. const statusText = computed(()=>{
  54. if(props.item.dealStatus === 'complete') return '已完成';
  55. let dict = getDict({dictValue: props.item.status, dictType: 'care_apply_status'});
  56. return dict.dictLabel??'空状态';
  57. })
  58. </script>
  59. <style lang="scss" scoped>
  60. :deep(.u-image) {
  61. display: flex;
  62. align-items: center;
  63. justify-content: center;
  64. }
  65. .apply-item {
  66. position: relative;
  67. background-color: #fff;
  68. margin: 24rpx;
  69. padding: 30rpx;
  70. border-radius: 20rpx;
  71. &-tag {
  72. position: absolute;
  73. right: 0;
  74. top: 0;
  75. font-size: 28rpx;
  76. color: #FFFFFF;
  77. background: linear-gradient(to right, #00D885 0%, #2CEFA4 100%);
  78. padding: 6rpx 24rpx;
  79. border-radius: 0 20rpx 0 20rpx;
  80. font-weight: 500;
  81. }
  82. &-tag1,
  83. &-tagno_start{
  84. background: linear-gradient(to right, #EFEFEF 0%, #EFEFEF 100%);
  85. color: #888888;
  86. }
  87. &-tag2,
  88. &-tagin_progress{
  89. background: linear-gradient(to right, #1677FF 0%, #5EA0FB 100%);
  90. }
  91. &-tag0,
  92. &-tagin_disagree{
  93. background: linear-gradient(to right, #fa3534 0%, #fa6355 100%);
  94. }
  95. &-name {
  96. font-size: 32rpx;
  97. color: #222222;
  98. margin-left: 20rpx;
  99. }
  100. &-content {
  101. margin-top: 20rpx;
  102. }
  103. &-tips {
  104. margin-left: 15rpx;
  105. font-size: 28rpx;
  106. color: #444444;
  107. }
  108. &-tips1 {
  109. margin-left: 15rpx;
  110. font-size: 24rpx;
  111. color: #444444;
  112. }
  113. }
  114. </style>