|
@@ -7,6 +7,7 @@ import sort from "./img/sort.png"
|
|
|
import close from "./img/close.png";
|
|
|
import PreviewBody from '@components/PreviewBody';
|
|
|
import Empty from '@components/Empty'
|
|
|
+
|
|
|
import { pushAllDataList,didPushParamChange } from '@utils/tools';
|
|
|
// import { dragBox } from '@utils/drag';
|
|
|
import { initItemList, setInitHistory } from '@store/async-actions/historyTemplates';
|
|
@@ -42,7 +43,8 @@ class HistoryCaseContainer extends React.Component {
|
|
|
activeIndex: -1, //字体显示蓝色高亮index
|
|
|
showEditIcon: false,
|
|
|
showDelIcon: false,
|
|
|
- desc: true // 正序/逆序
|
|
|
+ desc: true, // 正序/逆序
|
|
|
+ overHeight: 0
|
|
|
}
|
|
|
this.handleCaseClick=this.handleCaseClick.bind(this)
|
|
|
this.handleQuoteClick=this.handleQuoteClick.bind(this)
|
|
@@ -103,21 +105,25 @@ class HistoryCaseContainer extends React.Component {
|
|
|
activeId: idx,
|
|
|
activeHis: tmpItems,
|
|
|
dataStr: JSON.parse(tmpItems.preview)||[],
|
|
|
- activeIndex: idx
|
|
|
- })
|
|
|
+ activeIndex: idx,
|
|
|
+ // overHeight: this.$scrollRef.current.scrollTop
|
|
|
+ },
|
|
|
+ // ()=> {
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.$scrollRef.current.scrollTop = this.state.overHeight
|
|
|
+ // }, 0)}
|
|
|
+ )
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
// 确认引用选中病历
|
|
|
makeSure(){
|
|
|
const {activeHis} = this.state;
|
|
|
- // console.log(activeHis,'activeHis');
|
|
|
this.setState({visible:false});
|
|
|
store.dispatch(showHistory(false));
|
|
|
- //store.dispatch({type: CONFIRM_TYPE, confirmType: activeHis.sign});
|
|
|
- //store.dispatch({type: SET_READ_MODE, readMode: activeHis.sign});
|
|
|
store.dispatch(getHistempDetail(activeHis)); // 获取引用数据
|
|
|
const {handleQuoteClick} = this.props;
|
|
|
handleQuoteClick && handleQuoteClick(activeHis);
|
|
|
- // dragBox('hisWrapMove','closeHis','del');
|
|
|
}
|
|
|
//确认删除病历
|
|
|
makeSureDel(){
|
|
@@ -144,7 +150,7 @@ class HistoryCaseContainer extends React.Component {
|
|
|
// this.context.scrollArea.scrollYTo(40);
|
|
|
// console.log(this.$scrollRef,'this.$scrollRef');
|
|
|
// console.log(this.context,'this.context');
|
|
|
- this.forceUpdate()
|
|
|
+ // this.forceUpdate()
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -249,7 +255,6 @@ class HistoryCaseContainer extends React.Component {
|
|
|
|
|
|
// 处理鼠标移入编辑按钮
|
|
|
handleMouseEnterEdit(idx) {
|
|
|
-
|
|
|
this.setState({
|
|
|
showEditIcon: true
|
|
|
})
|
|
@@ -257,7 +262,6 @@ class HistoryCaseContainer extends React.Component {
|
|
|
|
|
|
// 处理鼠标移出编辑按钮
|
|
|
handleMouseLeaveEdit(idx) {
|
|
|
-
|
|
|
this.setState({
|
|
|
showEditIcon: false
|
|
|
})
|
|
@@ -265,7 +269,6 @@ class HistoryCaseContainer extends React.Component {
|
|
|
|
|
|
// 处理鼠标移入删除按钮
|
|
|
handleMouseEnterDel(idx) {
|
|
|
-
|
|
|
this.setState({
|
|
|
showDelIcon: true
|
|
|
})
|
|
@@ -300,12 +303,7 @@ class HistoryCaseContainer extends React.Component {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- 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;
|
|
@@ -348,7 +346,27 @@ 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" style={{ overflow:'auto' }} >
|
|
|
+ {/* <List
|
|
|
+ items = {items}
|
|
|
+ handleCaseClick = {this.handleCaseClick}
|
|
|
+ currentIndex ={ currentIndex}
|
|
|
+ showEditIcon = {this.state.showEditIcon}
|
|
|
+ activeIndex={activeIndex}
|
|
|
+ showDelIcon={this.state.showDelIcon}
|
|
|
+ ></List> */}
|
|
|
+
|
|
|
+ <ScrollArea speed={0.8}
|
|
|
+ key={items.length}
|
|
|
+ // ref={this.$scrollRef}
|
|
|
+ horizontal={false}
|
|
|
+ // stopScrollPropagation={items.length > 6 ? true : false}
|
|
|
+ style={{ height: '100%' }}
|
|
|
+ onScroll={(value) => { }}
|
|
|
+ className={styles["area"]}
|
|
|
+ verticalContainerStyle={contStyle}
|
|
|
+ verticalScrollbarStyle={barStyle}
|
|
|
+ contentClassName="content">
|
|
|
+ <ul id="hislistLeft" style={{ overflow:'auto' }} ref={this.$scrollRef}>
|
|
|
{(items && items.length > 0) ? items.map((val,idx)=>{
|
|
|
return <li key={val.id} onClick={() => { this.handleCaseClick(idx, val) }} onMouseEnter={() => this.handleMouseEnterLi(idx)} onMouseLeave={() => this.handleMouseLeaveLi(idx)}>
|
|
|
<div className={styles.itemLeft}>
|
|
@@ -376,6 +394,7 @@ class HistoryCaseContainer extends React.Component {
|
|
|
}):<Empty message={'无历史病历'}></Empty>
|
|
|
}
|
|
|
</ul>
|
|
|
+ </ScrollArea>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div className={styles.mainHistoryRight}>
|