Quellcode durchsuchen

Merge branch 'ChronicMag' into Chronic-ll

Luolei vor 6 Jahren
Ursprung
Commit
88015e5b60

+ 2 - 1
src/components/AssessResult/AssessHis/index.jsx

@@ -41,7 +41,7 @@ class AssessResultHis extends Component {
   }
   handoutTypes(obj,item,i){
     const {indexTimeTypes,wholeAssess,wholeIndexs,chooseSelecteds} =obj;
-    const {getIndexData,inquiryDate,indexData} = this.props;console.log(indexData)
+    const {getIndexData,inquiryDate,indexData,inquiryId} = this.props;
     const name = item.regionName+":";
     const list = item.data&&item.data.rows;
     switch (+item.regionType){
@@ -55,6 +55,7 @@ class AssessResultHis extends Component {
                           timeTypes={indexTimeTypes}
                           initFn={getIndexData}
                           endDate={inquiryDate}
+                          inquiryId={inquiryId}
                           handleChange={this.handleChartChange.bind(this,i)}></ChartItem>;
       default:
         return '';

+ 5 - 5
src/components/AssessResult/ChartItem/index.jsx

@@ -86,7 +86,7 @@ class ChartItem extends Component {
     const obj = this.props.data[range[0]+range[range.length-1]];
     let arr = [];
     for(let i in obj){
-      arr.push(<Chart data={obj[i]} type={timeTypes&&timeTypes[i]} index={i} getXAxisArr={this.getXAxisArr} handleRangeChange={this.rangChange}/>)
+      arr.push(<Chart data={obj[i]} inquiryId={this.props.inquiryId||''} type={timeTypes&&timeTypes[i]} index={i} getXAxisArr={this.getXAxisArr} handleRangeChange={this.rangChange}/>)
     }
     return arr;
   }
@@ -125,9 +125,9 @@ class Chart extends Component{
     this.timeSwitch = this.timeSwitch.bind(this);
   }
   drawChart(){
-    const {index,data,getXAxisArr,type,endDate} = this.props;
+    const {index,data,getXAxisArr,type,inquiryId} = this.props;
     const xAxis = getXAxisArr(type);
-    const id = 'chart'+index;
+    const id = 'chart'+inquiryId+index;
     let series = [],names=[],inx=-1;
     let myChart = echarts.init(document.getElementById(id));
 
@@ -222,7 +222,7 @@ class Chart extends Component{
     this.drawChart();
   }
   render(){
-    const {type,index} = this.props;
+    const {type,index,inquiryId} = this.props;
     return <div className={style['cont']}>
               <div className={style['time-range']}>
                 <span className={type=='year'?style['range']+" "+style['on']:style['range']} onClick={()=>this.timeSwitch("year")}>近一年</span>
@@ -230,7 +230,7 @@ class Chart extends Component{
                 <span className={type=='month'?style['range']+" "+style['on']:style['range']} onClick={()=>this.timeSwitch("month")}>近一个月</span>
                 <span className={type=='week'?style['range']+" "+style['on']:style['range']} onClick={()=>this.timeSwitch("week")}>近一周</span>
               </div>
-              <div className={style["chart-box"]} id={'chart'+index}></div>
+              <div className={style["chart-box"]} id={'chart'+inquiryId+index}></div>
             </div>;
   }
 }

+ 1 - 1
src/components/PreviewBody/index.jsx

@@ -4,7 +4,7 @@ import { normalVal, filterDataArr, filterOtherDataArr,timestampToTime } from '@u
 import Notify from '@commonComp/Notify';
 import Information from '../Information';
 import $ from "jquery";
-// import AssessResultHis from '@containers/AssessResultHis'
+import AssessResultHis from '@containers/AssessResultHis'
 
 class PreviewBody extends Component {
   constructor(props) {

+ 1 - 1
src/store/actions/pushMessage.js

@@ -134,7 +134,7 @@ export const addScheme = (state, action) => {
      
   }
 	res.AdviceStr = getAdviceStr(res.advice)
-	res.drugList = getDrugList(res.advice.scheme)
+	res.advice.drugList = getDrugList(res.advice.scheme)
   return res;
 }