|
@@ -40,33 +40,38 @@ function getInfomation() {
|
|
// }
|
|
// }
|
|
|
|
|
|
post(config.getStaticKnowledgeForHIS, param).then((res) => {
|
|
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();
|
|
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){
|
|
function showInfo(data){
|
|
var detailList = data.details
|
|
var detailList = data.details
|
|
var staticKnowList = detailList['静态知识']
|
|
var staticKnowList = detailList['静态知识']
|