leaves.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <div>
  3. <cu-custom bgColor="bg-gradual-pink" :isBack="true">
  4. <block slot="backText">返回</block>
  5. <block slot="content">我的假期</block>
  6. </cu-custom>
  7. <div class="panlen">
  8. <div class="items">
  9. <div style="height: 2px;"></div>
  10. {{datetime}}年度
  11. </div>
  12. <div style="text-align: center;margin-top: 10px;">
  13. <span style="font-size: 13px;color: #FFFFFF;">年假总天数:</span><span style="margin-left:10px ;font-size: 13px;color: #FFFFFF;">{{yearDay}}天</span>
  14. <span style="margin-left:10px;border-left: 2px solid #ccc;font-size: 13px;"></span>
  15. <span style="margin-left:10px ;font-size: 13px;color: #FFFFFF;">剩余年假天数:</span><span style="margin-left:10px ;font-size: 13px;color: #FFFFFF;">{{availableDay}}天</span>
  16. <span style="margin-left:10px;border-left: 2px solid #ccc;font-size: 13px;"></span>
  17. <span style="margin-left:10px ;font-size: 13px;color: #FFFFFF;">剩余可调休:</span><span style="margin-left:10px ;font-size: 13px;color: #FFFFFF;">{{txcount}}小时</span>
  18. </div>
  19. </div>
  20. <div style="background-color: #FFFFFF;">
  21. <div >
  22. <div style="height: 50px;position: relative;">
  23. <text style="position: absolute;top: 30%;margin-left: 10px;">年假申请记录</text>
  24. <!-- <strong style="position: absolute;top: 30%;font-size: 15px;">年假申请记录</strong> -->
  25. </div>
  26. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;"></div>
  27. <view class="cu-list menu radius" >
  28. <view class="cu-item " v-for="s in data" v-if="s.holidayType=='年假'">
  29. <navigator class="content" hover-class="none" >
  30. <text>年假 ({{s.holidayCount/24}}天)</text>
  31. <div>
  32. <div style="color: #9C9FAA;">
  33. <span >{{s.startDates}}</span>
  34. <span style="margin-left:5px;">至</span>
  35. <span style="margin-left:5px;">{{s.endDates}}</span>
  36. </div>
  37. </div>
  38. <div >
  39. <span style="float: right ;margin-top: -30px;color: #D6D6D6;" v-if='s.state=="2" ||s.state==2'>已通过</span>
  40. <span style="float: right ;color: #F09745;margin-top: -30px;" v-if='s.state=="1" ||s.state==1'>审批中</span>
  41. <span style="float: right ;color: #F09745;margin-top: -30px;" v-if='s.state=="3" ||s.state==3'>已驳回</span>
  42. <span style="float: right ;color: #F09745;margin-top: -30px;" v-if='s.state=="4" ||s.state==4'>已撤销</span>
  43. <span style="float: right ;color: #F09745;margin-top: -30px;" v-if='s.state=="5" ||s.state==5'>通过后撤销</span>
  44. <span style="float: right ;color: #F09745;margin-top: -30px;" v-if='s.state=="6" ||s.state==6'>已删除</span>
  45. </div>
  46. </navigator>
  47. </view>
  48. </view>
  49. </div>
  50. </div>
  51. </div>
  52. </template>
  53. <script>
  54. import api from '@/api/api'
  55. export default {
  56. data() {
  57. return {
  58. userUrl:'/sys/weixin/myVacation',
  59. datetime:null,
  60. yearDay:null,
  61. txcount:null,
  62. availableDay:null,
  63. data:[],
  64. }
  65. },
  66. created() {
  67. var date=new Date();
  68. this.datetime=date.getFullYear();
  69. var id=this.$store.getters.userid;
  70. var deptid=uni.getStorageSync('id');
  71. if(deptid!=null&&deptid!=""){
  72. id=deptid;
  73. }
  74. this.$http.get(this.userUrl,{params:{userid:id}}).then(res=>{
  75. console.log(res);
  76. this.yearDay=res.data.yearCount;
  77. this.availableDay=res.data.syYearCount;
  78. this.txcount=res.data.txCount;
  79. if(""!=res.data.vacationsBody &&res.data.vacationsBody!=null){
  80. this.data=res.data.vacationsBody;
  81. }
  82. }).catch(err => {
  83. console.log(err);
  84. });
  85. },methods:{
  86. ret(){
  87. this.$Router.push({name:'index'})
  88. },
  89. }
  90. }
  91. </script>
  92. <style>
  93. .panlen{
  94. width: 95%;
  95. height: 100px;
  96. border-radius:5px 5px 0 0;
  97. background-color: #3C7AD8;
  98. margin:0 auto;
  99. margin-top: 10px;
  100. }
  101. .items{
  102. width: 70px;
  103. height: 25px;
  104. background-color: #EC770C;
  105. border-radius:5px 0 5px 0;
  106. text-align: center;
  107. color: #FFFFFF;
  108. }
  109. .top{
  110. background-color: #5677AC;
  111. width: 100%;
  112. height: 40px;
  113. }
  114. </style>