index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <view class="h100vh page-bg-color">
  3. <!-- <u-navbar :customBack="handleBackHome" :title="typeLabel[currentType]"></u-navbar> -->
  4. <view class="workflow-page" :style="{height: `calc(100vh - ${diStatusBarHeight}px - 48px)`}">
  5. <view class="workflow-main">
  6. <start-workflow v-if="currentType === 'start'"></start-workflow>
  7. <approve-center v-else :type='currentType'></approve-center>
  8. </view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import startWorkflow from './startWorkflow/startWorkflow'
  14. import approveCenter from './approveCenter/index'
  15. export default {
  16. data() {
  17. return {
  18. currentType: 'start',
  19. typeLabel: {
  20. start: '发起申请',
  21. myLaunch: '我发起的',
  22. todo: '我的待办',
  23. done: '我的已办',
  24. },
  25. diStatusBarHeight: 0
  26. };
  27. },
  28. onLoad(options) {
  29. this.diStatusBarHeight = uni.getSystemInfoSync().statusBarHeight
  30. this.currentType = options.type
  31. console.log('类型',options.type)
  32. },
  33. components: {
  34. startWorkflow,
  35. approveCenter
  36. },
  37. methods: {
  38. handleBackHome() {
  39. console.log('000000')
  40. uni.switchTab({
  41. url: '/pages/home/home'
  42. })
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss">
  48. .h100vh {
  49. height: 100vh;
  50. }
  51. .workflow-page {
  52. .workflow-main {
  53. height: 100%;
  54. overflow: hidden;
  55. }
  56. }
  57. </style>