Parcourir la source

其他史无模板容错

zhouna il y a 6 ans
Parent
commit
71de5e239f

+ 1 - 1
src/components/NumberDrop/index.jsx

@@ -266,7 +266,7 @@ class NumberDrop extends Component{
                 onClick={allClick?this.handleNumClick:null}
                 contentEditable={editable}
                 onBlur={this.handleBlur}
-                onkeydown={handleEnter}
+                onKeyDown={handleEnter}
                 onFocus={(e)=>{e.stopPropagation()}}>
       <span ref = {this.$pre}>&nbsp;{prefix}</span>
       <span onFocus={this.handleNumFocus}

+ 2 - 1
src/store/async-actions/fetchModules.js

@@ -204,9 +204,10 @@ export function setOtherHisModule(){
   return (dispatch, getStore) => {
     const state = getStore();
     const initData = state.homePage.initData;
+    const otherModel = initData.otherHisModel;
     const block = Object.assign(JSON.parse(config.textLabel),{full:true});
     const mode = state.typeConfig.typeConfig;
-    const model = deepClone(initData.otherHisModel)||[block];     //查体模板
+    const model = otherModel&&otherModel.length>0?[...otherModel]:[block];     //查体模板
     const arr = deepClone(initData.otherHis);        //最近其他史数据
     const arrSave = deepClone(initData.otherHisSave);    //最近其他史saveText
     const selects = deepClone(initData.otherSelecteds);  //其他史杂音类选中项

+ 1 - 1
src/utils/tools.js

@@ -947,7 +947,7 @@ function fullfillText(arr,noPre=false,noEnd=false){
     tempText = '',
     value = '',
     cNum = 0;
-  arr&&arr.map((it,i)=>{
+  Array.isArray(arr)&&arr.map((it,i)=>{
     notText = notTextLabel(it);
     cNum = i;
     value = it.value||'';