Просмотр исходного кода

Merge branch 'pre-icss' of http://192.168.2.236:10080/zhouna/newICSS into pre-icss

luolei 5 лет назад
Родитель
Сommit
7abceeb906

+ 4 - 2
src/common/components/EditableSpan/index.jsx

@@ -60,7 +60,7 @@ class EditableSpan extends Component{
   }
   onChange(e){
     e.stopPropagation();
-    const {handleChange,boxMark,i,handleSearch,value,mainSaveText,mainIds,handleClear} = this.props;
+    const {handleChange,boxMark,i,handleSearch,noSearch,mainSaveText,mainIds,handleClear} = this.props;
     const {labelVal,searchPre} = this.state;
     const text1 = e.target.innerText || e.target.innerHTML;
     // e.newValue IE浏览器DOMCharacterDataModified监听
@@ -88,7 +88,9 @@ class EditableSpan extends Component{
 
     const that = this;
     handleChange&&handleChange({text1,boxMark,i});
-
+    if(noSearch){
+      return;
+    }
     //延迟搜索
     clearTimeout(this.state.timer);
     const timer = setTimeout(function(){

+ 1 - 1
src/containers/eleType.js

@@ -182,7 +182,7 @@ export default function(params){
         }
       }
       // 删除后value为空,应展示空而不是name
-      return <EditableSpan {...params} value={data.value||data.value==''?data.value:data.name} full={data.full||isLast}/>;
+      return <EditableSpan {...params} noSearch={data.noSearch} value={data.value||data.value==''?data.value:data.name} full={data.full||isLast}/>;
     case 11://推送类型
       return multCheckLabels(params,data.tagType);
     default:

+ 11 - 2
src/store/actions/checkBody.js

@@ -10,13 +10,22 @@ export function preSetCheckbody(state,action) {
 //设置查体数据
 export function set(state,action){
   let res = Object.assign({},state);
-  const {data} = action;
+  const {data,isText,isEmpty} = action;
+  if(isText){         //查体只显示文本时(引用预问诊)
+    const label = Object.assign(JSON.parse(config._textLabel),{value:data[0],noSearch:true});
+    res.data = [label];
+    res.saveText = [data];
+    res.showAll = true;
+    res.update = Math.random();
+    res.isEmpty = isEmpty;
+    return res;
+  }
   const obj = checkFullfillText(data);
   res.data = obj.newArr;
   res.saveText = obj.saveText;//存逗号
   res.showAll = obj.checkHiddenDefault;
   res.update = Math.random();
-  res.isEmpty = action.isEmpty;
+  res.isEmpty = isEmpty;
   return res;
 }
 //多选标签选中确定处理

+ 3 - 2
src/utils/tools.js

@@ -2,7 +2,7 @@ import store from '@store';
 import {CLEAR_MAIN_SUIT} from '@store/types/mainSuit';
 import {CLEAR_CURRENT_ILL} from '@store/types/currentIll';
 import {CLEAROTHERHISTORY} from '@store/types/otherHistory';
-import {CLEARCHECKBODY} from '@store/types/checkBody';
+import {CLEARCHECKBODY,SET} from '@store/types/checkBody';
 import {clearAssistData,addAssistLabel} from '@store/actions/assistCheck';
 import {clearAllLabel,addLabel} from '@store/actions/inspect';
 import {CLEAR_ALL_DIAG} from '@store/types/diagnosticList';
@@ -310,7 +310,8 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
       store.dispatch({
           type: SET,
           isEmpty:false,
-          data:reData.checkBody
+          data:reData.checkBody,
+          isText:true,    //查体只显示文本
       });
     }else{
         //回读/引用设置回读模式值(主诉-其他史使用)