Kaynağa Gözat

Merge branch 'dev5.3.4' of http://192.168.2.236:10080/zhouna/newICSS into dev5.3.4

luolei 5 yıl önce
ebeveyn
işleme
cbfe6636d5

+ 2 - 2
src/common/less/variables.less

@@ -104,7 +104,7 @@
   color:@red;
   background: #fff;
   //float: left;
-  margin-left: 22px;
+  margin-right: 15px;
   position: relative;
   //bottom: -10px;
 }
@@ -115,7 +115,7 @@
   color:@blue;
   font-size: 12px;
   background: #fff;
-  margin-left: 20px;
+  /*margin-left: 20px;*/
   //float: right;
   text-align: right;
   font-weight: bold;

+ 4 - 4
src/components/CommonSymptom/index.jsx

@@ -121,16 +121,16 @@ class CommonSymptom extends Component{
         {mainHis.length>0?<ul className={style["his"]}>
           <div className='clearfix'>
           <p>最近输入症状:</p>
-          <div className={style['oper']}>
-            <span className={style['clear']} onClick={this.handleClear}>清空选项</span>
-            <span className={style['confirm']} onClick={this.handleConfirm}>确定</span>
-          </div>
           </div>
           {mainHis.map((it)=>{
             return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getStyle(it.conceptId)} title={it.name.length>5?it.name:''}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</li>
           })}
         </ul>:''}
         <p className={style['c-title']}>常见症状:</p>
+        <div className={style['oper']}>
+          <span className={style['clear']} onClick={this.handleClear}>清空选项</span>
+          <span className={style['confirm']} onClick={this.handleConfirm}>确定</span>
+        </div>
         {data&&data.map((it)=>{
           return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getStyle(it.conceptId)} title={it.name.length>5?it.name:''}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</li>
         })}

+ 4 - 2
src/components/CommonSymptom/index.less

