瀏覽代碼

Merge branch 'dev5.3.1' into dev/new1

luolei 5 年之前
父節點
當前提交
e7dba2a44c

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

@@ -37,7 +37,7 @@ class AddAssistCheck extends React.Component {
       let _closeTil = $('#delTit')[0];   // 弹窗标题
       if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
         if(this.state.show){
-          this.props.setHighter(0)
+          this.props.setHighter(10)
         }
         this.setState({ show: false });
       }
@@ -109,6 +109,7 @@ class AddAssistCheck extends React.Component {
             className={styles.searchLi}
             title={(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
             onClick={() => {
+              this.props.setHighter(10)
               handleSign(item.conceptId,idx,'search');
               this.setState({ show: false })
             }}
@@ -128,6 +129,7 @@ class AddAssistCheck extends React.Component {
             className={styles.searchLi}
             title={item.name}
             onClick={() => {
+              this.props.setHighter(10)
               handleSign(item.conceptId, idx,'common');
               this.setState({ show: false })
             }}
@@ -250,7 +252,19 @@ class AddAssistCheck extends React.Component {
         <div id="searchWrapAssist" style={{ position: "relative", clear: 'both' }}>
           <Add showText="添加辅检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck" />
           {this.state.show ? <SearchOption windowHeight={windowHeight} refreshScroller={refreshScroller }  pageTop={pageTop} height={280} handleChangeValue={handleChangeValue} visible={true}>
-            {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
+            {list && list.length>0?
+              <ScrollArea speed={0.8}
+                horizontal={false}
+                stopScrollPropagation={true}
+                style={{height:'257px'}}
+                className={styles["area"]}
+                verticalContainerStyle={contStyle}
+                verticalScrollbarStyle={barStyle}
+                contentClassName="content">
+                {
+                  this.getSearchList(list)
+                }
+              </ScrollArea>:(assistVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
             {
               (list && list.length>0) || (assistVal != '') || (assistList&&assistList.length==0)?'':<div>
                 <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用辅检项</p>

+ 19 - 4
src/components/AddInspect/index.jsx

@@ -91,7 +91,7 @@ class Inspect extends React.Component {
       if (searchOption) {
         if (searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
           if(this.state.show){
-            this.props.setHighter(0)
+            this.props.setHighter(10)
           }
           this.setState({ show: false });
         }
@@ -99,7 +99,7 @@ class Inspect extends React.Component {
       if (inspectFill) {
         if ($(event.target).attr('id') != "getSureTime"&&event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
           if(this.state.showFill){
-            this.props.setHighter(0)
+            this.props.setHighter(10)
           }
           this.setState({ showFill: false, date: false });
         }
@@ -123,7 +123,7 @@ class Inspect extends React.Component {
   }
   changeShowFill() {
     this.setState({ showFill: false })
-    this.props.setHighter(0)
+    this.props.setHighter(10)
   }
   handleChangeDate(info) {
     // let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')
@@ -132,6 +132,7 @@ class Inspect extends React.Component {
   }
   handleSearchShow(e) {
     let tmpShow = this.state.show;
+    this.props.handleSomeAction()
     this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
     // e.stopPropagation();
     setPosition(e,"#searchOption",this.props.setHighter)
@@ -255,6 +256,7 @@ class Inspect extends React.Component {
             className={styles.searchLi}
             title={(item.name == item.retrievalName || !item.retrievalName) ? item.name : item.name + '(' + item.retrievalName + ')'}
             onClick={() => {
+              this.props.setHighter(10)
               handleSign(item.questionId, idx, 'search');
               this.setState({ show: false })
             }}
@@ -274,6 +276,7 @@ class Inspect extends React.Component {
             className={styles.searchLi}
             title={item.name}
             onClick={() => {
+              this.props.setHighter(10)
               handleSign(item.questionId, idx, 'common');
               this.setState({ show: false })
             }}
@@ -403,7 +406,19 @@ class Inspect extends React.Component {
         <div style={{ position: "relative", clear: "both", top: "5px" }}>
           <Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
           {this.state.show ? <SearchOption windowHeight={windowHeight} height={280} refreshScroller={refreshScroller} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
-            {list && list.length > 0 ? this.getSearchList(list) : (inspectVal == '' ? '' : <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>暂无筛选项</p>)}
+            {list && list.length > 0 ? 
+            <ScrollArea speed={0.8}
+              horizontal={false}
+              stopScrollPropagation={true}
+              style={{height:'257px'}}
+              className={styles["area"]}
+              verticalContainerStyle={contStyle}
+              verticalScrollbarStyle={barStyle}
+              contentClassName="content">
+              {
+                this.getSearchList(list)
+              }
+            </ScrollArea> : (inspectVal == '' ? '' : <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>暂无筛选项</p>)}
             {
               (list && list.length > 0) || (inspectVal != '') || (inspectList&&inspectList.length==0) ? '' : <div>
                 <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>常用化验项</p>

+ 5 - 4
src/components/DiagResultSearch/index.jsx

@@ -28,7 +28,7 @@ class DiagResultSearch extends Component {
         } else {
           if (e.target != diagSearch && e.target != addDiag && e.target.parentNode != addDiag && !$.contains(diagSearch, e.target)) {
             that.props.hideSearch();
-            that.props.setHighter(0)
+            that.props.setHighter(10)
           }
 
 
@@ -41,10 +41,11 @@ class DiagResultSearch extends Component {
 
   getSearchList(searchResult) {
     return <div className={style['search-result']}>
-
       {
         searchResult && searchResult.map((item) => {
-          return (<div key={item.id} className={style['search-result-item']}><DiagnosticItem title={true} item={item} clearInput={this.clearInput} type='search'/></div>)
+          return (<div key={item.id} className={style['search-result-item']}>
+            <DiagnosticItem setHighter={this.props.setHighter} title={true} item={item} clearInput={this.clearInput} type='search'/>
+          </div>)
         })
       }
     </div>
@@ -67,7 +68,7 @@ class DiagResultSearch extends Component {
           <ScrollArea speed={0.8}
                       horizontal={false}
                       stopScrollPropagation={true}
-                      style={{height:'225px'}}
+                      style={{height:'257px'}}
                       className={style["area"]}
                       verticalContainerStyle={contStyle}
                       verticalScrollbarStyle={barStyle}

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

@@ -43,7 +43,7 @@
 .search-result {
     /*overflow-y: auto;
     max-height: 225px;*/
-    min-height: 80px;
+    // min-height: 80px;
 }
 
 .search-result-item {

+ 2 - 0
src/components/DiagnosticItem/index.jsx

@@ -25,11 +25,13 @@ class DiagnosticItem extends Component{
         this.getTips = this.getTips.bind(this)
     }
     confirm() {
+        this.props.setHighter(10)
         this.close();
         const diagType = 1;
         this.addDiagodal(diagType)
     }
     cancel() {
+        this.props.setHighter(10)
         this.close();
         const diagType = 2;
         this.addDiagodal(diagType)

+ 7 - 2
src/components/EMRContainer/index.jsx

@@ -20,6 +20,7 @@ class EMRContainer extends Component {
         this.$cont = React.createRef();
         this.$div = React.createRef();
         this.setHighter = this.setHighter.bind(this);
+        this.handleSomeAction = this.handleSomeAction.bind(this);
     }
     componentDidMount(){
         // const {initHospital} = this.props;
@@ -37,6 +38,10 @@ class EMRContainer extends Component {
           }
         });
     }
+    handleSomeAction(){
+      console.log(ScrollArea,this.context)
+      // this.context.scrollArea.refresh();
+    }
     setHighter(ht){
       // console.log(this.$div.current.scrollHeight);
       if(this.$div.current){
@@ -60,7 +65,7 @@ class EMRContainer extends Component {
                       verticalContainerStyle={contStyle}
                       verticalScrollbarStyle={barStyle}
                       contentClassName="content">
-          <InfoTitle></InfoTitle>
+            <InfoTitle></InfoTitle>
             <div className={style['inner']} id="EmrContainer" ref={this.$div}>
                 <MainSuit></MainSuit>
                 <CurrentIll></CurrentIll>
@@ -68,7 +73,7 @@ class EMRContainer extends Component {
                 <div>
                   <CheckBody></CheckBody>
                 </div>
-                <Inspect setHighter={this.setHighter}></Inspect>
+                <Inspect setHighter={this.setHighter} handleSomeAction={this.handleSomeAction}></Inspect>
                 <AssistCheck setHighter={this.setHighter}></AssistCheck>
                 <Diagnosis setHighter={this.setHighter}></Diagnosis>
                 <AdviceContainer></AdviceContainer>

+ 3 - 1
src/components/Inspect/index.jsx

@@ -68,6 +68,7 @@ class Inspect extends React.Component {
         }
       }
     });
+    this.props.setContext(this.context)
   }
   handleBindFileApi(){
     const {message} = this.props;
@@ -207,7 +208,7 @@ class Inspect extends React.Component {
 
   }
   render() {
-    const {setHighter, fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
+    const {handleSomeAction,setHighter, fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
     const { ieVersion, isIE, hide,importLis } = this.state;
     const { checkSystemIpt, onClose,handleBindFileApi,closeInIcss,showSlideImport } = this;
     if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -266,6 +267,7 @@ class Inspect extends React.Component {
             <AddInspect
               handleSign={handleSign}
               setHighter={setHighter}
+              handleSomeAction={handleSomeAction}
               refreshScroller={this.refreshScroller}
               handleChangeValue={handleChangeValue}
               list={list}

+ 4 - 0
src/containers/Inspect.js

@@ -15,6 +15,7 @@ import {
   delExcelLis,
   clearLabel,
   delPartItem,
+  setContext
 } from '@store/actions/inspect';
 import {
   billing,
@@ -38,6 +39,9 @@ function mapStateToProps(state) {//console.log(state)
 
 function mapDispatchToProps(dispatch, store) {
   return {
+    setContext(obj){
+      dispatch(setContext(obj))
+    },
     handleChangeValue(val) {
       dispatch(getSearchList(val))
     },

+ 5 - 1
src/store/actions/inspect.js

@@ -1,4 +1,4 @@
-import {ADD_LABEL,SEARCH_LIST,SET_LABEL,FILL_ACTIVE,FILL_ACTIVE_DETAIL,GET_EXCEL,CHECK_VALUE_IS_CHANGE,CLEAR_LABEL,RESET_LABEL,CLEAR_ALL_LABEL,DEL_PART_ITEM,DEL_EXCEL_LIST} from '../types/inspect';
+import {SET_CONTEXT,ADD_LABEL,SEARCH_LIST,SET_LABEL,FILL_ACTIVE,FILL_ACTIVE_DETAIL,GET_EXCEL,CHECK_VALUE_IS_CHANGE,CLEAR_LABEL,RESET_LABEL,CLEAR_ALL_LABEL,DEL_PART_ITEM,DEL_EXCEL_LIST} from '../types/inspect';
 
 export const setLabel = (idx,sign) => ({          //搜索后点击选中的结果
     type:SET_LABEL,
@@ -59,3 +59,7 @@ export const clearAllLabel = (data,dataExcel,saveTextData) => ({
     dataExcel,
     saveTextData
 })
+export const setContext = (obj) => ({
+    type:SET_CONTEXT,
+    obj
+})

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

@@ -9,7 +9,8 @@ import {
     CLEAR_ALL_LABEL,
     DEL_PART_ITEM,
     DEL_EXCEL_LIST,
-    ADD_LABEL
+    ADD_LABEL,
+    SET_CONTEXT
 } from '../types/inspect';
 import store from '@store';
 import { getStringPlus,  getPushLists,  getPushList} from '@utils/tools.js';
@@ -27,6 +28,7 @@ const initSearchList = {
     pushItem:[],    //推送的数据
     pushItems:[],    //右侧模板预览的数据
     inspectVal:'',
+    context:{}
 }
 
 export default (state = initSearchList, action) => {
@@ -168,6 +170,11 @@ export default (state = initSearchList, action) => {
         newState.inspectStrPlus = getStringPlus(newState.pushItems)
         return newState;
     }
+    if (action.type == SET_CONTEXT) {    
+        const newState = Object.assign({}, state);
+        newState.context = action.obj
+        return newState;
+    }
     return state;
 }
 

+ 1 - 0
src/store/types/inspect.js

@@ -11,3 +11,4 @@ export const CLEAR_ALL_LABEL = 'CLEAR_ALL_LABEL';
 export const DEL_PART_ITEM = 'DEL_PART_ITEM';
 export const DEL_EXCEL_LIST = 'DEL_EXCEL_LIST';
 export const ADD_LABEL = 'ADD_LABEL';
+export const SET_CONTEXT = 'SET_CONTEXT';

+ 1 - 0
src/utils/tools.js

@@ -235,6 +235,7 @@ const getAllDataStringList =(baseList) =>{           //获取所有模块文本
  * @param {引用的话是保存时候的文本类型,编辑的时候是当前页面设置的文本类型} whichSign 
  */
 const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清空所有的数据
+  store.getState().inspect.context.scrollArea&&store.getState().inspect.context.scrollArea.scrollTop()
     if(action == 'clear'){     //清空
       const block = Object.assign(JSON.parse(config.textLabel),{full:true});//空白时保留一个自由文本标签
       //清除已删除标签记录