|
@@ -7,11 +7,12 @@ import tipsImg from "../../common/images/tips.png";
|
|
import vigilantImg from "../../common/images/vigilant.png";
|
|
import vigilantImg from "../../common/images/vigilant.png";
|
|
import showImg from "../../common/images/show.png";
|
|
import showImg from "../../common/images/show.png";
|
|
import hideImg from "../../common/images/close.png";
|
|
import hideImg from "../../common/images/close.png";
|
|
-import closeImg from "./img/close.png";
|
|
|
|
import CopyRightContainer from "@containers/CopyRightContainer";
|
|
import CopyRightContainer from "@containers/CopyRightContainer";
|
|
import PushDiag from "./PushDiag";
|
|
import PushDiag from "./PushDiag";
|
|
-import DiagnosticItem from '@containers/DiagnosticItem';
|
|
|
|
|
|
+import DiagnosticItem from "@containers/DiagnosticItem";
|
|
import $ from "jquery";
|
|
import $ from "jquery";
|
|
|
|
+import { getWindowInnerHeight } from "@common/js/func";
|
|
|
|
+import {windowEventHandler} from '@utils/tools'
|
|
|
|
|
|
class PushItems extends Component {
|
|
class PushItems extends Component {
|
|
constructor(props) {
|
|
constructor(props) {
|
|
@@ -19,7 +20,7 @@ class PushItems extends Component {
|
|
|
|
|
|
this.state = {
|
|
this.state = {
|
|
moreAssay: false,
|
|
moreAssay: false,
|
|
- moreCheck: false,
|
|
|
|
|
|
+ moreCheck: false
|
|
};
|
|
};
|
|
|
|
|
|
this.showMore = this.showMore.bind(this);
|
|
this.showMore = this.showMore.bind(this);
|
|
@@ -28,6 +29,7 @@ class PushItems extends Component {
|
|
this.changeAssay = this.changeAssay.bind(this);
|
|
this.changeAssay = this.changeAssay.bind(this);
|
|
this.changeCheck = this.changeCheck.bind(this);
|
|
this.changeCheck = this.changeCheck.bind(this);
|
|
this.showTips = this.showTips.bind(this);
|
|
this.showTips = this.showTips.bind(this);
|
|
|
|
+ this.$cont = React.createRef();
|
|
}
|
|
}
|
|
|
|
|
|
showMore(type) {
|
|
showMore(type) {
|
|
@@ -43,11 +45,11 @@ class PushItems extends Component {
|
|
const checkedAssay = assay.filter(item => item.checked);
|
|
const checkedAssay = assay.filter(item => item.checked);
|
|
const checkedCheck = check.filter(item => item.checked);
|
|
const checkedCheck = check.filter(item => item.checked);
|
|
this.props.billing(checkedAssay, checkedCheck);
|
|
this.props.billing(checkedAssay, checkedCheck);
|
|
- const Height = $('.src-components-BodyContainer-2SgEx').height()
|
|
|
|
- const adviceHeight = $('.src-common-components-ItemBox-1Bpz3').height()
|
|
|
|
|
|
+ const Height = $(".src-components-BodyContainer-2SgEx").height();
|
|
|
|
+ const adviceHeight = $(".src-common-components-ItemBox-1Bpz3").height();
|
|
const winHeight = window.innerHeight;
|
|
const winHeight = window.innerHeight;
|
|
- const scrollTop = Height
|
|
|
|
- document.documentElement.scrollTop = scrollTop;
|
|
|
|
|
|
+ const scrollTop = Height;
|
|
|
|
+ document.documentElement.scrollTop = 10000;
|
|
}
|
|
}
|
|
|
|
|
|
changeAssay(item) {
|
|
changeAssay(item) {
|
|
@@ -62,23 +64,28 @@ class PushItems extends Component {
|
|
const { getTipsDetails } = this.props;
|
|
const { getTipsDetails } = this.props;
|
|
getTipsDetails && getTipsDetails();
|
|
getTipsDetails && getTipsDetails();
|
|
}
|
|
}
|
|
|
|
+ componentDidMount() {
|
|
|
|
+ const height = getWindowInnerHeight() - 200;
|
|
|
|
+ this.$cont.current.style.height = height + "px";
|
|
|
|
|
|
|
|
+ windowEventHandler('resize', ()=>{
|
|
|
|
+ const height = getWindowInnerHeight() - 200;
|
|
|
|
+ this.$cont.current.style.height = height + "px";
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
|
|
render() {
|
|
render() {
|
|
const {
|
|
const {
|
|
- vigilant,
|
|
|
|
- determine,
|
|
|
|
|
|
+ vigilant,
|
|
|
|
+ determine,
|
|
doubt,
|
|
doubt,
|
|
possible,
|
|
possible,
|
|
assay,
|
|
assay,
|
|
check,
|
|
check,
|
|
- tips,
|
|
|
|
|
|
+ tips
|
|
} = this.props.pushMessage;
|
|
} = this.props.pushMessage;
|
|
const { tipsDiscalimer } = this.props;
|
|
const { tipsDiscalimer } = this.props;
|
|
- const {
|
|
|
|
- moreAssay,
|
|
|
|
- moreCheck,
|
|
|
|
- } = this.state;
|
|
|
|
|
|
+ const { moreAssay, moreCheck } = this.state;
|
|
const {
|
|
const {
|
|
showMore,
|
|
showMore,
|
|
closeMore,
|
|
closeMore,
|
|
@@ -98,7 +105,7 @@ class PushItems extends Component {
|
|
return (
|
|
return (
|
|
<span>
|
|
<span>
|
|
<input
|
|
<input
|
|
- id = {item.id + item.name}
|
|
|
|
|
|
+ id={item.id + item.name}
|
|
onChange={() => changeAssay(item)}
|
|
onChange={() => changeAssay(item)}
|
|
type="checkbox"
|
|
type="checkbox"
|
|
checked={item.checked}
|
|
checked={item.checked}
|
|
@@ -113,7 +120,7 @@ class PushItems extends Component {
|
|
return (
|
|
return (
|
|
<span>
|
|
<span>
|
|
<input
|
|
<input
|
|
- id = {item.id + item.name}
|
|
|
|
|
|
+ id={item.id + item.name}
|
|
onChange={() => changeAssay(item)}
|
|
onChange={() => changeAssay(item)}
|
|
type="checkbox"
|
|
type="checkbox"
|
|
checked={item.checked}
|
|
checked={item.checked}
|
|
@@ -132,7 +139,7 @@ class PushItems extends Component {
|
|
return (
|
|
return (
|
|
<span>
|
|
<span>
|
|
<input
|
|
<input
|
|
- id = {item.id + item.name}
|
|
|
|
|
|
+ id={item.id + item.name}
|
|
onChange={() => changeCheck(item)}
|
|
onChange={() => changeCheck(item)}
|
|
type="checkbox"
|
|
type="checkbox"
|
|
checked={item.checked}
|
|
checked={item.checked}
|
|
@@ -147,7 +154,7 @@ class PushItems extends Component {
|
|
return (
|
|
return (
|
|
<span>
|
|
<span>
|
|
<input
|
|
<input
|
|
- id = {item.id + item.name}
|
|
|
|
|
|
+ id={item.id + item.name}
|
|
onChange={() => changeCheck(item)}
|
|
onChange={() => changeCheck(item)}
|
|
type="checkbox"
|
|
type="checkbox"
|
|
checked={item.checked}
|
|
checked={item.checked}
|
|
@@ -158,146 +165,199 @@ class PushItems extends Component {
|
|
});
|
|
});
|
|
|
|
|
|
const vigilants = vigilant.map((item, index) => {
|
|
const vigilants = vigilant.map((item, index) => {
|
|
- return (
|
|
|
|
- <DiagnosticItem item={item}/>
|
|
|
|
- );
|
|
|
|
|
|
+ return <DiagnosticItem item={item} />;
|
|
});
|
|
});
|
|
|
|
|
|
return (
|
|
return (
|
|
- <div className={style["content"]}>
|
|
|
|
- {vigilant && vigilant.length > 0 &&
|
|
|
|
- (<div className={style["vigilant"]}>
|
|
|
|
- <div className={style["title"]}>
|
|
|
|
- <img src={vigilantImg} />
|
|
|
|
- 警惕
|
|
|
|
- </div>
|
|
|
|
- <div className={style["vigilantContent"]}>{vigilants}</div>
|
|
|
|
- </div>
|
|
|
|
- )}
|
|
|
|
- {/* 不展示确诊 */}
|
|
|
|
- {/* {determine && determine.length>0 && <PushDiag titleBg='#FAEBEC' icon={possibleImg} title='确诊' diagList={determine} maxShowNum={28}/>} */}
|
|
|
|
- {doubt && doubt.length>0 && <PushDiag titleBg='#FAEBEC' icon={doubtImg} title='疑似诊断' diagList={doubt} maxShowNum={28}/>}
|
|
|
|
- {possible && possible.length>0 && <PushDiag titleBg='#FAEBEC' icon={possibleImg} title='可能诊断' diagList={possible} maxShowNum={28}/>}
|
|
|
|
- <div className={style["diagnose"]}>
|
|
|
|
- { vigilant.length === 0 && determine.length === 0 && doubt.length === 0 && possible.length === 0 && (<div className={style["doubt"]}>
|
|
|
|
- <h1>
|
|
|
|
- <img src={doubtImg} />
|
|
|
|
- 疑似诊断
|
|
|
|
- </h1>
|
|
|
|
- <div className={style['no-push']}>无</div>
|
|
|
|
- </div>)}
|
|
|
|
- </div>
|
|
|
|
- <div className={style["recommend"]}>
|
|
|
|
- <h1>
|
|
|
|
- <img src={recommendImg} />
|
|
|
|
- 推荐检验检查<div onClick={billing}>开单</div>
|
|
|
|
- </h1>
|
|
|
|
- <div>
|
|
|
|
- {assay.length === 0 && check.length === 0 ? (
|
|
|
|
- "无"
|
|
|
|
- ) : (
|
|
|
|
- <ul>
|
|
|
|
- <li className={style["firstLi"]}>
|
|
|
|
- <div className={style["title"]}>化验:</div>
|
|
|
|
- <div className={style["content"]}>
|
|
|
|
- {assay.length === 0 ? "无" : moreAssay ? assays : assayHide}
|
|
|
|
- {assayNum > 28 ? (
|
|
|
|
- <span
|
|
|
|
- style={
|
|
|
|
- moreAssay ? { display: "none" } : { display: "inline-block" }
|
|
|
|
- }
|
|
|
|
- className={style["show"]}
|
|
|
|
- onClick={() => showMore("moreAssay")}
|
|
|
|
- >
|
|
|
|
- 更多
|
|
|
|
- <img src={showImg} />
|
|
|
|
- </span>
|
|
|
|
- ) : (
|
|
|
|
- ""
|
|
|
|
- )}
|
|
|
|
- <span style={
|
|
|
|
- moreAssay ? { display: "inline-block" } : { display: "none" }
|
|
|
|
- }
|
|
|
|
- className={style["close"]}
|
|
|
|
- onClick={() => closeMore("moreAssay")}>收起
|
|
|
|
- <img src={hideImg} />
|
|
|
|
- </span>
|
|
|
|
|
|
+ <div className={style["push-content-wrapper"]}>
|
|
|
|
+ <div className={style["push-content"]} ref={this.$cont}>
|
|
|
|
+ <div style = {{width: '420px'}}>
|
|
|
|
+ {vigilant && vigilant.length > 0 && (
|
|
|
|
+ <div className={style["vigilant"]}>
|
|
|
|
+ <div className={style["title"]}>
|
|
|
|
+ <img src={vigilantImg} />
|
|
|
|
+ 警惕
|
|
|
|
+ </div>
|
|
|
|
+ <div className={style["vigilantContent"]}>{vigilants}</div>
|
|
|
|
+ </div>
|
|
|
|
+ )}
|
|
|
|
+ {/* 不展示确诊 */}
|
|
|
|
+ {/* {determine && determine.length>0 && <PushDiag titleBg='#FAEBEC' icon={possibleImg} title='确诊' diagList={determine} maxShowNum={28}/>} */}
|
|
|
|
+ {doubt && doubt.length > 0 && (
|
|
|
|
+ <PushDiag
|
|
|
|
+ titleBg="#FAEBEC"
|
|
|
|
+ icon={doubtImg}
|
|
|
|
+ title="疑似诊断"
|
|
|
|
+ diagList={doubt}
|
|
|
|
+ maxShowNum={28}
|
|
|
|
+ />
|
|
|
|
+ )}
|
|
|
|
+ {possible && possible.length > 0 && (
|
|
|
|
+ <PushDiag
|
|
|
|
+ titleBg="#FAEBEC"
|
|
|
|
+ icon={possibleImg}
|
|
|
|
+ title="可能诊断"
|
|
|
|
+ diagList={possible}
|
|
|
|
+ maxShowNum={28}
|
|
|
|
+ />
|
|
|
|
+ )}
|
|
|
|
+ <div className={style["diagnose"]}>
|
|
|
|
+ {vigilant.length === 0 &&
|
|
|
|
+ determine.length === 0 &&
|
|
|
|
+ doubt.length === 0 &&
|
|
|
|
+ possible.length === 0 && (
|
|
|
|
+ <div className={style["doubt"]}>
|
|
|
|
+ <h1>
|
|
|
|
+ <img src={doubtImg} />
|
|
|
|
+ 疑似诊断
|
|
|
|
+ </h1>
|
|
|
|
+ <div className={style["no-push"]}>无</div>
|
|
</div>
|
|
</div>
|
|
- </li>
|
|
|
|
- <li className={style["lastLi"]}>
|
|
|
|
- <div className={style["title"]}>检查:</div>
|
|
|
|
- <div className={style["content"]}>
|
|
|
|
- {check.length === 0 ? "无" : moreCheck ? checks : checkHide}
|
|
|
|
- {checkNum > 28 ? (
|
|
|
|
|
|
+ )}
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div className={style["recommend"]}>
|
|
|
|
+ <h1>
|
|
|
|
+ <img src={recommendImg} />
|
|
|
|
+ 推荐检验检查<div onClick={billing}>开单</div>
|
|
|
|
+ </h1>
|
|
|
|
+ <div>
|
|
|
|
+ {assay.length === 0 && check.length === 0 ? (
|
|
|
|
+ "无"
|
|
|
|
+ ) : (
|
|
|
|
+ <ul>
|
|
|
|
+ <li className={style["firstLi"]}>
|
|
|
|
+ <div className={style["title"]}>化验:</div>
|
|
|
|
+ <div className={style["content"]}>
|
|
|
|
+ {assay.length === 0
|
|
|
|
+ ? "无"
|
|
|
|
+ : moreAssay
|
|
|
|
+ ? assays
|
|
|
|
+ : assayHide}
|
|
|
|
+ {assayNum > 28 ? (
|
|
|
|
+ <span
|
|
|
|
+ style={
|
|
|
|
+ moreAssay
|
|
|
|
+ ? { display: "none" }
|
|
|
|
+ : { display: "inline-block" }
|
|
|
|
+ }
|
|
|
|
+ className={style["show"]}
|
|
|
|
+ onClick={() => showMore("moreAssay")}
|
|
|
|
+ >
|
|
|
|
+ 更多
|
|
|
|
+ <img src={showImg} />
|
|
|
|
+ </span>
|
|
|
|
+ ) : (
|
|
|
|
+ ""
|
|
|
|
+ )}
|
|
|
|
+ <span
|
|
|
|
+ style={
|
|
|
|
+ moreAssay
|
|
|
|
+ ? { display: "inline-block" }
|
|
|
|
+ : { display: "none" }
|
|
|
|
+ }
|
|
|
|
+ className={style["close"]}
|
|
|
|
+ onClick={() => closeMore("moreAssay")}
|
|
|
|
+ >
|
|
|
|
+ 收起
|
|
|
|
+ <img src={hideImg} />
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </li>
|
|
|
|
+ <li className={style["lastLi"]}>
|
|
|
|
+ <div className={style["title"]}>检查:</div>
|
|
|
|
+ <div className={style["content"]}>
|
|
|
|
+ {check.length === 0
|
|
|
|
+ ? "无"
|
|
|
|
+ : moreCheck
|
|
|
|
+ ? checks
|
|
|
|
+ : checkHide}
|
|
|
|
+ {checkNum > 28 ? (
|
|
|
|
+ <span
|
|
|
|
+ style={
|
|
|
|
+ moreCheck
|
|
|
|
+ ? { display: "none" }
|
|
|
|
+ : { display: "inline-block" }
|
|
|
|
+ }
|
|
|
|
+ className={style["show"]}
|
|
|
|
+ onClick={() => showMore("moreCheck")}
|
|
|
|
+ >
|
|
|
|
+ 更多
|
|
|
|
+ <img src={showImg} />
|
|
|
|
+ </span>
|
|
|
|
+ ) : (
|
|
|
|
+ ""
|
|
|
|
+ )}
|
|
|
|
+ <span
|
|
|
|
+ style={
|
|
|
|
+ moreCheck
|
|
|
|
+ ? { display: "inline-block" }
|
|
|
|
+ : { display: "none" }
|
|
|
|
+ }
|
|
|
|
+ className={style["close"]}
|
|
|
|
+ onClick={() => closeMore("moreCheck")}
|
|
|
|
+ >
|
|
|
|
+ 收起
|
|
|
|
+ <img src={hideImg} />
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ )}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div className={style["tips"]}>
|
|
|
|
+ <h1>
|
|
|
|
+ <img src={tipsImg} />
|
|
|
|
+ 提示信息
|
|
|
|
+ </h1>
|
|
|
|
+ <div className={style["content"]}>
|
|
|
|
+ {tips && tips.introduceDetailList ? (
|
|
|
|
+ <div>
|
|
|
|
+ <div className={style["title"]}>
|
|
|
|
+ {tips.tagName}
|
|
<span
|
|
<span
|
|
- style={
|
|
|
|
- moreCheck ? { display: "none" } : { display: "inline-block" }
|
|
|
|
- }
|
|
|
|
- className={style["show"]}
|
|
|
|
- onClick={() => showMore("moreCheck")}
|
|
|
|
|
|
+ className={style["tips-details"]}
|
|
|
|
+ onClick={() => showTips(tips)}
|
|
>
|
|
>
|
|
- 更多
|
|
|
|
- <img src={showImg} />
|
|
|
|
|
|
+ 详情
|
|
</span>
|
|
</span>
|
|
- ) : (
|
|
|
|
- ""
|
|
|
|
- )}
|
|
|
|
- <span style={
|
|
|
|
- moreCheck ? { display: "inline-block" } : { display: "none" }
|
|
|
|
- }
|
|
|
|
- className={style["close"]}
|
|
|
|
- onClick={() => closeMore("moreCheck")}>
|
|
|
|
- 收起
|
|
|
|
- <img src={hideImg} />
|
|
|
|
- </span>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ {tips.introduceDetailList &&
|
|
|
|
+ tips.introduceDetailList.map((item, index) => {
|
|
|
|
+ return (
|
|
|
|
+ item.position.indexOf("1") > -1 && (
|
|
|
|
+ <div>
|
|
|
|
+ <div
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
+ __html: item.title
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ <div
|
|
|
|
+ dangerouslySetInnerHTML={{
|
|
|
|
+ __html: item.content
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ {item.isReason === 1 && (
|
|
|
|
+ <div className={style["warn"]}>
|
|
|
|
+ {tipsDiscalimer.data.data[0].description}
|
|
|
|
+ </div>
|
|
|
|
+ )}
|
|
|
|
+ </div>
|
|
|
|
+ )
|
|
|
|
+ );
|
|
|
|
+ })}
|
|
</div>
|
|
</div>
|
|
- </li>
|
|
|
|
- </ul>
|
|
|
|
- )}
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div className={style["tips"]}>
|
|
|
|
- <h1>
|
|
|
|
- <img src={tipsImg} />
|
|
|
|
- 提示信息
|
|
|
|
- </h1>
|
|
|
|
- <div className={style["content"]}>
|
|
|
|
- {tips ? (
|
|
|
|
- tips.introduceDetailList&&<div>
|
|
|
|
- <div className={style["title"]}>
|
|
|
|
- {tips.name}
|
|
|
|
- <span
|
|
|
|
- className={style["tips-details"]}
|
|
|
|
- onClick={() => showTips(tips)}
|
|
|
|
- >
|
|
|
|
- 详情
|
|
|
|
- </span>
|
|
|
|
- </div>
|
|
|
|
- {tips.introduceDetailList&&tips.introduceDetailList.map((item, index) => {
|
|
|
|
- return (
|
|
|
|
- item.position.indexOf("1") > -1 && (
|
|
|
|
- <div>
|
|
|
|
- <div dangerouslySetInnerHTML={{ __html: item.title }} />
|
|
|
|
- <div
|
|
|
|
- dangerouslySetInnerHTML={{ __html: item.content }}
|
|
|
|
- />
|
|
|
|
- {item.isReason === 1 && (
|
|
|
|
- <div className={style["warn"]}>
|
|
|
|
- {tipsDiscalimer.data.data[0].description}
|
|
|
|
- </div>
|
|
|
|
- )}
|
|
|
|
- </div>
|
|
|
|
- )
|
|
|
|
- );
|
|
|
|
- })}
|
|
|
|
|
|
+ ) : (
|
|
|
|
+ "无"
|
|
|
|
+ )}
|
|
</div>
|
|
</div>
|
|
- ) : (
|
|
|
|
- "无"
|
|
|
|
- )}
|
|
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
<CopyRightContainer />
|
|
<CopyRightContainer />
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
);
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|