|
@@ -12,7 +12,8 @@ const {
|
|
|
throttle,
|
|
|
imageUrlPrefix,
|
|
|
config,
|
|
|
- getUrlArgObject
|
|
|
+ getUrlArgObject,
|
|
|
+ openNewWin
|
|
|
} = require('./promise.js');
|
|
|
const $ = require("jquery");
|
|
|
let showName,noticeName,clinicalPathwayName,showLis=[]
|
|
@@ -40,33 +41,38 @@ function getInfomation() {
|
|
|
// }
|
|
|
|
|
|
post(config.getStaticKnowledgeForHIS, param).then((res) => {
|
|
|
- const data = res.data.data
|
|
|
- var str = '';
|
|
|
- var anchors = '';
|
|
|
- if (!data||data.length==0) {
|
|
|
- $("h1").html("暂时没有数据");
|
|
|
- $(".anchors").css("display", "none");
|
|
|
- return;
|
|
|
- }
|
|
|
- showLis=data
|
|
|
- for(let i = 0;i < showLis.length;i++){
|
|
|
- let tmp = showLis[i]
|
|
|
- str+=`<li data-idx="${i}" title="${tmp.name}">${tmp.name}</li>`
|
|
|
+ if(res.data.code==='0'){
|
|
|
+ const data = res.data.data
|
|
|
+ var str = '';
|
|
|
+ var anchors = '';
|
|
|
+ if (!data||data.length===0) {
|
|
|
+ showEmpty();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ showLis=data
|
|
|
+ for(let i = 0;i < showLis.length;i++){
|
|
|
+ let tmp = showLis[i]
|
|
|
+ str+=`<li data-idx="${i}" title="${tmp.name}">${tmp.name}</li>`
|
|
|
+ }
|
|
|
+ $(".showWhich ul").html(str)
|
|
|
+ $(".showWhichSelect").html(showLis[0].name).attr("title",showLis[0].name)
|
|
|
+ showName = data[0].name
|
|
|
+ document.title = showName
|
|
|
+ showInfoSelect()
|
|
|
+ showInfo(data[0])
|
|
|
+ $('.content img').bind('contextmenu', function(){
|
|
|
+ return false
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ showEmpty();
|
|
|
}
|
|
|
- $(".showWhich ul").html(str)
|
|
|
- $(".showWhichSelect").html(showLis[0].name).attr("title",showLis[0].name)
|
|
|
- showName = data[0].name
|
|
|
- document.title = showName
|
|
|
- showInfoSelect()
|
|
|
- showInfo(data[0])
|
|
|
- $('.content img').bind('contextmenu', function(){
|
|
|
- return false
|
|
|
- })
|
|
|
-
|
|
|
})
|
|
|
}
|
|
|
getInfomation();
|
|
|
-
|
|
|
+function showEmpty(){
|
|
|
+ const str=`<div class="empty"><img src="../images/empty3.png" alt=""><p>暂无静态知识</p></div>`;
|
|
|
+ $(".tabBox").html(str).css("border-bottom","none");
|
|
|
+}
|
|
|
function showInfo(data){
|
|
|
var detailList = data.details
|
|
|
var staticKnowList = detailList['静态知识']
|
|
@@ -191,10 +197,17 @@ function bindTabClick(){
|
|
|
$(`.${moduleName} .infos`).scrollTop(0)
|
|
|
}
|
|
|
})
|
|
|
+ $("#openWin").on("click",function(){
|
|
|
+ const type= getUrlArgObject('type');
|
|
|
+ const hospitalId= getUrlArgObject('hospitalId');
|
|
|
+ const hisName= getUrlArgObject('hisName');
|
|
|
+ const hisDetailName= getUrlArgObject('hisDetailName');
|
|
|
+ openNewWin("informationOut.html?hospitalId="+encodeURIComponent(hospitalId)+"&hisName="+encodeURIComponent(hisName)+"&hisDetailName="+encodeURIComponent(hisDetailName)+"&type="+encodeURIComponent(type));
|
|
|
+ })
|
|
|
}
|
|
|
function adjustHeight() {
|
|
|
var ht = window.innerHeight || document.documentElement.clientHeight;
|
|
|
- $(".content").height(ht - 145 - 60 + "px");
|
|
|
+ $(".content").height(ht - 90 + "px");
|
|
|
}
|
|
|
function adjustWidth() {
|
|
|
var wt = window.innerWidth || document.documentElement.clientWidth;
|
|
@@ -205,4 +218,8 @@ $(window).on('resize', function(){
|
|
|
adjustHeight()
|
|
|
adjustWidth()
|
|
|
})
|
|
|
+//如果是子窗口,隐藏网页查看按钮
|
|
|
+if(window.opener){
|
|
|
+ $("#openWin").hide();
|
|
|
+}
|
|
|
|