Jelajahi Sumber

Merge remote-tracking branch 'origin/ChronicMag' into ChronicMag

zhouna 6 tahun lalu
induk
melakukan
cfbb117bff

+ 1 - 1
src/common/components/EditableSpan/index.jsx

@@ -82,7 +82,7 @@ class EditableSpan extends Component{
     this.setState({
       labelVal:text1
     });
-
+    
     const that = this;
     handleChange&&handleChange({text1,boxMark,i});
 

+ 1 - 1
src/common/components/Textarea/index.jsx

@@ -24,7 +24,7 @@ class Textarea extends Component {
     const {handleFocus,fuzhen,handleInput,isChronic} = this.props;
     handleFocus&&handleFocus();         //其他史、查体获取数据的方法
     if(fuzhen&& !isChronic.name&&!(this.$dom.current.innerText?this.$dom.current.innerText:this.$dom.current.innerHTML)){
-      const text = config.currentText.replace("(**)",fuzhen);
+      const text = config.currentText.replace("(**)",fuzhen.replace(";",''));
       this.$dom.current.innerText?(this.$dom.current.innerText = text):(this.$dom.current.innerHTML = text);
       handleInput&&handleInput({text});
     }

+ 4 - 1
src/components/Advice/Textarea/index.jsx

@@ -30,7 +30,7 @@ class Textarea extends Component {
     return true;
   }
   componentWillReceiveProps(next){
-    const isRead = this.props.isRead;
+    const {isRead, typeConfig} = this.props;
     // if(next.isRead != isRead && next.value!=this.props.value){      //value对比解决复诊不显示bug
     //   next.value ? this.$dom.current.innerText = next.value :  this.$dom.current.innerText = next.value 
     //   // this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
@@ -39,6 +39,9 @@ class Textarea extends Component {
       next.value ? this.$dom.current.innerText = next.value :  this.$dom.current.innerText = '' 
       // this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
     }
+    if(next.typeConfig != typeConfig) {
+      this.$dom.current.innerText = '' 
+    }
   }
   componentDidMount(){
     const {value} = this.props;

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

@@ -66,7 +66,7 @@ class Advice extends Component{
 
   render(){
     const {advice} = this.props.pushMessage;
-    const {isRead, isFirstMainDiag, followUp, hasFollowUp, saveFollowUp} = this.props
+    const {isRead, isFirstMainDiag, followUp, hasFollowUp, saveFollowUp, typeConfig} = this.props
     let scheme = advice.scheme && advice.scheme.map((item, index) => {
       return <p>{item.treatment.map((it,ii) =>{
         return(it.treatmentStr && it.treatmentStr.length > 0 ? 
@@ -101,7 +101,7 @@ class Advice extends Component{
         <div className={style['billing']} > 
             {/* {!advice.adviceInput && <Textarea value='' isRead={isRead} handleChangeAssistValue={this.handleAdviceInput} ></Textarea>}
             {advice.adviceInput && <Textarea value={advice.adviceInput} isRead={isRead} handleChangeAssistValue={this.handleAdviceInput} ></Textarea>} */}
-            <Textarea value={advice.adviceInput} isRead={isRead} handleChangeAssistValue={this.handleAdviceInput} ></Textarea>
+            <Textarea value={advice.adviceInput} isRead={isRead} handleChangeAssistValue={this.handleAdviceInput}  typeConfig={typeConfig}></Textarea>
         </div>
       </ItemBox>
     </div>

+ 4 - 3
src/components/TreatDesc/DrugInfo/index.jsx

@@ -53,11 +53,12 @@ class DrugInfo extends Component {
     render() {
         const { drugInfo, hideDrugInfo, drugInfoList,hideDrugInfoMore } = this.props
         const { currentIndex } = this.state
+        {console.log('drugInfodrugInfo', drugInfo)}
         return (<div className={style['drug-info-wrapper']} id="drugWrapper">
                 <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/>
-                <h3 onMouseDown={this.setDragBox} id="drugTitle" className={style['drug-title']}>{drugInfo.title}说明书  </h3>
+                <h3 onMouseDown={this.setDragBox} id="drugTitle" className={style['drug-title']}>{drugInfo.tagType == 8 ? drugInfo.title+'说明书' : drugInfo.tagType == 10 ? drugInfo.title+ '说明': ''}</h3>
                 { drugInfo && drugInfo.drugDesc.length > 0 && <div className={style['drug-desc-wrapper']} id='drugDesc' onScroll={this.handleScrollModal.bind(this,  drugInfo.drugDesc)}>
-                    <div className={style['drug-title1']} >{drugInfo.title}说明书</div>
+                    <div className={style['drug-title1']} >{drugInfo.tagType == 8 ? drugInfo.title+'说明书' : drugInfo.tagType == 10 ? drugInfo.title+ '说明': ''}</div>
                     {drugInfo.drugDesc.map((item, index) =>{
                         return <div className={style['drug-desc-item']} id={item.title.trim()}>
                             <div className={style['drug-desc-title']} >{item.title.trim()}</div> 
@@ -83,7 +84,7 @@ class DrugInfo extends Component {
                 </div> }
                 { !drugInfo || (drugInfo && drugInfo.drugDesc.length === 0) && <div className={style['drug-desc-wrapper']}>
                     <div>
-                        该药品暂无说明
+                        {drugInfo.tagType == 8 ? '该药品暂无说明' : drugInfo.tagType == 10 ?'该不良反应暂无说明': ''}
                     </div>
                 </div> }
         </div>)

+ 1 - 1
src/components/TreatDesc/index.less

@@ -63,7 +63,7 @@
     margin: 0 3px -1px;
     cursor: pointer;
     position: absolute;
-    top: -10px;
+    top: -15px;
 }
 .info-flag {
     display: inline-block;

+ 2 - 1
src/containers/AdviceContainer.js

@@ -10,7 +10,8 @@ function mapStateToProps(state) {
         adviceInput: state.pushMessage.advice.adviceInput,
         isFirstMainDiag:  state.treat.isFirstMainDiag,
         followUp: state.pushMessage.advice.followUp,
-        hasFollowUp: state.treat.hasFollowUp
+        hasFollowUp: state.treat.hasFollowUp,
+        typeConfig: state.typeConfig.typeConfig
     })
 }
 

+ 1 - 0
src/store/actions/currentIll.js

@@ -98,6 +98,7 @@ export const fillChronicModule = (state,action)=>{
   let moduleData = JSON.parse(JSON.stringify(res.moduleData));//现病史模板
   res.data = fullfillText(moduleData).newArr;
   res.saveText = fullfillText(res.data).saveText;
+  res.editClear = false; //现病史框不可编辑
   res.update=Math.random();
   return res;
 }

+ 4 - 2
src/store/actions/treat.js

@@ -20,6 +20,7 @@ export const clearTreat = (state, action) => {
     res.adversReactionList=[];
     res.hasFollowUp = false;
     res.followUp = '';
+    res.followUpList = [];
     return res
 }
 
@@ -57,10 +58,11 @@ export const setOtherDrug = (state, action) => {
 //药品说明
 export const setDrugInfo = (state, action) => {
     const res = JSON.parse(JSON.stringify(state));
-    const instroduce = action.instroduce;
+    const {instroduce, name, tagType} = action;
     res.drugInfo = {};
-    res.drugInfo.title = action.name;
+    res.drugInfo.title = name;
     res.drugInfo.drugDesc = instroduce;
+    res.drugInfo.tagType = tagType
     return res
 }
 

+ 4 - 2
src/store/async-actions/treat.js

@@ -318,13 +318,15 @@ export const getInstroduce = (item, type, position)=>{
                     dispatch({
                         type: SET_DRUG_INFO,
                         instroduce: data.data.data.introduceDetailList,
-                        name: type ==8 ?item.medicitionName : type == 10 ? item.tagName : ''
+                        name: type ==8 ?item.medicitionName : type == 10 ? item.tagName : '',
+                        tagType: type
                     })
                 } else {
                     dispatch({
                         type: SET_DRUG_INFO,
                         instroduce: [],
-                        name: item.medicitionName
+                        name: type ==8 ?item.medicitionName : type == 10 ? item.tagName : '',
+                        tagType: type
                     })
                 }