Explorar el Código

mx-condition re-init from voluntary-ui

hare8999@163.com hace 1 año
padre
commit
751373dd12
Se han modificado 76 ficheros con 1358 adiciones y 506 borrados
  1. 95 0
      src/api/webApi/prev-batch.js
  2. 329 0
      src/common/MxConfig.js
  3. 201 0
      src/common/MxConst.js
  4. 12 12
      src/components/MxCondition/condition-mixins-data.js
  5. 73 73
      src/components/MxCondition/condition-mixins-view.js
  6. 4 4
      src/components/MxCondition/condition-object/condition-chapter-level-1.js
  7. 7 7
      src/components/MxCondition/condition-object/condition-chapter-level-2.js
  8. 1 3
      src/components/MxCondition/condition-object/condition-chapter-tree.js
  9. 20 20
      src/components/MxCondition/condition-object/condition-chat-classes.js
  10. 6 6
      src/components/MxCondition/condition-object/condition-chat-grade.js
  11. 3 3
      src/components/MxCondition/condition-object/condition-class-grade.js
  12. 2 2
      src/components/MxCondition/condition-object/condition-class-tree.js
  13. 32 32
      src/components/MxCondition/condition-object/condition-date-range.js
  14. 2 1
      src/components/MxCondition/condition-object/condition-dispatch-class.js
  15. 3 2
      src/components/MxCondition/condition-object/condition-dispatch-gender.js
  16. 1 1
      src/components/MxCondition/condition-object/condition-exe-branch.js
  17. 3 5
      src/components/MxCondition/condition-object/condition-exe-grade.js
  18. 3 5
      src/components/MxCondition/condition-object/condition-exe-order.js
  19. 0 1
      src/components/MxCondition/condition-object/condition-exe-qType-chapter.js
  20. 1 3
      src/components/MxCondition/condition-object/condition-exe-subject.js
  21. 2 1
      src/components/MxCondition/condition-object/condition-fav-quetype.js
  22. 2 1
      src/components/MxCondition/condition-object/condition-fav-subject.js
  23. 1 1
      src/components/MxCondition/condition-object/condition-homework-type.js
  24. 1 1
      src/components/MxCondition/condition-object/condition-local-favCollectType.js
  25. 1 1
      src/components/MxCondition/condition-object/condition-location.js
  26. 5 8
      src/components/MxCondition/condition-object/condition-paper-area.js
  27. 3 6
      src/components/MxCondition/condition-object/condition-paper-grade.js
  28. 2 5
      src/components/MxCondition/condition-object/condition-paper-subject.js
  29. 3 6
      src/components/MxCondition/condition-object/condition-paper-type.js
  30. 2 5
      src/components/MxCondition/condition-object/condition-paper-year.js
  31. 20 0
      src/components/MxCondition/condition-object/condition-pre-category.js
  32. 19 0
      src/components/MxCondition/condition-object/condition-pre-enroll-course0.js
  33. 19 0
      src/components/MxCondition/condition-object/condition-pre-enroll-course1.js
  34. 19 0
      src/components/MxCondition/condition-object/condition-pre-enroll-subTag.js
  35. 19 0
      src/components/MxCondition/condition-object/condition-pre-enroll-tag.js
  36. 15 0
      src/components/MxCondition/condition-object/condition-pre-enroll-year.js
  37. 28 0
      src/components/MxCondition/condition-object/condition-pre-plan-tag.js
  38. 20 0
      src/components/MxCondition/condition-object/condition-pre-plan-type.js
  39. 16 0
      src/components/MxCondition/condition-object/condition-pre-plan-year.js
  40. 13 13
      src/components/MxCondition/condition-object/condition-publish.js
  41. 1 1
      src/components/MxCondition/condition-object/condition-release-generation.js
  42. 1 1
      src/components/MxCondition/condition-object/condition-release-query-code.js
  43. 13 13
      src/components/MxCondition/condition-object/condition-role-type.js
  44. 1 3
      src/components/MxCondition/condition-object/condition-round.js
  45. 1 3
      src/components/MxCondition/condition-object/condition-senior-grade.js
  46. 1 3
      src/components/MxCondition/condition-object/condition-shiftline-level.js
  47. 1 3
      src/components/MxCondition/condition-object/condition-shiftline-location.js
  48. 1 3
      src/components/MxCondition/condition-object/condition-shiftline-type.js
  49. 1 3
      src/components/MxCondition/condition-object/condition-shiftline-year.js
  50. 6 6
      src/components/MxCondition/condition-object/condition-student-grade.js
  51. 1 3
      src/components/MxCondition/condition-object/condition-student-round.js
  52. 1 3
      src/components/MxCondition/condition-object/condition-students.js
  53. 2 4
      src/components/MxCondition/condition-object/condition-subject-by-subjects.js
  54. 4 4
      src/components/MxCondition/condition-object/condition-subject-list.js
  55. 7 7
      src/components/MxCondition/condition-object/condition-subjects.js
  56. 18 18
      src/components/MxCondition/condition-object/condition-term.js
  57. 5 5
      src/components/MxCondition/condition-object/condition-user-subject.js
  58. 2 4
      src/components/MxCondition/condition-object/condition-v2-subject.js
  59. 32 0
      src/components/MxCondition/condition-object/condition-video-course.js
  60. 7 8
      src/components/MxCondition/condition-object/condition-video-grade.js
  61. 11 12
      src/components/MxCondition/condition-object/condition-video-pack.js
  62. 5 5
      src/components/MxCondition/condition-object/condition-video-subject-fixed.js
  63. 3 4
      src/components/MxCondition/condition-object/condition-video-type.js
  64. 14 14
      src/components/MxCondition/condition-object/condition-video-version.js
  65. 2 3
      src/components/MxCondition/condition-object/condition-wrong-subject.js
  66. 4 4
      src/components/MxCondition/condition-object/condition-wrong-type.js
  67. 1 1
      src/components/MxCondition/condition-object/condition-year-admission.js
  68. 2 1
      src/components/MxCondition/condition-object/condition-yfyd-location.js
  69. 5 3
      src/components/MxCondition/condition-object/condition-yfyd-mode.js
  70. 4 2
      src/components/MxCondition/condition-object/condition-yfyd-year.js
  71. 3 3
      src/components/MxCondition/condition-templete/mx-condition-button-group.vue
  72. 44 40
      src/components/MxCondition/condition-templete/mx-condition-checkbox-group.vue
  73. 46 46
      src/components/MxCondition/condition-templete/mx-condition-date-range.vue
  74. 26 0
      src/components/MxCondition/condition-templete/mx-condition-select.vue
  75. 50 17
      src/components/MxCondition/mx-condition.vue
  76. 24 28
      src/views/career/zhiyuan/yfyd.vue

+ 95 - 0
src/api/webApi/prev-batch.js

@@ -0,0 +1,95 @@
+import request from '@/utils/request'
+
+// 提前批招生计划
+export function getPreRecruitPlan(params) {
+  return request({
+    url: '/front/syzy/pre/getPreRecruitPlan',
+    method: 'get',
+    params: params
+  })
+}
+
+export function getPreRecruitPlanV2(params) {
+  return request({
+    url: '/front/syzy/pre/getPreRecruitPlanV2',
+    method: 'get',
+    params: params
+  })
+}
+
+/**
+ * 招生计划 年份
+ * @param params
+ */
+export function getPreRecruitPlanYears(params) {
+  return request({
+    url: `/front/syzy/pre/years`,
+    method: 'get',
+    params
+  })
+}
+
+/**
+ * 招生计划 科类
+ * @param params
+ */
+export function getPreRecruitPlanTypes(params) {
+  return request({
+    url: `/front/syzy/pre/types`,
+    method: 'get',
+    params
+  })
+}
+
+export function getPreTree(params) {
+  return request({
+    url: '/front/syzy/pre/getPreTree',
+    method: 'get',
+    params
+  })
+}
+
+// return data.rows
+export function getPreEnrollYears(params) {
+  return request({
+    url: `/front/syzy/pre/enroll/years`,
+    method: 'get',
+    params
+  })
+}
+
+// params: { category, tag }
+// return data.rows
+export function getPreEnrollTags(params) {
+  return request({
+    url: `/front/syzy/pre/enroll/getTag`,
+    method: 'get',
+    params
+  })
+}
+
+// params: { category, course0 }
+// return data.rows
+export function getPreEnrollCourses(params) {
+  return request({
+    url: `/front/syzy/pre/enroll/getCourse1`,
+    method: 'get',
+    params
+  })
+}
+
+export function getPreEnroll(params) {
+  return request({
+    url: `/front/syzy/pre/enroll/getPreEnroll`,
+    method: 'get',
+    params
+  })
+}
+
+export function getPreEnrollV2(params) {
+  return request({
+    url: `/front/syzy/pre/enroll/getPreEnrollV2`,
+    method: 'get',
+    params
+  })
+}

+ 329 - 0
src/common/MxConfig.js

