Jelajahi Sumber

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

liucf 6 tahun lalu
induk
melakukan
eb0c3bd779

+ 1 - 0
src/common/components/ConfirmModal/index.less

@@ -27,6 +27,7 @@
     right: 0px;
     right: 0px;
     width: 40px;
     width: 40px;
     height: 40px;
     height: 40px;
+    cursor: pointer;
 }
 }
 
 
 .modal-content {
 .modal-content {

+ 5 - 8
src/components/AssessResult/AssessHis/index.jsx

@@ -1,6 +1,6 @@
 import React, { Component } from "react";
 import React, { Component } from "react";
 import style from "./index.less";
 import style from "./index.less";
-import { Radio,ComplexModal} from '@commonComp';
+import { Radio,ComplexModal,Notify} from '@commonComp';
 import arrow from '@common/images/show.png';
 import arrow from '@common/images/show.png';
 import arrowDown from '@common/images/close.png';
 import arrowDown from '@common/images/close.png';
 import loadingIcon from '@common/images/loading.gif';
 import loadingIcon from '@common/images/loading.gif';
@@ -85,16 +85,13 @@ class AssessResultHis extends Component {
       return data===null||(data&&data.length==0)?<p className={style['no-data']}>没有历史评估记录!</p>:'';
       return data===null||(data&&data.length==0)?<p className={style['no-data']}>没有历史评估记录!</p>:'';
     }
     }
   }
   }
