index.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <!-- 补卡、请假、加班、出差、审批 -->
  3. <view class="approval">
  4. <u-navbar :placeholder="true" :title="title" :autoBack="true">
  5. <template slot="right">
  6. <view
  7. @click="
  8. $u.route('/pages/approval/history/index', {
  9. processType: processType,
  10. })
  11. "
  12. class="dflex acenter"
  13. >
  14. <image
  15. class="nav-right-icon"
  16. src="@/static/images/approval/history.png"
  17. ></image>
  18. </view>
  19. </template>
  20. </u-navbar>
  21. <!-- 表单/流程图 -->
  22. <approvalApply :processType="processType"></approvalApply>
  23. </view>
  24. </template>
  25. <script>
  26. import approvalApply from './approvalApply'; // 补卡申请
  27. export default {
  28. name: 'approval',
  29. components: {
  30. approvalApply,
  31. },
  32. data() {
  33. return {
  34. processType: '', // 0补卡,1加班,2出差,3请假
  35. };
  36. },
  37. computed: {
  38. title() {
  39. const types = {
  40. 0: '补卡审批申请',
  41. 1: '加班审批申请',
  42. 2: '出差审批申请',
  43. 3: '请假审批申请',
  44. };
  45. return types[this.processType];
  46. },
  47. },
  48. onLoad(params) {
  49. const type = params.type;
  50. this.processType = type;
  51. },
  52. methods: {
  53. rightClick() {},
  54. },
  55. };
  56. </script>
  57. <style scoped lang="scss">
  58. .approval {
  59. display: flex;
  60. flex-direction: column;
  61. }
  62. .nav-right-icon {
  63. width: 20px;
  64. height: 20px;
  65. }
  66. </style>