LeaveInfo.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="leave">
  3. <view @click="itemClick(item)" v-for="(item,index) in list" :key="index" class="leave-item">
  4. <view class="leave-item-title">
  5. <view class="leave-item-title-left">
  6. {{item.name}}
  7. </view>
  8. <view class="leave-item-title-right">
  9. <view :style="`background-color:${item.color} ;`" class="leave-item-title-right-color">
  10. </view>
  11. <view :style="`color:${item.color} ;`" class="leave-item-title-right-status">
  12. {{item.text}}
  13. </view>
  14. </view>
  15. </view>
  16. <view class="leave-item-content">
  17. {{item.content}}
  18. </view>
  19. <view class="leave-item-date">
  20. 申请日期: {{item.date}}
  21. </view>
  22. <view v-if="item.status == 1 || item.status == 2" class="leave-item-result">
  23. <view class="leave-item-result-title">
  24. <view class="">
  25. 班主任回复
  26. </view>
  27. <view class="">
  28. 审批日期 : {{item.approvalTime}}
  29. </view>
  30. </view>
  31. <view class="leave-item-result-content">
  32. {{item.recover}}
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. name: "LeaveInfo",
  41. props: {
  42. list: {
  43. default: () => [],
  44. type: Array
  45. }
  46. },
  47. data() {
  48. return {
  49. };
  50. },
  51. methods:{
  52. itemClick(item){
  53. this.$emit('itemClick',item)
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .leave {
  60. width: 100%;
  61. font-family: 'PingFang';
  62. .leave-item {
  63. padding: 32rpx;
  64. background-color: #fff;
  65. box-sizing: border-box;
  66. border-radius: 5.33px;
  67. box-shadow: 0px 0px 6.67px 0px rgba(147, 147, 147, 0.10);
  68. margin-bottom: 32rpx;
  69. .leave-item-result {
  70. width: 100%;
  71. padding: 24rpx;
  72. background: #f2f2f2;
  73. border-radius: 5.33px;
  74. box-sizing: border-box;
  75. margin-top: 24rpx;
  76. font-size: 24rpx;
  77. .leave-item-result-title {
  78. display: flex;
  79. justify-content: space-between;
  80. color: #999;
  81. }
  82. }
  83. .leave-item-date {
  84. color: #999;
  85. font-size: 24rpx;
  86. }
  87. .leave-item-content {
  88. padding: 24rpx 0;
  89. }
  90. .leave-item-title {
  91. display: flex;
  92. justify-content: space-between;
  93. padding-bottom: 24rpx;
  94. border-bottom: 1px solid #f2f2f2;
  95. .leave-item-title-left {
  96. font-size: 32rpx;
  97. font-weight: 700;
  98. }
  99. .leave-item-title-right {
  100. display: flex;
  101. align-items: center;
  102. .leave-item-title-right-color {
  103. width: 16rpx;
  104. height: 16rpx;
  105. border-radius: 50%;
  106. margin-right: 24rpx;
  107. }
  108. }
  109. }
  110. }
  111. }
  112. </style>