cdssPlan.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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/reset.css');
  10. require('./../css/cdssPlan.less');
  11. require('./../css/popup.css');
  12. require('./../css/followUpV.less');
  13. require('./../css/staticSearch.css')
  14. require('./../js/staticSearch.js') //静态知识搜索
  15. require('./../images/empty.png').replace(/^undefined/g, '')
  16. require('./../images/empty2.png').replace(/^undefined/g, '')
  17. require('./../images/empty3.png').replace(/^undefined/g, '')
  18. require('./../images/loading.gif').replace(/^undefined/g, '')
  19. require('./../images/right.png').replace(/^undefined/g, '')
  20. require('./../images/new.png').replace(/^undefined/g, '')
  21. const $ = require("jquery");
  22. const { post,config,getUrlArgObject,openNewWin,titleConfig } = require('./promise.js');
  23. const { renderFollowUp } = require('./followUp.js');
  24. //静态知识类型: 1:诊断 2.药品 3.化验套餐 4.化验明细 5.辅检 6.手术和操作
  25. let mrId = getUrlArgObject('mrId')
  26. let msg;
  27. function getMRInfo() {
  28. return post(config.getMr2,{mrId:mrId})
  29. }
  30. // $('.loading').css("display","block")
  31. $('.empty').css("display","none")
  32. if(mrId){
  33. getMRInfo().then(res =>{
  34. if(res.data.code == '0'){
  35. msg = res.data.data ||{}
  36. window.msg = msg
  37. renderFollowUp(msg)
  38. }
  39. }).catch(function (err) {
  40. console.log(err);
  41. })
  42. } else{
  43. }
  44. let disName=""
  45. function handleShow(){
  46. const newinConf = {
  47. width: '600', //窗口的文档显示区的宽度。以像素计。
  48. height: '826', //窗口文档显示区的高度。以像素计。
  49. left: '0', //窗口的 x 坐标。以像素计。
  50. top: '0', //窗口的 y 坐标。以像素计。
  51. openMode: "_blank" //每次都是新窗口打开为_blank,打开同一窗口填写任意字符串
  52. }
  53. const newWindowLocation = `width=${newinConf.width}, height=${newinConf.height}, left=${newinConf.left}, top=${newinConf.top} scrollbars=yes`
  54. window.open('./emergency.html?disName='+disName, newinConf.openMode, newWindowLocation)
  55. }
  56. $(document).on('click',".allDis .allName",function(){
  57. handleShow()
  58. })
  59. $(document).on('click',".singleDis",function(){
  60. $(this).next().css("display","block")
  61. $(this).css("display","none")
  62. })
  63. $(document).on('click',".allDis .right,.allDis .secDis",function(){
  64. $(".allDis").css("display","none")
  65. $(".singleDis").css("display","block")
  66. })
  67. function adjustHei(){
  68. const iframeHei = $(".bodyWrap").height()
  69. const tabHei = $(".tabList").height()
  70. $(".contentWrapper").css("height",iframeHei-tabHei-20-30+3+19+'px')
  71. }
  72. $(function(){
  73. $.fn.extend({
  74. "preventScroll":function(){
  75. $(this).each(function(){
  76. var _this = this;
  77. if(navigator.userAgent.indexOf('Firefox') >= 0){ //firefox
  78. _this.addEventListener('DOMMouseScroll',function(e){
  79. _this.scrollTop += e.detail > 0 ? 60 : -60;
  80. e.preventDefault();
  81. },false);
  82. }else{
  83. _this.onmousewheel = function(e){
  84. e = e || window.event;
  85. _this.scrollTop += e.wheelDelta > 0 ? -60 : 60;
  86. return false;
  87. };
  88. }
  89. })
  90. }
  91. });
  92. // $(".iframeWrap").preventScroll();
  93. $(".iframeWrap").preventScroll();
  94. $(".recommendWrap").preventScroll();
  95. $(".infoWrap").preventScroll();
  96. $(".medicalKonwledgeWrap .staticSearchB ul").preventScroll();
  97. $(window).on("resize", function(){
  98. $(".iframeWrap").preventScroll();
  99. $(".recommendWrap").preventScroll();
  100. $(".medicalKonwledgeWrap .staticSearchB ul").preventScroll();
  101. adjustHei()
  102. })
  103. });