Переглянути джерело

Merge branch 'optimize' into optimize-zxc

zhangxc 6 роки тому
батько
коміт
1128fd61d5

+ 5 - 2
src/components/AssessResult/index.jsx

@@ -168,11 +168,14 @@ class AssessResult extends Component {
     }
   }
   render() {
-    const {disName} =this.props;
+    const {disName,chronicMagItemName} =this.props;
     const data = this.props.data&&this.props.data[disName];
     return <div className={style['assess-cont']} id="AssistResult">
-      <div className={style['printShow']}>
+      <div className={style['printShow']} style={{borderBottom: (chronicMagItemName == disName)?'1px solid #ccc':''}}>
         <Information></Information>
+        {
+          chronicMagItemName == disName?<p>诊断:{chronicMagItemName}复诊评估</p>:null
+        }
       </div>
       {!data?<p className={style['loading']}><img src={loadingIcon} alt='loading...'/></p>:''}
       {data&&data.length==0?<p className={style['no-data']}>暂无数据!</p>:''}

+ 4 - 1
src/components/AssessResult/index.less

@@ -36,7 +36,7 @@
     line-height: 35px;
     .row{
       display: inline-block;
-      max-width: 100%;
+      max-width: 86%;
     }
     .results{
       position: relative;
@@ -126,6 +126,9 @@
 }
 .printShow {
   display: none;
+  p {
+    margin-bottom: 15px;
+  }
 }
 .footer{
   .print{

+ 2 - 1
src/components/DiagnosticList/index.jsx

@@ -237,7 +237,7 @@ class DiagnosticList extends Component {
     }
     render(){
         const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading} = this.props;
-      const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex} = this.state;
+        const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex} = this.state;
         const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
         let isChronic = false;      //是否要显示管理评估
         const footer = <Footer print={true}
@@ -278,6 +278,7 @@ class DiagnosticList extends Component {
                        <AssessResult closeAssess={this.showAssessFn.bind(this)}
                                      disId={assessId}
                                      disName={disName}
+                                     chronicMagItemName={list[0].name}
                                      isAssessConfirm={isAssessConfirm}
                                      ></AssessResult>
                       </ComplexModal>:''}

+ 12 - 10
src/components/Emergency/HisList/index.jsx

@@ -174,16 +174,18 @@ class HisList extends Component {
     const { data,total } = this.props;
     const { hasSecond } = this.state;
     return <div className={style['list-Box']}>
-      <h2>本科室近期全部历史病历</h2>
-      <div className={style['list-time']}>
-        <img src={date} />
-        <TimeInterval getStartTime={this.getStartTime} getEndTime={this.getEndTime}></TimeInterval>
-      </div>
-      <div className={style['filter-box']}>
-        <span className={style['filter']}>筛选:</span>
-        <span className={hasSecond==-1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,-1)}>默认</span>
-        <span className={hasSecond==1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,1)}>有二次诊断</span>
-        <span className={hasSecond==0?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,0)}>没有二次诊断</span>
+      <div className={style['top']}>
+        <h2>本科室近期全部历史病历</h2>
+        <div className={style['list-time']}>
+          <img src={date} />
+          <TimeInterval getStartTime={this.getStartTime} getEndTime={this.getEndTime}></TimeInterval>
+        </div>
+        <div className={style['filter-box']}>
+          <span className={style['filter']}>筛选:</span>
+          <span className={hasSecond==-1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,-1)}>默认</span>
+          <span className={hasSecond==1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,1)}>有二次诊断</span>
+          <span className={hasSecond==0?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,0)}>没有二次诊断</span>
+        </div>
       </div>
       <div className={style['list']}>
         <ul>

+ 23 - 7
src/components/Emergency/HisList/index.less

