condition-dispatch-class.js 666 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: ['groupId'],
  6. key: 'class',
  7. title: '班级',
  8. isDependencyReady(params) {
  9. return params.groupId
  10. },
  11. getList: function(param) {
  12. return new Promise((resolve, reject) => {
  13. getClass({
  14. groupId: 10
  15. }).then(res => {
  16. console.log('111111111111',res.data)
  17. resolve(res.data)
  18. })
  19. .catch(e => reject(e))
  20. })
  21. },
  22. getCode: function(item) {
  23. return item.classId
  24. },
  25. getLabel: function(item) {
  26. return item.className
  27. }
  28. }