Bläddra i källkod

Merge remote-tracking branch 'origin/scale0414' into testNew

zhouna 4 år sedan
förälder
incheckning
afd8863c18

+ 0 - 0
src/css/common.css


+ 6 - 2
src/css/followUpV.less

@@ -62,9 +62,13 @@
 .pacsBox{
     margin-top: 10px;
 }
-.infoBox:hover{
+
+/*.infoBox:hover{
     background: #EEEEEE;
-}
+    .title h2 {
+        background: #EEEEEE;
+    }
+}*/
 .itemBoxTitle{
     position: absolute;
     left: 0;

+ 80 - 19
src/css/searchStaticList.less

@@ -124,9 +124,9 @@
 }
 .staticResult {
     .resultItem {
-        padding: 20px 38px;
-        background-color: #F4FBFF;
-        margin-bottom: 20px;
+      padding: 14px 38px;
+      background-color: #EDFAFF;
+      margin-bottom: 14px;
         cursor: pointer;
         div {
             line-height: 20px;
@@ -143,7 +143,8 @@
         background-color: @staticMainColor;
     }
     .code{
-        color: @staticMainColor;
+      font-size: 14px;
+      color: #999;
         margin-left: 10px;
     }
     .drug{
@@ -186,10 +187,11 @@
         input::-webkit-inner-spin-button {
             -webkit-appearance: none;
         }
+      font-size: 12px;
         input {
-            width: 40px;
-            height: 30px;
-            line-height: 30px;
+          width: 25px;
+          height: 22px;
+          line-height: 22px;
             text-align: center;
             border-radius: 3px;
             border: 1px solid @staticMainColor;
@@ -198,41 +200,42 @@
         }
     }
     .select {
+      font-size: 12px;
         color: @staticMainColor;
-        height: 30px;
-        line-height: 30px;
+      height: 22px;
+      line-height: 22px;
         border: 1px solid @staticMainColor;
         border-radius: 3px;
         box-sizing: border-box;
         position: relative;
-        top: -2px;
         margin-right: 10px;
         outline: none;
     }
     .totalSum{
         display: inline-block;
         font-size:12px;
-        height: 30px;
-        line-height:30px;
+      height: 22px;
+      line-height: 22px;
         color: @staticMainColor;
         margin-right: 10px;
         position: relative;
-        top: -2px;
     }
     .pageNum,.prePage,.nextPage, .more{
+      font-size: 12px;
         display: inline-block;
         box-sizing: border-box;
-        width: 30px;
-        height: 30px;
+      /*width: 30px;
+      height: 30px;*/
         line-height: 30px;
         cursor: pointer;
         margin: 0 10px 0 0;
         text-align: center;
-        color: #777;
-        border: 1px solid @staticMainColor;
         color: @staticMainColor;
         border-radius: 3px;
     }
+  .pageNum {
+    text-decoration: underline;
+  }
     .prePage,.nextPage{
         img{
             position: relative;
@@ -243,10 +246,11 @@
         cursor: not-allowed;
     }
     .arrowPage{
-        width: 12px;
+      width: 10px;
     }
     .activePage{
-        color: red;
+      color: #FE7D3D;
+      text-decoration: none;
     }
     
     .tipIcon{
@@ -287,6 +291,63 @@
     
 }
 
+.warning-box {
+  display: none;
+  position: fixed;
+  width: 100%;
+  height: 100%;
+  top: 0;
+  left: 0;
+  .bg {
+    width: 100%;
+    height: 100%;
+    background: #000;
+    opacity: .3;
+    z-index: 999;
+  }
+  .inner-box {
+    width: 400px;
+    background: #fff;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    margin: -90px 0 0 -200px;
+    color: #333;
+    border-radius: 4px;
+  }
+  .title {
+    border-bottom: 1px #EBEBEB solid;
+    height: 40px;
+    line-height: 40px;
+    span {
+      margin-left: 20px;
+    }
+    i {
+      margin-left: 322px;
+      font-size: 16px;
+      cursor: pointer;
+    }
+  }
+  .content {
+    padding: 30px 20px;
+    img {
+      width: 20px;
+      height: 20px;
+      vertical-align: middle;
+      margin-right: 10px;
+    }
+  }
+  button {
+    width: 60px;
+    height: 34px;
+    background: @staticMainColor;
+    color: #fff;
+    text-align: center;
+    border-radius: 3px;
+    margin: 0 0 20px 322px;
+  }
+}
+
 
 
 

+ 5 - 1
src/css/staticInfoOut.less

@@ -76,12 +76,16 @@ div,li,span,i,p,h1,h2,h3,h4,h5,pre{
   }
 
   .infos>div {
-    margin-right: 160px;
+    margin-right: 6.5%;
     .contentWrapper img{
       width: 100%;
     }
   }
 
+.infoBox {
+  border-bottom: 1px #E6E6E6 solid;
+  margin-bottom: 10px;
+}
   .title {
     position: relative;
     line-height: 24px;

+ 15 - 0
src/html/searchStaticList.html

@@ -45,6 +45,21 @@
       </div>
     </div>
   </div>
+  <div class="warning-box">
+    <div class="bg"></div>
+    <div class="inner-box">
+      <div class="title">
+        <span>提示</span>
+        <i class="close">×</i>
+      </div>
+      <div class="content">
+        <img src="../images/warn.png" alt=""><span></span>
+      </div>
+      <div class="btn">
+        <button class="confirm">确定</button>
+      </div>
+    </div>
+  </div>
 </body>
 </html>
 

BIN
src/images/warn.png


+ 29 - 3
src/js/searchStaticList.js

@@ -3,7 +3,7 @@ require('./../css/searchStaticList.less');
 const $ = require("jquery");
 const { post,config,getUrlArgObject,openNewWin } = require('./promise.js');
 
-let searchType = 0,inputStr = '',curPage=1,size=10;
+let searchType = 0, inputStr = '', curPage = 1, size = 10, totalPage = 1;
 searchType = getUrlArgObject('type') || 0
 inputStr = getUrlArgObject('inputStr') || ''
 
@@ -13,6 +13,7 @@ require('./../images/staticBgS.png').replace(/^undefined/g, '')
 require('./../images/staticLogo.png').replace(/^undefined/g, '')
 require('./../images/staticBg.png').replace(/^undefined/g, '')
 require('./../images/nolis.png').replace(/^undefined/g, '')
+require('./../images/warn.png').replace(/^undefined/g, '')
 
 $(function(){
   initData()
@@ -60,6 +61,11 @@ function getSearchList(){
 }
 function getTabData(){
     let vals = $('.searchStr').val();
+    if (!vals) {
+        $(".staticResult .loading").hide();
+        toggleWarnBox('检索词不能为空!');
+        return;
+    }
     let param = {
         size,
         current:curPage,
@@ -72,7 +78,7 @@ function getTabData(){
       if(result.code == 0) {
         const data = result.data;
         tabList = data.records;
-        const totalPage = data.pages;
+          totalPage = data.pages;
         const totalNum = data.total;
         renderList(tabList);
         if(totalNum > 0){
@@ -127,6 +133,15 @@ function initData(){
         $(".searchStr").val(inputStr)
     }
 }
+
+function toggleWarnBox(text) {
+    if (text) {
+        $(".warning-box .content span").text(text);
+        $(".warning-box").show();
+    } else {
+        $(".warning-box").hide();
+    }
+}
 // 分页
 function renderPagination(totalPage,activePage,totalNum){
     let str = `<span class="totalSum">共${totalNum}条</span>
@@ -201,8 +216,19 @@ function renderPagination(totalPage,activePage,totalNum){
         getTabData()
     })
     $('.goNum input').change(function(){
-        curPage = $(this).val()
+        const n = $(this).val()
+        if (totalPage < n) {
+            toggleWarnBox("输入页数不能大于最大页数");
+            return;
+        }
+        curPage = n;
         getTabData()
     })
 }
 
+$(function () {
+    $(".warning-box .confirm,.warning-box .close").click(function () {
+        toggleWarnBox();
+    })
+})();
+

+ 1 - 1
src/js/staticInfoOut.js

@@ -229,7 +229,7 @@ function adjustHeight() {
 function adjustWidth() {
   var wt = window.innerWidth || document.documentElement.clientWidth;
   $(".titleH2").width(wt- 0.2*wt -33 - 200 - 17 - 40 -15 + 'px')
-  $("pre").width(wt- 0.2*wt - 200 + 'px')
+    //$("pre").width(wt- 0.2*wt - 200 + 'px')
 }
 $(window).on('resize', function(){
   adjustHeight()