|
@@ -10,8 +10,10 @@ import hideImg from "../../common/images/close.png";
|
|
|
import DetailsModal from './DetailsModal';
|
|
|
import PushDiag from "./PushDiag";
|
|
|
import DiagnosticItem from "@containers/DiagnosticItem";
|
|
|
-import $ from "jquery";
|
|
|
+import store from "@store";
|
|
|
import { getWindowInnerHeight } from "@common/js/func";
|
|
|
+import {addLabel} from '@store/actions/inspect';
|
|
|
+import {addAssistLabel} from '@store/actions/assistCheck';
|
|
|
import {windowEventHandler} from '@utils/tools'
|
|
|
|
|
|
class PushItems extends Component {
|
|
@@ -41,19 +43,61 @@ class PushItems extends Component {
|
|
|
this.setState({ [type]: false });
|
|
|
}
|
|
|
|
|
|
+ getCurrentDate(){
|
|
|
+ let myDate = new Date();
|
|
|
+ let year = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
|
|
|
+ let mon = myDate.getMonth()-0+1; //获取当前月份(0-11,0代表1月)
|
|
|
+ let day = myDate.getDate(); //获取当前日(1-31)
|
|
|
+ let date = year+'-'+(mon<10?'0'+mon:mon)+'-'+(day<10?'0'+day:day);
|
|
|
+ return date;
|
|
|
+ }
|
|
|
+
|
|
|
billing() {
|
|
|
const { assay, check } = this.props.pushMessage;
|
|
|
const checkedAssay = assay.filter(item => item.checked);
|
|
|
const checkedCheck = check.filter(item => item.checked);
|
|
|
this.props.billing(checkedAssay, checkedCheck);
|
|
|
- if(checkedAssay.length > 0 || checkedCheck.length > 0) {
|
|
|
- const Height = $(".src-components-BodyContainer-2SgEx").height();
|
|
|
- const adviceHeight = $(".src-common-components-ItemBox-1Bpz3").height();
|
|
|
- const winHeight = window.innerHeight;
|
|
|
- const scrollTop = Height;
|
|
|
- $('#addScrollEvent').scrollTop(100000)
|
|
|
+ // if(checkedAssay.length > 0 || checkedCheck.length > 0) {
|
|
|
+ // const Height = $(".src-components-BodyContainer-2SgEx").height();
|
|
|
+ // const adviceHeight = $(".src-common-components-ItemBox-1Bpz3").height();
|
|
|
+ // const winHeight = window.innerHeight;
|
|
|
+ // const scrollTop = Height;
|
|
|
+ // $('#addScrollEvent').scrollTop(100000)
|
|
|
+ // }
|
|
|
+ let obj = { //添加化验
|
|
|
+ details: [],
|
|
|
+ name: '',
|
|
|
+ questionId: '',
|
|
|
+ showType: 1,
|
|
|
+ }
|
|
|
+ let obj1 = { //添加辅检
|
|
|
+ name: '',
|
|
|
+ questionId: '',
|
|
|
+ showType: 1,
|
|
|
+ time:this.getCurrentDate(),
|
|
|
+ value:''
|
|
|
+ }
|
|
|
+ if(checkedAssay.length > 0){
|
|
|
+ let assayArr = []
|
|
|
+ for(let i = 0;i < checkedAssay.length;i++){
|
|
|
+ let tmpObj = JSON.parse(JSON.stringify(obj));
|
|
|
+ tmpObj.questionId = checkedAssay[i].id
|
|
|
+ tmpObj.name = checkedAssay[i].name
|
|
|
+ tmpObj.details = checkedAssay[i].questionMapping
|
|
|
+ assayArr.push(tmpObj)
|
|
|
+ }
|
|
|
+ store.dispatch(addLabel(assayArr))
|
|
|
+ }
|
|
|
+ if(checkedCheck.length > 0){
|
|
|
+ let checkArr = []
|
|
|
+ for(let i = 0;i < checkedCheck.length;i++){
|
|
|
+ let tmpObj = JSON.parse(JSON.stringify(obj1));
|
|
|
+ tmpObj.questionId = checkedCheck[i].id
|
|
|
+ tmpObj.name = checkedCheck[i].name
|
|
|
+ checkArr.push(tmpObj)
|
|
|
+ }
|
|
|
+ store.dispatch(addAssistLabel(checkArr))
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
changeAssay(item) {
|