staticInfoOut.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. if(!Promise){
  2. var Promise = require("bluebird");
  3. // Configure
  4. Promise.config({
  5. longStackTraces: true,
  6. warnings: true // note, run node with --trace-warnings to see full stack traces for warnings
  7. })
  8. }
  9. require('../css/staticInfoOut.less')
  10. const {
  11. post,
  12. throttle,
  13. imageUrlPrefix,
  14. config,
  15. getUrlArgObject,
  16. openNewWin
  17. } = require('./promise.js');
  18. const $ = require("jquery");
  19. let printing = require('./../images/printing.png');
  20. let printing2 = require('./../images/printing2.png');
  21. let showName,noticeName,clinicalPathwayName,showLis=[],selectedDrop=0,selectedTab=0
  22. //如果是子窗口,隐藏网页查看按钮
  23. if(window.opener){
  24. selectedDrop=getUrlArgObject("d")||0;
  25. selectedTab=getUrlArgObject("t")||0;
  26. $("#openWin").hide();
  27. }
  28. let icond = require('./../images/d.png').replace(/^undefined/g, '')
  29. function getInfomation() {
  30. // var param = {
  31. // "type": getUrlArgObject('type'),
  32. // "name": getUrlArgObject('name'),
  33. // "position": getUrlArgObject('position'),
  34. // "contentTypes":[1,2,3]
  35. // };
  36. var param = {
  37. "type": getUrlArgObject('type'),
  38. "hospitalId": getUrlArgObject('hospitalId'),
  39. "hisName": getUrlArgObject('hisName'),
  40. "hisDetailName": getUrlArgObject('hisDetailName'),
  41. "contentTypes":[1,2,3]
  42. };
  43. //showName = param.hisName;
  44. // if (param.type == 5 || param.type == 51) {
  45. // param.type = 12;
  46. // param.name = uname;
  47. // }
  48. post(config.getStaticKnowledgeForHIS, param).then((res) => {
  49. if(res.data.code==='0'){
  50. const data = res.data.data
  51. var str = '';
  52. var anchors = '';
  53. let sName ='';
  54. if (!data||data.length===0) {
  55. showEmpty();
  56. return;
  57. }
  58. showLis=data
  59. for(let i = 0;i < showLis.length;i++){
  60. let tmp = showLis[i]
  61. str+=`<li data-idx="${i}" title="${tmp.name}(${tmp.hisName})">${tmp.name}(${tmp.hisName})</li>`
  62. }
  63. $(".showWhich ul").html(str);
  64. sName=showLis[selectedDrop].name+"("+showLis[selectedDrop].hisName+")";
  65. $(".showWhichSelect").html(sName).attr("title",sName)
  66. showName = data[selectedDrop].name+"("+data[selectedDrop].hisName+")";
  67. showInfoSelect()
  68. showInfo(data[selectedDrop])
  69. renderTitleShow();
  70. $('.content img').bind('contextmenu', function(){
  71. return false
  72. })
  73. }else{
  74. showEmpty();
  75. }
  76. })
  77. }
  78. getInfomation();
  79. function showEmpty(){
  80. const str=`<div class="empty"><img src="../images/empty3.png" alt=""><p>暂无静态知识</p></div>`;
  81. $(".tabBox").html(str).css("border-bottom","none");
  82. $("body").css('background','#fff');
  83. }
  84. function showInfo(data){
  85. var detailList = data.details
  86. var scale = data.scale
  87. var staticKnowList = detailList['静态知识']
  88. var noticeInfo = detailList['注意事项']
  89. var clinicalPathwayInfo = detailList['临床路径']
  90. var name = data.name
  91. noticeName = data.noticeName || "注意事项"
  92. clinicalPathwayName = data.clinicalPathwayName || "临床路径"
  93. var scaleInfo = data.scale ? data.scale.scaleDetails : ''
  94. // $("h1").css({
  95. // "color": "#267FD7",
  96. // "borderBottom": "4px solid #E9E9E9",
  97. // "padding": "0px 60px 50px 0px"
  98. // });
  99. renderTab(detailList, scale)
  100. staticKnowList&&renderContent(staticKnowList,'staticKnowledge')
  101. noticeInfo&&renderContent(noticeInfo,'notice')
  102. clinicalPathwayInfo&&renderContent(clinicalPathwayInfo,'clinicalPathway')
  103. scaleInfo && renderContentscale(scaleInfo, 'scale', name)
  104. }
  105. function showInfoSelect(){
  106. $('.showWhich li').click(function(){
  107. let idx = $(this).attr('data-idx')
  108. let name = $(this).html(),str=''
  109. selectedDrop=idx;
  110. selectedTab=0;
  111. showName = showLis[idx].name+"("+showLis[idx].hisName+")";
  112. showInfo(showLis[idx])
  113. renderTitleShow();
  114. $('.content .infos').scrollTop(0)
  115. $(".showWhich ul").css("display","none")
  116. $(".showWhichSelect").html(name).attr("title",name)
  117. })
  118. $(".showWhichSelect").click(function(e){
  119. e.stopPropagation()
  120. $(".showWhich ul").slideToggle()
  121. })
  122. $(document).click(function(){
  123. $(".showWhich ul").css("display","none")
  124. })
  125. }
  126. function renderTitleShow(){
  127. document.title = showName;
  128. $(".titleCont .title").html($(".tabList .tab:eq("+selectedTab+")").attr("data-title"));
  129. }
  130. function renderContent(list, contentWrapClassName){
  131. $(`.${contentWrapClassName} .infos`).html('');
  132. $(`.${contentWrapClassName} .anchors ul`).html('');
  133. for (var i = 0; i < list.length; i++) {
  134. var item = list[i];
  135. item.content = item.content&&item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
  136. anchors = '<li><i></i><a href="#' + contentWrapClassName+i +
  137. '">' + item.title + '</a></li><li class="anchor-line"></li>';
  138. str = '<div class="infoBox"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName+i +
  139. '">'
  140. if (getUrlArgObject('type') == 8) {
  141. str += '【' + item.title + '】'
  142. } else {
  143. str += item.title
  144. }
  145. str += '</h2></div>' +
  146. '<div class="contentWrapper"><pre>' + item.content + '</pre><div></div>';
  147. str = `<div class="infoWrapper">${str}</div>`
  148. $(`.${contentWrapClassName} .infos`).append(str);
  149. $(`.${contentWrapClassName} .anchors ul`).append(anchors);
  150. }
  151. function addScrollEvent() {
  152. var scrollTop = $(`.${contentWrapClassName} .infos`).scrollTop()
  153. var divHeight = 0;
  154. for (var i = 0; i < list.length; i++) {
  155. divHeight = divHeight + parseInt($('#'+contentWrapClassName+i).css('height')) + parseInt($('#'+contentWrapClassName+i).parent().next().css('height')) + 20
  156. if (divHeight > scrollTop) {
  157. var anchor = 2 * i;
  158. $(`.${contentWrapClassName} .anchors ul`).children().eq(anchor).addClass('active').siblings().removeClass('active');
  159. return;
  160. }
  161. }
  162. }
  163. $(`.${contentWrapClassName} .infos`).scroll(throttle(addScrollEvent, 200));
  164. addLinkClickEvent(contentWrapClassName);
  165. adjustHeight();
  166. adjustWidth()
  167. }
  168. function renderContentscale(list, contentWrapClassName, name) {
  169. var pushInfo = []
  170. var textType = []
  171. for (var i = 0; i < list[0].detailList.length; i++) {
  172. var item = list[0].detailList[i];
  173. console.log(item.resultType)
  174. textType.push(item.textType)
  175. if (item.textType == 11) {
  176. anchors = '<li><i></i><a href="#' + contentWrapClassName + i +
  177. '">' + item.content + '</a></li><li class="anchor-line"></li>';
  178. item.content = item.content && item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
  179. str = '<div class="infoBox scaleBox" data-id="' + item.id + '"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName + i +
  180. '">'
  181. str += item.content
  182. str += '</h2></div>'
  183. str = `<div class="infoWrapper">${str}</div>`
  184. $(`.${contentWrapClassName} .infos .infos-box`).append(str);
  185. $(`.${contentWrapClassName} .anchors ul`).append(anchors);
  186. for (var j = 0; j < item.subList.length; j++) {
  187. var items = item.subList[j];
  188. for (var k = 0; k < items.detailList.length; k++) {
  189. var it = items.detailList[k];
  190. it.content = it.content && it.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
  191. str = '<div class="contentList" data-id="' + it.parentId + '-' + it.groupNum + '"><div class="item-list">';
  192. if (it.selectType == 21) {
  193. str += '<p class="item-title">' + it.content + '</p>'
  194. } else if (it.selectType == 22) {
  195. str += '<p class="item-titles">' + it.content + '</p>'
  196. }
  197. str += '<div class="item-content" data-id="' + it.id + '">'
  198. str += '</div></div></div>'
  199. $(".scale .infos .infos-box .infoWrapper .infoBox[data-id=" + it.parentId + "]").append(str);
  200. for (var l = 0; l < it.subList[0].detailList.length; l++) {
  201. var its = it.subList[0].detailList[l];
  202. its.content = its.content && its.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
  203. str = '<div class="radio" name="scale' + its.parentId + '" value="' + its.score + '">';
  204. if (it.selectType == 21 && item.resultType == 1) {
  205. str += '<label><input class="radio_type" type="radio" name="scale' + its.parentId + '" value="' + its.score + '"/>'
  206. } else if (it.selectType == 22 && item.resultType == 1) {
  207. str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.score + '"/>'
  208. } else if (it.selectType == 21 && item.resultType == 2) {
  209. str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + it.content + '问题' + its.result + '"/>'
  210. } else if (it.selectType == 22 && item.resultType == 2) {
  211. str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + its.result + '"/>'
  212. }
  213. str += its.content
  214. if (item.resultType == 1) {
  215. str += '<span class="num">' + '(' + its.score + ')' + '</span>'
  216. }
  217. str += '</label>'
  218. str += `${its.match == 1 ? `<img class="recommend" src=${recommend} />` : ``}</div>`
  219. $(".scale .infos .infos-box .infoWrapper .infoBox[data-id=" + it.parentId + "] .contentList .item-content[data-id=" + its.parentId + "]").append(str);
  220. }
  221. }
  222. }
  223. }
  224. if (item.textType == 13) {
  225. for (var m = 0; m < item.subList[0].detailList[0].subList[0].detailList.length; m++) {
  226. var itl = item.subList[0].detailList[0].subList[0].detailList[m]
  227. let arr = {
  228. content: JSON.parse(itl.content),
  229. result: itl.result,
  230. pushInfo: itl.pushInfo
  231. }
  232. pushInfo.push(arr)
  233. }
  234. }
  235. }
  236. str = '<div class="scalebot">'
  237. str += '<p class="score"></p>'
  238. str += '<button class="but">结果</button></div>'
  239. str += `<div class="result"><div class="result_box"><img src=${hel} class="hel"/><span>结果:</span><p id="result_title" class="result_title"></p><textarea id="inputs"></textarea></div></div>`
  240. str += `<div class="foot"><div class="foot_box"><div class="printing"><img src=${printing} class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
  241. $(`.${contentWrapClassName} .infos .infos-box`).append(str);
  242. // str = `<div class="foot"><div class="foot_box"><div class="printing"><img src=${printing} class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
  243. // $(`.${contentWrapClassName} .infos`).after(str);
  244. function addScrollEvent() {
  245. var scrollTop = $(`.${contentWrapClassName} .infos .infos-box`).scrollTop()
  246. var divHeight = 0;
  247. for (var i = 0; i < list.length; i++) {
  248. divHeight = divHeight + parseInt($('#' + contentWrapClassName + i).css('height')) + parseInt($('#' + contentWrapClassName + i).parent().next().css('height')) + 20
  249. if (divHeight > scrollTop) {
  250. var anchor = 2 * i;
  251. $(`.${contentWrapClassName} .anchors ul`).children().eq(anchor).addClass('active').siblings().removeClass('active');
  252. return;
  253. }
  254. }
  255. }
  256. $(`.${contentWrapClassName} .infos .infos-box`).scroll(throttle(addScrollEvent, 200));
  257. addLinkClickEvent(contentWrapClassName);
  258. adjustHeight();
  259. adjustWidth()
  260. getcheck()
  261. getResult(pushInfo, textType)
  262. copy(name)
  263. getprinting()
  264. }
  265. function getprinting() {
  266. $('.printing').click(function () {
  267. $('.foot').hide()
  268. // $('.hel').hide()
  269. $('#Print').css({
  270. 'height': 'auto', //高度自动
  271. }).jqprint();
  272. $('.foot').show()
  273. // $('.hel').show()
  274. })
  275. }
  276. function getcheck() {
  277. $('input:radio').click(function () {
  278. const domName = $(this).attr('name');
  279. const $radio = $(this);
  280. const id = $(this).parents('.contentList').data("id");
  281. if ($radio.data('waschecked') == true) {
  282. $radio.prop('checked', false);
  283. $("input:radio[name='" + domName + "']").data('waschecked', false);
  284. $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
  285. if (isclick) {
  286. getchecks()
  287. $(".score").html('');
  288. $(".result_title").html('');
  289. $(".result").css('display', 'none')
  290. $(".foot").css('display', 'none')
  291. }
  292. } else {
  293. $radio.prop('checked', true);
  294. $("input:radio[name='" + domName + "']").data('waschecked', false);
  295. $radio.data('waschecked', true);
  296. $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
  297. if (isclick) {
  298. getchecks()
  299. console.log(11)
  300. $(".score").html('');
  301. $(".result_title").html('');
  302. $(".result").css('display', 'none')
  303. $(".foot").css('display', 'none')
  304. }
  305. }
  306. });
  307. $('input:checkbox').click(function () {
  308. const domName = $(this).attr('name');
  309. const $radio = $(this);
  310. const id = $(this).parents('.contentList').data("id");
  311. $radio.parents('.contentList').each(function (i) {
  312. if ($(this).find('input[type="checkbox"]:checked').val() == undefined) {
  313. $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
  314. if (isclick) {
  315. getchecks()
  316. $(".score").html('');
  317. $(".result_title").html('');
  318. $(".result").css('display', 'none')
  319. $(".foot").css('display', 'none')
  320. }
  321. } else {
  322. $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
  323. if (isclick) {
  324. getchecks()
  325. $(".score").html('');
  326. $(".result_title").html('');
  327. $(".result").css('display', 'none')
  328. $(".foot").css('display', 'none')
  329. }
  330. }
  331. })
  332. });
  333. }
  334. function copy(name) {
  335. $(".copy").click(function () {
  336. var texts = document.getElementById("result_title").innerText;
  337. if (texts == '') {
  338. Toast('结果为空,无法复制', 500, 'warn')
  339. return
  340. }
  341. var inputs = document.getElementById("inputs");
  342. inputs.value = name + '结果为:' + texts; // 修改文本框的内容(赋值内容)
  343. console.log(inputs.value)
  344. inputs.select(); // 选中文本
  345. document.execCommand("copy"); // 执行浏览器复制命令
  346. Toast('复制成功', 500, 'success')
  347. setTimeout(() => {
  348. window.close()
  349. }, 500)
  350. })
  351. }
  352. function getchecks() {
  353. $(".contentList").each(function (i) {
  354. if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
  355. $(this).find(".item-title").addClass('chColor');
  356. } else {
  357. $(this).find(".item-title").removeClass('chColor');
  358. }
  359. if ($(this).find('input[type="checkbox"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
  360. $(this).find(".item-titles").addClass('chColor');
  361. } else {
  362. $(this).find(".item-titles").removeClass('chColor');
  363. }
  364. });
  365. }
  366. function getResult(pushInfo, textType) {
  367. $(".but").click(function () {
  368. let arr = [];
  369. let multarr = []
  370. let multname
  371. let num = 0
  372. let result
  373. let key = false
  374. let proposal = ''
  375. $(".contentList").each(function (i) {
  376. if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
  377. $(this).find(".item-title").addClass('chColor');
  378. } else {
  379. $(this).find(".item-title").removeClass('chColor');
  380. }
  381. if ($(this).find('input[type="checkbox"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
  382. $(this).find(".item-titles").addClass('chColor');
  383. } else {
  384. $(this).find(".item-titles").removeClass('chColor');
  385. }
  386. });
  387. if (!$(".contentList").find(".item-title").hasClass('chColor') && !$(".contentList").find(".item-titles").hasClass('chColor')) {
  388. isclick = true
  389. $('input[type="radio"]:checked').each(function () {
  390. if (!isNaN($(this).val())) {
  391. num += parseFloat($(this).val())
  392. } else {
  393. arr.push($(this).attr("data_obj"))
  394. }
  395. });
  396. $('input[type="checkbox"]:checkbox:checked').each(function () {
  397. if (!isNaN($(this).val())) {
  398. num += parseFloat($(this).val())
  399. } else {
  400. multname = $(this).parents('.item-content').siblings('.item-titles').html()
  401. multarr.push($(this).attr("data_obj"))
  402. }
  403. });
  404. if (multarr.join("、")) {
  405. console.log(1)
  406. arr.push(multname + multarr.join("、"))
  407. }
  408. console.log(arr)
  409. tmp = arr.join(";");
  410. if (pushInfo.length > 0) {
  411. for (var i = 0; i < pushInfo.length; i++) {
  412. if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min) {
  413. if (tmp) {
  414. result = pushInfo[i].result + '(' + num + '分' + ')' + ';' + tmp
  415. proposal = pushInfo[i].pushInfo
  416. } else {
  417. result = pushInfo[i].result + '(' + num + '分' + ')'
  418. proposal = pushInfo[i].pushInfo
  419. }
  420. } else {
  421. if (tmp) {
  422. result = tmp
  423. }
  424. }
  425. }
  426. } else {
  427. result = tmp
  428. }
  429. if (result == undefined) {
  430. if ($.inArray(13, textType) > 0) {
  431. $(".score").html('总分:' + num + '分');
  432. }
  433. $(".score").css('display', 'block')
  434. $(".copy").css('display', 'none')
  435. $(".foot").css('display', 'block')
  436. } else {
  437. $(".hel").attr({
  438. "title": proposal
  439. });
  440. $(".result_title").html(result);
  441. if ($.inArray(13, textType) > 0) {
  442. $(".score").html('总分:' + num + '分');
  443. }
  444. $(".result").css('display', 'block')
  445. $(".score").css('display', 'block')
  446. $(".copy").css('display', 'block')
  447. $(".foot").css('display', 'block')
  448. }
  449. } else {
  450. Toasts('温馨提示:必填选项不能为空~', 500, 'warn')
  451. }
  452. })
  453. $(".printing").hover(
  454. function () {
  455. $(".slideImg").attr("src", printing2);
  456. }, function () {
  457. $(".slideImg").attr("src", printing);
  458. });
  459. }
  460. function addLinkClickEvent(contentWrapClassName) {
  461. $(`.${contentWrapClassName} .anchors li:first`).addClass("active");
  462. $(`.${contentWrapClassName} .anchors li>a`).on("click", function () {
  463. const that = this
  464. setTimeout(function(){
  465. $(`.${contentWrapClassName} .anchors .active`).removeClass('active');
  466. $(that).parent().addClass("active");
  467. },20)
  468. });
  469. }
  470. function renderTab(detailList, scale){
  471. $(".tabList").html('')
  472. if(detailList['静态知识']){
  473. $(".tabList").append(`<span class="tab" data-module="staticKnowledge" data-title="`+showName+`">静态知识</span>`)
  474. //$(".titleCont .title").html(showName);
  475. }
  476. if(detailList['临床路径']){
  477. $(".tabList").append(`<span class="tab" data-module="clinicalPathway" data-title="`+clinicalPathwayName+`">临床路径</span>`)
  478. //$(".titleCont .title").html(clinicalPathwayName);
  479. }
  480. if(detailList['注意事项']){
  481. $(".tabList").append(`<span class="tab" data-module="notice" data-title="`+noticeName+`">注意事项</span>`)
  482. //$(".titleCont .title").html(noticeName);
  483. }
  484. if (scale) {
  485. $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
  486. //$(".tabBox .title").html(noticeName);
  487. }
  488. if ((getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale) || !detailList['静态知识']) {
  489. $(".tabList .tab").eq(1).addClass("activeTab")
  490. defaultModuleName = $(".tabList .tab").eq(1).attr("data-module")
  491. } else {
  492. $(".tabList .tab").eq(0).addClass("activeTab")
  493. defaultModuleName = $(".tabList .tab").eq(0).attr("data-module")
  494. }
  495. $(`.${defaultModuleName}`).css("display","block")
  496. bindTabClick()
  497. }
  498. function bindTabClick(){
  499. $(".tabList .tab").on("click", function(){
  500. const moduleName = $(this).attr("data-module")
  501. //const display = $(`.${moduleName}`).css("display")
  502. selectedTab=$('.tabList .tab').index(this);
  503. $(".titleCont .title").html($(this).attr('data-title'));
  504. //if(display == "none"){
  505. $(".activeTab").removeClass("activeTab")
  506. $(this).addClass("activeTab")
  507. $(".container").css("display","none")
  508. $(`.${moduleName}`).css("display","block")
  509. $(`.${moduleName} .infos`).scrollTop(0)
  510. //}
  511. })
  512. $("#openWin").on("click",function(){
  513. const type= getUrlArgObject('type');
  514. const hospitalId= getUrlArgObject('hospitalId');
  515. const hisName= getUrlArgObject('hisName');
  516. const hisDetailName= getUrlArgObject('hisDetailName');console.log(selectedDrop)
  517. openNewWin("staticInfoOut.html?hospitalId="+encodeURIComponent(hospitalId)+"&hisName="+encodeURIComponent(hisName)+"&hisDetailName="+encodeURIComponent(hisDetailName||'')+"&type="+encodeURIComponent(type)+"&d="+selectedDrop+"&t="+selectedTab);
  518. })
  519. }
  520. function adjustHeight() {
  521. var ht = window.innerHeight || document.documentElement.clientHeight;
  522. $(".content,.content .infos").height(ht - 198 + "px");
  523. /*$(".anchors").height(ht - 258 + "px");*/
  524. }
  525. function adjustWidth() {
  526. var wt = window.innerWidth || document.documentElement.clientWidth;
  527. $(".titleH2").width(wt- 0.2*wt -33 - 200 - 17 - 40 -15 + 'px')
  528. //$("pre").width(wt- 0.2*wt - 200 + 'px')
  529. }
  530. $(window).on('resize', function(){
  531. adjustHeight()
  532. adjustWidth()
  533. })