瀏覽代碼

知识搜索同义词样式修改

zhouna 6 年之前
父節點
當前提交
79dc058486

+ 3 - 4
src/components/MedicalInfo/index.jsx

@@ -21,14 +21,13 @@ class MedicalInfo extends Component {
     }
     getSearchList() {
         const { getAllConceptDetail,searchResult } = this.props;
-      let showSubName = false;
         return searchResult && searchResult.map((item) => {
-          showSubName = item.type == 51 ? true : false;
           return <li key={item.conceptId}
                      title='点击查看详情'
                      onClick={() => getAllConceptDetail({name: item.name, type: item.type, uname: item.uniqueName})}>
-            <span>{item.name}{showSubName ? '(' + item.retrievalName + ')' : ''}</span>
+            <span>{item.name}</span>
             <i>( {item.libTypeName} )</i>
+            {item.retrievalName?<p>• {item.retrievalName}</p>:''}
             {/*<button>查看</button>*/}
           </li>;
             });
@@ -95,7 +94,7 @@ class MedicalInfo extends Component {
         return (
             <div className={style['search-cont']} ref={this.$cont}>
               <div className={style['search-box']}>
-                <p className={style['title']}>医学知识搜索<i>(支持同义词检索)</i></p>
+                <p className={style['title']}>医学知识搜索</p>
                 <p className={style['cont']}>
                   <input type="text" className={style['input']} ref={this.$inp} onInput={this.handleChange} onKeyUp={this.handleEnter}/>
                   {val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}

+ 10 - 3
src/components/MedicalInfo/index.less

@@ -32,10 +32,10 @@
         font-size: 12px;
         color:#979797;
         margin-bottom: 10px;
-        i {
+        /*i {
             color: #f93333;
             font-size: 12px;
-        }
+        }*/
     }
     .input{
         display: inline-block;
@@ -62,8 +62,15 @@
         box-sizing: border-box;
         li{
             border-bottom:1px #CECECE solid;
-            line-height: 42px;
+            line-height: 30px;
+            padding-top: 5px;
             cursor: pointer;
+            p{
+                color:#979797;
+                font-size: 12px;
+                margin-bottom: 10px;
+                line-height: 20px;
+            }
             span{
                 font-size: 14px;
                 color: #000;

+ 1 - 0
src/components/ScaleSearch/index.jsx

@@ -42,6 +42,7 @@ class ScaleSearch extends Component {
                  title='点击查看详情'
                  onClick={this.showScale.bind(this,{conceptId:item.conceptId,name:item.name})}>
         <span className={style['scale-name']}>{item.name}{this.getResult(item.conceptId)}</span>
+        {item.showType===0?<p>• {item.searchName}</p>:''}
         {/*<button>查看</button>*/}
       </li>;
     });

+ 6 - 0
src/components/ScaleSearch/index.less

@@ -60,6 +60,12 @@
       border-bottom:1px #CECECE solid;
       line-height: 42px;
       cursor: pointer;
+      p{
+        color:#979797;
+        font-size: 12px;
+        margin-bottom: 10px;
+        line-height: 20px;
+      }
       span{
         font-size: 14px;
         color: #000;