mx-major-tree-translate-mixin.js 732 B

1234567891011121314151617181920212223242526272829
  1. import cacheMixin from '@/components/Cache/mx-cache-mixin.js'
  2. export default {
  3. mixins: [cacheMixin],
  4. data() {
  5. return {
  6. masterMajorList: [],
  7. specialtyMajorList: [],
  8. masterTreeReady: false,
  9. specialtyTreeReady: false
  10. }
  11. },
  12. beforeMount() {
  13. this.loadMasterMajorTree()
  14. this.loadSpecialtyMajorTree()
  15. },
  16. methods: {
  17. async loadMasterMajorTree() {
  18. this.masterMajorList = await this.getMasterMajorTree()
  19. this.masterTreeReady = true
  20. console.log('master-major-ready')
  21. },
  22. async loadSpecialtyMajorTree() {
  23. this.specialtyMajorList = await this.getSpecialtyMajorTree()
  24. this.specialtyTreeReady = true
  25. console.log('specialty-major-ready')
  26. },
  27. }
  28. }