浏览代码

hidden question-collection mode in PaperByIntelligent

hehaitao 11 月之前
父节点
当前提交
09c4136c3e

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

@@ -5,8 +5,9 @@ export default {
   ...conditionObjectBase,
   ...conditionObjectBase,
   key: 'exeBranch',
   key: 'exeBranch',
   title: '选题',
   title: '选题',
-  getList: function(param) {
-    const branches = Object.values(consts.enum.questionBranches)
+  getList: function(param, $me) {
+    const predicate = $me.model.extendCollection ? _ => true : item => item != consts.enum.questionBranches.collect
+    const branches = Object.values(consts.enum.questionBranches).filter(predicate)
     return Promise.resolve(branches)
     return Promise.resolve(branches)
   },
   },
   getCode: function(item) {
   getCode: function(item) {

+ 2 - 1
src/views/questioncenter/components/generate-tabs/paper-by-hand.vue

@@ -115,6 +115,7 @@ export default {
   components: {MxQuestionReadonly, LeftTreeSide, CorrectQuestionDialog, MxCondition},
   components: {MxQuestionReadonly, LeftTreeSide, CorrectQuestionDialog, MxCondition},
   data() {
   data() {
     return {
     return {
+      extendCollection: true,
       queryParams: null,
       queryParams: null,
       queryOutput: null,
       queryOutput: null,
       requireFields: [],
       requireFields: [],
@@ -189,7 +190,7 @@ export default {
     },
     },
     resetQueryParams(force = false) {
     resetQueryParams(force = false) {
       if (!this.queryParams || force) {
       if (!this.queryParams || force) {
-        const model = {}
+        const model = { extendCollection: this.extendCollection }
         model.exeBranch = this.queryParams?.exeBranch || consts.enum.questionBranches.chapter.value
         model.exeBranch = this.queryParams?.exeBranch || consts.enum.questionBranches.chapter.value
         this.invisibleFields = []
         this.invisibleFields = []
         switch (model.exeBranch) {
         switch (model.exeBranch) {

+ 1 - 0
src/views/questioncenter/components/generate-tabs/paper-by-intelligent.vue

@@ -83,6 +83,7 @@ export default {
   data() {
   data() {
     return {
     return {
       // override
       // override
+      extendCollection: false,
       mathId: 'question_by_intelligent',
       mathId: 'question_by_intelligent',
       enableBox: false,
       enableBox: false,
       ignoreQType: true,
       ignoreQType: true,