@@ -1,7 +1,17 @@
 .list-Box{
-  width: 360px;
-  height: 700px;
-  padding-top: 30px;
+  // width: 360px;
+  width: 324px;
+  // height: 700px;
+  height: 100%;
+  overflow: hidden;
+  padding-top: 130px;
+  padding-bottom: 70px;
+  position: relative;
+  .top{
+    position: absolute;
+    top:20px;
+    left: 0;
+  }
   h2{
     font-weight: 700;
     font-size: 18px;
@@ -11,10 +21,10 @@
     margin: 0 0 10px 20px;
   }
   .list-time{
-    width: 320px;
+    width: 323px;
     height: 39px;
     background: #E9F5FA;
-    margin: 0 20px 8px;
+    // margin: 0 20px 8px;
     padding-top: 6px;
     position: relative;
   }
@@ -41,7 +51,8 @@
     }
   }
   .list{
-    height: 480px;
+    // height: 480px;
+    height: 100%;
     overflow-y: auto;
     padding-bottom: 20px;
     li{
@@ -86,9 +97,14 @@
   .all-box{
     color: #7C828E;
     height: 69px;
+    width: 323px;
     line-height: 69px;
     padding: 0 20px;
     border-top: 1px solid #E9F5FA;
+    position: absolute;
+    bottom: 2px;
+    left: 0;
+    background: #fff;
     .check-all{
       width: 14px;
       margin: 0 8px 0 0;
@@ -102,7 +118,7 @@
       text-align: center;
       border: 1px solid #E2EFF6;
       border-radius: 4px;
-      margin-left: 177px;
+      margin-left: 136px;
       cursor: pointer;
     }
     .exp-select{

+ 10 - 7
src/components/Emergency/index.less

@@ -3,19 +3,20 @@
   .mask;
 }
 .emer-box{
-  width: 1060px;
-  height: 700px;
+  // width: 1060px;
+  width: 1024px;
+  // height: 700px;
+  height: 84%;
   position: fixed;
-  top:55px; //搜索结果展示-6-26
-  // top: 50%;
+  top:20px; //搜索结果展示-6-26
   left:50%;
-  // margin-top: -350px;
   margin-left: -530px;
   z-index: 2002;
   background: #fff;
   // overflow: hidden;
   .emer-content{
     position: relative;
+    height: 100%;
   }
   .closeModal {
     width: 100%;
@@ -34,13 +35,15 @@
     z-index: 888;
   }
   .emer-left{
-    width: 360px;
+    // width: 360px;
+    width: 324px;
+    height: 100%;
     display: inline-block;
     border-right: 1px solid #E9F5FA;
   }
   .emer-right{
     width: 700px;
-    height: 700px;
+    height: 100%;
     overflow-y: auto;
     display: inline-block;
     vertical-align: top;

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

@@ -2,11 +2,11 @@ import styles from './index.less'
 import small from '../img/small.png'
 import EmergencyPart from '../EmergencyPart'
 import pic from '../img/pic.png'
-import pic1 from '../img/pic1.jpg'
-import pic2 from '../img/pic2.jpg'
-import pic3 from '../img/pic3.jpg'
+import pic1 from '../img/pic1.png'
+import pic2 from '../img/pic2.png'
+import pic3 from '../img/pic3.png'
 import pic4 from '../img/pic4.png'
-import pic5 from '../img/pic5.jpg'
+import pic5 from '../img/pic5.png'
 import $ from 'jquery'
 
 class EmergencyModal extends React.Component{

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

@@ -92,7 +92,6 @@
     width: 1000px;
     margin-left: -500px;
     transform: translateY(-50%);
-
     // margin-top: -420px;
     // height: 840px;
     // transform: translateX(-50%);
@@ -101,6 +100,8 @@
     img{
       width: 100%;
       height: 100%;
+      float: left;
+      top: 0;
     }
   }
 }

BIN
src/components/EmergencyProcedure/img/pic1.jpg


BIN
src/components/EmergencyProcedure/img/pic1.png


BIN
src/components/EmergencyProcedure/img/pic2.jpg


BIN
src/components/EmergencyProcedure/img/pic2.png


BIN
src/components/EmergencyProcedure/img/pic3.jpg


BIN
src/components/EmergencyProcedure/img/pic3.png


BIN
src/components/EmergencyProcedure/img/pic4.png


BIN
src/components/EmergencyProcedure/img/pic5.jpg


BIN
src/components/EmergencyProcedure/img/pic5.png


+ 9 - 7
src/components/MedicalInfo/index.jsx

@@ -21,14 +21,16 @@ class MedicalInfo extends Component {
     }
     getSearchList() {
         const { getAllConceptDetail,searchResult } = this.props;
+      let showSubName = false;
         return searchResult && searchResult.map((item) => {
-                return <li key={item.conceptId}
-                           title='点击查看详情'
-                           onClick={() =>getAllConceptDetail({name: item.name, type: item.type})}>
-                            <span>{item.name}</span>
-                            <i>( {item.libTypeName} )</i>
-                            {/*<button>查看</button>*/}
-                        </li>;
+          showSubName = item.type == 51 ? true : false;
+          return <li key={item.conceptId}
+                     title='点击查看详情'
+                     onClick={() => getAllConceptDetail({name: item.name, type: item.type, uname: item.uniqueName})}>
+            <span>{item.name}{showSubName ? '(' + item.retrievalName + ')' : ''}</span>
+            <i>( {item.libTypeName} )</i>
+            {/*<button>查看</button>*/}
+          </li>;
             });
     }
     search(){

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

@@ -18,7 +18,6 @@ class Preview extends Component {
     let baseList = store.getState();
     const dataJson = getAllDataList(baseList);
     const dataStr = getAllDataStringList(baseList);
-
     return <div className={style['container']}>
       <div className={style['shade']} onClick={onClose}></div>
       <div className={style['modal']} id="previewWrapper">

+ 4 - 0
src/components/PreviewBody/index.less

@@ -91,6 +91,10 @@ table{
 }
 .assistTableTdSec {
   width: 16%;
+  position: relative;
+  img {
+    top: 6px !important;
+  }
 }
 .assistTableTdTrd {
   width: 24%;

+ 33 - 10
src/components/RadioInpDrop/index.jsx

@@ -1,6 +1,6 @@
 import React,{Component} from 'react';
-import {handleEnter,getPageCoordinate,windowEventHandler} from '@utils/tools.js';
-import {DropList} from '@commonComp';
+import {handleEnter,getPageCoordinate,windowEventHandler,filterDataArr,getLabelIndex} from '@utils/tools.js';
+import {DropList,Notify} from '@commonComp';
 import config from '@config/index';
 import style from "./index.less";
 import classNames from 'classnames';
@@ -26,7 +26,8 @@ class RadioInpDrop extends Component{
       boxTop:0,
       tmpScroll:0,
       tmpTop:0,
-      texts:props.vals||{0:props.value||props.placeholder}
+      texts:props.vals||{0:props.value||props.placeholder},
+      over:false
     };
     this.$cont = React.createRef();
     this.isIE = navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g,"")=="MSIE8.0";
@@ -147,22 +148,44 @@ class RadioInpDrop extends Component{
     handleDbclick&&handleDbclick({id:patId||id});
   }
   handleInnerInp(i,val){
-    const {ikey,boxMark,handleSaveInp} = this.props;
-    let vals = this.state.texts;
+    const {ikey,boxMark,handleSaveInp,mainSaveText} = this.props;
+    let vals = this.state.texts; 
+
+    // 主诉字数限制
+    if(boxMark==1){
+      let preText = vals[i].value;
+      let mainText = filterDataArr(mainSaveText);
+      let lengths = 0;
+      if(preText){
+        lengths = mainText.length + (val.length - preText.length);
+      }else{
+        lengths = mainText.length + val.length;
+      }
+      console.log("val:",val,"preVal:",preText,"mainText:",mainText,"lengths:",lengths,this.state.texts)
+      if(lengths >= config.limited){
+        Notify.info(config.limitText);
+        this.setState({
+          over:true
+        });
+        return
+      }
+    }
+    
     vals[i].value=val;
     this.setState({
-      texts:vals
+      texts:vals,
+      over:false
     });
-    handleSaveInp({values:vals,ikey,boxMark});
+    handleSaveInp({values:vals,ikey,boxMark,mainSaveText});
   }
   parseInputDom(){
     const {value,placeholder} = this.props;
-    const {texts} = this.state;
+    const {texts,over} = this.state;
     let temp='',list=[];
     for(let i in texts){
       temp = texts[i];
       if(typeof temp=='object'){
-        list.push(<InputComp handleInp={this.handleInnerInp} editable={true} index={i} value={temp.value}></InputComp>);
+        list.push(<InputComp handleInp={this.handleInnerInp} editable={true} index={i} value={temp.value} over={over}></InputComp>);
       }else{
         list.push(<span>&nbsp;{temp}</span>);
       }
@@ -207,7 +230,7 @@ class InputComp extends Component{
   handleBlur(e){
     e.stopPropagation();
     const text = e.target.innerText;
-    const {handleInp,index} = this.props;
+    const {handleInp,index,value} = this.props;
     e.target.innerText = '';
     handleInp(index,text);
   }

+ 27 - 1
src/containers/RadioInpDrop.js

@@ -150,9 +150,35 @@ function mapDispatchToProps(dispatch,store){
       });
     },
     handleSaveInp(params){
-      const {boxMark} = params;
+      const {boxMark,mainSaveText,values} = params;
       const index = params.ikey;
       let ikey = getLabelIndex(index);
+      // 输入框字数限制
+      /*if(boxMark==1){
+        if(values){
+          let str='',temp='';
+          for(let i in values){
+            temp = values[i];
+            if(typeof temp=='object'){
+              str+=temp.value;
+            }else{
+              str+=temp;
+            }
+          }
+          let oldVal = mainSaveText[ikey];
+          let mainText = filterDataArr(mainSaveText);
+          let lengths = 0;console.log("单选框输入:",params,oldVal,mainText.length)
+          if(oldVal && oldVal.length > str.length){
+            lengths = mainText.length + (str.length - oldVal.length);
+          }else{
+            lengths = mainText.length + str.length;
+          }  
+          if(lengths >= config.limited){
+            Notify.info(config.limitText);
+            return
+          }
+        }
+      }*/
       dispatch({
         type:InputActions[+boxMark],
         data:{values:params.values,ikey:params.ikey}

+ 4 - 4
src/store/actions/mainSuit.js

@@ -433,7 +433,7 @@ export function setNumberValue(state,action){
   const param = action.params;
   const index = param.ikey;
   let labelInx = getLabelIndex(index);
-  const subInx = index.substr(index.length-1);
+  const subInx = index.split("-")[2];//index.substr(index.length-1);
   let item = res.data[labelInx];
   // if(param.text.trim()){
     if(+item.tagType===1){
@@ -465,7 +465,7 @@ export function setRadioValue(state,action){
   let res = Object.assign({},state);
   const {ikey,id,text} = action;
   let labelInx = getLabelIndex(ikey);
-  const subInx = ikey.substr(ikey.length-1);
+  const subInx = ikey.split("-")[2]//ikey.substr(ikey.length-1);
   let item = res.data[labelInx];
   if(typeof text != 'string'){    //需要展开项--有无治疗类型
     const len = +item.copyType === 0?1:0;
@@ -513,7 +513,7 @@ export const setRadioInputValue = (state,action)=>{
   const res = Object.assign({},state);
   const {ikey,values,id} = action.data;
   let index = getLabelIndex(ikey);
-  let innerInx = ikey.substr(ikey.length-1);
+  let innerInx = ikey.split("-")[2];//ikey.substr(ikey.length-1);
   let item = res.data[index];
   if(item.tagType!=1){      //在组合项中
     item = res.data[index].questionMapping[innerInx];
@@ -568,7 +568,7 @@ export const setRadioInputValue = (state,action)=>{
     });
     res.saveText[index] = sub.join('');
   }else {
-    res.saveText[ikey] = str;
+    res.saveText[index] = str;
   }
   res.update = Math.random();
   return res;

+ 7 - 2
src/store/async-actions/pushMessage.js

@@ -183,11 +183,16 @@ export const getConceptDetail = (item) => {
 export const getAllConceptDetail = (item) => {
     return(dispatch, getState) => {
         const state = getState();
-        const params = {
+      let params = {
             type: item.type,
             name: item.name,
             position:item.position
-        }
+      };
+      if (item.type == 5 || item.type == 51) {
+        params.type = 12;
+        params.position = 0;
+        params.name = item.uname;
+      }
         json(api.getConceptDetail, params)
         .then((res)=>{
             if(res.data.code == '0') {

+ 2 - 2
src/utils/tools.js

@@ -219,7 +219,7 @@ const getAllDataStringList =(baseList) =>{           //获取所有模块文本
       'diag' : baseList.diagnosticList.diagnosticStr,
       'advice' : baseList.pushMessage.AdviceStr
     }
-    //console.log(jsonDataString,'文本模式数据获取')
+    // console.log(JSON.stringify(chiefData),chiefData,'文本模式数据获取')
     return jsonDataString;
 }
 /**
@@ -819,7 +819,7 @@ function inspectAndAssist(){
       name: '',
       questionId: '',
       showType: 1,
-      time:getCurrentDate(),
+      time:getCurrentDate(1),
       value:''
     }
     tmpObj.questionId = tmpAssist[i].id