the_leave_record.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <view>
  3. <view class='wrap' v-for="(item, index) in tableData" :key="index">
  4. <view class="wenzi audit1" v-if="item.status == '待审核'">审核中</view>
  5. <view class="wenzi audit2" v-if="item.status == '已通过'">已通过</view>
  6. <view class="wenzi audit3" v-if="item.status == '未通过'" >未通过</view>
  7. <view class="c-row">
  8. <view class="title">请假类型 : {{item.leaveType}}</view>
  9. </view>
  10. <view class="c-row">
  11. <view class="title">请假事由 : {{item.reasonForLeave}}</view>
  12. </view>
  13. <view class="c-row">
  14. <view class="title">开始时间 : {{item.startDate}}</view>
  15. </view>
  16. <view class="c-row">
  17. <view class="title">结束时间 : {{item.endDate}}</view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. pageSize: 10,
  27. currentPage: 1,
  28. tableData: [],
  29. }
  30. },
  31. onShow() {
  32. this.getList()
  33. },
  34. methods: {
  35. getList() {
  36. this.$api.doRequest('get', '/leaveInfo/selectLeaveInfo', {
  37. pageSize: this.pageSize,
  38. currentPage: this.currentPage,
  39. pcFlag: 0,
  40. compId: uni.getStorageSync('pcUserInfo').compId,
  41. commonId: uni.getStorageSync('pcUserInfo').userId,
  42. }).then(res => {
  43. if (res.data.code == 200) {
  44. this.tableData = res.data.data.records
  45. }
  46. })
  47. },
  48. }
  49. }
  50. </script>
  51. <style lang='scss' scoped>
  52. page {
  53. background: #F5F6FA;
  54. }
  55. .wrap {
  56. padding-top: 15px;
  57. padding-bottom: 20px;
  58. font-size: 14px;
  59. background: #fff;
  60. margin: 10px;
  61. border-radius: 10px;
  62. input {
  63. font-size: 14px;
  64. }
  65. >.title {
  66. padding: 10px 16px;
  67. }
  68. }
  69. .wenzi {
  70. text-align: right;
  71. border-radius: 10rpx;
  72. margin-right: 30rpx;
  73. height: 10rpx;
  74. }
  75. .audit1{
  76. color: red;
  77. }
  78. .audit2{
  79. color: #afafe6;
  80. }
  81. .audit3{
  82. color: red;
  83. }
  84. .c-row {
  85. display: -webkit-box;
  86. display: -webkit-flex;
  87. display: flex;
  88. -webkit-box-align: center;
  89. -webkit-align-items: center;
  90. align-items: center;
  91. padding: 5rpx 30rpx;
  92. position: relative;
  93. }
  94. </style>