Explorar el Código

bug(4945,4956,4957,4958)

zhangxc hace 5 años
padre
commit
858eeae00a
Se han modificado 4 ficheros con 75 adiciones y 67 borrados
  1. 36 33
      src/js/graphMap.js
  2. 2 0
      src/js/index.js
  3. 2 0
      src/js/knowledgeTree.js
  4. 35 34
      src/js/schemaMap.js

+ 36 - 33
src/js/graphMap.js

@@ -324,43 +324,46 @@ function getNode(val, type){
             $(".tabNameList").show()
             $(".tabNameList li").click(function(){
                 const txt = $(this).text()
-                $('#searchInp').val(txt)
+                if(txt !="暂无符合数据"){
+                    $('#searchInp').val(txt)
+                }
                 const clientHei = $(window).height()
                 const contentHei = clientHei - 80
                 $(".tabNameList").hide()
-                if(select_type_noSearch != select_type){
-                    select_type = select_type_noSearch
-                    let renderInfo = getTab(select_type) 
-                    renderTab(renderInfo)
-                    if(select_type == '疾病'){
-                       
-                        // $('#searchInp').val("高血压3级")
-                        getTree(1,1,txt);
-                    }else if(select_type == '药品通用名'){
-                        
-                        getTree(0,2,txt);
-                    }else if(select_type == '症状'){
-                        getTree(0,3,txt);
-                    }else if(select_type == '手术和操作'){
-                        getTree(0,4,txt);
-                    }else if(select_type == '实验室检查'){
-                        getTree(0,5,txt);
-                    }else if(select_type == '辅助检查'){
-                        getTree(0,6,txt);
+                getGraph(val,select_type_noSearch).then(()=>{
+                    if(!window.refreshTree){
+                      
+                        return
                     }
-                    if(select_type == '疾病'){
-                        $(".radioList").show()
-                        $('.iconRadio').attr('src','/images/radioUnSelect.png')
-                        $('.ICD10 img').attr('src','/images/radioSelect.png')
-                        setTabBottomHei(1)
-                    }else{
-                        $(".radioList").hide()
-                        setTabBottomHei(2)
-                    }
-                }else{
-                    updateTree(txt)
-                }
-                getGraph(txt,select_type)
+                        select_type = select_type_noSearch
+                        
+                        if(select_type == '疾病'){
+                            // $('#searchInp').val("高血压3级")
+                            getTree(1,1,txt);
+                        }else if(select_type == '药品通用名'){
+                            getTree(0,2,txt);
+                        }else if(select_type == '症状'){
+                            getTree(0,3,txt);
+                        }else if(select_type == '手术和操作'){
+                            getTree(0,4,txt);
+                        }else if(select_type == '实验室检查'){
+                            getTree(0,5,txt);
+                        }else if(select_type == '辅助检查'){
+                            getTree(0,6,txt);
+                        }
+                        if(select_type == '疾病'){
+                            $('.iconRadio').attr('src','/images/radioUnSelect.png')
+                            $('.ICD10 img').attr('src','/images/radioSelect.png')
+                            $(".radioList").show()
+                            setTabBottomHei(1)
+                        }else{
+                            $(".radioList").hide()
+                            setTabBottomHei(2)
+                        }
+                        let renderTabInfo = getTab("疾病") 
+                        renderTab(renderTabInfo)
+                    
+                })
                
             })
         }

+ 2 - 0
src/js/index.js

@@ -159,9 +159,11 @@ renderTab(renderTabInfo)
 
 $(".tabList").click(function(e){
     e.stopPropagation()
+    hideSlide()
 })
 $(".hideTabList").click(function(e){
     e.stopPropagation()
+    hideSlide()
 })
 //点击页面其他地方关闭下拉
 $('html').click(function(){

+ 2 - 0
src/js/knowledgeTree.js

@@ -153,9 +153,11 @@ renderTab(renderTabInfo)
 
 $(".tabList").click(function(e){
     e.stopPropagation()
+    hideSlide()
 })
 $(".hideTabList").click(function(e){
     e.stopPropagation()
+    hideSlide()
 })
 
 //点击页面其他地方关闭下拉

+ 35 - 34
src/js/schemaMap.js

@@ -119,44 +119,45 @@ function getNode(val, type){
             $(".tabNameList").show()
             $(".tabNameList li").click(function(){
                 const txt = $(this).text()
-                $('#searchInp').val(txt)
+                if(txt !="暂无符合数据"){
+                    $('#searchInp').val(txt)
+                }
                 const clientHei = $(window).height()
                 const contentHei = clientHei - 80
                 $(".tabNameList").hide()
-                console.log('select_type',select_type,'select_type_noSearch',select_type_noSearch)
-                if(select_type_noSearch != select_type){
-                    select_type = select_type_noSearch
-                    let renderInfo = getTab(select_type) 
-                    renderTab(renderInfo)
-                    if(select_type == '疾病'){
-                       
-                        // $('#searchInp').val("高血压3级")
-                        getTree(1,1,txt);
-                    }else if(select_type == '药品通用名'){
-                        
-                        getTree(0,2,txt);
-                    }else if(select_type == '症状'){
-                        getTree(0,3,txt);
-                    }else if(select_type == '手术和操作'){
-                        getTree(0,4,txt);
-                    }else if(select_type == '实验室检查'){
-                        getTree(0,5,txt);
-                    }else if(select_type == '辅助检查'){
-                        getTree(0,6,txt);
-                    }
-                    if(select_type == '疾病'){
-                        $(".radioList").show()
-                        $('.iconRadio').attr('src','/images/radioUnSelect.png')
-                        $('.ICD10 img').attr('src','/images/radioSelect.png')
-                        setTabBottomHei(1)
-                    }else{
-                        $(".radioList").hide()
-                        setTabBottomHei(2)
+                getSchema(val,select_type_noSearch).then(()=>{
+                    if(!window.refreshTree){
+                        return
                     }
-                }else{
-                    updateTree(txt)
-                }
-                getSchema(txt,select_type)
+                        select_type = select_type_noSearch
+                        
+                        if(select_type == '疾病'){
+                            // $('#searchInp').val("高血压3级")
+                            getTree(1,1,txt);
+                        }else if(select_type == '药品通用名'){
+                            getTree(0,2,txt);
+                        }else if(select_type == '症状'){
+                            getTree(0,3,txt);
+                        }else if(select_type == '手术和操作'){
+                            getTree(0,4,txt);
+                        }else if(select_type == '实验室检查'){
+                            getTree(0,5,txt);
+                        }else if(select_type == '辅助检查'){
+                            getTree(0,6,txt);
+                        }
+                        if(select_type == '疾病'){
+                            $('.iconRadio').attr('src','/images/radioUnSelect.png')
+                            $('.ICD10 img').attr('src','/images/radioSelect.png')
+                            $(".radioList").show()
+                            setTabBottomHei(1)
+                        }else{
+                            $(".radioList").hide()
+                            setTabBottomHei(2)
+                        }
+                        let renderTabInfo = getTab("疾病") 
+                        renderTab(renderTabInfo)
+                   
+                })