@@ -0,0 +1,329 @@
+import CssVar from '@/assets/styles/variables.scss'
+
+export default {
+  enableElective: false,
+  avatar_default: '',
+  color: {
+    primary: CssVar['theme'],
+    primary_up: '#51C9A7',
+    primary_down: '#D2F1E8',
+    primary_report: '#2EC7C9',
+    success: '#13ce66',
+    warning: '#ffba00',
+    yellow_up: '#F5AB86',
+    yellow_down: '#FDEAE1',
+    yellow_report: '#FFA400',
+    blue_up: '#608EDF',
+    blue_down: '#DBE8FF',
+    audit_bg: {
+      login: '#D8FFF4',
+      video: '#FFECDE',
+      test: '#DBE8FF',
+      clazz: '#D9FFEE'
+    },
+    error: '#EB5454'
+  },
+  form: {
+    sexOptions: [{
+      text: '男',
+      value: '0'
+    }, {
+      text: '女',
+      value: '1'
+    }],
+    yesOrNoOptions: [{
+      text: '是',
+      value: 1
+    }, {
+      text: '否',
+      value: 0
+    }]
+  },
+  objectiveQuestionTypeIds: [1, 3],
+  roundSettingStep: {
+    score: {
+      key: 'step_0',
+      icon: 'el-icon-upload2',
+      title: '选科成绩',
+      description: '导入成绩作为选科依据(可选)'
+    },
+    scoreWeight: {
+      key: 'step_1',
+      icon: 'el-icon-set-up',
+      title: '成绩权重',
+      description: '多次成绩的加权平均值'
+    },
+    group: {
+      key: 'step_2',
+      icon: 'el-icon-menu',
+      title: '组合设置',
+      description: '选择开放的选科组合'
+    },
+    groupLimit: {
+      key: 'step_3',
+      icon: 'el-icon-s-operation',
+      title: '设置详情',
+      description: '针对选科组合进行决策设置'
+    }
+  },
+  roundSelectTestEntryOptions: {
+    philosophy: {
+      title: '人生价值观探索',
+      description: '价值观是指一个人对各类事物的意义和重要性的评价与看法,是一套判断事物是否有价值的观念体系,是指导我们选择与行动的内在指南。它指引着我们的生活。不同价值观的人会在不同的职业和专业领域实现自己的价值。下面的探索活动将帮助你了解自己在生命中所看的东西,指引你去探索属于自己专业的未来。'
+    },
+    occupation: {
+      title: '职业兴趣探索',
+      description: '与学业和职业相关的兴趣,隐藏在生活的方方面面。探索兴趣的方法非常多样,通常人们通过思考自己在学习、生活中的表现或者对某些职业、活动的感受来确定自己的兴趣。职业研究者根据兴趣与职业世界、学业世界的关联把人的兴趣分为六种类型。下面让我们一起来看看你的兴趣代码及与之相关的专业和学科。'
+    },
+    knowledge: {
+      title: '知识兴趣探索',
+      description: '知识兴趣是我们对某类知识的喜欢程度,通过知识兴趣的探索,你将会对自己喜欢在哪个领域进行学习有所洞察,它们很可能就是你未来渴望学习的专业。'
+    }
+  },
+  electiveGenerationOptions: {
+    init: {
+      key: 'init',
+      value: 0,
+      code: 'Init',
+      decisionMaking: false,
+      stepsVisible: false,
+      title: '未开启',
+      description: '',
+      icon: ''
+    },
+    primary: {
+      key: 'primary',
+      value: 1,
+      code: 'Primary',
+      decisionMaking: false,
+      stepsVisible: true,
+      title: '初录报名',
+      enrollName: '初录录取',
+      description: '',
+      icon: ''
+    },
+    primaryDM: {
+      key: 'primaryDM',
+      value: 2,
+      code: 'PrimaryDM',
+      decisionMaking: true,
+      stepsVisible: true,
+      title: '初录结果',
+      enrollName: '初录录取',
+      description: '',
+      icon: ''
+    },
+    backTracking: {
+      key: 'backTracking',
+      value: 3,
+      code: 'BackTracking',
+      decisionMaking: false,
+      stepsVisible: true,
+      title: '补录报名',
+      enrollName: '补录录取',
+      description: '',
+      icon: ''
+    },
+    backTrackingDM: {
+      key: 'backTrackingDM',
+      value: 4,
+      code: 'BackTrackingDM',
+      decisionMaking: true,
+      stepsVisible: true,
+      title: '补录结果',
+      enrollName: '补录录取',
+      description: '',
+      icon: ''
+    },
+    finalAdjust: {
+      key: 'finalAdjust',
+      value: 5,
+      code: 'FinalAdjust',
+      decisionMaking: false,
+      stepsVisible: true,
+      title: '二次补录报名',
+      enrollName: '二次补录录取',
+      description: '',
+      icon: ''
+    },
+    finalAdjustDM: {
+      key: 'finalAdjustDM',
+      value: 6,
+      code: 'FinalAdjustDM',
+      decisionMaking: true,
+      stepsVisible: true,
+      title: '二次补录结果',
+      enrollName: '二次补录录取',
+      description: '',
+      icon: ''
+    },
+    forceAdjust: {
+      key: 'forceAdjust',
+      value: 7,
+      code: 'ForceAdjust',
+      decisionMaking: true,
+      stepsVisible: true,
+      title: '调剂结果',
+      enrollName: '调剂录取',
+      description: '',
+      icon: ''
+    },
+    rankBalance: {
+      key: 'rankBalance',
+      value: 8,
+      code: 'RankBalance',
+      decisionMaking: true,
+      stepsVisible: false,
+      title: '排名均衡',
+      description: '',
+      icon: ''
+    },
+    terminate: {
+      key: 'terminate',
+      value: 9,
+      code: 'Terminate',
+      decisionMaking: true,
+      stepsVisible: false,
+      title: '选科结束',
+      description: '',
+      icon: ''
+    }
+  },
+  electiveDMAlgorithm: {
+    rankFirst: {
+      key: 'rankFirst',
+      value: 'RankFirst',
+      title: '按成绩'
+    },
+    majorFirst: {
+      key: 'majorFirst',
+      value: 'MajorFirst',
+      title: '按专业'
+    }
+  },
+  studentReleaseQueryCodes: [
+    { id: 'acceptCount', name: '已录取', isEnroll: true },
+    { id: 'unfinishedCount', name: '未录取', isEnroll: false }
+  ],
+  majorDetailOptions: {
+    ben: [
+      {
+        prop: 'introduction',
+        title: '专业介绍'
+      }, {
+        prop: 'eduObjective',
+        title: '培养目标'
+      }, {
+        prop: 'eduRequirement',
+        title: '培养要求'
+      }, {
+        prop: 'subjectRequirement',
+        title: '学科要求'
+      }, {
+        prop: 'loreAndAbility',
+        title: '知识能力'
+      }, {
+        prop: 'studyDirection',
+        title: '考研方向'
+      }, {
+        prop: 'mainCourse',
+        title: '主要课程'
+      }, {
+        prop: 'famousScholar',
+        title: '社会名人'
+      }],
+    zhuan: [
+      {
+        prop: 'eduObjective',
+        title: '培养目标'
+      }, {
+        prop: 'internshipDesc',
+        title: '实习实训'
+      }, {
+        prop: 'jobDirection',
+        title: '职业资格证书举例'
+      }, {
+        prop: 'loreAndAbility',
+        title: '知识能力'
+      }, {
+        prop: 'zhuanToBenOrient',
+        title: '专升本方向'
+      }, {
+        prop: 'mainCourse',
+        title: '主要课程'
+      }
+    ]
+  },
+  recommendSortList: [{
+    name: '录取概率从低到高',
+    short: '录取率',
+    icon: 'el-icon-bottom',
+    compare: (a, b) => {
+      const aRatio = a.enrollRatio * 1
+      const bRatio = b.enrollRatio * 1
+      return aRatio - bRatio
+    }
+  }, {
+    name: '录取概率从高到低',
+    short: '录取率',
+    icon: 'el-icon-top',
+    compare: (a, b) => {
+      const aRatio = a.enrollRatio * 1
+      const bRatio = b.enrollRatio * 1
+      return bRatio - aRatio
+    }
+  }, {
+    name: '最低位次从低到高',
+    short: '位次',
+    icon: 'el-icon-bottom',
+    compare: (a, b) => {
+      const aSeat = a.history?.seat || 9999
+      const bSeat = b.history?.seat || 9999
+      return bSeat - aSeat // 数字越小位次越高
+    }
+  }, {
+    name: '最低位次从高到低',
+    short: '位次',
+    icon: 'el-icon-top',
+    compare: (a, b) => {
+      const aSeat = a.history?.seat || -1
+      const bSeat = b.history?.seat || -1
+      return aSeat - bSeat
+    }
+  }, {
+    name: '院校排名从低到高',
+    short: '院校排名',
+    icon: 'el-icon-bottom',
+    compare: (a, b) => {
+      const aRank = a.university.ranking * 1
+      const bRank = b.university.ranking * 1
+      return bRank - aRank // 数字越小排名越高
+    }
+  }, {
+    name: '院校排名从高到低',
+    short: '院校排名',
+    icon: 'el-icon-top',
+    compare: (a, b) => {
+      const aRank = a.university.ranking * 1
+      const bRank = b.university.ranking * 1
+      return aRank - bRank
+    }
+  }],
+  recommendSortResetCompare: (a, b, restoreSort) => {
+    let aIdx = restoreSort.findIndex(id => id == a.recruitPlan.collegeCode)
+    let bIdx = restoreSort.findIndex(id => id == b.recruitPlan.collegeCode)
+    if (aIdx === -1) aIdx = 9999
+    if (bIdx === -1) bIdx = 9999
+    return aIdx - bIdx
+  },
+  recommendMajorSortResetCompare: (a, b, restoreSort) => {
+    let aIdx = restoreSort.findIndex(id => id == a.marjorBelongs)
+    let bIdx = restoreSort.findIndex(id => id == b.marjorBelongs)
+    if (aIdx === -1) aIdx = 9999
+    if (bIdx === -1) bIdx = 9999
+    return aIdx - bIdx
+  },
+  scoreLockingTips: '现在是志愿填报正式阶段,请准确填入您的高考分数和科目,确认后不可再修改',
+  scoreLockedTips: '*志愿填报正式阶段不能修改分数与科目',
+  scoreRuleTips: '*出分前分数与科目可以多次输入,出分后只能输入一次,系统使用视频可以在个人中心的使用教程查看'
+}

+ 201 - 0
src/common/MxConst.js

@@ -0,0 +1,201 @@
+export default {
+  currentYear: 2022,
+  mobilePattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+  keys: {
+    sysToken: 'Admin-Token',
+    token: 'Admin-Token',
+    menuTab: 'Menu-Tab',
+    menuList: 'Menu-List',
+    menuListAction: 'Menu-List-Action',
+    activeMenu: 'Active-Menu',
+    userInfo: 'User-Info',
+    keyPaperShortcutNotified: 'keyPaperShortcutNotified',
+    keyCachePrefix: 'mx-cache-',
+    electiveGlobalChangeEvent: 'electiveGlobalChangeEvent',
+    keyGenerationCartChanged: 'keyGenerationCartChanged',
+    keyVoluntaryDetail: 'usingVoluntaryDetailCache',
+    keyVoluntaryEdit: 'usingVoluntaryEditCache'
+  },
+  enum: {
+    scoreLock: {
+      // 待锁定状态
+      locking: -1,
+      // 正常状态
+      unlock: 0,
+      // 已锁定状态
+      locked: 1
+    },
+    paper: {
+      boardMode: {
+        text: 'text',
+        image: 'image'
+      },
+      parseMode: {
+        parse: 'parse',
+        score: 'score'
+      },
+      examineeType: {
+        evaluation: 1, // 测评中心
+        competition: 2, // 学乐园 - 竞赛
+        ai: 3, // 数据中心 - AI匹配试题
+        elective: 4 // 选科测评
+      }
+    },
+    formType: {
+      addClassMaster: 'AddClassMaster',
+      updateClassMaster: 'UpdateClassMaster',
+      delClassMaster: 'DelClassMaster',
+      addClass: 'AddClass',
+      updateClass: 'UpdateClass',
+      delClass: 'DelClass'
+    },
+    formStatus: {
+      init: 0,
+      approved: 1,
+      rejected: 2,
+      canceled: 3
+    },
+    formAudit: {
+      system: 'System',
+      headMaster: 'HeadMaster',
+      auto: 'Auto'
+    },
+    uploadType: {
+      default: 0,
+      personalResource: 1,
+      cloudResource: 2,
+      schoolResource: 3,
+      appVideo: 4,
+      microFile: 5,
+      answerResource: 6,
+      questionsPicture: 7,
+      codeResourcePic: 8,
+      avatar: 9,
+      competition: 10,
+      customPaper: 11
+    },
+    scoreImportType: {
+      manual: 1, // 手工导入
+      outerSystem: 2, // 外部系统:阅卷系统
+      innerSystem: 3 // 内部系统:测评中心
+    },
+    selectTestType: {
+      // / 选科测评类型
+      philosophy: 1, // 人生价值观
+      occupation: 2, // 职业兴趣
+      knowledge: 3 // 知识兴趣
+    },
+    mentalHealthTestType: 4, // 心理健康测评
+    electivePermission: {
+      applyCount: 'elective:student:apply:applyCount', // 初录选科人数比 elective:student:apply:scoreByGroup
+      scoreByGroup: 'elective:student:apply:scoreByGroup', // 组合成绩
+      rankInGroup: 'elective:student:apply:rankInGroup', // 当前组合实时排名
+      rankInGrade: 'elective:student:apply:rankInGrade' // 当前组合全校排名
+    },
+    gkSelectType: {
+      towFormFour: 1, // 3+1+2
+      threeFormSix: 2 // 6选3
+    },
+    electiveMajorMatchType: {
+      optional: {
+        value: 1,
+        title: '自选专业'
+      },
+      electiveTest: {
+        value: 2,
+        title: '测评专业'
+      }
+    },
+    librarySource: {
+      question: 1,
+      video: 2,
+      courseware: 3,
+      custom: 4,
+      task: 5, // 班级任务
+      microclass: 6 // 名学微课宝
+    },
+    generateScene: {
+      // 组卷场景区分
+      none: { value: 0, key: 'none' },
+      normal: { value: 1, key: 'normal' },
+      paperWork: { value: 2, key: 'paperWork' }
+    },
+    questionBranches: {
+      chapter: {
+        label: '按章节选题',
+        value: 'chapter'
+      },
+      knowledge: {
+        label: '按知识点选题',
+        value: 'knowledge'
+      }
+    },
+    electiveReportType: {
+      student: 1,
+      teacher: 2,
+      master: 3
+    },
+    // / 1:在线作业,2:视频作业,3:试卷作业,4:文字作业
+    homeworkTypes: [{
+      label: '在线作业',
+      value: 1,
+      usePaper: true,
+      visible: true
+    }, {
+      label: '视频作业',
+      value: 2,
+      useVideo: true,
+      visible: true
+    }, {
+      label: '试卷作业',
+      value: 3,
+      usePaper: true,
+      visible: true
+    }, {
+      label: '文字作业',
+      value: 4,
+      visible: false
+    }],
+    aliIdType: {
+      AliIdResourcePerson: 5 // 个人资源库收藏
+    },
+    recruitPlanCategory: {
+      // 现在支持1.2.3
+      visibleKeys: ['common', 'art', 'sports'],
+      // 招生计划类型
+      common: 1, // 普通招生
+      art: 2, // 艺术招生
+      sports: 3, // 体育招生
+      vhs: 4, // 职高对口
+      names: {
+        1: '提前批',
+        2: '艺术类',
+        3: '体育类',
+        4: '职高对口'
+      }
+    }
+  },
+  recommendOptions: {
+    sinoforeign: [
+      { label: '不限', value: '' },
+      { label: '仅看中外', value: true },
+      { label: '不看中外', value: false }
+    ],
+    collect: [
+      { label: '不限', value: '' },
+      { label: '仅看征集', value: true },
+      { label: '不看征集', value: false }
+    ],
+    specialProjectNation: [
+      { label: '不限', value: '' },
+      { label: '仅看国家专项', value: true },
+      { label: '不看国家专项', value: false }
+    ],
+    specialProjectLocal: [
+      { label: '不限', value: '' },
+      { label: '仅看地方专项', value: true },
+      { label: '不看地方专项', value: false }
+    ]
+  },
+  recommendMajorSortFn: (a, b) => a.localPriority - b.localPriority
+}

