Sfoglia il codice sorgente

病情提示中不分慢病都显示加入病例记录按钮,管理评估中不可打开量表未完

zhouna 5 anni fa
parent
commit
4ebb30b198

+ 1 - 1
src/components/AssessResult/ScaleItem/index.jsx

@@ -67,7 +67,7 @@ class ScaleItem extends Component {
   handleShowScale(item){
     const {showScaleFn,closeAssess} = this.props;
     //closeAssess&&closeAssess();    //关闭评估弹窗
-    showScaleFn&&showScaleFn(item,true);
+    showScaleFn&&showScaleFn(item);
   }
   handleRadio(item,parent){
     let {result} = this.props;

+ 12 - 12
src/components/ChronicInfo/index.jsx

@@ -156,8 +156,8 @@ class ChronicInfo extends React.Component{
   // 量表明细-关闭,isClose是否是点击关闭按钮
   closeTable(isClose){
     const {scaleParam} = this.state;
-    const {showHide,chronicMagItem} = this.props;
-    if(!showHide.isPop){
+    const {showHide} = this.props;
+    //if(!showHide.isPop){    //管理评估中点开的量表,按钮显示为确定,不可加入病例
       //量表结果,判断需要计算并且dom中有值才能加入病例记录
       // innerHTML 兼容FF26
       const res = this.$result.current&&(this.$result.current.innerText||this.$result.current.innerHTML);
@@ -165,11 +165,11 @@ class ChronicInfo extends React.Component{
         Notify.info("请先计算量表结果!");
         return ;
       }
-      !isClose&&chronicMagItem&&this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);   //是慢病流程才能加入病例
+      !isClose&&this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);
       this.setState({
         scaleParam:{}
       });
-    }
+    //}
     this.props.hideList({name:'showTable',value:false});
   }
   // 非计分量表确定-延时关闭->量表存值
@@ -248,12 +248,12 @@ class ChronicInfo extends React.Component{
     addAssessItem(v,pIndex,i);
   }
   addFormula(it,v,pIndex,i){
-    const {chronicMagItem, setCalcuInfo} = this.props;
+    const {setCalcuInfo} = this.props;
     this.closeFormula(it);
     const itCopy = deepClone(it)
     const vCopy = deepClone(v)
     setCalcuInfo && setCalcuInfo(v.conceptId,itCopy.content.details,itCopy.content.result)
-    chronicMagItem&&this.handleAddAssessItem(vCopy,pIndex,i);
+    this.handleAddAssessItem(vCopy,pIndex,i);
   }
   handleInputformula(id,calcuContent,i,j,idd,cres,e) {
     // const {calcuValues} = this.state;
@@ -296,7 +296,7 @@ class ChronicInfo extends React.Component{
   }
   confirmOption(parent,pIndex,i){//可能结果确定
     const {radioVal,possible} = this.state;
-    const {savePossibleResult,chronicMagItem} = this.props;
+    const {savePossibleResult} = this.props;
     if(Object.keys(radioVal).length===0){     //初始状态,可能有推荐选项
       const defaulted = parent.details[i].content.details.filter((it)=>+it.state===1);
       if(defaulted.length>0){
@@ -309,7 +309,7 @@ class ChronicInfo extends React.Component{
       optionId:null,
     });
     savePossibleResult&&savePossibleResult({possible:Object.assign({},possible,radioVal),radioVal:Object.assign({},possible,radioVal)})
-    chronicMagItem&&this.handleAddAssessItem(parent,pIndex,i);
+    this.handleAddAssessItem(parent,pIndex,i);
 
   }
   handleSaveCalcu(obj){
@@ -387,7 +387,7 @@ class ChronicInfo extends React.Component{
     return hasCritical
   }
   getDetail(){
-    const {data,formulaResult,calcuResult,chronicMagItem} = this.props;
+    const {data,formulaResult,calcuResult} = this.props;
     const {formulaId,optionId,possible,radioVal,calcuValues,currentIndex,hasEnterImg} = this.state;
     /*let names = [];*/
     let list = data&&data.map((v,i)=>{
@@ -443,7 +443,7 @@ class ChronicInfo extends React.Component{
                             </span>
                             {formulaId&&formulaId==v.conceptId&&<MiniToast title={it.content.name}
                                 icon={allTableIcon}
-                                confirmText={chronicMagItem?'加入病历记录':'确定'}
+                                confirmText='加入病历记录'
                                 show={formulaId&&formulaId==v.conceptId?true:false}
                                 close={this.closeFormula.bind(this,it)}
                                 confirm={this.addFormula.bind(this,it,v,i,j)}
@@ -512,7 +512,7 @@ class ChronicInfo extends React.Component{
                             </span>
                             <MiniToast title='结果选择'
                                 icon={checkIcon}
-                                confirmText={chronicMagItem?'加入病历记录':'确定'}
+                                confirmText='加入病历记录'
                                 show={optionId&&optionId==v.conceptId?true:false}
                                 close={this.closeOption}
                                 confirm={this.confirmOption.bind(this,v,i,j)}
@@ -572,7 +572,7 @@ class ChronicInfo extends React.Component{
     const {comfirnFlag,flag,ff} = this.state;
     const {chronicMagItem,chronicDesease,data,showHide,slideUp} = this.props;
     const scaleFooter = <Footer print={true}
-                                footText={showHide.isPop||!chronicMagItem?"确定":"加入病历记录"}
+                                footText="加入病历记录"
                                 handlePrint={this.onPrint}
                                 handleConfirm={this.comfirnTable}/>;
     if(data&&data.length>0){

+ 1 - 2
src/containers/AssessResult.js

@@ -88,12 +88,11 @@ function mapDispatchToProps(dispatch) {
     //     id:id
     //   })
     // },
-    showScaleFn(item,isPop){
+    showScaleFn(item){
       dispatch({
         type:SHOW_TABLE_LIST,
         name:'showTable',
         value:true,
-        isPop,
         item:Object.assign({},item)
       });
     },

+ 1 - 2
src/containers/MedicalInfoContainer.js

@@ -32,12 +32,11 @@ function mapDispatchToProps(dispatch) {
                 type:CLEAR_INFO_SEARCH_LIST
               })
         },
-        showScaleFn(item,isPop){
+        showScaleFn(item){
           dispatch({
             type:SHOW_TABLE_LIST,
             name:'showTable',
             value:true,
-            isPop,
             item:Object.assign({},item)
           });
         },

+ 1 - 2
src/containers/ScaleSearchContainer.js

@@ -23,12 +23,11 @@ function mapDispatchToProps(dispatch) {
         getScale(item) {
             dispatch(getScaleInfo(item))
         },
-        showScaleFn(item,isPop){
+        showScaleFn(item){
           dispatch({
             type:SHOW_TABLE_LIST,
             name:'showTable',
             value:true,
-            isPop,
             item:Object.assign({},item)
           });
         },

+ 1 - 1
src/store/reducers/pushMessage.js

@@ -67,7 +67,7 @@ export default function(state = initState, action) {
       res.tableList = action.data;
       return res;
     case SHOW_TABLE_LIST://显示、隐藏量表列表
-      res.showHide = Object.assign({},res.showHide,{[action.name]:action.value,isPop:action.isPop},action.item);
+      res.showHide = Object.assign({},res.showHide,{[action.name]:action.value},action.item);
       return res;
     case SET_CHRONIC_PUSHS:
       res.chronicPushItems = action.data;