Explorar o código

chaper & knowledge exchange monitor

siesnow hai 5 meses
pai
achega
7e9b4ed882

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

@@ -227,7 +227,10 @@ export default {
       this.queryOutput = model
       delete this.queryOutput.exeBranch // 本页API调用并不需要这个参数
       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
       // TODO: 这里最好是由mx-condition解析依赖关系,但现在mx-condition的渲染逻辑不太方便切入
@@ -253,6 +256,7 @@ export default {
       }
 
       // query question
+      console.log('call resetQuestionQuery by mx-condition')
       this.resetQuestionQuery()
     },
     setCurrentNodeAndTitle(nodeData) {
@@ -264,6 +268,7 @@ export default {
     },
     handleTreeNodeClick(data) {
       this.setCurrentNodeAndTitle(data)
+      console.log('call resetQuestionQuery by tree node click')
       this.resetQuestionQuery()
     },
     resetQuestionQuery() {