Luolei 6 年之前
父節點
當前提交
f0344738b2

+ 2 - 2
src/components/AddAssistCheck/Textarea/index.jsx

@@ -66,11 +66,11 @@ class Textarea extends Component {
     this.textInput.current.previousSibling.focus();
   }
   render() {
-    const {idx} = this.props;
+    const {idx,disabled} = this.props;
     return (
       <div className={style.textWap}>
         <div className={style.divTextarea}
-            contenteditable={true}
+            contenteditable={disabled?false:true}
             ref={this.$dom}
             onInput={this.handleInput}
             onKeyUp={this.handleInput}

+ 14 - 7
src/components/AddAssistCheck/index.jsx

@@ -1,9 +1,9 @@
 import React from 'react';
-import { SearchOption, Calendar, ConfirmModal, Notify, Add ,DelToast,getCurrentDate} from '@commonComp';
+import { SearchOption, Calendar, ConfirmModal, Notify, Add ,DelToast} from '@commonComp';
 import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
-import { getPageCoordinate } from '@utils/tools';
+import { getPageCoordinate,getCurrentDate } from '@utils/tools';
 import close from './img/close.png';
 
 class AddAssistCheck extends React.Component {
@@ -81,7 +81,7 @@ class AddAssistCheck extends React.Component {
         }
       }
     });
-    this.getCurrentDate();
+    getCurrentDate(1);
   }
   handleSearchShow(e) {
     let tmpShow = this.state.show;
@@ -165,7 +165,7 @@ class AddAssistCheck extends React.Component {
               second: tmp2[2]
             }
           }
