morphone1995 4 年之前
父節點
當前提交
f25cd7cd94

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

@@ -149,7 +149,7 @@ class AddAssistCheck extends React.Component {
             className={styles.searchLi}
             title={item.name}
             onClick={() => {
-              this.props.setHighter(48)
+              this.props.setHighter(96)
               this.handleSign(item,'search');
               this.setState({ show: false })
             }}

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

@@ -126,6 +126,7 @@ class Inspect extends React.Component {
   }
   changeShowFill() {
     this.setState({ showFill: false })
+    console.log(123123);
     this.props.setHighter(48)
   }
   handleChangeDate(info) {

+ 11 - 3
src/components/BlockEmrCont/index.jsx

@@ -59,10 +59,18 @@ class BlockEMRCont extends Component {
   }
 
   setHighter(ht){
-    // console.log(this.$div.current.scrollHeight,ht,'-=-=-=-------');
-    if(this.$div.current){
+    // console.log(ht, '-=-=-ht=-------');
+    // console.log(this.$div.current.scrollHeight,'-=-this.$div.current.scrollHeight=-=-------');
+    // if (this.$div.current) {
+    //   this.$div.current.style.paddingBottom = ht + 'px';
+    // }
+    //  低分辨率屏幕 处理 高度,暂时定为检验 + 48px   检查 +96px,可解决bug但是需要后期优化 2020/08/21
+    if (this.$div.current && ht === 48){
       this.$div.current.style.paddingBottom = ht+'px';
     }
+    if (this.$div.current && ht === 96) {
+      this.$div.current.style.paddingBottom = ht + 'px';
+    }
   }
   render() {
     const { isShowSexInput} = this.state
@@ -98,7 +106,7 @@ class BlockEMRCont extends Component {
           {isShowSexInput && <MenstruationHistory></MenstruationHistory>}
           
           {/* <OtherHistory></OtherHistory> */}
-          <CheckBody></CheckBody>
+          <CheckBody setHighter={this.setHighter}></CheckBody>
           {/* 检验 */}
           <Inspect setHighter={this.setHighter}></Inspect>
           {/* 检查 */}

+ 30 - 30
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -35,10 +35,10 @@ class HistoryCaseContainer extends React.Component {
           editVisible: false,
           templateName: '', // 病历名称
           historyCase: [],
-          currentIndex:-1,
+          currentIndex:-1,  // 显示编辑/删除图标
           delId: '', //删除病历id
           editId: '', //编辑病历id
-          activeIndex: 0,
+          activeIndex: -1,  //字体显示蓝色高亮index
           showEditIcon: false,
           showDelIcon: false,
           desc: true // 正序/逆序
@@ -55,6 +55,8 @@ class HistoryCaseContainer extends React.Component {
         this.makeSureEdit = this.makeSureEdit.bind(this);
         this.handleChange = this.handleChange.bind(this);
       this.handleSortClick = this.handleSortClick.bind(this);
+
+      this.$scrollRef = React.createRef();
     }
     componentDidMount(){
       const {items} = this.props
@@ -67,8 +69,6 @@ class HistoryCaseContainer extends React.Component {
       })
     }
 
-    componentWillReceiveProps(nextProps){
-    }
 
     // 操作后获取获取列表数据
     getTemplatePageAlls(val) {
@@ -86,7 +86,6 @@ class HistoryCaseContainer extends React.Component {
 
     // 点击当前的历史病历
     handleCaseClick(idx,val) {
-  
       const { items } = this.props;
       let tmpItems = []
       $("#hislistLeft li").eq(idx).css({
@@ -102,8 +101,6 @@ class HistoryCaseContainer extends React.Component {
       this.setState({
         activeId: idx,
         activeHis: tmpItems,
-        // dataStr: tmpItems.preview || {},
-        // dataJson:JSON.parse(tmpItems.dataJson)||{},
         dataStr: JSON.parse(tmpItems.preview)||[],
         activeIndex: idx
       })
@@ -168,6 +165,10 @@ class HistoryCaseContainer extends React.Component {
     // 确认编辑病历
     makeSureEdit(){
       const { editId, templateName} = this.state
+      if (templateName === '') {
+        Notify.info('请输入病历名称')
+        return
+      }
       store.dispatch(asyncUpdateByIdUsNames(editId, templateName)).then(res=>{
         if (res.data.code === '0'){
           Notify.success('病历修改成功');
@@ -191,11 +192,12 @@ class HistoryCaseContainer extends React.Component {
     }
     // 显示编辑确认框
     handleEditQuoteClick(e, val, idx) {
+      // console.log(val,'显示编辑确认框');
       e.stopPropagation()
       this.setState({
         editVisible: true,
         editId: val.id,
-        templateName: ''
+        templateName: val.name
       })
     }
 
@@ -234,7 +236,9 @@ class HistoryCaseContainer extends React.Component {
     // 处理鼠标移除
     handleMouseLeaveLi(idx){
       // console.log('处理鼠标移除li');
-
+      this.setState({
+        currentIndex : -1
+      })
     }
 
       // 处理鼠标移入编辑按钮
@@ -288,16 +292,14 @@ class HistoryCaseContainer extends React.Component {
           }
         })
     })
+  }
 
-     
-      // const { items } = this.props;
-      // let length = items &&  items.length
-      // let index = length - this.state.currentIndex -1
-      // this.props.handleSortClick()
-      // this.setState({
-      //   currentIndex: index
-      // })
-    }
+  componentDidUpdate() {  // 刷新组件
+    // console.log(this.$scrollRef.current.scrollTop);
+    // console.log(this.$scrollRef);
+    // this.$scrollRef.current.scrollTop = this.$scrollRef.current.scrollHeight;
+
+  }
 
     render(){
         const { items,handleSortClick,showHistoryBox,preInfo } = this.props;
@@ -329,30 +331,28 @@ class HistoryCaseContainer extends React.Component {
                         <span className={styles.sort} onClick={this.handleSortClick}>排序 <img src={sort} alt="排序"/></span>
                     </div>
                     <div className={styles.lists}>
-                        <ul id="hislistLeft">
+                        <ul id="hislistLeft" ref={this.$scrollRef}>
                             {(items && items.length > 0) ? items.map((val,idx)=>{
                                     // return <li key={val.id} className={val.id == activeHistory.id?styles.bgc:''} onClick={(e)=>{this.handleCaseClick(e,idx)}}>
                               return <li key={val.id} onClick={() => { this.handleCaseClick(idx, val) }} onMouseEnter={() => this.handleMouseEnterLi(idx)} onMouseLeave={() => this.handleMouseLeaveLi(idx)}>
                                          <div className={styles.itemLeft}>
                                            <div className={styles.historyTop}>
-                                        <span title={val.name} className={activeIndex === idx ? styles.itemNameActive :styles.itemName}>{val.name}</span>
-                                    {currentIndex === idx && (<div className={styles.edit} onClick={(e) => { this.handleEditQuoteClick(e, val, idx) }} onMouseEnter={() => this.handleMouseEnterEdit(idx)} onMouseLeave={() => this.handleMouseLeaveEdit(idx)}>
-                                      <img src={ this.state.showEditIcon ? editHover :edit} />
+                                           <span title={val.name} className={activeIndex === idx ? styles.itemNameActive :styles.itemName}>{val.name}</span>
+                                           {currentIndex === idx && (
+                                              <div className={styles.edit} onClick={(e) => { this.handleEditQuoteClick(e, val, idx) }} onMouseEnter={() => this.handleMouseEnterEdit(idx)} onMouseLeave={() => this.handleMouseLeaveEdit(idx)}>
+                                               <img src={ this.state.showEditIcon ? editHover :edit} />
                                               </div>)}
-                                           </div>
-                                  <div className={activeIndex === idx ? styles.timeActive : styles.time}>{val.inquiryDate}</div>
+                                         </div>
+                                         <div className={activeIndex === idx ? styles.timeActive : styles.time}>{val.inquiryDate}</div>
                                           
                                          </div>
                                          <div className={styles.itemRight}>
                                                                                    
-                                          <button
-                                            className={styles.quote}
-                                            onClick={(e) => { this.handleQuoteClick(e, val, idx) }}
-                                          >引 用</button>
+                                          <button className={styles.quote} onClick={(e) => { this.handleQuoteClick(e, val, idx) }}>引 用</button>
 
                                           {currentIndex === idx && (
-                                      <div className={styles.del} onClick={(e) => { this.handleDelQuoteClick(e, val, idx) }} onMouseEnter={() => this.handleMouseEnterDel(idx)} onMouseLeave={() => this.handleMouseLeaveDel(idx)}>
-                                      <img src={this.state.showDelIcon?delHover :del} />
+                                            <div className={styles.del} onClick={(e) => { this.handleDelQuoteClick(e, val, idx) }} onMouseEnter={() => this.handleMouseEnterDel(idx)} onMouseLeave={() => this.handleMouseLeaveDel(idx)}>
+                                              <img src={this.state.showDelIcon?delHover :del} />
                                             </div>
                                           )} 
                                         </div>

+ 18 - 2
src/components/Operation/index.jsx

@@ -112,7 +112,19 @@ class Operation extends Component {
       return;
     }   
     if (keepState == 4) {
-      Notify.info('性别不能为空');
+      Notify.info('卡号不能为空');
+      return;
+    }   
+    if (keepState == 5) {
+      Notify.info('科室不能为空');
+      return;
+    }   
+    if (keepState == 6) {
+      Notify.info('医生不能为空');
+      return;
+    }   
+    if (keepState == 7) {
+      Notify.info('门诊号不能为空');
       return;
     }   
     // }else if(keepState == 2){
@@ -341,7 +353,11 @@ class Operation extends Component {
     const { save, clear, saveDataAll,saveDataAlls,diagShowTmp ,chronicMagItem,chronicDesease,admin,floderListAdmin} = this.props;
     const { type,deptId,sex,title,fstName,folderId,folderNameVal } = this.state;
     // console.log(type,'======type');
-    if (type == 1) {
+    if (type == 1) {     
+      if (this.state.medicalName === '') {
+        Notify.info('请输入病历名称')
+        return 
+      }
       diagShowTmp(false)
       this.setState({ title: '' })
       if (type == 1) {

+ 7 - 8
src/components/PreviewBody/Inspect/index.jsx

@@ -13,22 +13,21 @@ const PreviewInspect = (props) => {
         {
           dataJson && dataJson.labelListSmall && dataJson.labelListSmall.map((item) => {
             // console.log(item, item,'=====');
-              return (
-                
+              return (               
                   <tr className={style.assistTableTrSec}>
                     <td className={style.assistTableTdFst}>{item.uniqueName}</td>
                     <td className={style.assistTableTdSec}>
                       {/* {getStatusImg(value.type, value.value, 1)}
                       {value.unit} */}
-                      {/* {getStatusImg(2, item.value, 1)}
-                      {item.units} */}
-                      {getStatusImg(2, 9.8, 1)}
-                      {'mmol/L'}
+                      {getStatusImg(0, item.value, 1)}
+                      {item.units}
+                      {/* {getStatusImg(2, 9.8, 1)}
+                      {'mmol/L'} */}
                     </td>
                     {/* {showDetails(item)} */}
                     <td className={style.assistTableTdTrd}>
-                      {/* {normalVal(item.minValue, item.maxValue)} */}
-                      {normalVal(3.9, 6.1)}
+                      {normalVal(item.minValue, item.maxValue)}
+                      {/* {normalVal(3.9, 6.1)} */}
                     </td>
                     <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '检验时间:' + toTime(item.time)
                     }</td>

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

@@ -82,7 +82,7 @@ class PreviewBody extends Component {
   render() {
     const { show, preInfo, dataJson, dataStr, baseObj, flg ,come,showAssessBtn,showHistoryCases} = this.props;
     let other_data={},lis_data={},pas_data={},other_yjs='',access='',adviceData={};
-    let isShowSex = baseObj.sex ? false : true
+    let isShowSex = baseObj.sex !== 2 ? false : true
     // if(!come){
     //   other_data = JSON.parse(baseObj.detailList[2].contentJson)
     //   lis_data = JSON.parse(baseObj.detailList[4].contentJson)

+ 16 - 2
src/utils/tools.js

@@ -1195,7 +1195,11 @@ function readyKeepHistory(){
   let jsonStr = getAllDataStringList(baseList);
   let patientName = formatFormParmas('patientName', patInfoData);  // 姓名
   let patientAge = formatFormParmas('patientAge', patInfoData);  // 年龄
-  let patientSex = formatFormParmas('patientSex', patInfoData);  // 性别
+  let patientIdNo = formatFormParmas('patientIdNo', patInfoData);  // 卡号
+  let hospitalDeptName = formatFormParmas('hospitalDeptName', patInfoData);  // 科室
+  let doctorName = formatFormParmas('doctorName', patInfoData);  // 医生
+  let recordId = formatFormParmas('recordId', patInfoData);  // 门诊号
+
   if(filterDataArr(JSON.parse(jsonStr.chief)) == ''){
       return 1;//主诉不能为空
   }
@@ -1205,9 +1209,19 @@ function readyKeepHistory(){
   if (patientAge === '') {
     return 3;
   }
-  if (patientSex === '') {
+  if (patientIdNo === '') {
     return 4;
   }
+  if (hospitalDeptName === '') {
+    return 5;
+  }
+  if (doctorName === '') {
+    return 6;
+  }
+  if (recordId === '') {
+    return 7;
+  }
+
 
   // }else if(!jsonStr.diag || jsonStr.diag.trim().length < 1){
   //     return 2;//诊断不能为空