@@ -1,5 +1,6 @@
 @import "~@less/variables.less";
 .list{
+  position: relative;
   .pop;
   left: 85px;
   padding: 5px;
@@ -53,8 +54,9 @@
     bottom: 0;
   }
   .oper{
-    padding-right: 5px;
-    float: right;
+    position: absolute;
+    top: 0px;
+    right: 10px;
   }
 }
 .hide{

+ 6 - 0
src/components/ScaleTable/index.less

@@ -1,6 +1,12 @@
 @import "~@less/mixin.less";
 .tableBox{
   // height: 690px;
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+  -khtml-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
   overflow-y: auto;
   padding: 30px;
   h1{

+ 15 - 23
src/components/SpreadDrop/index.jsx

@@ -171,7 +171,8 @@ class SpreadDrop extends Component{
   getInitExclu(){
     const {defaulted,data,value} = this.props;
     let excluId = '',excName='';
-    if(defaulted&&value===undefined){
+    let showDefaulted = this.ifDefault();
+    if(showDefaulted&&defaulted&&value===undefined){
       const it = data[0];
       excluId = it.exclusionType===1?it.questionDetailList[0].id:'';
       excName = it.exclusionType===1?it.questionDetailList[0].name:'';
@@ -201,8 +202,6 @@ class SpreadDrop extends Component{
     this.setState({
       nones:'',
       exists:[],
-      //existsName:{},
-      //withsName:{},
       withs:[],
       noneIds:[],
       noneOn:false,
@@ -282,11 +281,8 @@ class SpreadDrop extends Component{
     if(+item.code===1){     //操作“伴”类型
       this.setState({
         withOn:!withOn,
-        // withs:withOn?[]:[...withs,id],     //取消“伴”选中,伴随症状全部取消选中    
-        // withs:withOn?[]:[...withs,{id:item.id,name:name}],
         withs:withOn?[]:withs,
         ban:withOn?{}:{id:id,name:name,value:name},
-        //withsName:withOn?"":withsName+name,     //取消“伴”选中,伴随症状全部取消选中
         nowOn:withOn?(noneOn?'none':''):'with'
       });
       return;
@@ -329,10 +325,8 @@ class SpreadDrop extends Component{
         nones += name+'、';
         noneIds.push(id);
       }else if(nowOn=='with'){
-        // withs.push({id:id,name:name,questionId:item.questionId});
         withs.push({id:id,name:name,questionId:item.questionId,conceptId:item.conceptId});
       }else{
-        // exists.push({id:id,name:name,listIndex,questionId:item.questionId});
         exists.push({id:id,name:name,listIndex,questionId:item.questionId,conceptId:item.conceptId});
       }
     }
@@ -347,23 +341,26 @@ class SpreadDrop extends Component{
     });
   }
   getClass(){
-    const {isImports,show,value,isExtBlue} = this.props;
+    const {isImports,show,value,isExtBlue,defaulted} = this.props;
     const blueBorder = this.state.editable?style['blue-border']:'';
     const orgBorder = isImports&&!value?style['orange-border']:'';
     const ext = isExtBlue?style['ext']:'';
+    let showDefaulted = this.ifDefault();
     if(show){
       $(this.$div.current).addClass(style['borderd']);
     }else{
       $(this.$div.current).removeClass(style['borderd']);
     }
-    if(value){
+    if(value||(showDefaulted&&value===undefined&&defaulted)){
       return classNames(style['selected-tag'],blueBorder,setFontColorSize());
-    }else{
-
     }
     return classNames(style['tag'],orgBorder,ext,setFontColorSize(1));
   }
-
+  ifDefault(){
+    const {type,otherDefault,curDefault} = this.props;
+    const showDefaulted = (type=='2'&&curDefault)||(type=='3'&&otherDefault);
+    return showDefaulted;
+  }
   componentDidMount(){
     if(isIE()){
       $(this.$div.current).onIe8Input(function(e){
@@ -371,16 +368,11 @@ class SpreadDrop extends Component{
       },this);
     }
   }
-  /*componentWillReceiveProps(nextProps){
-    const {setHighter} = this.props;
-    if(!nextProps.show){console.log(22)
-      setHighter&&setHighter(48);
-    }
-  }*/
   render(){
-    const {placeholder,value,show,data,order,type,tagType,ikey,pos,defaulted} = this.props;
+    const {placeholder,value,show,data,order,type,tagType,pos,defaulted,showVal} = this.props;
     const {tmpDom,left} = this.state;
-    const clickIndx = ikey.split('-')[1];//展开下拉的index
+    let showDefaulted = this.ifDefault();
+    let showV = showDefaulted&&value===undefined?showVal:value;       //未选中过值时展示默认选中
     if(!show&&tmpDom){
       $(tmpDom).parent().prev().attr({"contentEditable":true})
     }
@@ -398,8 +390,8 @@ class SpreadDrop extends Component{
         onBlur={this.handleBlur}
         onInput={this.onChange}
         onkeydown={handleEnter}
-        >{value||placeholder}</div>
-          <ListItems parDiv={this.$list} defaulted={defaulted} pos={pos} data={data} order={order} left={left} boxMark={type} tagType={tagType}
+        >{showV||placeholder}</div>
+          <ListItems parDiv={this.$list} defaulted={showDefaulted&&defaulted} pos={pos} data={data} order={order} left={left} boxMark={type} tagType={tagType}
              show={show} handleSelect={this.handleSelect} handleConfirm={this.handleConfirm} handleClear={this.handleClear} {...this.state}></ListItems>
       </div>
   }

+ 2 - 2
src/config/index.js

@@ -1,8 +1,8 @@
 export default {
     defaultValue:{      //默认配置
       0:0,     //0为半结构化模式,1为纯文本模式(主诉现病史其他史只自由文本输入)
-      1:0,    //一般情况默认值,1开启,2关闭
-      2:0,    //其他史默认值,1开启,2关闭
+      1:0,    //一般情况默认值,1开启,0关闭
+      2:0,    //其他史默认值,1开启,0关闭
       3:0,    //字体大小:1增大,0标准
       4:0,    //字体颜色:1增黑,0标准
     },