-          return (<li key={item.questionId} className={`${styles.assistLists} ${styles.clearfix}`}>
+          return (<li className={`${styles.assistLists} ${styles.clearfix}`}>
             <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
               <span className={styles.tagSpan}>
                 {item.name}:
@@ -173,11 +173,18 @@ class AddAssistCheck extends React.Component {
               </span>
             </span>
             <div className={styles.textareaWrap}>
-              <Textarea value={item.value} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
+              <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
             </div>
             <div className={styles.pointerFinger}>
-              <p onClick={() => this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
-              <i onClick={() => this.handleShowDate(idx)}></i>
+              {
+                item.disabled?<React.Fragment>
+                  <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
+                  <i></i>
+                </React.Fragment>:<React.Fragment>
+                  <p onClick={() => this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
+                  <i onClick={() => this.handleShowDate(idx)}></i>
+                </React.Fragment>
+              }
               {/*<a href="javascript:void(0);" onClick={() => { this.handleDelClick(idx,item) }}><img src={close} alt="" /></a>*/}
               <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span>
               {

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

@@ -103,6 +103,7 @@ class PreviewBody extends Component {
   render() {
     const { show, preInfo, dataJson, dataStr, baseObj, flg ,showAssessBtn,showHistoryCases} = this.props;
     const other_yjs = dataStr.other?filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other):'';
+    const isChronic = (dataJson.diagChronicMagItem&&dataJson.diagChronicMagItem.name)||(dataJson.mainChronicDesease&&dataJson.mainChronicDesease.name);
     const noData = JSON.stringify(preInfo) == '{}';
     return <div className={style['content']} style={{ width: flg ? '700' : '820' }}>
       <div className={style['contents']} id="content" style={{ margin: "0 auto", maxWidth: "620px" }}>

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

@@ -68,7 +68,7 @@ class PushItems extends Component {
       name: '',
       questionId: '',
       showType: 1,
-      time:getCurrentDate(),
+      time:getCurrentDate(1),
       value:''
     }
     if(checkedAssay.length > 0){

+ 1 - 2
src/components/WrapModalBody/Item/index.jsx

@@ -1,8 +1,7 @@
 import React from "react";
 import style from "../index.less";
-import {getCalendarDate,getCurrentDate} from "@utils/tools";
+import {getCurrentDate} from "@utils/tools";
 import TimeInterval from '../../TimeInterval';
-
 class Item extends React.Component {
   constructor(props) {
     super(props);

+ 6 - 7
src/components/WrapModalBody/WrapModalTable/index.jsx

@@ -5,13 +5,12 @@ class WrapModalTable extends React.Component {
   constructor(props) {
     super(props)
   }
-  // shouldComponentUpdate(next){
-  //   if(JSON.stringify(next.handleGetSonList) == JSON.stringify(this.props.handleGetSonList)){
-  //     return false
-  //   }else{
-  //     return true
-  //   }
-  // }
+  shouldComponentUpdate(nextProps,nextState){
+    if(JSON.stringify(nextProps.hospitalInspect) == JSON.stringify(this.props.hospitalInspect)){
+      return false
+    }
+    return true
+  }
   render() {
     const { hospitalInspect, handleGetSonList } = this.props;
     return <div className={style['modalTable']}>

+ 3 - 3
src/containers/Inspect.js

@@ -7,7 +7,7 @@ import {
   getSearchList,
   getSublableList,
   getImportList,
-  getSonDetailList
+  getSonDetailLists
 } from '@store/async-actions/inspect';
 import {
   setLabel,
@@ -65,8 +65,8 @@ function mapDispatchToProps(dispatch, store) {
     handleSearch(data) {
       dispatch(getImportList(data))
     },
-    handleGetSonList(name) {
-      dispatch(getSonDetailList(name))
+    handleGetSonList(name,time) {
+      dispatch(getSonDetailLists(name,time))
     },
     handleChangeValue(val) {
       dispatch(getSearchList(val))

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

@@ -24,10 +24,11 @@ export const getHospitalInspectList = (list) => ({         //检索医院化验
     type:SEARCH_HOSPITAL_INSPECT,
     list
 })
-export const getHospitalInspectDetailList = (list,name) => ({         //检索医院化验项
+export const getHospitalInspectDetailList = (list,name,time) => ({         //检索医院化验项
     type:SEARCH_HOSPITAL_INSPECT_SON,
     list,
-    name
+    name,
+    time
 })
 
 export const setLabel = (idx,sign) => ({          //搜索后点击选中的结果

+ 2 - 2
src/store/async-actions/inspect.js

@@ -68,12 +68,12 @@ export const getImportList = (data) => {
         })
     }
 };
-export const getSonDetailList = (name) => {
+export const getSonDetailLists = (name,time) => {
     return (dispatch) => {
         axios.json('/dockingImport/getByGroupNameLisData',{groupName:name})
         .then((res)=>{
             const data = res.data.data;
-            dispatch(getHospitalInspectDetailList(data,name))
+            dispatch(getHospitalInspectDetailList(data,name,time))
         })
     }
 };

+ 4 - 0
src/store/reducers/assistCheck.js

@@ -41,6 +41,7 @@ export default (state = initSearchList, action) => {
       for (let k = 0; k < tmpGroup[i].pacsResultDTO.length; k++) {
         let tmpObj = {}
         tmpObj.time = tmpGroup[i].Rtime
+        tmpObj.disabled = true
         tmpObj.name = tmpGroup[i].pacsResultDTO[k].checkItem
         tmpObj.value = tmpGroup[i].pacsResultDTO[k].imagingResults
         tmpObj.imagingDiagnose = tmpGroup[i].pacsResultDTO[k].imagingDiagnose
@@ -173,6 +174,9 @@ export default (state = initSearchList, action) => {
       newState.allCheck = true;
     } else {
       newState.allCheck = false;
+    }
+    for(let i = 0;i<tmpArr.length;i++){
+      
     }
     newState.hospitalPacObj = tmpArr
     return newState;

+ 4 - 1
src/store/reducers/inspect.js

@@ -45,7 +45,6 @@ export default (state = initSearchList, action) => {
     if (action.type == SHOW_IN_ICSS) {
         const newState = Object.assign({}, state);
         let tmpGroup = JSON.parse(JSON.stringify(newState.selectGroupList))
-        console.log(tmpGroup,7878787)
         let tmpArr = newState.getExcelDataList;
         let tmpArr2 = newState.labelList;
         let excelDataLis = {
@@ -57,6 +56,9 @@ export default (state = initSearchList, action) => {
             menus:'',
             lisExcelItem:[]
           }
+          for(let k = 0;k < tmpGroup[i].lisExcelWrapper.length;k++){
+            tmpGroup[i].lisExcelWrapper[k].time = tmpGroup[i].Rtime
+          }
           tmpObj.menus = tmpGroup[i].groupName
           tmpObj.lisExcelItem = tmpGroup[i].lisExcelWrapper
           excelDataLis.lisExcelRes.push(tmpObj)
@@ -230,6 +232,7 @@ export default (state = initSearchList, action) => {
         }else{
           newState.allCheck = false;
         }
+        tmpArr.Rtime = action.time
         newState.hospitalInspectObj = tmpArr
         return newState;
     }