-  /*componentDidMount(){
-    const indexTimeTypes = JSON.parse(JSON.stringify(this.props.indexTimeTypes));
-    console.log(indexTimeTypes)
-    this.setState({
-      chartTimeTypes:indexTimeTypes
-    });
-  }*/
   showScaleFn(item,pid){
   showScaleFn(item,pid){
     const { list,inquiryId } = this.props;
     const { list,inquiryId } = this.props;
     const obj = list&&list[inquiryId];
     const obj = list&&list[inquiryId];
+    if(!(obj.scaleInfo&&obj.scaleInfo[item.id])){
+      Notify.info("未保存该量表数据");
+      return ;
+    }
     if(item){
     if(item){
       this.setState({
       this.setState({
         tableName:item.name,
         tableName:item.name,

+ 13 - 11
src/components/AssessResult/ChartItem/index.jsx

@@ -90,7 +90,7 @@ class ChartItem extends Component {
     for(let i in obj){
     for(let i in obj){
       arr.push(<Chart data={obj[i]} endDate={endDate} type={timeTypes&&timeTypes[i]} index={i} getXAxisArr={this.getXAxisArr} handleRangeChange={this.rangChange}/>)
       arr.push(<Chart data={obj[i]} endDate={endDate} type={timeTypes&&timeTypes[i]} index={i} getXAxisArr={this.getXAxisArr} handleRangeChange={this.rangChange}/>)
     }
     }
-    return arr;
+    return arr.length>0?arr:<p style={{color:'#acacac'}}>该模块暂无数据</p>;
   }
   }
   componentDidMount(){
   componentDidMount(){
     const {initFn,pindex} = this.props;
     const {initFn,pindex} = this.props;
@@ -133,14 +133,14 @@ class Chart extends Component{
     let series = [],names=[],inx=-1;
     let series = [],names=[],inx=-1;
     let myChart = echarts.init(document.getElementById(id) ,null, {renderer: 'svg'});
     let myChart = echarts.init(document.getElementById(id) ,null, {renderer: 'svg'});
     let xAxisArr = [...xAxis];
     let xAxisArr = [...xAxis];
-
     const interval = {
     const interval = {
       week:23,
       week:23,
       month:4,
       month:4,
       sixMonth:9,
       sixMonth:9,
       year:60
       year:60
     };
     };
-    data&&data.map((it)=>{
+
+    data&&data.map((it,j)=>{
       let values=new Array();
       let values=new Array();
       let name='';
       let name='';
       it&&it.creatTime.map((x,i)=>{
       it&&it.creatTime.map((x,i)=>{
@@ -160,7 +160,12 @@ class Chart extends Component{
         name: it.itemName,
         name: it.itemName,
         type: 'line',
         type: 'line',
         data: values,
         data: values,
-        showAllSymbol:true
+        showAllSymbol:true,
+        symbol:config.chartSymbols[j%7],
+        symbolSize:7,
+        itemStyle:{
+          color:config.chartColors[j%7]
+        }
       });
       });
     });
     });
     // 指定图表的配置项和数据
     // 指定图表的配置项和数据
@@ -172,16 +177,13 @@ class Chart extends Component{
         }
         }
       },
       },
       legend: {
       legend: {
-        type:'scroll',
-        /*formatter: function (name) {
-          return name.split("-")[name.split("-").length-1];
-        },*/
-        data:names,
+        show:false
+        /*data:names,
         padding:0,
         padding:0,
-        itemHeight:16,
+        itemHeight:16,*/
       },
       },
       grid:{
       grid:{
-        top:80
+        top:40
       },
       },
       xAxis: {
       xAxis: {
         type: 'category',
         type: 'category',

+ 1 - 1
src/components/AssessResult/ScaleItem/index.jsx

@@ -186,7 +186,7 @@ class ScaleItem extends Component {
                                footer="true">
                                footer="true">
                       <table>
                       <table>
                         {it.content.details.map((item1,idd)=>{
                         {it.content.details.map((item1,idd)=>{
-                          if(item1.controlType==1){//单选
+                          if(item1.controlType==1||item1.controlType==3){//单选
                             return <tr>
                             return <tr>
                               <td>
                               <td>
                                 <span>{'请选择'+item1.name+':'}</span>
                                 <span>{'请选择'+item1.name+':'}</span>

+ 1 - 1
src/components/AssessResult/index.less

@@ -85,7 +85,7 @@
   }
   }
   .time-range{
   .time-range{
     position: absolute;
     position: absolute;
-    bottom: 180px;
+    bottom: 224px;
     /*top: 26px;*/
     /*top: 26px;*/
     z-index: 2;
     z-index: 2;
     width: 100%;
     width: 100%;

+ 2 - 22
src/components/ChronicInfo/index.jsx

@@ -350,13 +350,13 @@ class ChronicInfo extends React.Component{
                                 footer="true">
                                 footer="true">
                                 <table>
                                 <table>
                                 {it.content.details.map((item,idd)=>{
                                 {it.content.details.map((item,idd)=>{
-                                    if(item.controlType==1){//单选
+                                    if(item.controlType==3||item.controlType==1){//单选
                                       return <tr>
                                       return <tr>
                                         <td>
                                         <td>
                                           <span>{'请选择'+item.name+':'}</span>
                                           <span>{'请选择'+item.name+':'}</span>
                                         </td>
                                         </td>
                                         <td>
                                         <td>
-                                          {item.details.map((ii,ind)=>{
+                                          {Array.isArray(item.details)&&item.details.map((ii,ind)=>{
                                             return <div className={style["chooseItem"]}>
                                             return <div className={style["chooseItem"]}>
                                                     <Radio label={ii.detailName}
                                                     <Radio label={ii.detailName}
                                                              isSelect={ii.state == 1}
                                                              isSelect={ii.state == 1}
@@ -366,8 +366,6 @@ class ChronicInfo extends React.Component{
                                           })}
                                           })}
                                         </td>  
                                         </td>  
                                       </tr>
                                       </tr>
-                                    }else if(item.controlType==1){//多选
-
                                     }else if(item.controlType==2){//输入框
                                     }else if(item.controlType==2){//输入框
                                       return <tr>
                                       return <tr>
                                         <td>
                                         <td>
@@ -380,24 +378,6 @@ class ChronicInfo extends React.Component{
                                           <span>{item.uint}</span>
                                           <span>{item.uint}</span>
                                         </td>
                                         </td>
                                         
                                         
-                                      </tr>
-                                    }else if(item.controlType==3){//下拉
-                                      return <tr>
-                                        <td>
-                                          <span>{'请选择'+item.name+':'}</span>
-                                        </td>
-                                        <td>
-                                          {item.details.map((ii,ind)=>{
-                                            return <div className={style["chooseItem"]}>
-                                                    <Radio label={ii.detailName}
-                                                            // isSelect={radioVal[i]==ii.detailName}
-                                                            isSelect={ii.state == 1}
-                                                            handleClick={this.handleForRadio.bind(this,ii,v,i)}>
-                                                    </Radio>
-                                                  </div>
-                                          })}
-                                        </td>
-                                        
                                       </tr>
                                       </tr>
                                     }
                                     }
                                 })}
                                 })}

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

@@ -81,7 +81,7 @@ class ScaleTableHis extends React.Component{
   }
   }
 
 
   render(){
   render(){
-    const {title,data,result} = this.props;console.log(this.props)
+    const {title,data,result} = this.props;
     const scale = data && this.filterScale(data);
     const scale = data && this.filterScale(data);
     const datas = scale && scale.content && JSON.parse(scale.content);
     const datas = scale && scale.content && JSON.parse(scale.content);
     const scaleResult = datas; //量表计算结果
     const scaleResult = datas; //量表计算结果

+ 9 - 12
src/components/Treat/AdverseReactions/index.jsx

@@ -19,9 +19,6 @@ class AdverseReactions extends Component {
         this.props.changeReact(it, index);
         this.props.changeReact(it, index);
     }
     }
     handleMouseEnterDrug(index, item) {
     handleMouseEnterDrug(index, item) {
-        const drugNameWidth = parseInt($('#'+item.id)[0].offsetWidth)
-        const imgLeft = drugNameWidth/2-8
-        $('#'+item.id).find('img').css('left', imgLeft)
         this.setState({
         this.setState({
             currentIndex: index,
             currentIndex: index,
         })
         })
@@ -61,19 +58,19 @@ class AdverseReactions extends Component {
                     <span className={style['last-treat-name-box']}
                     <span className={style['last-treat-name-box']}
                         
                         
                     >   
                     >   
-                        <span   id={item.id} 
+                        <span   
                                 className={style['last-treat-big-name-box']} 
                                 className={style['last-treat-big-name-box']} 
                                 onMouseEnter={this.handleMouseEnterDrug.bind(this, index, item)}
                                 onMouseEnter={this.handleMouseEnterDrug.bind(this, index, item)}
                                 onMouseLeave = {this.handleMouseLeaveDrug}
                                 onMouseLeave = {this.handleMouseLeaveDrug}
                         >
                         >
-                            {item.tagName}:
-                            {<img className={style['info-img']}  
-                                style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
-                                src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
-                                onMouseEnter={this.handleMouseEnterImg.bind(this)}
-                                onMouseLeave = {this.handleMouseLeaveImg}
-                                onClick={() =>{this.setDrugInfo(item);showDrugInfo();}}/>}
-                        
+                            <span className={style['last-treat-big-name']} >{item.tagName}:
+                                {<img className={style['info-img']}  
+                                    style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
+                                    src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
+                                    onMouseEnter={this.handleMouseEnterImg.bind(this)}
+                                    onMouseLeave = {this.handleMouseLeaveImg}
+                                    onClick={() =>{this.setDrugInfo(item);showDrugInfo();}}/>}
+                            </span>
                         </span>
                         </span>
                         
                         
                     </span>
                     </span>

+ 6 - 2
src/components/Treat/AdverseReactions/index.less

@@ -35,11 +35,15 @@
 .info-img {
 .info-img {
     position: absolute;
     position: absolute;
     width: 15px;
     width: 15px;
-    position: absolute;
-    top: -8px;
+    top: -15px;
+    left: 50%;
+    margin-left: -8px;
 }
 }
 .last-treat-big-name-box {
 .last-treat-big-name-box {
     display: inline-block;
     display: inline-block;
     
     
 }
 }
+.last-treat-big-name {
+    position: relative;
+}
 
 

+ 0 - 4
src/components/Treat/DrugTreat/index.jsx

@@ -28,9 +28,6 @@ class DrugTreat extends Component {
         selectDrug && selectDrug(index,ii);
         selectDrug && selectDrug(index,ii);
     }
     }
     handleMouseEnterDrug(ii, index, it) {
     handleMouseEnterDrug(ii, index, it) {
-        const drugNameWidth = parseInt($('#'+it.medicitionName)[0].offsetWidth)
-        const imgLeft = drugNameWidth/2-10
-        $('#'+it.medicitionName).find('img').css('left', imgLeft)
         this.setState({
         this.setState({
             currentIndex: index,
             currentIndex: index,
             currentImg: ii
             currentImg: ii
@@ -99,7 +96,6 @@ class DrugTreat extends Component {
                                         {ii === 0 ? '' : ', '}
                                         {ii === 0 ? '' : ', '}
                                         <span onMouseEnter={this.handleMouseEnterDrug.bind(this, ii , index, it)}
                                         <span onMouseEnter={this.handleMouseEnterDrug.bind(this, ii , index, it)}
                                               onMouseLeave = {this.handleMouseLeaveDrug}
                                               onMouseLeave = {this.handleMouseLeaveDrug}
-                                              id={it.medicitionName}
                                               className={style['drug-name-wrapper']} 
                                               className={style['drug-name-wrapper']} 
                                         >
                                         >
                                             <span className={style['drug-name']}  
                                             <span className={style['drug-name']}  

+ 2 - 0
src/components/Treat/DrugTreat/index.less

@@ -35,6 +35,8 @@
     width: 15px;
     width: 15px;
     position: absolute;
     position: absolute;
     top: -15px;
     top: -15px;
+    left: 50%;
+    margin-left: -7px;
 }
 }
 .info-flag {
 .info-flag {
     display: inline-block;
     display: inline-block;

TEMPAT SAMPAH
src/components/TreatDesc/img/packUp.png


+ 2 - 2
src/components/TreatDesc/index.jsx

@@ -6,7 +6,7 @@ import info from './img/info.png';
 import info1 from './img/info1.png';
 import info1 from './img/info1.png';
 import info2 from './img/info2.png';
 import info2 from './img/info2.png';
 import info3 from './img/info3.png';
 import info3 from './img/info3.png';
-
+import packUp from './img/packUp.png';
 
 
 class TreatDesc extends Component {
 class TreatDesc extends Component {
     constructor(props){
     constructor(props){
@@ -78,7 +78,7 @@ class TreatDesc extends Component {
                     
                     
                 </div> } */}
                 </div> } */}
                 { otherDrugIndex > -1 && <div  className={style['similar-drug']}>
                 { otherDrugIndex > -1 && <div  className={style['similar-drug']}>
-                    <h3 className={style['drug-desc-title']}><span className={style['drug-desc-class-title']} title={'同类药物(' + treatment[otherDrugIndex].drugsName + ')'}>同类药物({treatment[otherDrugIndex].bigdrugsName})</span>  <img src={close} onClick={this.hideTreatDesc} className={style['close-drug-desc']} /></h3>
+                    <h3 className={style['drug-desc-title']}><span className={style['drug-desc-class-title']} title={'同类药物(' + treatment[otherDrugIndex].drugsName + ')'}>同类药物({treatment[otherDrugIndex].bigdrugsName})</span>  <img src={packUp} onClick={this.hideTreatDesc} className={style['close-drug-desc']} /></h3>
                     {treatment[otherDrugIndex].medicitionsList.map((item, index) =>{
                     {treatment[otherDrugIndex].medicitionsList.map((item, index) =>{
                         return (<span >
                         return (<span >
                         {index === 0 ? '' : ', '}     
                         {index === 0 ? '' : ', '}     

+ 2 - 0
src/config/index.js

@@ -55,6 +55,8 @@ export default {
       age:"岁",
       age:"岁",
     },
     },
     chartDismen:'year',   //评估图表默认维度:近1年year,近6个月sixMonth,近1个月month,近1周week
     chartDismen:'year',   //评估图表默认维度:近1年year,近6个月sixMonth,近1个月month,近1周week
+    chartSymbols:['emptyCircle' , 'rect', 'arrow', 'triangle', 'diamond','circle', 'pin', 'roundRect'],
+    chartColors:['#3B9ED0','#F50933', '#F99903', '#66CB33', '#91c7ae','#749f83',  '#ca8622'],
     showCheckNum:16,        //查体默认展开非自由文本标签的个数
     showCheckNum:16,        //查体默认展开非自由文本标签的个数
     radioOptionPer:'()',     //单选项输入占位符
     radioOptionPer:'()',     //单选项输入占位符
     textReg:new RegExp("([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9])"), //包含中英文或数字
     textReg:new RegExp("([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9])"), //包含中英文或数字