浏览代码

修改治疗方案小标题样式

zhangxc 6 年之前
父节点
当前提交
859a7364a9

+ 3 - 2
src/components/Treat/GeneralTreat/index.jsx

@@ -7,10 +7,11 @@ class GeneralTreat extends Component {
     }
 
     render() {
-        const { icon, titleBg, filter, title, generalTreat } = this.props
+        const { icon, titleStyle,titleBg, filter, title, generalTreat } = this.props
         return(
             generalTreat && generalTreat.length > 0 && <div className={style['general-wrapper']}>
-                <div className={style['general-title']} style={{background: titleBg,filter:filter}}><img className={style['general-icon']} src={icon}/>{title}</div>
+                <div className={style['general-title-box']} style={titleStyle}></div>
+                <div className={style['general-title']} ><img className={style['general-icon']} src={icon}/>{title}</div>
                 <div className={style['general-item']} dangerouslySetInnerHTML={{__html: generalTreat}}>
                 </div>
 

+ 12 - 0
src/components/Treat/GeneralTreat/index.less

@@ -1,7 +1,19 @@
 .general-wrapper {
+    position: relative;
     padding: 10px 0 0 0;
 }
+.general-title-box {
+    height: 36px;
+    line-height: 36px;
+    background: rgb(47,199,156);
+    opacity: 0.1;
+    filter:alpha(opacity=10);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=10);";
+}
 .general-title {
+    position: absolute;
+    width: 100%;
+    top: 10px;
     height: 36px;
     line-height: 36px;
 }

+ 2 - 2
src/components/Treat/index.jsx

@@ -53,8 +53,8 @@ class Treat extends Component {
                                 setOtherRecommend={ setOtherRecommend } 
                                 showDrugInfo = {showDrugInfo}
                                 setDrugInfo={ setDrugInfo }>
-                        </DrugTreat>
-                        <GeneralTreat icon={surgicalIcon} title='手术治疗' titleBg='#FAEAEA' generalTreat={surgeryTreat}></GeneralTreat>
+                        </DrugTreat> 
+                        <GeneralTreat icon={surgicalIcon} title='手术治疗' titleStyle={{background:'#FAEAEA',opacity:'1', filter:'alpha(opacity=100);',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=100);'}} titleBg='#FAEAEA' generalTreat={surgeryTreat}></GeneralTreat>
                     </div>
                     <div className={style['bottom']}>
                         <span className={style['prescription-btn']} onClick={this.handlePrescription}>开处方</span> <span className={style['determine-btn']} onClick={this.handleDetermine}>确定</span>