Explorar o código

chaper & knowledge exchange monitor

siesnow hai 5 meses
pai
achega
aa9c7c8df9

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

@@ -266,7 +266,10 @@ export default {
       // temporary save & parameter check
       this.queryOutput = model
       delete this.queryOutput.exeBranch // 本页API调用并不需要这个参数
-      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的渲染逻辑不太方便切入
@@ -292,6 +295,7 @@ export default {
       }
 
       // query question
+      console.log('call resetQuestionQuery by mx-condition')
       this.resetQuestionQuery()
     },
     setCurrentNodeAndTitle(nodeData) {
@@ -303,6 +307,7 @@ export default {
     },
     handleTreeNodeClick(data) {
       this.setCurrentNodeAndTitle(data)
+      console.log('call resetQuestionQuery by tree node click')
       this.resetQuestionQuery()
     },
     resetQuestionQuery() {