Bladeren bron

医学知识

zhangxc 6 jaren geleden
bovenliggende
commit
25f07d785c

+ 5 - 0
src/common/less/variables.less

@@ -242,3 +242,8 @@
     opacity: .5;
   }
 }
+.ellipsis {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}

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

@@ -24,7 +24,13 @@ class MedicalInfo extends Component {
         return <div className={style['search-result']}>
             {
             searchResult && searchResult.map((item) => {
-                return (<div key={item.conceptId} className={style['search-result-item']} onClick={() =>getAllConceptDetail({name: item.name, type: item.type})}>{item.name + '('+ item.libTypeName + ')'}</div>)
+                return (<div key={item.conceptId} className={style['search-result-item']} >
+                   <span className={style['search-result-item-box']} title={item.name + '('+ item.libTypeName + ')'}>
+                    <span className={style['search-result-item-name']}> {item.name} </span> 
+                    <span className={style['search-result-item-type']}> {'('+ item.libTypeName + ')'} </span>
+                   </span>
+                   <span className={style['search-result-item-btn']} onClick={() =>getAllConceptDetail({name: item.name, type: item.type})}>查看</span>
+                </div>)
             })
             }
         </div>
@@ -34,9 +40,11 @@ class MedicalInfo extends Component {
         return (
         <div className={style['mefical-info-wrapper']}> 
             <div ref={this.$cont}>
-                <SearchOption handleChangeValue={handleChangeValue} pageTop={pageTop} windowHeight={windowHeight} height={180} visible={true}>
-                    {this.getSearchList(searchResult)}
-                </SearchOption>
+                <div className={style['mefical-info-search-box']}>
+                    <SearchOption handleChangeValue={handleChangeValue}  height={180} visible={true}>
+                        {this.getSearchList(searchResult)}
+                    </SearchOption>
+                </div>
              </div>
 
         </div>

+ 41 - 0
src/components/MedicalInfo/index.less

@@ -5,4 +5,45 @@
     width: @push-width;
     overflow: hidden;
     position: relative;
+}
+.mefical-info-search-box {
+    position: absolute;
+    left: 67px;
+}
+.search-result {
+    overflow-y: auto;
+    max-height: 225px;
+    min-height: 80px;
+}
+
+.search-result-item {
+    padding: 0 30px;
+    height: 36px;
+    line-height: 36px;
+    cursor: pointer;
+    position: relative;
+}
+
+.search-result-item:hover {
+    border: 1px solid @blue;
+}
+.search-result-item-box {
+    display: inline-block;
+    width: 200px;
+    .ellipsis
+}
+.search-result-item-type {
+    color: @blue;
+}
+.search-result-item-btn {
+    .btnCom;
+    display: inline-block;
+    border: 1px solid @blue;
+    color: @blue;
+    width: 40px;
+    height: 28px;
+    line-height: 28px;
+    position: absolute;
+    right: 15px;
+    top: 3px;
 }

+ 4 - 4
src/components/PushContainer/index.jsx

@@ -24,9 +24,9 @@ class PushContainer extends Component {
             }, {
                 title: '模板',
             },
-            // {
-            //     title: '医学知识',
-            // }
+            {
+                title: '医学知识',
+            }
             ],
             visible:false,
             message:'',                 //提示的内容
@@ -255,7 +255,7 @@ class PushContainer extends Component {
                         handleMangerTemplate={this.handleMangerTemplate}
                         handleAllCheckbox={this.handleAllCheckbox}
                     ></TemplateItems>
-                    {/* <MedicalInfoContainer></MedicalInfoContainer> */}
+                    <MedicalInfoContainer></MedicalInfoContainer>
                 </TemplateContainer>
             </Tab>
             <ConfirmModal