notice-item.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class="notice-item">
  3. <view class="item-head">
  4. <view class="item-head-msg">
  5. <view class="image-box">
  6. <u-badge type="error" :isDot="true" :show="!item.isRead" :absolute="true" :offset="[-2,-2]"></u-badge>
  7. <image :src="img" mode=""></image>
  8. </view>
  9. <view>{{typeText}}</view>
  10. </view>
  11. <view class="time-box">
  12. {{$u.timeFormat(item.time, 'hh:MM:ss')}}
  13. </view>
  14. </view>
  15. <view class="item-cont">
  16. 您有1条新的拣货任务(单号:{{item.sn}}),请点击查看并及时处理!
  17. </view>
  18. <view class="item-footer">
  19. <view>查看详情</view>
  20. <u-icon name="arrow-right" color="#7E838D"></u-icon>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default{
  26. props:{
  27. item:{
  28. type:Object,
  29. default:()=>{}
  30. }
  31. },
  32. computed:{
  33. img() {
  34. let src = ""
  35. if(this.item.type == 1) {
  36. src = require('@/static/image/home/icon-cgrk.png')
  37. }else if(this.item.type == 2) {
  38. src = require('@/static/image/home/icon-chcx.png')
  39. }
  40. return src
  41. },
  42. typeText() {
  43. let text = ""
  44. if(this.item.type == 1) {
  45. text = '采购入库'
  46. }else if(this.item.type == 2) {
  47. text = '存货查询'
  48. }
  49. return text
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss" scoped>
  55. .notice-item {
  56. border-radius: 16px;
  57. background: #FFF;
  58. padding: 24rpx 24rpx 0;
  59. margin-bottom: 24rpx;
  60. .item-head {
  61. display: flex;
  62. align-items: center;
  63. justify-content: space-between;
  64. &-msg {
  65. display: flex;
  66. align-items: center;
  67. color: #333;
  68. font-family: "PingFang SC";
  69. font-size: 32rpx;
  70. font-weight: bold;
  71. .image-box {
  72. position: relative;
  73. margin-right: 24rpx;
  74. image {
  75. width: 48rpx;
  76. height: 48rpx;
  77. z-index: 2;
  78. }
  79. ::v-deep .u-badge {
  80. z-index: 3;
  81. }
  82. }
  83. }
  84. }
  85. .item-cont {
  86. color: #666;
  87. font-family: "PingFang SC";
  88. font-size: 28rpx;
  89. font-weight: 400;
  90. padding: 17rpx 0 24rpx;
  91. border-bottom: 1px solid #F4F4F4;
  92. }
  93. .item-footer {
  94. height: 88rpx;
  95. display: flex;
  96. align-items: center;
  97. justify-content: space-between;
  98. color: #333;
  99. font-family: "PingFang SC";
  100. font-size: 28rpx;
  101. font-weight: 400;
  102. }
  103. }
  104. </style>