浏览代码

Merge branch 'bugFix20190722' of http://192.168.2.236:10080/zhouna/newICSS into bugFix20190722

liucf 5 年之前
父节点
当前提交
59fb1802ec

+ 3 - 1
src/common/components/Calendar/index.jsx

@@ -114,7 +114,9 @@ class Calendar extends React.Component {
       second: this.state.select.second
     };
     this.setState({
-      select: info
+      select: info,
+      month:this.month,
+      year:this.year
     });
     // this.props.timeSure(Object.assign({}, info))
     this.props.handleChange(info);

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

@@ -37,7 +37,7 @@ class AddAssistCheck extends React.Component {
       if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
         this.setState({ show: false });
       }
-      if (!_cons.is(event.target) && _cons.has(event.target).length === 0) { // Mark 1
+      if (!_cons.is(event.target) && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
         this.setState({ date: false });
       }
       

+ 14 - 10
src/components/AssessResult/ChartItem/index.jsx

@@ -24,10 +24,12 @@ class ChartItem extends Component {
     //近一周
     switch(type){
       case 'week':
-        for(let i=0;i<7;i++){
+        arr.push(...this.getDayHours(now,true,1));
+        for(let i=1;i<6;i++){
           temp=i*1000*60*60*24;
           arr.unshift(...this.getDayHours(now-temp,true));
-        }
+        };
+        arr.unshift(...this.getDayHours(now-6*1000*60*60*24,true,2));
         break;
       case 'month':
         for(let i=0;i<30;i++){
@@ -52,7 +54,7 @@ class ChartItem extends Component {
 
     return arr;
   }
-  getDayHours(time,isHour){
+  getDayHours(time,isHour,isLimit){
     const year = new Date(time).getFullYear();
     const month = new Date(time).getMonth()+1;
     const date = new Date(time).getDate();
@@ -60,9 +62,10 @@ class ChartItem extends Component {
     let arr=[],temp='';
     const str= year+'-'+(month<10?'0'+month:month)+'-'+(date<10?'0'+date:date);
     if(isHour){
-      for(let i=0;i<24;i++){
-        temp = hour-i>-1?hour-i:hour-i+24;
-        arr.unshift(str+" "+(temp<10?'0'+temp:temp)+":00:00");
+      const num = isLimit===1?hour+1:24;
+      for(let i=(isLimit===2?hour:0);i<num;i++){
+        //temp = hour-i>-1?hour-i:hour-i+24;
+        arr.push(str+" "+(i<10?'0'+i:i)+":00:00");
       }
       return arr;
     }else{
@@ -70,14 +73,14 @@ class ChartItem extends Component {
     }
   }
   rangChange(type,i){
-    const {initFn,handleChange,data,pindex} = this.props;
+    const {initFn,disName,handleChange,data,pindex} = this.props;
     const times = this.getXAxisArr(type);
     const startTime=times[0];
     const endTime=times[times.length-1];
     const range = [startTime,endTime];
     const temp=this.props.timeTypes;
     if(!data[startTime+endTime]){
-      initFn&&initFn({range,rangeType:type,index:i,pindex,getNew:false});
+      initFn&&initFn({range,disName,rangeType:type,index:i,pindex,getNew:false});
     }
     handleChange&&handleChange(Object.assign(temp,{[i]:type}));
   }
@@ -150,6 +153,7 @@ class Chart extends Component{
     let series = [],names=[],inx=-1;
     let myChart = echarts.init(document.getElementById(id) ,null, {renderer: 'svg'});
     let xAxisArr = [...xAxis];
+    const strNum = type=='week'?13:10;
     const interval = {
       week:23,
       month:4,
@@ -161,8 +165,8 @@ class Chart extends Component{
       let name='';
       it&&it.creatTime.map((x,i)=>{
         inx=xAxis.findIndex((a)=>{
-          name=x.substr(0,13);
-          return a.substr(0,13)==name;
+          name=x.substr(0,strNum);
+          return a.substr(0,strNum)==name;
         });     //日期对应横坐标的位置
         if(inx!=-1){
           if(type=='week'){

+ 7 - 0
src/components/ChronicInfo/index.jsx

@@ -488,6 +488,13 @@ class ChronicInfo extends React.Component{
     return list;
   }
   componentWillReceiveProps(next){
+    //计算公式可能结果弹窗关闭1916
+    if(!next.data||next.data.length==0){
+      this.setState({
+        formulaId:null,
+        optionId:null
+      });
+    }
     if(JSON.stringify(next.calcuValues)!=JSON.stringify(this.props.calcuValues)){
       this.setState({
         calcuValues:next.calcuValues

+ 4 - 4
src/components/EmergencyProcedure/EmergencyModal/index.less

@@ -143,15 +143,15 @@
   overflow: hidden;
   z-index: 500;
   width: 900px;
-  padding-top: 30px;
+  padding-top: 20px;
   box-sizing: border-box;
   margin-left: -450px;
-  // margin-top: -400px;
+  // margin-top: -415px;
   // height: 800px;
   // top: 50%;
   left: 50%;
-  top: 40px;
-  bottom: 40px;
+  top: 60px;
+  bottom: 60px;
   .emergencyImg{
     height: 100%;
     width: 100%;

+ 1 - 1
src/components/EmergencyProcedure/index.less

@@ -8,7 +8,7 @@
     -ms-user-select: none;
     user-select: none;
     position: fixed;
-    z-index: 205;
+    z-index: 202;
     top: 55px;
     right: 20px;
     width: auto;

+ 3 - 3
src/components/Multiple/index.jsx

@@ -173,16 +173,16 @@ class Multiple extends react.Component{
     }
   }
   render(){
-    const {placeholder,value,show,data,handleConfirm,ikey,order,mainSaveText,handleHide,type} = this.props;
+    const {placeholder,value,show,data,hideTag} = this.props;
     const {editable,boxTop,boxLeft,seleData,seleId} = this.state;
     return <div className={style["container"]}>
       <div className={this.getClass()}
       ref={this.$div}
       onClick={this.handleShow}
-      onDoubleClick={this.changeToEdit}
+      onDoubleClick={hideTag?null:this.changeToEdit}
       onBlur={this.handleBlur}
       onInput={this.onChange}
-      onkeydown={handleEnter}
+      onKeyDown={handleEnter}
       contentEditable={editable}>{value||placeholder}</div>
       <div className={this.getListClass()} contentEditable="false">
         <SlideItem 

+ 5 - 5
src/components/NumberUnitDrop/index.jsx

@@ -185,19 +185,19 @@ class NumberUnitDrop extends Component{
   }
 
   render(){
-    const {placeholder,prefix,suffix,show,value,handleHide} = this.props;
-    const {numEditable,editable,hasSelect,boxLeft,boxTop} = this.state;
+    const {placeholder,prefix,suffix,show,value,handleHide,hideTag} = this.props;
+    const {editable,hasSelect,boxLeft,boxTop} = this.state;
     return <div className={this.getClasses()}
                 ref={this.$cont}
                 onClick={this.handleNumClick}
                 contentEditable={editable}
                 onBlur={this.numInpBlur}
-                onDoubleClick={this.changeToEdit}
-                onkeydown={handleEnter}
+                onDoubleClick={hideTag?null:this.changeToEdit}
+                onKeyDown={handleEnter}
                 onInput={this.handleSpanInp}>
       <span ref = {this.$pre}>{prefix?prefix+' ':prefix}</span>
       <span ref = {this.$span}
-            onkeydown={handleEnter}
+            onKeyDown={handleEnter}
             style={{cursor:editable?'text':'pointer'}}>{value||placeholder}</span>
       <span ref = {this.$suf}>{suffix?' '+suffix:suffix}</span>
       <NumberUnitPan handleSelect={(obj)=>this.select(obj)}

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

@@ -152,7 +152,7 @@ class RadioDrop extends Component{
       <div className={this.getClass()}
            onBlur={this.handleEditLabel}
            contentEditable={this.state.editable}
-           onDoubleClick={this.handledbClick}
+           onDoubleClick={hideTag?null:this.handledbClick}
            onFocus={(e)=>{e.stopPropagation()}}
            onClick={(e)=>this.handleShow(e,true)}
            onkeydown={handleEnter}>

+ 3 - 3
src/components/RadioInpDrop/index.jsx

@@ -205,15 +205,15 @@ class RadioInpDrop extends Component{
     return list;
   }
   render(){
-    const {data,show,vals,placeholder} = this.props;
+    const {data,show,vals,placeholder,hideTag} = this.props;
     const {boxLeft,boxTop} = this.state;
     return <div className={style['container']} ref = {this.$cont}>
       <div className={this.getClass()}
            onBlur={this.handleEditLabel}
            contentEditable={this.state.editable}
-           onDoubleClick={this.handledbClick}
+           onDoubleClick={hideTag?null:this.handledbClick}
            onClick={(e)=>this.handleShow(e,true)}
-           onkeydown={handleEnter}>
+           onKeyDown={handleEnter}>
         {vals?this.parseInputDom():<span>{placeholder}</span>}
       </div>
       <DropList onSelect={this.handleSelect} data={data} left={boxLeft} top={boxTop} show={show}/>

+ 15 - 3
src/components/WrapModalBody/WrapModalTableSon/index.jsx

@@ -6,8 +6,12 @@ import {getStatusImg} from '@utils/tools';
 
 class WrapModalTableSon extends React.Component {
   constructor(props) {
-    super(props)
+    super(props);
+    this.state = {
+      msg:'选中异常值数据'
+    }
     this.getImgPath = this.getImgPath.bind(this)
+    this.selectWaring = this.selectWaring.bind(this)
   }
   getImgPath(name,groupName,item){
     const { checkedList,selectOneCheck } = this.props;
@@ -24,11 +28,19 @@ class WrapModalTableSon extends React.Component {
       return <img className={style.check} onClick={()=>selectOneCheck(name,groupName,item)} src={check_circle} alt="" />
     }
   }
+  selectWaring(){
+    let tmpMsg = this.state.msg
+    const { selectWaring } = this.props;
+    this.setState({
+      msg:tmpMsg=='选中异常值数据'?'取消选中异常值数据集':'选中异常值数据'
+    })
+    selectWaring&&selectWaring()
+  }
   render() {
-    const { hospitalSonInspect,allCheckImportIns,allCheck,selectWaring } = this.props;
+    const { hospitalSonInspect,allCheckImportIns,allCheck } = this.props;
     return <div className={style['modalTable']}>
       <div className={style.sonTitle}>
-        <span>组名称 : {hospitalSonInspect.groupName}</span><span className={style.btn} onClick={selectWaring}>选中异常值数据</span>
+        <span>组名称 : {hospitalSonInspect.groupName}</span><span className={style.btn} onClick={this.selectWaring}>{this.state.msg}</span>
       </div>
       <div className={`${style.SonTable}`}>
         <table>

+ 4 - 4
src/components/WrapModalBodyPac/WrapModalTableSon/index.jsx

@@ -8,19 +8,19 @@ class WrapModalTableSon extends React.Component {
     super(props)
     this.getImgPath = this.getImgPath.bind(this)
   }
-  getImgPath(name,checkItem,item){
+  getImgPath(name,checkItem,item,idx){
     const { checkedList,selectOneCheck } = this.props;
     let num = 0;
     for(let k = 0;k < checkedList.length;k++){
       let tmpLis = checkedList[k];
       if(tmpLis == name){
-        return <img className={style.check} onClick={()=>selectOneCheck(name,checkItem,item)} src={check_right} alt="" />
+        return <img className={style.check} onClick={()=>selectOneCheck(name,checkItem,item,idx)} src={check_right} alt="" />
       }else{
         ++num
       }
     }
     if(num == checkedList.length){
-      return <img className={style.check} onClick={()=>selectOneCheck(name,checkItem,item)} src={check_circle} alt="" />
+      return <img className={style.check} onClick={()=>selectOneCheck(name,checkItem,item,idx)} src={check_circle} alt="" />
     }
   }
   render() {
@@ -48,7 +48,7 @@ class WrapModalTableSon extends React.Component {
               return <tr>
                 <td className={`${style.fst}`}>
                   {
-                    this.getImgPath(item.checkItem,hospitalSonInspect.checkItem,item)
+                    this.getImgPath(item.checkItem,hospitalSonInspect.checkItem,item,idx)
                   }
                 </td>
                 <td title={item.checkItem} className={`${style.sec}`}>{item.checkItem}</td>

+ 2 - 2
src/containers/WrapModalBodyPac.js

@@ -23,8 +23,8 @@ function mapDispatchToProps(dispatch, store) {
         showInIcss(){
           dispatch(showInIcsss())
         },
-        selectOneCheck(name,checkItem,item){
-          dispatch(selectOneChecks(name,checkItem,item))
+        selectOneCheck(name,checkItem,item,idx){
+          dispatch(selectOneChecks(name,checkItem,item,idx))
         },
         allCheckImport() {
           dispatch(allCheckImports())

+ 3 - 2
src/store/actions/wrapModalBodyPac.js

@@ -3,11 +3,12 @@ import {SET_ALLCHECKS,SHOW_IN_ICSSS,SELECT_ONE_CHECKS,SEARCH_HOSPITAL_PAC_SON,SE
 export const showInIcsss = () => ({         //确认选择显示到页面
   type:SHOW_IN_ICSSS
 })
-export const selectOneChecks = (name,checkItem,item) => ({         //选一个
+export const selectOneChecks = (name,checkItem,item,idx) => ({         //选一个
   type:SELECT_ONE_CHECKS,
   name,
   checkItem,
-  item
+  item,
+  idx
 })
 export const allCheckImports = () => ({         //全选反选
   type:SET_ALLCHECKS

+ 0 - 1
src/utils/drag.js

@@ -94,7 +94,6 @@ function dragBox(dragWrap,dragTop,type,addDom,img) {
   } else {
     drag.on('mousedown', function (event) {
       let lenHeight = wrap.height()
-      console.log(lenHeight,78787)
       if(img){
         $("#preImg").css("height",(lenHeight)+'px')
       }