浏览代码

问题修改

1178232204@qq.com 3 年之前
父节点
当前提交
8d27519539
共有 4 个文件被更改,包括 27 次插入14 次删除
  1. 1 1
      src/html/searchStaticList.html
  2. 9 8
      src/js/homeStatic.js
  3. 5 0
      src/js/searchStaticList.js
  4. 12 5
      src/js/staticSearch.js

+ 1 - 1
src/html/searchStaticList.html

@@ -53,7 +53,7 @@
         </div>
         <div class="resultItemEmpty">
           <img src="../images/nolis.png" alt="">
-          <p>抱歉,没有找到您要查询的知识</p>
+          <p>暂无数据~</p>
         </div>
         <div class="pagination"></div>
       </div>

+ 9 - 8
src/js/homeStatic.js

@@ -3,7 +3,7 @@ require('./../css/homeStatic.less');
 const $ = require("jquery");
 const { post, config, } = require('./promise.js');
 const { toggleWarnBox } = require('./util.js');
-let searchType = 0,codeType = 1,codeVal = 1;
+let searchType = 0, codeType = 1, codeVal = 1;
 require('./../images/staticBgS.png').replace(/^undefined/g, '')
 require('./../images/staticLogo.png').replace(/^undefined/g, '')
 require('./../images/staticBg.png').replace(/^undefined/g, '')
@@ -37,7 +37,7 @@ function goSearchList() {
       toggleWarnBox('检索词不能为空!');
       return;
     }
-    window.location.href = './searchStaticList.html?type=' + searchType + '&inputStr=' + vals+ '&codeType=' + codeType+ '&codeVal=' + codeVal
+    window.location.href = './searchStaticList.html?type=' + searchType + '&inputStr=' + vals + '&codeType=' + codeType + '&codeVal=' + codeVal
   })
 }
 //获取字典信息
@@ -82,13 +82,14 @@ $(function () {
     $(".seleName").html($(this).text())
     $(".selc-list").css('display', 'none')
     $('.code-list li').eq(0).css({ borderColor: '#fff' }).siblings().css({ borderColor: '#2A9BD5' })
+    $('.knowledge li').eq(0).css({ borderColor: '#fff' }).siblings().css({ borderColor: '#2A9BD5' })
     $(".selectItem .arrow").attr("src", iconDown)
-    if(codeVal == 1){
-      $(".staticTopTab .code-list").css('display','none')
-      $(".staticTopTab .knowledge").css('display','block')
-    }else{
-      $(".staticTopTab .code-list").css('display','block')
-      $(".staticTopTab .knowledge").css('display','none')
+    if (codeVal == 1) {
+      $(".staticTopTab .code-list").css('display', 'none')
+      $(".staticTopTab .knowledge").css('display', 'block')
+    } else {
+      $(".staticTopTab .code-list").css('display', 'block')
+      $(".staticTopTab .knowledge").css('display', 'none')
     }
   })
 

+ 5 - 0
src/js/searchStaticList.js

@@ -279,6 +279,8 @@ $(function () {
         codeVal = $(this).attr('data-val')
         $(".searchStr").val('')
         $(this).addClass('active').siblings().removeClass('active');
+        $(".knowledge li").eq(0).addClass('tabFst').siblings().removeClass('tabFst')
+        $(".code-list li").eq(0).addClass('code-active').siblings().removeClass('code-active')
         $(".seleName").html($(this).text())
         $(".selc-list").css('display', 'none')
         $(".selectItem .arrow").attr("src", iconDown)
@@ -289,6 +291,9 @@ $(function () {
             $(".staticTopTab .code-list").css('display', 'block')
             $(".staticTopTab .knowledge").css('display', 'none')
         }
+        $(".resultItemWrap").css('display', 'none')
+        $(".resultItemEmpty").css('display', 'block')
+        $('.pagination').html("")
     })
 
     $(".staticTopTab .code-list li").click(function () {

+ 12 - 5
src/js/staticSearch.js

@@ -37,7 +37,10 @@ $(".header-tab li").click(function () {
     $(this).attr("class", "choice")
     $(this).siblings().attr("class", "")
     $('.radio-list').find('input[value=1]').prop("checked", true)
-    console.log(123);
+    for (let i = 0; i < medicalTypesList.length; i++) {
+        medicalTypesList[i].checked = false
+    }
+    medicalTypesList[0].checked = true
     // 获取tab ID
     if (tabid == 1) {
         $(".radio-list").css('display', 'none')
@@ -48,8 +51,13 @@ $(".header-tab li").click(function () {
         $(".searchTypeBox").css('display', 'none')
 
     }
+
     $(".searchKnowledge .staticSearchB .tip").css({ display: 'none' })
+    $(".searchKnowledge .staticSearchB .empty").css({ display: 'none' })
+    $(".searchKnowledge .staticSearchB .searching").css({ display: 'none' })
+    $(".searchKnowledge .staticSearchB .inputWarning").css({ display: 'none' })
     $(".searchKnowledge .staticSearchB ul").html('')
+    renderMedicalType(medicalTypesList)
 })
 $(".check-box").click(function () {
     type = $(this).find('input[name=ICD10]').val()
@@ -146,9 +154,10 @@ function getKnowledgeData(value) {
                 medicalTypes.push(medicalTypesList[i].val)
             }
         }
+
         url = config.getStaticKnowledge
         param = {
-            inputStr: value.replace(/\\/g, '\\\\').replace(/%/g, '\\%').replace(/\_/g, '\\_').trim(),
+            inputStr: value.trim(),
             types: medicalTypes
         }
     } else {
@@ -156,7 +165,7 @@ function getKnowledgeData(value) {
         param = {
             current: 0,
             size: 100,
-            inputStr: value.replace(/\\/g, '\\\\').replace(/%/g, '\\%').replace(/\_/g, '\\_').trim(),
+            inputStr: value.trim(),
             type: type
         }
     }
@@ -218,9 +227,7 @@ function getKnowledgeData(value) {
         }
     })
 }
-function getDiseaseIndex() {
 
-}
 function adjustHeight() {
     var ht = window.innerHeight;
     var containerHt = $(".medicalKonwledgeWrap .container").height()