|
@@ -25,6 +25,7 @@ const { drawGraph,updateTree,getGraph,getTree,getNode } = require('./graphMap.js
|
|
|
|
|
|
window.select_type="疾病";
|
|
|
window.select_type_noSearch="疾病";
|
|
|
+window.refreshTree = true
|
|
|
const clientHei = $(window).height()
|
|
|
const contentHei = clientHei - 80
|
|
|
$(".left").css("height",contentHei+'px')
|
|
@@ -96,29 +97,35 @@ $('#searchBtn').click(function(e){
|
|
|
const clientHei = $(window).height()
|
|
|
const contentHei = clientHei - 80
|
|
|
$(".tabNameList").hide()
|
|
|
- if(select_type_noSearch != select_type){
|
|
|
- select_type = select_type_noSearch
|
|
|
-
|
|
|
- if(select_type == '疾病'){
|
|
|
- $(".radioList").show()
|
|
|
- $(".activeTab").removeClass("activeTab")
|
|
|
- $(".diagnose").addClass("activeTab")
|
|
|
- $(".ztree").css("height",contentHei-80-43-60-20+'px')
|
|
|
- // $('#searchInp').val("高血压3级")
|
|
|
- $('.iconRadio').attr('src','/images/radioUnSelect.png')
|
|
|
- $('.ICD10 img').attr('src','/images/radioSelect.png')
|
|
|
- getTree(1,1,val);
|
|
|
- }else if(select_type == '药品通用名'){
|
|
|
- $(".radioList").hide()
|
|
|
- $(".ztree").css("height",contentHei-80-43-20+'px')
|
|
|
- $(".activeTab").removeClass("activeTab")
|
|
|
- $(".drug").addClass("activeTab")
|
|
|
- getTree(0,2,val);
|
|
|
+ getGraph(val,select_type_noSearch).then(()=>{
|
|
|
+ if(!window.refreshTree){
|
|
|
+ return
|
|
|
}
|
|
|
- }else{
|
|
|
- updateTree(val)
|
|
|
- }
|
|
|
- getGraph(val,select_type)
|
|
|
+ if(select_type_noSearch != select_type){
|
|
|
+ select_type = select_type_noSearch
|
|
|
+
|
|
|
+ if(select_type == '疾病'){
|
|
|
+ $(".radioList").show()
|
|
|
+ $(".activeTab").removeClass("activeTab")
|
|
|
+ $(".diagnose").addClass("activeTab")
|
|
|
+ $(".ztree").css("height",contentHei-80-43-60-20+'px')
|
|
|
+ // $('#searchInp').val("高血压3级")
|
|
|
+ $('.iconRadio').attr('src','/images/radioUnSelect.png')
|
|
|
+ $('.ICD10 img').attr('src','/images/radioSelect.png')
|
|
|
+ getTree(1,1,val);
|
|
|
+ }else if(select_type == '药品通用名'){
|
|
|
+ $(".radioList").hide()
|
|
|
+ $(".ztree").css("height",contentHei-80-43-20+'px')
|
|
|
+ $(".activeTab").removeClass("activeTab")
|
|
|
+ $(".drug").addClass("activeTab")
|
|
|
+ getTree(0,2,val);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ updateTree(val)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}else{
|
|
|
$('.tabNameListNoSearch').show()
|