浏览代码

chaper & knowledge exchange monitor

siesnow 5 月之前
父节点
当前提交
7e9b4ed882
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      src/views/questioncenter/components/generate-tabs/paper-by-hand.vue

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

@@ -227,7 +227,10 @@ export default {
       this.queryOutput = model
       this.queryOutput = model
       delete this.queryOutput.exeBranch // 本页API调用并不需要这个参数
       delete this.queryOutput.exeBranch // 本页API调用并不需要这个参数
       if (this.isCollectionBranch) return this.queryCollections()
       if (this.isCollectionBranch) return this.queryCollections()
-      if (!this.isKnowledgeBranch && !this.queryOutput.gradeId) return // 这是exeBranch条件切换时的中间状态,不要触发后续查询
+      const isKnowledgeToChapter = !this.isKnowledgeBranch && !this.queryOutput.gradeId
+      const isChapterToKnowledge = this.isKnowledgeBranch && !!this.queryOutput.gradeId
+      // console.log('中间状态?', isKnowledgeToChapter, isChapterToKnowledge)
+      if (isKnowledgeToChapter || isChapterToKnowledge) return // 这是exeBranch条件切换时的中间状态,不要触发后续查询
 
 
       // refresh tree by need
       // refresh tree by need
       // TODO: 这里最好是由mx-condition解析依赖关系,但现在mx-condition的渲染逻辑不太方便切入
       // TODO: 这里最好是由mx-condition解析依赖关系,但现在mx-condition的渲染逻辑不太方便切入
@@ -253,6 +256,7 @@ export default {
       }
       }
 
 
       // query question
       // query question
+      console.log('call resetQuestionQuery by mx-condition')
       this.resetQuestionQuery()
       this.resetQuestionQuery()
     },
     },
     setCurrentNodeAndTitle(nodeData) {
     setCurrentNodeAndTitle(nodeData) {
@@ -264,6 +268,7 @@ export default {
     },
     },
     handleTreeNodeClick(data) {
     handleTreeNodeClick(data) {
       this.setCurrentNodeAndTitle(data)
       this.setCurrentNodeAndTitle(data)
+      console.log('call resetQuestionQuery by tree node click')
       this.resetQuestionQuery()
       this.resetQuestionQuery()
     },
     },
     resetQuestionQuery() {
     resetQuestionQuery() {