condition-dispatch-class.js 701 B

12345678910111213141516171819202122232425262728
  1. import conditionObjectBase from '../condition-object-base.js'
  2. import { getClass } from '@/api/webApi/elective/dispatch.js'
  3. export default {
  4. ...conditionObjectBase,
  5. dependentKeys: ['localGroupId'],
  6. key: 'dispatchClassId',
  7. title: '新班级',
  8. isDependencyReady(params) {
  9. return params.localGroupId
  10. },
  11. getList: function(param, $vue) {
  12. return new Promise((resolve, reject) => {
  13. getClass({
  14. groupId: param.localGroupId,
  15. roundId: $vue.model.dispatchRoundId
  16. }).then(res => {
  17. resolve(res.data)
  18. })
  19. .catch(e => reject(e))
  20. })
  21. },
  22. getCode: function(item) {
  23. return item.id
  24. },
  25. getLabel: function(item) {
  26. return item.name
  27. }
  28. }