elective-enroll-analysis.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <div>
  3. <enroll-report :generation="generation" :optional-majors="optionalMajors"
  4. :dispatch-info="dispatchInfo"></enroll-report>
  5. <div v-if="dispatchInfo&&dispatchInfo.eSignImage" class="mt40 mb40 ml40 f24">
  6. <div class="fx-row bold fx-sta-cen">
  7. <span style="white-space: nowrap;">签名:</span>
  8. <el-image :src="dispatchInfo.eSignImage" fit="contain" style="height: 36px; width: 120px;"></el-image>
  9. </div>
  10. <div class="fx-row bold fx-sta-cen mt10">
  11. <span>报告日期:</span>
  12. <span>{{ dispatchInfo.activeDate }}</span>
  13. </div>
  14. </div>
  15. </div>
  16. </template>
  17. <script>
  18. import EnrollReport from '@/views/career/bigdataSelectCourse/enrollReport'
  19. import { classesResult } from '@/api/webApi/elective/dispatch'
  20. export default {
  21. name: 'elective-enroll-analysis',
  22. inject: ['getGeneration', 'getOptionalMajors'],
  23. components: { EnrollReport },
  24. data() {
  25. return {
  26. dispatchInfo: {}
  27. }
  28. },
  29. computed: {
  30. generation() {
  31. return this.getGeneration() || {}
  32. },
  33. optionalMajors() {
  34. return this.getOptionalMajors() || []
  35. }
  36. },
  37. watch: {
  38. 'generation': function(newVal) {
  39. if (newVal?.status?.roundId) this.loadDispatchInfo()
  40. }
  41. },
  42. methods: {
  43. loadDispatchInfo() {
  44. const { year, roundId } = this.generation.status
  45. classesResult({ year, roundId }).then(res => this.dispatchInfo = res.rows.first() || {})
  46. }
  47. }
  48. }
  49. </script>
  50. <style scoped>
  51. </style>