Browse Source

添加网页查看按钮

zhouna 4 years ago
parent
commit
0782e507db

+ 18 - 1
src/css/information.less

@@ -235,4 +235,21 @@
   }
   }
   .ql-align-center{
   .ql-align-center{
     text-align: center;
     text-align: center;
-  }
+  }
+.open-win{
+  position: absolute;
+  right: 15px;
+  bottom: 8px;
+  cursor: pointer;
+  color: #3B9ED0;
+  font-size: 14px;
+  padding-left: 30px;
+  background: url("../images/link.png") 0 -2px no-repeat;
+  background-size: 25px 25px;
+  /*img{
+    width: 30px;
+    height: 30px;
+    vertical-align: middle;
+    margin-right: 10px;
+  }*/
+}

+ 11 - 0
src/css/informationOut.less

@@ -304,4 +304,15 @@
     font-size: 15px;
     font-size: 15px;
     color: #aaa;
     color: #aaa;
   }
   }
+}
+.open-win{
+  position: absolute;
+  right: 15px;
+  bottom: 8px;
+  cursor: pointer;
+  color: #3B9ED0;
+  font-size: 14px;
+  padding-left: 30px;
+  background: url("../images/link.png") 0 -2px no-repeat;
+  background-size: 25px 25px;
 }
 }

+ 1 - 0
src/html/information.html

@@ -19,6 +19,7 @@
     <div class="tabList">
     <div class="tabList">
      
      
     </div>
     </div>
+      <a id="openWin" class="open-win">网页查看</a>
   </div>
   </div>
   
   
   <div class=" container disCopy staticKnowledge">
   <div class=" container disCopy staticKnowledge">

+ 1 - 0
src/html/informationOut.html

@@ -26,6 +26,7 @@
     <div class="tabList">
     <div class="tabList">
      
      
     </div>
     </div>
+    <a id="openWin" class="open-win">网页查看</a>
   </div>
   </div>
   
   
   <div class=" container disCopy staticKnowledge">
   <div class=" container disCopy staticKnowledge">

BIN
src/images/link.png


+ 13 - 1
src/js/information.js

@@ -12,7 +12,8 @@ const {
   throttle,
   throttle,
   imageUrlPrefix,
   imageUrlPrefix,
   config,
   config,
-  getUrlArgObject
+  getUrlArgObject,
+  openNewWin
 } = require('./promise.js');
 } = require('./promise.js');
 const $ = require("jquery");
 const $ = require("jquery");
 let showName,noticeName,clinicalPathwayName
 let showName,noticeName,clinicalPathwayName
@@ -153,6 +154,13 @@ function bindTabClick(){
       $(`.${moduleName} .infos`).scrollTop(0)
       $(`.${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() {
 function adjustHeight() {
   var ht = window.innerHeight || document.documentElement.clientHeight;
   var ht = window.innerHeight || document.documentElement.clientHeight;
@@ -168,3 +176,7 @@ $(window).on('resize', function(){
   adjustWidth()
   adjustWidth()
 })
 })
 
 
+//如果是子窗口,隐藏网页查看按钮
+if(window.opener){
+  $("#openWin").hide();
+}

+ 13 - 1
src/js/informationOut.js

@@ -12,7 +12,8 @@ const {
   throttle,
   throttle,
   imageUrlPrefix,
   imageUrlPrefix,
   config,
   config,
-  getUrlArgObject
+  getUrlArgObject,
+  openNewWin
 } = require('./promise.js');
 } = require('./promise.js');
 const $ = require("jquery");
 const $ = require("jquery");
 let showName,noticeName,clinicalPathwayName,showLis=[]
 let showName,noticeName,clinicalPathwayName,showLis=[]
@@ -196,6 +197,13 @@ function bindTabClick(){
       $(`.${moduleName} .infos`).scrollTop(0)
       $(`.${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() {
 function adjustHeight() {
   var ht = window.innerHeight || document.documentElement.clientHeight;
   var ht = window.innerHeight || document.documentElement.clientHeight;
@@ -210,4 +218,8 @@ $(window).on('resize', function(){
   adjustHeight()
   adjustHeight()
   adjustWidth()
   adjustWidth()
 })
 })
+//如果是子窗口,隐藏网页查看按钮
+if(window.opener){
+  $("#openWin").hide();
+}