Sfoglia il codice sorgente

Merge branch 'ChronicMag' of http://192.168.2.236:10080/zhouna/newICSS into ChronicMag

liucf 6 anni fa
parent
commit
af6ea4c262

+ 17 - 7
src/components/AssessResult/ChartItem/index.jsx

@@ -62,7 +62,7 @@ class ChartItem extends Component {
     if(isHour){
       for(let i=0;i<24;i++){
         temp = hour-i>-1?hour-i:hour-i+24;
-        arr.unshift(str+" "+(temp<10?'0'+temp:temp));
+        arr.unshift(str+" "+(temp<10?'0'+temp:temp)+":00:00");
       }
       return arr;
     }else{
@@ -132,9 +132,10 @@ class Chart extends Component{
     const id = endDate?'chart'+endDate+index:'chart'+index;
     let series = [],names=[],inx=-1;
     let myChart = echarts.init(document.getElementById(id) ,null, {renderer: 'svg'});
+    let xAxisArr = [...xAxis];
 
     const interval = {
-      week:24,
+      week:23,
       month:4,
       sixMonth:9,
       year:60
@@ -145,9 +146,12 @@ class Chart extends Component{
       it&&it.creatTime.map((x,i)=>{
         inx=xAxis.findIndex((a)=>{
           name=type=='week'?x.substr(0,13):x.substr(0,10);
-          return a==name;
+          return a.substr(0,13)==name;
         });     //日期对应横坐标的位置
         if(inx!=-1){
+          if(type=='week'){
+            xAxisArr[inx] = x;
+          }
           values[inx] = it.indexValue[i];       //值对应横坐标的位置
         }
       });
@@ -162,7 +166,10 @@ class Chart extends Component{
     // 指定图表的配置项和数据
     var option = {
       tooltip: {
-        trigger: 'axis'
+        trigger: 'axis',
+        textStyle:{
+          fontSize:12
+        }
       },
       legend: {
         data:names,
@@ -174,9 +181,9 @@ class Chart extends Component{
       xAxis: {
         type: 'category',
         boundaryGap: false,
-        data: xAxis,
+        data: xAxisArr,
         splitLine:{
-          show:false
+          show:true
         },
         axisPointer:{
           //show:false
@@ -190,7 +197,10 @@ class Chart extends Component{
           showMaxLabel:true,
           interval:interval[type],
           rotate:65,
-          fontSize:10
+          fontSize:10,
+          formatter: function(value,index){
+            return value.substr(0,10);
+          }
         }
       },
       yAxis: {

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

@@ -76,6 +76,7 @@ class PreviewBody extends Component {
     const { show, preInfo, dataJson, dataStr, baseObj, flg ,showAssessBtn} = this.props;
     const other_yjs = filterOtherDataArr(JSON.parse(dataStr.other),dataJson.other);
     const noData = JSON.stringify(preInfo) == '{}';
+    const isChronic = (dataJson.diagChronicMagItem&&dataJson.diagChronicMagItem.name)||(dataJson.mainChronicDesease&&dataJson.mainChronicDesease.name);
     return <div className={style['content']} style={{ width: flg ? '700' : '820' }}>
       <div className={style['contents']} id="content" style={{ margin: "0 auto", maxWidth: "620px" }}>
         <Information baseObj={baseObj} preInfo={preInfo}></Information>
@@ -222,7 +223,7 @@ class PreviewBody extends Component {
           </tr>
         </table>
         <p style={{textAlign:'right',marginTop:'15px'}}>医生签名:<span style={{minWidth: '60px',padding: '0 5px 2px 5px',borderBottom: '1px solid #333',}}>{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</span></p>
-        {showAssessBtn?<AssessResultHis isChronic={dataJson.diagChronicMagItem&&dataJson.diagChronicMagItem.name?true:false} inquiryId={baseObj&&baseObj.id} inquiryDate={baseObj&&baseObj.inquiryDate}></AssessResultHis>:""}
+        {showAssessBtn?<AssessResultHis isChronic={isChronic?true:false} inquiryId={baseObj&&baseObj.id} inquiryDate={baseObj&&baseObj.inquiryDate}></AssessResultHis>:""}
         
         <div onClick={() => { this.surePrint(dataStr) }} style={{
           display: show ? 'inline-block' : 'none',

+ 2 - 1
src/store/async-actions/fetchModules.js

@@ -180,8 +180,9 @@ export function setOtherHisModule(){
   return (dispatch, getStore) => {
     const state = getStore();
     const initData = state.homePage.initData;
+    const block = Object.assign(JSON.parse(config.textLabel),{full:true});
     const mode = state.typeConfig.typeConfig;
-    const model = JSON.parse(JSON.stringify(initData.otherHisModel || null));     //查体模板
+    const model = JSON.parse(JSON.stringify(initData.otherHisModel || null))||[block];     //查体模板
     const arr = JSON.parse(JSON.stringify(initData.otherHis || null));        //最近其他史数据
     const arrSave = JSON.parse(JSON.stringify(initData.otherHisSave || null));    //最近其他史saveText
     const selects = JSON.parse(JSON.stringify(initData.otherSelecteds || null));  //其他史杂音类选中项