ソースを参照

Merge remote-tracking branch 'origin/dev5.3.3' into dev/new1

zhouna 5 年 前
コミット
73e36e10cc

+ 3 - 3
src/common/components/ItemBox/index.jsx

@@ -33,9 +33,9 @@ class ItemBox extends Component {
     handleClick && handleClick(e);//为了获取鼠标位置,显示搜索结果框;
   }
   handleInput(e){
-    const {onchange,data} = this.props;
+    const {handleChange,data} = this.props;
     if(!data || (data.length==0)){//避免结构化下触发onchange,导致下拉要点两下
-      onchange&&onchange(e)
+      handleChange&&handleChange(e)
     }
   }
 
@@ -58,7 +58,7 @@ componentWillReceiveProps(nextP){
     }
 }
   render(){
-    const {title,children,editable,className,handleFocus,onchange,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
+    const {title,children,editable,className,handleFocus,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
     return <div className={style["box"]+" "+"clearfix"} >
       <div className={style["title"] + ' '+(className||'')} style={{marginTop:titleTop?'22px':''}}>{title}</div>
       <div ref={this.$div} className={`${style["content"]} ${border?style["border"]:''} ${backgroundColor?style["noBorder"]:''}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={handleFocus} onInput={this.handleInput} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur} id={boxId} onkeydown={handleEnter}>

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

@@ -142,8 +142,8 @@ class CurrentIll extends Component{
     return  <div className={style['current-ill']}>
       <ItemBox title='现病史' 
       editable={editClear||data.length==0?true:false} 
-      handleFocus={this.handleFocus} 
-      onchange={forbidInput?this.onchange:''} 
+      handleFocus={this.handleFocus}
+      handleChange={forbidInput?this.onchange:''}
       handleClick={this.handleClick}
       handleBlur={this.handleBlur}>
         {data.length>0?this.getInlineTag():(saveText[0]?saveText[0]:'')}

+ 2 - 10
src/components/MainSuit/index.jsx

@@ -13,7 +13,6 @@ class MainSuit extends Component{
   constructor(props){
     super(props);
     this.state = {
-      boxEditable:true,
       boxLeft:null,
       boxTop:null,
       symptom:false,
@@ -22,7 +21,6 @@ class MainSuit extends Component{
       clearTimer:null,
       overFlag:false,
     };
-    this.toggleEditable = this.toggleEditable.bind(this);
     this.handleFocus = this.handleFocus.bind(this);
     this.handleSelect = this.handleSelect.bind(this);
     this.handleSearchSelect = this.handleSearchSelect.bind(this);
@@ -30,12 +28,6 @@ class MainSuit extends Component{
     this.handleClick = this.handleClick.bind(this);
     this.handleBlur = this.handleBlur.bind(this);
   }
-  toggleEditable(){
-    this.setState({
-      boxEditable:!this.state.boxEditable
-    })
-  }
-
 
   getInlineTag(){
     const {datas,showArr,handleTailClick,selecteds,saveText,mainIds,allModules} = this.props;
@@ -296,8 +288,8 @@ class MainSuit extends Component{
       title='主诉' 
       editable={editClear||datas.length==0?true:false} 
       boxLineHeight="24px"
-      handleFocus={this.handleFocus} 
-      onchange={this.handleChange} 
+      handleFocus={this.handleFocus}
+      handleChange={this.handleChange}
       handleClick={this.handleClick} 
       handleBlur={this.handleBlur}
       data={datas}

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

@@ -23,6 +23,7 @@ import $ from 'jquery';
  * tagType:标签类型
  * id:id
  * flag:仅主诉中使用
+ * isExtBlue:是否为查体生命体征标签蓝色显示
  *
  * ***/
 

+ 1 - 1
src/containers/MainSuit.js

@@ -17,7 +17,7 @@ import { SET_READ_MODE } from "@store/types/typeConfig";
 function mapStateToProps(state) {
   const {mainSuit,homePage,diagnosticList,typeConfig} = state;
   return {
-    showDrop:mainSuit.showDrop,//用于更新
+    //showDrop:mainSuit.showDrop,//用于更新
     update:mainSuit.update,
     CommonSymptoms:mainSuit.CommonSymptoms,//常见症状
     datas:mainSuit.data,//数据源

+ 2 - 2
src/utils/utils.js

@@ -141,8 +141,8 @@ export function recoveTag(state,action) {
   let res = Object.assign({},state);
   let arr = [...res.data];
   const boxMark = action.data.delIndex.substr(0,1);
-  //const text = Object.assign({showInCheck:action.data.showInCheck},JSON.parse(config._textLabel));
-  arr.splice(action.index,0,action.data);
+  const text = Object.assign({showInCheck:action.data.showInCheck},JSON.parse(config.textLabel));
+  arr.splice(action.index,0,action.data,text);
   const dataArr = boxMark==='4'?checkFullfillText(arr):fullfillText(arr);
   res.data = dataArr.newArr;
   res.saveText = dataArr.saveText;