index.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <view>
  3. <view class="" v-if="type == 1">
  4. <allAppWorkFlow ref="allAppWorkFlow" :categoryList='categoryList'></allAppWorkFlow>
  5. </view>
  6. <view class="" v-if="type == 2">
  7. <allAppApply ref="allAppApply"></allAppApply>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. import allAppWorkFlow from './allApp_workFlow.vue'
  13. import allAppApply from './allApp_apply.vue'
  14. import {
  15. FlowEngineListAll
  16. } from '@/api/workFlow/flowEngine'
  17. import {
  18. getFlowList,
  19. getDataList,
  20. getUsualList,
  21. addUsual,
  22. delUsual
  23. } from '@/api/apply/apply.js'
  24. export default {
  25. components: {
  26. allAppWorkFlow,
  27. allAppApply
  28. },
  29. data() {
  30. return {
  31. type: '1',
  32. categoryList: []
  33. }
  34. },
  35. onLoad(option) {
  36. this.type = option.type || '1'
  37. uni.setNavigationBarTitle({
  38. title: this.type == '1' ? '收藏流程' : '收藏菜单'
  39. })
  40. this.categoryList = option.categoryList ? JSON.parse(decodeURIComponent(option.categoryList)) : []
  41. this.init()
  42. },
  43. methods: {
  44. init(option) {
  45. this.$nextTick(() => {
  46. if (this.type == 1) {
  47. this.$refs.allAppWorkFlow.init()
  48. } else {
  49. this.$refs.allAppApply.init()
  50. }
  51. })
  52. },
  53. }
  54. }
  55. </script>
  56. <style>
  57. page {
  58. background-color: #f0f2f6;
  59. }
  60. </style>