|
@@ -7,12 +7,11 @@ 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) {
|
|
@@ -20,7 +19,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);
|
|
@@ -29,7 +28,6 @@ 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) {
|
|
@@ -45,11 +43,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 = 10000;
|
|
|
|
|
|
+ const scrollTop = Height
|
|
|
|
+ document.documentElement.scrollTop = scrollTop;
|
|
}
|
|
}
|
|
|
|
|
|
changeAssay(item) {
|
|
changeAssay(item) {
|
|
@@ -64,28 +62,23 @@ 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,
|
|
@@ -105,7 +98,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}
|
|
@@ -120,7 +113,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}
|
|
@@ -139,7 +132,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}
|
|
@@ -154,7 +147,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}
|
|
@@ -165,199 +158,146 @@ 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["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 className={style["content"]}>
|
|
|
|
+ {vigilant && vigilant.length > 0 &&
|
|
|
|
+ (<div className={style["vigilant"]}>
|
|
|
|
+ <div className={style["title"]}>
|
|
|
|
+ <img src={vigilantImg} />
|
|
|
|
+ 警惕
|
|
</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>
|
|
|
|
- </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}
|
|
|
|
|
|
+ <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
|
|
<span
|
|
- className={style["tips-details"]}
|
|
|
|
- onClick={() => showTips(tips)}
|
|
|
|
|
|
+ style={
|
|
|
|
+ moreAssay ? { display: "none" } : { display: "inline-block" }
|
|
|
|
+ }
|
|
|
|
+ className={style["show"]}
|
|
|
|
+ onClick={() => showMore("moreAssay")}
|
|
>
|
|
>
|
|
- 详情
|
|
|
|
|
|
+ 更多
|
|
|
|
+ <img src={showImg} />
|
|
</span>
|
|
</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>
|
|
|
|
- )
|
|
|
|
- );
|
|
|
|
- })}
|
|
|
|
|
|
+ ) : (
|
|
|
|
+ ""
|
|
|
|
+ )}
|
|
|
|
+ <span style={
|
|
|
|
+ moreAssay ? { display: "inline-block" } : { display: "none" }
|
|
|
|
+ }
|
|
|
|
+ className={style["close"]}
|
|
|
|
+ onClick={() => closeMore("moreAssay")}>收起
|
|
|
|
+ <img src={hideImg} />
|
|
|
|
+ </span>
|
|
</div>
|
|
</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.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>
|
|
);
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|