+ 12 - 12
src/components/MxCondition/condition-mixins-data.js

@@ -72,7 +72,7 @@ export default {
       // 注意 _开头的变量会被VUE忽略掉?! 比如this._modelSnapshot -> undefined
       // TODO: _dependencyTree 其实不需要每次都全量组建,有优化空间
       _modelSnapshot: null, // {} model传入时的快照,用于重置功能
-      _modelKeys: null, //[] 读取model属性名,对应imports中的condition-key,仅保留参与条件运算的key,允许model挂载一些其它属性
+      _modelKeys: null, // [] 读取model属性名,对应imports中的condition-key,仅保留参与条件运算的key,允许model挂载一些其它属性
       _dependencyTree: null, // {key1:[childKeys],key2:[childKeys]} // 因为条件影响向下传递,只需要两级,递归算法会读取所有依赖
       _restoreProcessing: false // 正处于还原过程
     }
@@ -191,11 +191,11 @@ export default {
       return this._modelKeys?.some(k => this.model[k])
     },
     getConditionLabel(key, code) {
-      let condition = this.conditionsOutput.find(c => c.key == key)
+      const condition = this.conditionsOutput.find(c => c.key == key)
       return condition?.list.find(i => i.code == code)?.label
     },
     isRequired(key) {
-      return this.finalRules.hasOwnProperty(key)
+      return Object.hasOwnProperty.call(this.finalRules, key)
     },
     // 公共API 重写部分 供独立模式挂载主体重写
     singleChangedAction(model, key) {
@@ -236,11 +236,11 @@ export default {
       this._rebuildAllConditions().then(() => this._triggerEventIfNeed())
     },
     _readEffectiveModelKeys(model) {
-      let allKeys = Object.keys(model)
+      const allKeys = Object.keys(model)
       if (!allKeys.length) return allKeys
       if (!this.ignoreUnmatched) return allKeys
 
-      let unmatched = []
+      const unmatched = []
       allKeys.forEach(key => {
         if (!this.imports.some(i => i.key == key)) {
           unmatched.push(key)
@@ -288,7 +288,7 @@ export default {
         console.log(`发现依赖缺省,请检查model.${key}是否存在:`, key, dependencyCheckLink, fromKey)
         return false
       }
-      let selfChildren = this._dependencyTree[key] || []
+      const selfChildren = this._dependencyTree[key] || []
       if (fromKey && !selfChildren.includes(fromKey)) selfChildren.push(fromKey)
       this._dependencyTree[key] = selfChildren
       const matchCondition = this.imports.find(c => c.key == key)
@@ -341,7 +341,7 @@ export default {
       // 处理显示对象
       /* TODO:  现在还不确定一个条件同时依赖多个条件的情况是否能正常工作,
                 理论上一个依赖多个可以强制转换成单依赖,因为交互时用户也无法同时点两个条件 */
-      let displayList = list.map(item => ({
+      const displayList = list.map(item => ({
         code: condition.getCode(item),
         label: condition.getLabel(item),
         _raw: item // 原数据引用提供一份
@@ -353,7 +353,7 @@ export default {
       }
       // 校验当前值还是否有效
       const currentVal = this.model[condition.key]
-      let displayValue = condition.transferToEffectiveDisplayValue(currentVal, displayList)
+      const displayValue = condition.transferToEffectiveDisplayValue(currentVal, displayList)
       if (!condition.codeEquals(currentVal, displayValue)) {
         // 初始化过程和还原过程不改值
         if (isConditionRequired) {
@@ -379,8 +379,8 @@ export default {
       this.conditionsOutputTemporary[condition.key] = wrappedList
     },
     _getDependentParamAndCacheKey(condition) {
-      let cacheKey = '',
-        param = {}
+      let cacheKey = ''
+      let param = {}
       condition.dependentKeys.forEach(key => {
         const currentVal = this.model[key]
         cacheKey += `${key}_${currentVal}$`
@@ -486,7 +486,7 @@ export default {
         const formFields = formRef.fields
         const shouldDelay = localFields.length > 0 && formFields.length == 0
 
-        const invoker = function(){
+        const invoker = function() {
           formRef.validate((valid, errors) => {
             if (valid) resolve(valid)
             else reject(errors) // 经这一步转化,可以外抛errors
@@ -494,7 +494,7 @@ export default {
         }
 
         // NOTE: 5.14 hht 这里因为form组件的校验要在子组件加载好之后才能生效
-        if (shouldDelay) this.$nextTick(()=> invoker())
+        if (shouldDelay) this.$nextTick(() => invoker())
         else invoker()
       })
     }

+ 73 - 73
src/components/MxCondition/condition-mixins-view.js

@@ -1,77 +1,77 @@
 /* NOTE	思路:	见condition-mixins-data */
 export default {
-	props: {
-		conditionsInput: {
-			// 见computed.conditions
-			// 独立模式时要求外部传入mixins-data产生的conditionsOutput
-			type: Array,
-			default: _ => []
-		},
-		errorsInput: {
-			// 见computed.errors 非强制引入,一般呈现conditions中的error信息即可
-			// 独立模式时***可能***要求外部传入mixins-data产生的errorsOutput
-			type: Array,
-			default: _ => []
-		}
-	},
-	watch: {
-		'conditionsOutput': function(newVal, oldVal) {
-			console.log('mixins-view conditions changed:', newVal)
-			this.conditions = newVal
-		},
-		'conditionsInput': function(newVal, oldVal) {
-			console.log('mixins-view conditions changed:', newVal)
-			this.conditions = newVal
-		},
-		'errorsInput': function(newVal, oldVal) {
-			this.errors = newVal
-		},
-		'errorsOutput': function(newVal, oldVal) {
-			this.errors = newVal
-		},
-	},
-	data() {
-		return {
-			mixinsViewEnabled: true,
-			conditions: [],
-			errors: [],
-		}
-	},
-	computed: {
-		// conditions() {
-		// 	// 如果是联合模式,直接取data.conditionOutput,否则取传入值(传入值由mixins-data提供)
-		// 	// [{title:'',list:[{code:'',label:''}],key:'',error:''}]
-		// 	let results = this.isCombineMode() ? this.conditionsOutput : this.conditionsInput
-		// 	console.log('mixins-view conditions changed:', results)
-		// 	return results
-		// },
-		// errors() {
-		// 	// 这是condition-object.validate产生的原始错误,非强制引入,一般呈现conditions中的error信息即可
-		// 	// 如果是联合模式,直接取data.errorsOutput,否则取传入值(传入值由mixins-data提供)
-		// 	// [{title:'',list:[{code:'',label:''}],key:'',error:''}]
-		// 	return this.isCombineMode() ? this.errorsOutput : this.errorsInput
-		// },
-	},
-	mounted() {
-		this.conditions = this.isCombineMode() ? this.conditionsOutput : this.conditionsInput
-		this.errors = this.isCombineMode() ? this.errorsOutput : this.errorsInput
-	},
-	methods: {
-		// 公共API
-		isCombineMode() {
-			// 此方法请与mixins-data保持一致
-			return this.mixinsViewEnabled && this.mixinsDataEnabled
-		},
-		conditionChanged(key, newVal) {
-			// 如果联合模式,修改属性值会直接被监听
-			// 如果独立模式,则需要事件外抛来告知mixins.data
-			if (this.isCombineMode() && typeof this.setModelValue == "function") {
-				this.setModelValue(key, newVal)
-			} else {
-				this.$emit('conditionChanged', key, newVal)
-			}
-		}
+  props: {
+    conditionsInput: {
+      // 见computed.conditions
+      // 独立模式时要求外部传入mixins-data产生的conditionsOutput
+      type: Array,
+      default: _ => []
+    },
+    errorsInput: {
+      // 见computed.errors 非强制引入,一般呈现conditions中的error信息即可
+      // 独立模式时***可能***要求外部传入mixins-data产生的errorsOutput
+      type: Array,
+      default: _ => []
+    }
+  },
+  watch: {
+    'conditionsOutput': function(newVal, oldVal) {
+      console.log('mixins-view conditions changed:', newVal)
+      this.conditions = newVal
+    },
+    'conditionsInput': function(newVal, oldVal) {
+      console.log('mixins-view conditions changed:', newVal)
+      this.conditions = newVal
+    },
+    'errorsInput': function(newVal, oldVal) {
+      this.errors = newVal
+    },
+    'errorsOutput': function(newVal, oldVal) {
+      this.errors = newVal
+    }
+  },
+  data() {
+    return {
+      mixinsViewEnabled: true,
+      conditions: [],
+      errors: []
+    }
+  },
+  computed: {
+    // conditions() {
+    // 	// 如果是联合模式,直接取data.conditionOutput,否则取传入值(传入值由mixins-data提供)
+    // 	// [{title:'',list:[{code:'',label:''}],key:'',error:''}]
+    // 	let results = this.isCombineMode() ? this.conditionsOutput : this.conditionsInput
+    // 	console.log('mixins-view conditions changed:', results)
+    // 	return results
+    // },
+    // errors() {
+    // 	// 这是condition-object.validate产生的原始错误,非强制引入,一般呈现conditions中的error信息即可
+    // 	// 如果是联合模式,直接取data.errorsOutput,否则取传入值(传入值由mixins-data提供)
+    // 	// [{title:'',list:[{code:'',label:''}],key:'',error:''}]
+    // 	return this.isCombineMode() ? this.errorsOutput : this.errorsInput
+    // },
+  },
+  mounted() {
+    this.conditions = this.isCombineMode() ? this.conditionsOutput : this.conditionsInput
+    this.errors = this.isCombineMode() ? this.errorsOutput : this.errorsInput
+  },
+  methods: {
+    // 公共API
+    isCombineMode() {
+      // 此方法请与mixins-data保持一致
+      return this.mixinsViewEnabled && this.mixinsDataEnabled
+    },
+    conditionChanged(key, newVal) {
+      // 如果联合模式,修改属性值会直接被监听
+      // 如果独立模式,则需要事件外抛来告知mixins.data
+      if (this.isCombineMode() && typeof this.setModelValue == 'function') {
+        this.setModelValue(key, newVal)
+      } else {
+        this.$emit('conditionChanged', key, newVal)
+      }
+    }
 
-		// 内部方法
-	}
+    // 内部方法
+  }
 }

+ 4 - 4
src/components/MxCondition/condition-object/condition-chapter-level-1.js

@@ -6,13 +6,13 @@ export default {
   title: '',
   dependentKeys: ['chapterId'],
   isDependencyReady(params) {
-    let depKey = this.dependentKeys[0]
+    const depKey = this.dependentKeys[0]
     return params[depKey]
   },
   getList: function(param, vue) {
-    let depKey = this.dependentKeys[0]
-    let conditionList = vue.conditionsOutput.find(c => c.key == depKey)
-    let matchItem = conditionList.list.find(l => l.code == param[depKey])
+    const depKey = this.dependentKeys[0]
+    const conditionList = vue.conditionsOutput.find(c => c.key == depKey)
+    const matchItem = conditionList.list.find(l => l.code == param[depKey])
     return Promise.resolve(matchItem._raw.children)
   }
 }

+ 7 - 7
src/components/MxCondition/condition-object/condition-chapter-level-2.js

@@ -1,8 +1,8 @@
-import level1 from "./condition-chapter-level-1.js"
-
-export default {
-	...level1,
-	key: 'chapterIdLevel2',
-	title: '',
-	dependentKeys: ['chapterIdLevel1'],
+import level1 from './condition-chapter-level-1.js'
+
+export default {
+  ...level1,
+  key: 'chapterIdLevel2',
+  title: '',
+  dependentKeys: ['chapterIdLevel1']
 }

+ 1 - 3
src/components/MxCondition/condition-object/condition-chapter-tree.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  chapterTree
-} from '@/api/webApi/webQue.js'
+import { chapterTree } from '@/api/webApi/webQue.js'
 
 export default {
   ...conditionObjectBase,

+ 20 - 20
src/components/MxCondition/condition-object/condition-chat-classes.js

@@ -1,21 +1,21 @@
-import conditionObjectBase from "./condition-chat-class.js"
-
-export default {
-	...conditionObjectBase,
-	dependentKeys: ['chatGradeId', 'chatTarget'],
-	key: 'chatClassIds',
-	title: '班级',
-	template: 'multiple',
-	disableAllByForce: true,
-	isDependencyReady(params) {
-		// 选择发送至班级时,班级多选(这里将依赖条件设置成!=学生,即默认会班级多选,但当指定为学生时,不启动该条件)
-		return params.chatGradeId && params.chatTarget != 2;
-	},
-	transferToEffectiveDisplayValue(val, list) {
-		const safeArrayVal = Array.isArray(val) ? val : isNaN(val) ? [] : [val]
-		return list.length && safeArrayVal.every(v => list.some(i => i.code == v)) ? safeArrayVal : []
-	},
-	codeEquals(codeL, codeR) {
-		return codeL?.toString() == codeR?.toString()
-	}
+import conditionObjectBase from './condition-chat-class.js'
+
+export default {
+  ...conditionObjectBase,
+  dependentKeys: ['chatGradeId', 'chatTarget'],
+  key: 'chatClassIds',
+  title: '班级',
+  template: 'multiple',
+  disableAllByForce: true,
+  isDependencyReady(params) {
+    // 选择发送至班级时,班级多选(这里将依赖条件设置成!=学生,即默认会班级多选,但当指定为学生时,不启动该条件)
+    return params.chatGradeId && params.chatTarget != 2
+  },
+  transferToEffectiveDisplayValue(val, list) {
+    const safeArrayVal = Array.isArray(val) ? val : isNaN(val) ? [] : [val]
+    return list.length && safeArrayVal.every(v => list.some(i => i.code == v)) ? safeArrayVal : []
+  },
+  codeEquals(codeL, codeR) {
+    return codeL?.toString() == codeR?.toString()
+  }
 }

+ 6 - 6
src/components/MxCondition/condition-object/condition-chat-grade.js

@@ -1,7 +1,7 @@
-import grade from './condition-grade.js'
-
-export default {
-	...grade,
-	key: 'chatGradeId',
-	title: '年级'
+import grade from './condition-grade.js'
+
+export default {
+  ...grade,
+  key: 'chatGradeId',
+  title: '年级'
 }

+ 3 - 3
src/components/MxCondition/condition-object/condition-class-grade.js

@@ -1,7 +1,7 @@
 import grade from './condition-grade.js'
 
 export default {
-	...grade,
-	key: 'classGradeId',
-	title: '年级'
+  ...grade,
+  key: 'classGradeId',
+  title: '年级'
 }

+ 2 - 2
src/components/MxCondition/condition-object/condition-class-tree.js

@@ -7,8 +7,8 @@ export default {
   key: 'localClassId',
   title: '原班级',
   getList: function(param, $vue) {
-    return new Promise((resolve,reject) => {
-      getAllGradeClasses().then(res =>{
+    return new Promise((resolve, reject) => {
+      getAllGradeClasses().then(res => {
         // 暂时写死
         console.log($vue.model.queryLocalYear)
         console.log(res.data)

+ 32 - 32
src/components/MxCondition/condition-object/condition-date-range.js

@@ -1,36 +1,36 @@
-import conditionObjectBase from "../condition-object-base.js"
+import conditionObjectBase from '../condition-object-base.js'
 import * as ext from '@/utils'
 
 export default {
-	...conditionObjectBase,
-	key: 'daterange',
-	title: '时间',
-	template: 'date-range',
-	neverCache: true,
-	modelAsParam: true,
-	disableAllByForce: true,
-	getList: function(param) {
-		// 设置两个默认时间
-		let current = param[this.key]
-		if (current?.length == 2) {
-			return Promise.resolve([current])
-		} else {
-			return Promise.resolve([ext.getDefaultDateRange()])
-		}
-	},
-	getCode: function(item) {
-		return item
-	},
-	getLabel: function(item) {
-		return item
-	},
-	codeEquals(codeL, codeR) {
-		if (Array.isArray(codeL) && Array.isArray(codeR)) {
-			return JSON.stringify(codeL) == JSON.stringify(codeR)
-		}
-		return codeL == codeR
-	},
-	_valid(val) {
-		return Array.isArray(val) && val.length == 2
-	}
+  ...conditionObjectBase,
+  key: 'daterange',
+  title: '时间',
+  template: 'date-range',
+  neverCache: true,
+  modelAsParam: true,
+  disableAllByForce: true,
+  getList: function(param) {
+    // 设置两个默认时间
+    const current = param[this.key]
+    if (current?.length == 2) {
+      return Promise.resolve([current])
+    } else {
+      return Promise.resolve([ext.getDefaultDateRange()])
+    }
+  },
+  getCode: function(item) {
+    return item
+  },
+  getLabel: function(item) {
+    return item
+  },
+  codeEquals(codeL, codeR) {
+    if (Array.isArray(codeL) && Array.isArray(codeR)) {
+      return JSON.stringify(codeL) == JSON.stringify(codeR)
+    }
+    return codeL == codeR
+  },
+  _valid(val) {
+    return Array.isArray(val) && val.length == 2
+  }
 }

+ 2 - 1
src/components/MxCondition/condition-object/condition-dispatch-class.js

@@ -1,5 +1,6 @@
 import conditionObjectBase from '../condition-object-base.js'
 import { getClass } from '@/api/webApi/elective/dispatch.js'
+
 export default {
   ...conditionObjectBase,
   dependentKeys: ['localGroupId'],
@@ -16,7 +17,7 @@ export default {
       }).then(res => {
         resolve(res.data)
       })
-      .catch(e => reject(e))
+        .catch(e => reject(e))
     })
   },
   getCode: function(item) {

+ 3 - 2
src/components/MxCondition/condition-object/condition-dispatch-gender.js

@@ -1,5 +1,6 @@
 import conditionObjectBase from '../condition-object-base.js'
-import MxConfig from '@/common/mx-config'
+import MxConfig from '@/common/MxConfig'
+
 export default {
   ...conditionObjectBase,
   key: 'dispatchGender',
@@ -11,5 +12,5 @@ export default {
         name: item.text
       }
     }))
-  },
+  }
 }

+ 1 - 1
src/components/MxCondition/condition-object/condition-exe-branch.js

@@ -1,5 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import consts from '@/common/mx-const'
+import consts from '@/common/MxConst'
 
 export default {
   ...conditionObjectBase,

+ 3 - 5
src/components/MxCondition/condition-object/condition-exe-grade.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  smartGradeList,
-} from '@/api/webApi/webQue.js'
+import { smartGradeList } from '@/api/webApi/webQue.js'
 
 export default {
   ...conditionObjectBase,
@@ -13,9 +11,9 @@ export default {
   alias: 'gradeId',
   title: '学册',
   neverCache: true,
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     return new Promise((resolve, reject) => {
-      smartGradeList({subjectId:$ref.model.exeSubject,editionId:param.exeOrder}).then(res => resolve(res.data  || []))
+      smartGradeList({ subjectId: $ref.model.exeSubject, editionId: param.exeOrder }).then(res => resolve(res.data || []))
         .catch(e => reject(e))
     })
   },

+ 3 - 5
src/components/MxCondition/condition-object/condition-exe-order.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  newEditionList,
-} from '@/api/webApi/webQue.js'
+import { newEditionList } from '@/api/webApi/webQue.js'
 
 export default {
   ...conditionObjectBase,
@@ -12,9 +10,9 @@ export default {
   key: 'exeOrder',
   alias: 'editionId',
   title: '版本',
-  getList: function(param,) {
+  getList: function(param) {
     return new Promise((resolve, reject) => {
-      newEditionList({subjectId:param.exeSubject}).then(res => resolve(res.data))
+      newEditionList({ subjectId: param.exeSubject }).then(res => resolve(res.data))
         .catch(e => reject(e))
     })
   },

+ 0 - 1
src/components/MxCondition/condition-object/condition-exe-qType-chapter.js

@@ -7,7 +7,6 @@ export default {
   alias: 'qtpye', // NOTE: 就是用错别字,别改
   title: '题型',
   dependentKeys: ['exeGrade'],
-  neverCache: true,
   getList: async function(param, vm) {
     const query = {
       subjectId: vm.model.exeSubject,

+ 1 - 3
src/components/MxCondition/condition-object/condition-exe-subject.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  smartSubjectList,
-} from '@/api/webApi/webQue.js'
+import { smartSubjectList } from '@/api/webApi/webQue.js'
 
 export default {
   ...conditionObjectBase,

+ 2 - 1
src/components/MxCondition/condition-object/condition-fav-quetype.js

@@ -1,5 +1,6 @@
 import conditionObjectBase from '../condition-object-base.js'
 import { favQueTypes } from '@/api/webApi/webQue'
+
 export default {
   ...conditionObjectBase,
   isDependencyReady(params) {
@@ -11,7 +12,7 @@ export default {
   getList: function(param) {
     return new Promise((resolve, reject) => {
       favQueTypes({
-        subjectName:param.favSubject
+        subjectName: param.favSubject
       }).then(res => resolve(res.data))
         .catch(e => reject(e))
     })

+ 2 - 1
src/components/MxCondition/condition-object/condition-fav-subject.js

@@ -1,5 +1,6 @@
 import conditionObjectBase from '../condition-object-base.js'
 import { favSubjects } from '@/api/webApi/webQue'
+
 export default {
   ...conditionObjectBase,
   isDependencyReady(params) {
@@ -11,7 +12,7 @@ export default {
   getList: function(param) {
     return new Promise((resolve, reject) => {
       favSubjects({
-        type:param.favCollectType
+        type: param.favCollectType
       }).then(res => resolve(res.data))
         .catch(e => reject(e))
     })

+ 1 - 1
src/components/MxCondition/condition-object/condition-homework-type.js

@@ -1,5 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import consts from '@/common/mx-const'
+import consts from '@/common/MxConst'
 
 export default {
   ...conditionObjectBase,

+ 1 - 1
src/components/MxCondition/condition-object/condition-local-favCollectType.js

@@ -8,7 +8,7 @@ export default {
     return this._getList(param, $vue)
   },
   _getList: function(param, $vue) {
-    return Promise.resolve( [
+    return Promise.resolve([
       { type: 'question', name: '试题收藏' },
       { type: 'paper', name: '试卷收藏' }
     ])

+ 1 - 1
src/components/MxCondition/condition-object/condition-location.js

@@ -1,5 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import { locations } from "@/api/webApi/career-other";
+import { locations } from '@/api/webApi/career-other'
 
 export default {
   ...conditionObjectBase,

+ 5 - 8
src/components/MxCondition/condition-object/condition-paper-area.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  papersAreas,
-} from '@/api/webApi/webQue.js'
+import { papersAreas } from '@/api/webApi/webQue.js'
 
 export default {
   ...conditionObjectBase,
@@ -10,14 +8,13 @@ export default {
   },
   dependentKeys: ['paperType'],
   key: 'paperArea',
-  alias: 'area',
   title: '地区',
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     return new Promise((resolve, reject) => {
       papersAreas({
-        subjectName:$ref.model.paperSubject,
-        gradeName:$ref.model.paperGrade,
-        gradeType:param.paperType,
+        subjectName: $ref.model.paperSubject,
+        gradeName: $ref.model.paperGrade,
+        gradeType: param.paperType
       }).then(res => resolve(res.data))
         .catch(e => reject(e))
     })

+ 3 - 6
src/components/MxCondition/condition-object/condition-paper-grade.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  paperGrade,
-} from '@/api/webApi/webQue.js'
+import { paperGrade } from '@/api/webApi/webQue.js'
 
 export default {
   ...conditionObjectBase,
@@ -10,11 +8,10 @@ export default {
   },
   dependentKeys: ['paperSubject'],
   key: 'paperGrade',
-  alias: 'gradeName',
   title: '年级',
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     return new Promise((resolve, reject) => {
-      paperGrade({subjectName:param.paperSubject}).then(res => resolve(res.data))
+      paperGrade({ subjectName: param.paperSubject }).then(res => resolve(res.data))
         .catch(e => reject(e))
     })
   },

+ 2 - 5
src/components/MxCondition/condition-object/condition-paper-subject.js

@@ -1,14 +1,11 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  subjectList,
-} from '@/api/webApi/webQue.js'
+import { subjectList } from '@/api/webApi/webQue.js'
 
 export default {
   ...conditionObjectBase,
   key: 'paperSubject',
-  alias: 'subjectName',
   title: '科目',
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     return new Promise((resolve, reject) => {
       subjectList().then(res => resolve(res.data))
         .catch(e => reject(e))

+ 3 - 6
src/components/MxCondition/condition-object/condition-paper-type.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  papersTypes,
-} from '@/api/webApi/webQue.js'
+import { papersTypes } from '@/api/webApi/webQue.js'
 
 export default {
   ...conditionObjectBase,
@@ -10,11 +8,10 @@ export default {
   },
   dependentKeys: ['paperGrade'],
   key: 'paperType',
-  alias: 'paperType',
   title: '类型',
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     return new Promise((resolve, reject) => {
-      papersTypes({subjectName:$ref.model.paperSubject,gradeName:param.paperGrade}).then(res => resolve(res.data))
+      papersTypes({ subjectName: $ref.model.paperSubject, gradeName: param.paperGrade }).then(res => resolve(res.data))
         .catch(e => reject(e))
     })
   },

+ 2 - 5
src/components/MxCondition/condition-object/condition-paper-year.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  papersYears,
-} from '@/api/webApi/webQue.js'
+import { papersYears } from '@/api/webApi/webQue.js'
 
 export default {
   ...conditionObjectBase,
@@ -10,9 +8,8 @@ export default {
   },
   dependentKeys: ['paperSubject'],
   key: 'paperYear',
-  alias: 'year',
   title: '年份',
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     return new Promise((resolve, reject) => {
       papersYears({}).then(res => resolve(res.data))
         .catch(e => reject(e))

+ 20 - 0
src/components/MxCondition/condition-object/condition-pre-category.js

@@ -0,0 +1,20 @@
+import conditionObjectBase from '../condition-object-base'
+import MxConst from '@/common/MxConst'
+
+export default {
+  ...conditionObjectBase,
+  key: 'preCategory',
+  alias: 'category',
+  title: '目录',
+  disableAllByForce: true,
+  getList: function() {
+    const keys = MxConst.enum.recruitPlanCategory.visibleKeys
+    return keys.map(key => {
+      const val = MxConst.enum.recruitPlanCategory[key]
+      return {
+        id: val,
+        name: MxConst.enum.recruitPlanCategory.names[val]
+      }
+    })
+  }
+}

+ 19 - 0
src/components/MxCondition/condition-object/condition-pre-enroll-course0.js

@@ -0,0 +1,19 @@
+import conditionObjectBase from '../condition-object-base'
+import { getPreEnrollCourses } from '@/api/webApi/prev-batch'
+
+export default {
+  ...conditionObjectBase,
+  key: 'preEnrollCourse0',
+  dependentKeys: ['preEnrollYear'],
+  alias: 'course0',
+  title: '首选科目',
+  modelAsParam: true,
+  isDependencyReady: function(param) {
+    return param.preEnrollYear
+  },
+  getList: async function(param) {
+    const params = { category: param.category || param.preCategory, year: param.preEnrollYear }
+    const res = await getPreEnrollCourses(params)
+    return res.rows.map(i => ({ id: i, name: i }))
+  }
+}

+ 19 - 0
src/components/MxCondition/condition-object/condition-pre-enroll-course1.js

@@ -0,0 +1,19 @@
+import conditionObjectBase from '../condition-object-base'
+import { getPreEnrollCourses } from '@/api/webApi/prev-batch'
+
+export default {
+  ...conditionObjectBase,
+  key: 'preEnrollCourse1',
+  dependentKeys: ['preEnrollCourse0'],
+  alias: 'course1',
+  title: '再选科目',
+  modelAsParam: true,
+  isDependencyReady: function(param) {
+    return param.preEnrollCourse0
+  },
+  getList: async function(param) {
+    const params = { category: param.category || param.preCategory, course0: param.preEnrollCourse0, year: param.preEnrollYear }
+    const res = await getPreEnrollCourses(params)
+    return res.rows.map(i => ({ id: i, name: i }))
+  }
+}

+ 19 - 0
src/components/MxCondition/condition-object/condition-pre-enroll-subTag.js

@@ -0,0 +1,19 @@
+import conditionObjectBase from '../condition-object-base'
+import { getPreEnrollTags } from '@/api/webApi/prev-batch'
+
+export default {
+  ...conditionObjectBase,
+  key: 'preEnrollSubTag',
+  dependentKeys: ['preEnrollTag'],
+  alias: 'subTag',
+  title: '类别细分',
+  modelAsParam: true,
+  isDependencyReady: function(param) {
+    return param.preEnrollTag
+  },
+  getList: async function(param) {
+    const params = { category: param.category || param.preCategory, tag: param.preEnrollTag, year: param.preEnrollYear }
+    const res = await getPreEnrollTags(params)
+    return res.rows.map(i => ({ id: i, name: i }))
+  }
+}

+ 19 - 0
src/components/MxCondition/condition-object/condition-pre-enroll-tag.js

@@ -0,0 +1,19 @@
+import conditionObjectBase from '../condition-object-base'
+import { getPreEnrollTags } from '@/api/webApi/prev-batch'
+
+export default {
+  ...conditionObjectBase,
+  key: 'preEnrollTag',
+  dependentKeys: ['preEnrollYear'],
+  alias: 'tag',
+  title: '计划类别',
+  modelAsParam: true,
+  isDependencyReady: function(param) {
+    return param.preEnrollYear
+  },
+  getList: async function(param) {
+    const params = { category: param.category || param.preCategory, year: param.preEnrollYear }
+    const res = await getPreEnrollTags(params)
+    return res.rows.map(i => ({ id: i, name: i }))
+  }
+}

+ 15 - 0
src/components/MxCondition/condition-object/condition-pre-enroll-year.js

@@ -0,0 +1,15 @@
+import conditionObjectBase from '../condition-object-base'
+import { getPreEnrollYears } from '@/api/webApi/prev-batch'
+
+export default {
+  ...conditionObjectBase,
+  key: 'preEnrollYear',
+  alias: 'year',
+  title: '年份',
+  modelAsParam: true,
+  getList: async function(param) {
+    const params = { category: param.category || param.preCategory }
+    const res = await getPreEnrollYears(params)
+    return res.rows.map(i => ({ id: i, name: i }))
+  }
+}

+ 28 - 0
src/components/MxCondition/condition-object/condition-pre-plan-tag.js

@@ -0,0 +1,28 @@
+import conditionObjectBase from '../condition-object-base'
+import { getPreTree } from '@/api/webApi/prev-batch'
+
+export default {
+  ...conditionObjectBase,
+  template: 'cascader',
+  key: 'prePlanTagCode',
+  title: '类别',
+  alias: 'tagCode',
+  dependentKeys: ['prePlanYear'],
+  modelAsParam: true,
+  disableAllByForce: true,
+  isDependencyReady: function(param) {
+    return param.prePlanYear
+  },
+  getList: function(param, callback, $vm) {
+    const params = { category: param.category, year: param.prePlanYear }
+    getPreTree(params).then(res => {
+      const tree = $vm.convertStandardTree(res.data, 'name', 'code')
+      callback(tree)
+    })
+  },
+  transferToEffectiveDisplayValue(val, list) {
+    // 由于cascader的value是数组,所以这里需要判断数组中的每一项是否在list中,
+    // 因为code逐级追加,所以只要判断val是否以list中的某一项开头即可
+    return val && list?.some(i => val.startsWith(i._raw.value)) ? val : ''
+  }
+}

+ 20 - 0
src/components/MxCondition/condition-object/condition-pre-plan-type.js

@@ -0,0 +1,20 @@
+import conditionObjectBase from '../condition-object-base'
+import { getPreRecruitPlanTypes } from '@/api/webApi/prev-batch'
+
+export default {
+  ...conditionObjectBase,
+  key: 'prePlanType',
+  alias: 'type',
+  dependentKeys: ['prePlanYear'],
+  title: '科目',
+  modelAsParam: true,
+  isDependencyReady: function(param) {
+    return param.prePlanYear
+  },
+  getList: function(param, callback) {
+    const params = { category: param.category, year: param.prePlanYear }
+    getPreRecruitPlanTypes(params).then(res => {
+      callback(res.rows.map(i => ({ id: i, name: i })))
+    })
+  }
+}

+ 16 - 0
src/components/MxCondition/condition-object/condition-pre-plan-year.js

@@ -0,0 +1,16 @@
+import conditionObjectBase from '../condition-object-base'
+import { getPreRecruitPlanYears } from '@/api/webApi/prev-batch'
+
+export default {
+  ...conditionObjectBase,
+  key: 'prePlanYear',
+  alias: 'year',
+  title: '年份',
+  modelAsParam: true,
+  getList: function(param, callback) {
+    const params = { category: param.category }
+    getPreRecruitPlanYears(params).then(res => {
+      callback(res.rows.map(i => ({ id: i, name: i })))
+    })
+  }
+}

+ 13 - 13
src/components/MxCondition/condition-object/condition-publish.js

@@ -1,16 +1,16 @@
-import conditionObjectBase from "../condition-object-base.js"
+import conditionObjectBase from '../condition-object-base.js'
 
 export default {
-	...conditionObjectBase,
-	key: 'publish',
-	title: '开启',
-	getList: function(param) {
-		return Promise.resolve([{
-			id: '2',
-			name: '已开启'
-		}, {
-			id: '1',
-			name: '未开启'
-		}])
-	}
+  ...conditionObjectBase,
+  key: 'publish',
+  title: '开启',
+  getList: function(param) {
+    return Promise.resolve([{
+      id: '2',
+      name: '已开启'
+    }, {
+      id: '1',
+      name: '未开启'
+    }])
+  }
 }

+ 1 - 1
src/components/MxCondition/condition-object/condition-release-generation.js

@@ -1,5 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import config from '@/common/mx-config'
+import config from '@/common/MxConfig'
 
 export default {
   ...conditionObjectBase,

+ 1 - 1
src/components/MxCondition/condition-object/condition-release-query-code.js

@@ -1,5 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import config from '@/common/mx-config'
+import config from '@/common/MxConfig'
 
 export default {
   ...conditionObjectBase,

+ 13 - 13
src/components/MxCondition/condition-object/condition-role-type.js

@@ -1,16 +1,16 @@
-import conditionObjectBase from "../condition-object-base.js"
+import conditionObjectBase from '../condition-object-base.js'
 
 export default {
-	...conditionObjectBase,
-	key: 'roleType',
-	title: '角色',
-	getList: function(param) {
-		return Promise.resolve([{
-			id: 3,
-			name: '学生/家长'
-		}, {
-			id: 4,
-			name: '老师'
-		}])
-	}
+  ...conditionObjectBase,
+  key: 'roleType',
+  title: '角色',
+  getList: function(param) {
+    return Promise.resolve([{
+      id: 3,
+      name: '学生/家长'
+    }, {
+      id: 4,
+      name: '老师'
+    }])
+  }
 }

+ 1 - 3
src/components/MxCondition/condition-object/condition-round.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  getSchoolRounds
-} from '@/api/webApi/selection.js'
+import { getSchoolRounds } from '@/api/webApi/selection.js'
 
 export default {
   ...conditionObjectBase,

+ 1 - 3
src/components/MxCondition/condition-object/condition-senior-grade.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  gradeList
-} from '@/api/webApi/webQue.js'
+import { gradeList } from '@/api/webApi/webQue.js'
 
 export default {
   ...conditionObjectBase,

+ 1 - 3
src/components/MxCondition/condition-object/condition-shiftline-level.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  selectUniversityLevels,
-} from '@/api/webApi/shiftLine'
+import { selectUniversityLevels } from '@/api/webApi/shiftLine'
 
 // 院校投档线  层次
 export default {

+ 1 - 3
src/components/MxCondition/condition-object/condition-shiftline-location.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  selectUniversityLocations
-} from '@/api/webApi/shiftLine'
+import { selectUniversityLocations } from '@/api/webApi/shiftLine'
 
 // 院校投档线  地域
 export default {

+ 1 - 3
src/components/MxCondition/condition-object/condition-shiftline-type.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  selectUniversityTypes,
-} from '@/api/webApi/shiftLine'
+import { selectUniversityTypes } from '@/api/webApi/shiftLine'
 
 // 院校投档线  科类
 export default {

+ 1 - 3
src/components/MxCondition/condition-object/condition-shiftline-year.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  selectUniversityYears
-} from '@/api/webApi/shiftLine'
+import { selectUniversityYears } from '@/api/webApi/shiftLine'
 
 // 院校投档线  年份
 export default {

+ 6 - 6
src/components/MxCondition/condition-object/condition-student-grade.js

@@ -1,7 +1,7 @@
-import grade from './condition-grade.js'
-
-export default {
-	...grade,
-	key: 'studentGradeId',
-	title: '学生年级'
+import grade from './condition-grade.js'
+
+export default {
+  ...grade,
+  key: 'studentGradeId',
+  title: '学生年级'
 }

+ 1 - 3
src/components/MxCondition/condition-object/condition-student-round.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  getSchoolRounds
-} from '@/api/webApi/selection.js'
+import { getSchoolRounds } from '@/api/webApi/selection.js'
 import store from '@/store/index'
 
 export default {

+ 1 - 3
src/components/MxCondition/condition-object/condition-students.js

@@ -1,7 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  getStudents
-} from '@/api/webApi/back.js'
+import { getStudents } from '@/api/webApi/back.js'
 
 export default {
   ...conditionObjectBase,

+ 2 - 4
src/components/MxCondition/condition-object/condition-subject-by-subjects.js

@@ -1,7 +1,5 @@
 import conditionSubjectBase from './condition-subject.js'
-import {
-  getDicts
-} from '@/api/system/dict/data'
+import { getDicts } from '@/api/system/dict/data'
 
 export default {
   ...conditionSubjectBase,
@@ -13,7 +11,7 @@ export default {
   },
   getList: function(param) {
     if (param.subjects == '单科') {
-      return this._getList(param, callback)
+      return this._getList(param)
     } else if (param.subjects == '组合') {
       return new Promise((resolve, reject) => {
         getDicts('subjects_type').then(res => {

+ 4 - 4
src/components/MxCondition/condition-object/condition-subject-list.js

@@ -1,17 +1,17 @@
 import conditionObjectBase from '../condition-object-base.js'
-import * as system from "@/api/webApi/system";
+import * as system from '@/api/webApi/system'
 
 export default {
   ...conditionObjectBase,
   key: 'subjectByVideo',
   title: '科目',
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     return new Promise((resolve, reject) => {
-      system.getSubjectsList({  }).then(res => resolve(
+      system.getSubjectsList({}).then(res => resolve(
         res.rows.map(item => {
           return {
             code: item.subjectid,
-            label:item.subjectname
+            label: item.subjectname
           }
         })
       ))

+ 7 - 7
src/components/MxCondition/condition-object/condition-subjects.js

@@ -1,10 +1,10 @@
-import conditionObjectBase from "../condition-object-base.js"
+import conditionObjectBase from '../condition-object-base.js'
 
 export default {
-	...conditionObjectBase,
-	key: 'subjects',
-	title: '',
-	getList: function(param, callback) {
-		return Promise.resolve([{id:'单科',name:'单科'},{id:'组合',name:'组合'}]);
-	}
+  ...conditionObjectBase,
+  key: 'subjects',
+  title: '',
+  getList: function(param, callback) {
+    return Promise.resolve([{ id: '单科', name: '单科' }, { id: '组合', name: '组合' }])
+  }
 }

+ 18 - 18
src/components/MxCondition/condition-object/condition-term.js

@@ -1,21 +1,21 @@
-import conditionObjectBase from "../condition-object-base.js"
+import conditionObjectBase from '../condition-object-base.js'
 
 export default {
-	...conditionObjectBase,
-	key: 'termId',
-	title: '学期',
-	dependentKeys: ['gradeId'],
-	isDependencyReady(params) {
-		return params.gradeId;
-	},
-	getList: function(param) {
-		let termList = [{
-			id: param.gradeId + 1,
-			name: '上学期'
-		}, {
-			id: param.gradeId + 2,
-			name: '下学期'
-		}]
-		return Promise.resolve(termList);
-	}
+  ...conditionObjectBase,
+  key: 'termId',
+  title: '学期',
+  dependentKeys: ['gradeId'],
+  isDependencyReady(params) {
+    return params.gradeId
+  },
+  getList: function(param) {
+    const termList = [{
+      id: param.gradeId + 1,
+      name: '上学期'
+    }, {
+      id: param.gradeId + 2,
+      name: '下学期'
+    }]
+    return Promise.resolve(termList)
+  }
 }

+ 5 - 5
src/components/MxCondition/condition-object/condition-user-subject.js

@@ -1,6 +1,6 @@
-import subjectBase from './condition-subject.js'
-
-export default {
-	...subjectBase,
-	key: 'userSubjectId',
+import subjectBase from './condition-subject.js'
+
+export default {
+  ...subjectBase,
+  key: 'userSubjectId'
 }

+ 2 - 4
src/components/MxCondition/condition-object/condition-v2-subject.js

@@ -1,13 +1,11 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  smartSubjectList,
-} from "@/api/webApi/webQue";
+import { smartSubjectList } from '@/api/webApi/webQue'
 
 export default {
   ...conditionObjectBase,
   key: 'v2Subject',
   title: '科目',
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     return new Promise((resolve, reject) => {
       smartSubjectList().then(res => resolve(res.rows))
         .catch(e => reject(e))

+ 32 - 0
src/components/MxCondition/condition-object/condition-video-course.js

@@ -0,0 +1,32 @@
+import conditionObjectBase from '../condition-object-base.js'
+import { videoSubjects } from '@/api/webApi/webVideo'
+
+export default {
+  ...conditionObjectBase,
+  key: 'videoCourse',
+  alias: 'course',
+  dependentKeys: ['videoType'],
+  isDependencyReady(params) {
+    return params.videoType
+  },
+  title: '科目',
+  getList: function(param, $ref) {
+    return new Promise((resolve, reject) => {
+      videoSubjects({ subject: param.videoType }).then(res => resolve(
+        res.rows.map(item => {
+          return {
+            code: item.code,
+            label: item.label
+          }
+        })
+      ))
+        .catch(e => reject(e))
+    })
+  },
+  getCode: function(item) {
+    return item.code
+  },
+  getLabel: function(item) {
+    return item.label
+  }
+}

+ 7 - 8
src/components/MxCondition/condition-object/condition-video-grade.js

@@ -1,24 +1,23 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  videoGrades,
-} from "@/api/webApi/webVideo";
+import { videoGrades } from '@/api/webApi/webVideo'
 
 export default {
   ...conditionObjectBase,
   key: 'videoGrade',
-  neverCache:true,
+  alias: 'grade',
+  neverCache: true,
   dependentKeys: ['videoCourse'],
   isDependencyReady(params) {
     return params.videoCourse
   },
   title: '年级',
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     return new Promise((resolve, reject) => {
-      videoGrades({ course:param.videoCourse,subject:$ref.model.videoType }).then(res => resolve(
+      videoGrades({ course: param.videoCourse, subject: $ref.model.videoType }).then(res => resolve(
         res.rows.map(item => {
           return {
-            code:item.code,
-            label:item.label
+            code: item.code,
+            label: item.label
           }
         })
       ))

+ 11 - 12
src/components/MxCondition/condition-object/condition-video-pack.js

@@ -1,26 +1,25 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  packList,
-} from "@/api/webApi/webVideo";
+import { packList } from '@/api/webApi/webVideo'
 
 export default {
   ...conditionObjectBase,
   key: 'videoPack',
-  neverCache:true,
+  alias: 'pack',
+  neverCache: true,
   dependentKeys: ['videoVersion'],
   isDependencyReady(params) {
-    return  params.videoVersion
+    return params.videoVersion
   },
   title: '学册',
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     return new Promise((resolve, reject) => {
       packList({
-        course:$ref.model.videoCourse,
-        subject:$ref.model.videoType,
-        grade:$ref.model.videoGrade,
-        pageNum:1,
-        pageSize:20,
-        version:param.videoVersion
+        course: $ref.model.videoCourse,
+        subject: $ref.model.videoType,
+        grade: $ref.model.videoGrade,
+        pageNum: 1,
+        pageSize: 20,
+        version: param.videoVersion
       }).then(res => resolve(res.rows))
         .catch(e => reject(e))
     })

+ 5 - 5
src/components/MxCondition/condition-object/condition-video-subject-fixed.js

@@ -1,4 +1,4 @@
-import subjectBase from './condition-video-subject'
+import subjectBase from './condition-video-course'
 import { videoSubjects } from '@/api/webApi/webVideo'
 
 export default {
@@ -8,18 +8,18 @@ export default {
   isDependencyReady(params) {
     return true
   },
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     console.log($ref.model.videoTypeFixed)
     return new Promise((resolve, reject) => {
-      videoSubjects({ subject:$ref.model.videoTypeFixed }).then(res => resolve(
+      videoSubjects({ subject: $ref.model.videoTypeFixed }).then(res => resolve(
         res.rows.map(item => {
           return {
             code: item.code,
-            label:item.label
+            label: item.label
           }
         })
       ))
         .catch(e => reject(e))
     })
-  },
+  }
 }

+ 3 - 4
src/components/MxCondition/condition-object/condition-video-type.js

@@ -1,13 +1,12 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  videoType,
-} from "@/api/webApi/webVideo";
+import { videoType } from '@/api/webApi/webVideo'
 
 export default {
   ...conditionObjectBase,
   key: 'videoType',
+  alias: 'subject',
   title: '类型',
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     return new Promise((resolve, reject) => {
       videoType().then(res => resolve(res.rows))
         .catch(e => reject(e))

+ 14 - 14
src/components/MxCondition/condition-object/condition-video-version.js

@@ -1,29 +1,29 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  videoVersions,
-} from "@/api/webApi/webVideo";
+import { videoVersions } from '@/api/webApi/webVideo'
 
 export default {
   ...conditionObjectBase,
   key: 'videoVersion',
-  neverCache:true,
+  alias: 'version',
+  neverCache: true,
   dependentKeys: ['videoGrade'],
   isDependencyReady(params) {
     return params.videoGrade
   },
   title: '版本',
-  getList: function(param,$ref) {
+  getList: function(param, $ref) {
     return new Promise((resolve, reject) => {
       videoVersions({
-        course:$ref.model.videoCourse,
-        subject:$ref.model.videoType,
-        grade:param.videoGrade }).then(res => resolve(
-          res.rows.map(item => {
-            return {
-              code: item.code,
-              label:item.label
-            }
-          })
+        course: $ref.model.videoCourse,
+        subject: $ref.model.videoType,
+        grade: param.videoGrade
+      }).then(res => resolve(
+        res.rows.map(item => {
+          return {
+            code: item.code,
+            label: item.label
+          }
+        })
       ))
         .catch(e => reject(e))
     })

+ 2 - 3
src/components/MxCondition/condition-object/condition-wrong-subject.js

@@ -1,7 +1,6 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  wrongSubjects,
-} from "@/api/webApi/webQue.js";
+import { wrongSubjects } from '@/api/webApi/webQue.js'
+
 export default {
   ...conditionObjectBase,
   key: 'wrongSubject',

+ 4 - 4
src/components/MxCondition/condition-object/condition-wrong-type.js

@@ -1,7 +1,6 @@
 import conditionObjectBase from '../condition-object-base.js'
-import {
-  wrongTypes,
-} from "@/api/webApi/webQue.js";
+import { wrongTypes } from '@/api/webApi/webQue.js'
+
 export default {
   ...conditionObjectBase,
   key: 'wrongType',
@@ -10,7 +9,8 @@ export default {
   getList: function(param) {
     return new Promise((resolve, reject) => {
       wrongTypes({
-        subjectName:param.wrongSubject }).then(res => resolve(res.data))
+        subjectName: param.wrongSubject
+      }).then(res => resolve(res.data))
         .catch(e => reject(e))
     })
   },

+ 1 - 1
src/components/MxCondition/condition-object/condition-year-admission.js

@@ -1,5 +1,5 @@
 import conditionObjectBase from '../condition-object-base.js'
-import { years } from "@/api/webApi/career-other";
+import { years } from '@/api/webApi/career-other'
 
 export default {
   ...conditionObjectBase,

+ 2 - 1
src/components/MxCondition/condition-object/condition-yfyd-location.js

@@ -1,9 +1,10 @@
 import conditionObjectBase from '../condition-object-base.js'
-import { yfydLocations } from "@/api/webApi/career-other";
+import { yfydLocations } from '@/api/webApi/career-other'
 
 export default {
   ...conditionObjectBase,
   key: 'yfydLocation',
+  alias: 'location',
   title: '地域',
   getList: function(param) {
     return new Promise((resolve, reject) => {

+ 5 - 3
src/components/MxCondition/condition-object/condition-yfyd-mode.js

@@ -1,18 +1,20 @@
 import conditionObjectBase from '../condition-object-base.js'
-import { yfydModes } from "@/api/webApi/career-other";
+import { yfydModes } from '@/api/webApi/career-other'
 
 export default {
   ...conditionObjectBase,
   dependentKeys: ['yfydYear'],
   key: 'yfydMode',
+  alias: 'mode',
   title: '科类',
+  disableAllByForce: true,
   isDependencyReady(params) {
     return params.yfydYear
   },
   getList: function(param, $ref) {
-    console.log('',$ref)
+    console.log('', $ref)
     return new Promise((resolve, reject) => {
-      yfydModes({ location:$ref.model.yfydLocation,year:param.yfydYear }).then(res => resolve(res.rows))
+      yfydModes({ location: $ref.model.yfydLocation, year: param.yfydYear }).then(res => resolve(res.rows))
         .catch(e => reject(e))
     })
   },

+ 4 - 2
src/components/MxCondition/condition-object/condition-yfyd-year.js

@@ -1,17 +1,19 @@
 import conditionObjectBase from '../condition-object-base.js'
-import { yfydYears } from "@/api/webApi/career-other";
+import { yfydYears } from '@/api/webApi/career-other'
 
 export default {
   ...conditionObjectBase,
   dependentKeys: ['yfydLocation'],
   key: 'yfydYear',
+  alias: 'year',
   title: '学年',
+  disableAllByForce: true,
   isDependencyReady(params) {
     return params.yfydLocation
   },
   getList: function(param) {
     return new Promise((resolve, reject) => {
-      yfydYears({ location:param.yfydLocation }).then(res => resolve(res.rows))
+      yfydYears({ location: param.yfydLocation }).then(res => resolve(res.rows))
         .catch(e => reject(e))
     })
   },

+ 3 - 3
src/components/MxCondition/condition-templete/mx-condition-button-group.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-radio-group v-model="condition.value" size="mini" @change="itemAction" class="mx-condition">
+  <el-radio-group v-model="condition.value" size="mini" class="mx-condition" @change="itemAction">
     <el-radio-button v-for="item in condition.list" :key="item.code" :label="item.code">
       {{ item.label }}
     </el-radio-button>
@@ -8,7 +8,7 @@
 
 <script>
 export default {
-  name: 'mx-condition-button-group',
+  name: 'MxConditionButtonGroup',
   props: {
     condition: {
       type: Object,
@@ -42,6 +42,6 @@ export default {
 }
 
 .mx-condition /deep/.el-radio-button__orig-radio:checked + .el-radio-button__inner {
-  border-color: #47C6A2;
+  border-color: var(--themeColor);
 }
 </style>

+ 44 - 40
src/components/MxCondition/condition-templete/mx-condition-checkbox-group.vue

@@ -1,47 +1,51 @@
 <template>
-	<view class="mx-condition-button-group pl20">
-		<view class="mx-condition-group-title mb8">
-			<text class="mx-condition-title mr10">{{condition.title}}</text>
-			<text class="mx-condition-item pl15 pr15 mr10 rd12 mb8" @click="selectAll()">全选</text>
-			<text class="mx-condition-item pl15 pr15 mr10 rd12 mb8" @click="selectOpposite()">反选</text>
-			<text v-if="condition.error" class="mx-condition-error">{{condition.error}}</text>
-		</view>
-		<view class="mx-condition-group-list">
-			<mx-data-checkbox multiple :modelValue="condition.value || []" :localdata="condition.list"
-				:map="{text:'label',value:'code'}" @update:modelValue="valueChangedAction">
-			</mx-data-checkbox>
-		</view>
-	</view>
+  <view class="mx-condition-button-group pl20">
+    <view class="mx-condition-group-title mb8">
+      <text class="mx-condition-title mr10">{{ condition.title }}</text>
+      <text class="mx-condition-item pl15 pr15 mr10 rd12 mb8" @click="selectAll()">全选</text>
+      <text class="mx-condition-item pl15 pr15 mr10 rd12 mb8" @click="selectOpposite()">反选</text>
+      <text v-if="condition.error" class="mx-condition-error">{{ condition.error }}</text>
+    </view>
+    <view class="mx-condition-group-list">
+      <mx-data-checkbox
+        multiple
+        :model-value="condition.value || []"
+        :localdata="condition.list"
+        :map="{text:'label',value:'code'}"
+        @update:modelValue="valueChangedAction"
+      />
+    </view>
+  </view>
 </template>
 
 <script>
-	export default {
-		name: "mx-condition-button-group",
-		props: {
-			condition: {
-				type: Object,
-				default: _ => ({})
-			}
-		},
-		methods: {
-			valueChangedAction(value) {
-				if (this.condition.value?.toString() != value?.toString()) {
-					console.log('multiple valueChangedAction', value)
-					this.$emit('conditionChanged', this.condition.key, value)
-				}
-			},
-			selectAll() {
-				const all = this.condition.list.map(i => i.code)
-				this.$emit('conditionChanged', this.condition.key, all)
-			},
-			selectOpposite() {
-				const val = this.condition.value
-				const safeArrayVal = Array.isArray(val) ? val : isNaN(val) ? [] : [val]
-				const opp = this.condition.list.filter(i => !safeArrayVal.includes(i.code)).map(i => i.code)
-				this.$emit('conditionChanged', this.condition.key, opp)
-			}
-		}
-	}
+export default {
+  name: 'MxConditionButtonGroup',
+  props: {
+    condition: {
+      type: Object,
+      default: _ => ({})
+    }
+  },
+  methods: {
+    valueChangedAction(value) {
+      if (this.condition.value?.toString() != value?.toString()) {
+        console.log('multiple valueChangedAction', value)
+        this.$emit('conditionChanged', this.condition.key, value)
+      }
+    },
+    selectAll() {
+      const all = this.condition.list.map(i => i.code)
+      this.$emit('conditionChanged', this.condition.key, all)
+    },
+    selectOpposite() {
+      const val = this.condition.value
+      const safeArrayVal = Array.isArray(val) ? val : isNaN(val) ? [] : [val]
+      const opp = this.condition.list.filter(i => !safeArrayVal.includes(i.code)).map(i => i.code)
+      this.$emit('conditionChanged', this.condition.key, opp)
+    }
+  }
+}
 </script>
 
 <style scoped>

+ 46 - 46
src/components/MxCondition/condition-templete/mx-condition-date-range.vue

@@ -1,53 +1,53 @@
 <template>
-	<view class="mx-condition-button-group pl20">
-		<view class="mx-condition-group-title mb8">
-			<text class="mx-condition-title mr10">{{condition.title}}</text>
-			<text v-if="condition.error" class="mx-condition-error">{{condition.error}}</text>
-		</view>
-		<view class="mx-condition-group-list pr40">
-			<mx-daterange-picker :modelValue="range" @change="$emit('conditionChanged', condition.key, $event)" />
-		</view>
-	</view>
+  <view class="mx-condition-button-group pl20">
+    <view class="mx-condition-group-title mb8">
+      <text class="mx-condition-title mr10">{{ condition.title }}</text>
+      <text v-if="condition.error" class="mx-condition-error">{{ condition.error }}</text>
+    </view>
+    <view class="mx-condition-group-list pr40">
+      <mx-daterange-picker :model-value="range" @change="$emit('conditionChanged', condition.key, $event)" />
+    </view>
+  </view>
 </template>
 
 <script>
-	export default {
-		name: "mx-condition-date-range",
-		props: {
-			condition: {
-				type: Object,
-				default: _ => ({})
-			}
-		},
-		mounted() {
-			this.setDefaultRange()
-		},
-		watch: {
-			'condition': function(newVal, oldVal) {
-				this.setDefaultRange()
-			}
-		},
-		data() {
-			return {
-				range: [],
-				showPicker: false
-			}
-		},
-		methods: {
-			setDefaultRange() {
-				//console.log('date range setDefaultRange called')
-				if (!this.condition?.list?.length) return
-				let defaultRange = this.condition.list[this.condition.list.length - 1].code
-				this.range = defaultRange
-				setTimeout(_ => this.showPicker = true, 200)
-			},
-			itemAction(key, value) {
-				if (value != this.condition.value) {
-					this.$emit('conditionChanged', key, value)
-				}
-			}
-		}
-	}
+export default {
+  name: 'MxConditionDateRange',
+  props: {
+    condition: {
+      type: Object,
+      default: _ => ({})
+    }
+  },
+  data() {
+    return {
+      range: [],
+      showPicker: false
+    }
+  },
+  watch: {
+    'condition': function(newVal, oldVal) {
+      this.setDefaultRange()
+    }
+  },
+  mounted() {
+    this.setDefaultRange()
+  },
+  methods: {
+    setDefaultRange() {
+      // console.log('date range setDefaultRange called')
+      if (!this.condition?.list?.length) return
+      const defaultRange = this.condition.list[this.condition.list.length - 1].code
+      this.range = defaultRange
+      setTimeout(_ => this.showPicker = true, 200)
+    },
+    itemAction(key, value) {
+      if (value != this.condition.value) {
+        this.$emit('conditionChanged', key, value)
+      }
+    }
+  }
+}
 </script>
 
 <style scoped>

+ 26 - 0
src/components/MxCondition/condition-templete/mx-condition-select.vue

@@ -0,0 +1,26 @@
+<template>
+  <el-select v-model="condition.value" placeholder="请选择" @change="itemAction">
+    <el-option v-for="item in condition.list" :key="item.code" :label="item.label" :value="item.code" />
+  </el-select>
+</template>
+
+<script>
+export default {
+  name: 'MxConditionSelect',
+  props: {
+    condition: {
+      type: Object,
+      default: _ => ({})
+    }
+  },
+  methods: {
+    itemAction(value) {
+      this.$emit('conditionChanged', this.condition.key, value)
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 50 - 17
src/components/MxCondition/mx-condition.vue

@@ -1,10 +1,25 @@
 <template>
-  <el-form ref="form" :model="model" :rules="finalRules" label-position="right" :label-width="labelWidth">
-    <template v-for="(group,idx) in conditionsOutput">
-      <el-form-item :prop="group.key" :label="group.title" class="form-item-condition">
-        <mx-condition-button-group v-if="!group.template" :condition="group" @conditionChanged="conditionChangedAction">
-        </mx-condition-button-group>
-        <slot :name="group.template" :condition="group"></slot>
+  <el-form
+    ref="form"
+    :model="model"
+    :rules="finalRules"
+    label-position="right"
+    :label-width="labelWidth"
+    :inline="inline"
+  >
+    <template v-for="(group,idx) in visibleConditions">
+      <el-form-item :key="idx" :prop="group.key" :label="group.title" :class="{'form-item-condition': tinyMarginBottom}">
+        <mx-condition-button-group
+          v-if="!group.template"
+          :condition="group"
+          @conditionChanged="conditionChangedAction"
+        />
+        <mx-condition-select
+          v-else-if="group.template == 'select'"
+          :condition="group"
+          @conditionChanged="conditionChangedAction"
+        />
+        <slot :name="group.template" :condition="group" />
       </el-form-item>
     </template>
   </el-form>
@@ -20,17 +35,15 @@
 import conditionDataMixins from './condition-mixins-data'
 import conditionViewMixins from './condition-mixins-view'
 import mxConditionButtonGroup from './condition-templete/mx-condition-button-group.vue'
-import mxConditionDateRange from './condition-templete/mx-condition-date-range.vue'
-import mxConditionCheckboxGroup from './condition-templete/mx-condition-checkbox-group.vue'
+import MxConditionSelect from '@/components/MxCondition/condition-templete/mx-condition-select.vue'
 
 export default {
-  name: 'mx-condition',
-  mixins: [conditionDataMixins, conditionViewMixins],
+  name: 'MxCondition',
   components: {
-    mxConditionButtonGroup,
-    mxConditionDateRange,
-    mxConditionCheckboxGroup
+    MxConditionSelect,
+    mxConditionButtonGroup
   },
+  mixins: [conditionDataMixins, conditionViewMixins],
   props: {
     labelWidth: {
       type: String,
@@ -39,20 +52,36 @@ export default {
     useAliasMapping: {
       type: Boolean,
       default: false
+    },
+    inline: {
+      type: Boolean,
+      default: false
+    },
+    tinyMarginBottom: {
+      type: Boolean,
+      default: false
+    },
+    invisibleFields: {
+      type: Array,
+      default: () => []
     }
   },
-  mounted() {
-  },
   data() {
     return {
       fillRequiresWhenInit: true
     }
   },
   computed: {
+    visibleConditions() {
+      if (!this.invisibleFields?.length) return this.conditionsOutput
+      return this.conditionsOutput.filter(c => !this.invisibleFields.includes(c.key))
+    },
     groupedConditions() {
       return this.conditionsOutput?.groupBy(c => c.groupName || c.key) || []
     }
   },
+  mounted() {
+  },
   methods: {
     conditionChangedAction(key, value) {
       this.conditionChanged(key, value)
@@ -73,8 +102,9 @@ export default {
       if (!this.useAliasMapping) return model
       const mapping = {}
       Object.keys(model).forEach(key => {
-        const cond = this.conditionsOutput.find(c => c.key == key)
-        mapping[cond.alias] = model[key]
+        const cond = this.conditionsOutput.find(c => c.key == key) || this.imports.find(c => c.key == key)
+        if (cond?.alias) mapping[cond.alias] = model[key]
+        else mapping[key] = model[key]
       })
       return mapping
     }
@@ -83,4 +113,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.el-form-item.form-item-condition {
+  margin-bottom: 5px !important;
+}
 </style>

+ 24 - 28
src/views/career/zhiyuan/yfyd.vue

@@ -18,37 +18,38 @@
       </div>
     </el-card>
     <el-card>
-      <mx-search-group class="mb10" justify="end" :span="6" v-model="scoreRank" placeholder="请输入分数或位次" @search="getList"
-      ></mx-search-group>
-      <mx-condition ref="condition" :query-params="queryParams" :require-fields="requireFields" @query="handleQuery"
-                    @invalid="handleInvalidQuery"
-      ></mx-condition>
+      <mx-search-group class="mb10" justify="end" :span="6" v-model="scoreRank" placeholder="请输入分数或位次"
+                       @search="getList"/>
+      <mx-condition ref="condition" :query-params="queryParams" :require-fields="requireFields"
+                    :invisible-fields="invisibleFields"
+                    use-alias-mapping tiny-margin-bottom @query="handleQuery"/>
       <div class="content">
         <div class="table-wrap" v-loading="loading">
           <mx-table :rows="batchData" :propDefines="propDefines">
             <template #rank="{row}">
-              <p>{{row.highestRank == row.lowestRank ? `${row.highestRank}` : `${row.highestRank}~${row.lowestRank}`}}</p>
+              <p>
+                {{ row.highestRank == row.lowestRank ? `${row.highestRank}` : `${row.highestRank}~${row.lowestRank}` }}</p>
             </template>
             <template #score="{row}">
-              <p>{{row.score == row.maxScore ? `${row.score}` : `${row.score}~${row.maxScore}`}}</p>
+              <p>{{ row.score == row.maxScore ? `${row.score}` : `${row.score}~${row.maxScore}` }}</p>
             </template>
           </mx-table>
         </div>
 
-        <pagination :total="pageForm.total" :autoScroll="false" @pagination="onChangePage" :page.sync="pageForm.pageNum"
-                    :limit.sync="pageForm.pageSize"
-        ></pagination>
+        <pagination :total="pageForm.total" :autoScroll="false" :page.sync="pageForm.pageNum"
+                    :limit.sync="pageForm.pageSize" @pagination="getList"/>
       </div>
     </el-card>
   </div>
 </template>
 
 <script>
-import { yfydList } from '@/api/webApi/career-other'
+import {yfydList} from '@/api/webApi/career-other'
 import MxCondition from '@/components/MxCondition/mx-condition'
 import MxSearchGroup from '@/components/MxSearch/mx-search-group'
 import Pagination from '@/components/Pagination'
-import { mapGetters } from 'vuex'
+import {mapGetters} from 'vuex'
+
 export default {
   components: {
     MxCondition,
@@ -63,8 +64,10 @@ export default {
         yfydYear: '',
         yfydMode: ''
       },
-      requireFields:['yfydLocation'],
-      pageForm: { pageNum: 1, pageSize: 20, total: 0 },
+      requireFields: ['yfydLocation', 'yfydYear', 'yfydMode'],
+      invisibleFields: ['yfydLocation'],
+      firedParams: null,
+      pageForm: {pageNum: 1, pageSize: 20, total: 0},
       backimg:
         'url(' + require('@/assets/images/career/icon_colleges.png') + ')',
       batchData: [],
@@ -81,11 +84,11 @@ export default {
         },
         score: {
           label: '分数',
-          slot:'score'
+          slot: 'score'
         },
         lowestRank: {
           label: '位次',
-          slot:'rank'
+          slot: 'rank'
         },
         num: {
           label: '人数'
@@ -99,32 +102,25 @@ export default {
   created() {
     this.queryParams.yfydLocation = this.currentUser.provinceName
   },
-  computed:{
-    ...mapGetters(['location','currentUser']),
+  computed: {
+    ...mapGetters(['location', 'currentUser']),
   },
   methods: {
     getList() {
-      if (this.scoreRank == '') return
       this.getYfydList()
-    },
-    handleInvalidQuery() {
-
     },
     onChangePage(page) {
-      this.pageForm.pageSize = page.limit
-      this.pageForm.pageNum = page.page
       this.getYfydList()
     },
-    handleQuery() {
+    handleQuery(model) {
+      this.firedParams = model
       this.pageForm.pageNum = 1
       this.getYfydList()
     },
     getYfydList() {
       this.loading = true
       yfydList({
-        year: this.queryParams.yfydYear,
-        location: this.queryParams.yfydLocation,
-        mode: this.queryParams.yfydMode,
+        ...this.firedParams,
         scoreRank: this.scoreRank,
         ...this.pageForm
       }).then((res) => {