瀏覽代碼

'慢病静态知识'

liucf 6 年之前
父節點
當前提交
a54f8ce39b

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

@@ -152,6 +152,7 @@ class DiagnosticList extends Component {
                 <div className={style['diaglist-wrap']}>
                     {list && (list.length > 0) && list.map((item, index) => {
                         const hasTreat = item.treat && (item.treat.commonTreatment.content || item.treat.surgeryTreatment.content || item.treat.treatment.length>0)
+                        // const hasTreat= true;
                         return (<div draggable={true} className={style['diag-box'] + ' clearfix'}  key={item.id} >
                                     {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></span>}
                                     {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}

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

@@ -99,8 +99,8 @@ class MultSpread extends Component{
                             id={it.id}
                             ikey={inx} hideTag={true}></InlineTag>;
         case +it.controlType===7:
-          const min = data.minValue!=null&&data.minValue!=undefined?data.minValue-1:undefined;
-          const max = data.maxValue!=null&&data.maxValue!=undefined?+data.maxValue+1:undefined;
+          const min = it.minValue!=null&&it.minValue!=undefined?it.minValue-1:undefined;
+          const max = it.maxValue!=null&&it.maxValue!=undefined?+it.maxValue+1:undefined;
           return <NumberDrop prefix={it.labelPrefix}
                              suffix={it.labelSuffix}
                              placeholder={it.name}

+ 8 - 0
src/components/PushItems/index.jsx

@@ -7,6 +7,7 @@ import tipsImg from "../../common/images/tips.png";
 import vigilantImg from "../../common/images/vigilant.png";
 import showImg from "../../common/images/show.png";
 import hideImg from "../../common/images/close.png";
+import DetailsModal from './DetailsModal';
 import PushDiag from "./PushDiag";
 import DiagnosticItem from "@containers/DiagnosticItem";
 import store from "@store";
@@ -158,6 +159,8 @@ class PushItems extends Component {
       assay,
       check,
       tips,
+      showTipsDetails,
+      tipsDetails,
       tmpFlg,
     } = this.props.pushMessage;
     const { tipsDiscalimer,chronicPushItems,wholeIndexs} = this.props;
@@ -473,6 +476,11 @@ class PushItems extends Component {
             </div>
           </div>
         </div>
+        {tipsDiscalimer.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data[1]&&tipsDiscalimer.data.data[1].description}}></div>}
+        {showTipsDetails && <DetailsModal  
+            showTipsDetails = {showTipsDetails}
+            hideTips = {this.hideTips}
+            tipsDetails = {tipsDetails}/>}
       </div>
     );
   }

+ 3 - 3
src/components/SpreadDrop/index.jsx

@@ -156,7 +156,7 @@ class SpreadDrop extends Component{
 
   }
   setStateInit(){
-    const {nones,noneOn,noneIds,withOn,exists,nowOn,withs,exclusion,excluName} = deepClone(this.props.selecteds||[]);
+    const {nones,noneOn,noneIds,withOn,exists,nowOn,withs,exclusion,excluName,ban} = deepClone(this.props.selecteds||[]);
     this.setState({
       nones:nones||'',
       exists:exists||[],
@@ -167,7 +167,7 @@ class SpreadDrop extends Component{
       withOn:withOn||false,
       nowOn:nowOn||'',
       exclusion:exclusion||'',
-      ban:{},
+      ban:ban||{},
     });
   }
   clearState(){
@@ -224,7 +224,7 @@ class SpreadDrop extends Component{
       return;
     }
     //操作单选项
-    if(!noneOn&&selected){
+    if(selected){
       const tIndex= exists.findIndex((it)=>it.questionId===item.questionId);
       const bIndex= withs.findIndex((it)=>it.questionId===item.questionId);
       if(tIndex!=-1){

+ 4 - 4
src/components/Treat/AdverseReactions/index.jsx

@@ -52,10 +52,10 @@ class AdverseReactions extends Component {
                 <div className={style['last-treat-title']} ><img className={style['last-treat-icon']} src={icon}/>{title}</div>
                 {adversReactionList.map((item, index) => {
                     return (<div key={item.id}><span>{item.tagName}:</span>
-                        {item.details.map((item, index) => {
-                            return <span key={item.name}>
-                                <input type="checkbox" checked={item.checked} id={item.name} onChange={()=>{console.log('change')}}/>
-                                <label for={item.name}> {item.name} </label>
+                        {item.details.map((it, index) => {
+                            return <span key={item.id + it.name}>
+                                <input type="checkbox" checked={item.checked} id={item.id + it.name} onChange={()=>{console.log('change')}}/>
+                                <label for={item.id + it.name}> {it.name} </label>
                             </span>
                         })}
                     </div>)

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

@@ -65,8 +65,8 @@ class Treat extends Component {
 
                     <div className={style['treat-inner-box']}>
                         <GeneralTreat icon={generalIcon} title='一般治疗'   generalTreat={generalTreat}></GeneralTreat>
-                        {/* <LastTreat icon={generalIcon} title='上次用药情况' lastTreat={lastTreat}  showDrugInfo = {showDrugInfo} setDrugInfo={ setDrugInfo }></LastTreat>
-                        <AdverseReactions icon={generalIcon} title='不良反应' adversReactionList = {adversReactionList}></AdverseReactions> */}
+                        <LastTreat icon={generalIcon} title='上次用药情况' lastTreat={lastTreat}  showDrugInfo = {showDrugInfo} setDrugInfo={ setDrugInfo }></LastTreat>
+                        <AdverseReactions icon={generalIcon} title='不良反应' adversReactionList = {adversReactionList}></AdverseReactions>
                         <DrugTreat treatment={ treatment } 
                                 selectDrug={selectDrug} 
                                 setOtherRecommend={ setOtherRecommend } 

+ 31 - 7
src/store/reducers/treat.js

@@ -99,7 +99,23 @@ const initState = {
             controlType: 2,
             details: [
                 {
-                    name: "无",
+                    name: "否",
+                    value: 0
+                },
+                {
+                    name: "是",
+                    value: 0
+                },
+                {
+                    name: "轻度",
+                    value: 0
+                },
+                {
+                    name: "中度",
+                    value: 0
+                },
+                {
+                    name: "重度",
                     value: 0
                 },
                 {
@@ -107,7 +123,7 @@ const initState = {
                     value: 0
                 },
                 {
-                    name: "频",
+                    name: "频",
                     value: 0
                 }
             ]
@@ -121,23 +137,31 @@ const initState = {
             controlType: 2,
             details: [
                 {
-                    name: "腹胀 ",
+                    name: "否",
+                    value: 0
+                },
+                {
+                    name: "是",
                     value: 0
                 },
                 {
-                    name: "厌食",
+                    name: "轻度",
                     value: 0
                 },
                 {
-                    name: "嗳气",
+                    name: "中度",
                     value: 0
                 },
                 {
-                    name: "恶心",
+                    name: "重度",
+                    value: 0
+                },
+                {
+                    name: "偶尔",
                     value: 0
                 },
                 {
-                    name: "呕吐",
+                    name: "频繁",
                     value: 0
                 }
             ]