Browse Source

管理评估弹窗样式

zhouna 6 years ago
parent
commit
7496a221fd

+ 1 - 0
package.json

@@ -26,6 +26,7 @@
     "copy-webpack-plugin": "^4.5.1",
     "cross-env": "^5.1.4",
     "css-loader": "^0.28.10",
+    "echarts": "^4.2.1",
     "es3ify-webpack-plugin": "0.0.1",
     "eventsource-polyfill": "^0.9.6",
     "express": "^4.16.2",

+ 3 - 3
src/common/components/Radio/index.less

@@ -1,7 +1,7 @@
 .radio{
-  width: 120px;
-  height: 44px;
-  line-height: 44px;
+  max-width: 120px;
+  height: 35px;
+  line-height: 35px;
   cursor: pointer;
   img{
     vertical-align: middle;

+ 3 - 1
src/common/components/index.js

@@ -20,6 +20,7 @@ import EditableSpan from "./EditableSpan";
 import Textarea from "./Textarea";
 import NumberUnitPan from "./NumberUnitPan";
 import Add from "./Add";
+import ComplexModal from "./ComplexModal";
 
 module.exports = {
     Banner,
@@ -43,5 +44,6 @@ module.exports = {
     EditableSpan,
     Textarea,
     NumberUnitPan,
-    Add
+    Add,
+    ComplexModal
 };

+ 51 - 0
src/components/AssessResult/ChartItem/index.jsx

@@ -0,0 +1,51 @@
+import React, { Component } from "react";
+import style from "../index.less";
+import { Radio} from '@commonComp';
+import echarts from 'echarts';
+
+class ChartItem extends Component {
+  constructor(props) {
+    super(props);
+    this.drawChart = this.drawChart.bind(this);
+
+  }
+  drawChart(id){
+    var myChart = echarts.init(document.getElementById(id));
+
+    // 指定图表的配置项和数据
+    var option = {
+      tooltip: {},
+      legend: {
+        data:['销量']
+      },
+      xAxis: {
+        data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
+      },
+      yAxis: {},
+      series: [{
+        name: '销量',
+        type: 'line',
+        data: [5, 20, 36, 10, 10, 20]
+      }]
+    };
+
+    // 使用刚指定的配置项和数据显示图表。
+    myChart.setOption(option);
+  }
+  componentDidMount(){
+    this.drawChart('chart1');
+    this.drawChart('chart2');
+  }
+  render() {
+    const {title,data  } = this.props;
+    return <div className={style['assess-item']}>
+      <h2>{title}</h2>
+      <div className={style['item-content']}>
+        <div className={style["chart-box"]} id={'chart1'}></div>
+        <div className={style["chart-box"]} id={'chart2'}></div>
+      </div>
+    </div>;
+  }
+}
+
+export default ChartItem;

+ 38 - 0
src/components/AssessResult/ScaleItem/index.jsx

@@ -0,0 +1,38 @@
+import React, { Component } from "react";
+import style from "../index.less";
+import deleteIcon from '@common/images/delete.png';
+
+class ScaleItem extends Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const {title,data  } = this.props;
+    return <div className={style['assess-item']}>
+      <h2>{title}</h2>
+      <div className={style['item-content']}>
+        <ul>
+          <li>
+            <span>糖尿病周围神经病变:</span>
+            <div className={style['row']}>
+              正常
+            </div>
+            <div className={style["recommend"]}>
+              <img src={deleteIcon} />
+            </div>
+          </li>
+          <li>
+            <span>肾功能不全:</span>
+            <div className={style['row']}>
+            </div>
+            <div className={style["recommend"]}>
+              <img src={deleteIcon} />
+            </div>
+          </li>
+        </ul>
+      </div>
+    </div>;
+  }
+}
+
+export default ScaleItem;

+ 19 - 8
src/components/AssessResult/index.jsx

@@ -1,13 +1,24 @@
 import React, { Component } from "react";
 import style from "./index.less";
+import { Radio} from '@commonComp';
+import Notify from '@commonComp/Notify';
+import RadioItem from "./RadioItem";
+import ScaleItem from "./ScaleItem";
+import ChartItem from "./ChartItem";
 
-class AssessResult extends Component{
-  constructor(props){
-    super(props);
-  }
-  render(){
-    return <div className={style['container']}>
 
-    </div>
+class AssessResult extends Component {
+  constructor(props) {
+    super(props)
+  }
+  render() {
+    const { onClose } = this.props;
+    return <div className={style['assess-cont']}>
+      <RadioItem title='疗效评估:' data={[]}></RadioItem>
+      <ScaleItem title='整体评估:' data={[]}></ScaleItem>
+      <ChartItem title='血糖控制情况:' data={[]}></ChartItem>
+    </div>;
   }
-}
+}
+
+export default AssessResult;

+ 34 - 0
src/components/AssessResult/index.less

@@ -0,0 +1,34 @@
+.assess-cont{
+  padding: 15px;
+}
+.assess-item{
+  h2{
+    line-height: 40px;
+    background: #e5eefe;
+    padding: 0 15px;
+    font-weight: bold;
+  }
+  .item-content{
+    margin-top: 10px;
+    padding: 0 15px;
+  }
+  li {
+    line-height: 35px;
+    .row{
+      display: inline-block;
+    }
+    .recommend{
+      max-width: 200px;
+      float: right;
+      color: #929292;
+    }
+  }
+  .chart-box{
+    display: inline-block;
+    width: 49%;
+    height: 225px;
+  }
+  .chart-box:nth-child(odd){
+    margin-right: 2%;
+  }
+}

+ 4 - 2
src/components/EMRContainer/index.jsx

@@ -29,8 +29,10 @@ class EMRContainer extends Component {
         windowEventHandler('resize', ()=>{
           const height = getWindowInnerHeight() - 175;
           const width = getWindowInnerWidth() - 480;
-          this.$cont.current.style.height = height + "px";
-          this.$cont.current.style.width = width + "px";
+          if(this.$cont.current){
+            this.$cont.current.style.height = height + "px";
+            this.$cont.current.style.width = width + "px";
+          }
         });
     }
     render() {

+ 21 - 9
src/components/PushItems/index.jsx

@@ -11,6 +11,7 @@ import infoPic from "../../common/images/info-pic.png";
 import chronicPic from "../../common/images/chronic.png";
 import level1 from "../../common/images/级别1.png";
 import close from "../../common/images/close-icon.png";
+import printIcon from '@common/images/team.png';
 import DetailsModal from './DetailsModal';
 import PushDiag from "./PushDiag";
 import DiagnosticItem from "@containers/DiagnosticItem";
@@ -19,8 +20,8 @@ import { getWindowInnerHeight } from "@common/js/func";
 import {addLabel} from '@store/actions/inspect';
 import {addAssistLabel} from '@store/actions/assistCheck';
 import {windowEventHandler} from '@utils/tools'
-import {ConfirmModal} from '@commonComp';
-import $ from 'jquery';
+import {ConfirmModal,ComplexModal} from '@commonComp';
+import AssessResult from '../AssessResult';
 import mocks from '../../mock/chronicTable.js'
 
 class PushItems extends Component {
@@ -33,7 +34,8 @@ class PushItems extends Component {
       show:true,
       showInfo:false,
       showOption:false,
-      showTable:false
+      showTable:false,
+      showAssess:false      //评估弹窗
     };
 
     this.showMore = this.showMore.bind(this);
@@ -52,6 +54,7 @@ class PushItems extends Component {
     this.closeOption = this.closeOption.bind(this);
     this.showTable = this.showTable.bind(this);//显示量表弹窗
     this.closeTable = this.closeTable.bind(this);//关闭量表弹窗
+    this.showAssessFn = this.showAssessFn.bind(this); //开关评估弹窗
     this.$cont = React.createRef();
   }
 
@@ -62,7 +65,11 @@ class PushItems extends Component {
   closeMore(type) {
     this.setState({ [type]: false });
   }
-
+  showAssessFn(){
+    this.setState({
+      showAssess:!this.state.showAssess
+    });
+  }
   getCurrentDate(){
     let myDate = new Date();
     let year = myDate.getFullYear();       //获取完整的年份(4位,1970-????)
@@ -168,9 +175,6 @@ class PushItems extends Component {
     const {hideList} = this.props;
     hideList&&hideList();
   }
-  showManage(){//管理和评估
-    console.log("点击了管理和评估");
-  }
   showInfo(){//显示静态知识
     this.setState({
       showInfo:true
@@ -216,7 +220,7 @@ class PushItems extends Component {
                   <span
                     className={style["tipsDetails"]}
                     style={{width:'70px'}}
-                    onClick={() => this.showManage()}
+                    onClick={this.showAssessFn}
                   >
                     管理和评估
                   </span>
@@ -318,8 +322,12 @@ class PushItems extends Component {
       tipsDetails,
       tmpFlg,
     } = this.props.pushMessage;
+    const footer = <div className={style['footer']}>
+      <span className={style['print']}><img src={printIcon} alt=""/>打印</span>
+      <span className={style['okBtn']}>确定</span>
+    </div>;
     const { tipsDiscalimer,tableList ,showList,chronicMagItem} = this.props;
-    const { moreAssay, moreCheck ,show,showTable} = this.state;
+    const { moreAssay, moreCheck ,show,showTable,showAssess} = this.state;
     const {
       showMore,
       closeMore,
@@ -707,6 +715,10 @@ class PushItems extends Component {
             <span className={style["confirmBtn"]}>确定</span>
           </div>
         </ConfirmModal>
+        {showAssess?<ComplexModal onclose={this.showAssessFn} footer={footer}
+                      title='管理和评估'>
+          <AssessResult></AssessResult>
+        </ComplexModal>:''}
       </div>
     );
   }

+ 35 - 0
src/components/PushItems/index.less

@@ -542,3 +542,38 @@
       text-align: center;
     }
   }
+.footer{
+  .print{
+    width: 111px;
+    height: 34px;
+    line-height: 34px;
+    outline: none;
+    border-radius: 4px;
+    /*color: #3B9ED0;*/
+    border: 0 none;
+    cursor: pointer;
+    background: #fff;
+    margin-right: 20px;
+    img{
+      width: 20px;
+      vertical-align: middle;
+      margin-right: 4px;
+    }
+  }
+  .okBtn{
+    width: 80px;
+    height: 34px;
+    line-height: 32px;
+    text-align: center;
+    outline: none;
+    border-radius: 4px;
+    cursor: pointer;
+    border: 1px solid #3B9ED0;
+    box-sizing: border-box;
+    margin-left: 20px;
+    background: #3B9ED0;
+    color: #fff;
+    float: right;
+    margin-right: 20px;
+  }
+}

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

@@ -15,7 +15,8 @@ const api={
   getOtherHisRecord: '/inquiryInfo/getLastOther',
   getBigPush:'/push/pushInner',
   saveMode:'/doctorPageMode/saveDoctorPageModes',
-  getSymptomFeature:'/feature/getSymptomFeature'
+  getSymptomFeature:'/feature/getSymptomFeature',
+  getAssess:'http://192.168.3.1:5050/api/icss/evaluationModuleMapping/getEvaluationModules'
 };
 
 export const getFeature = (item)=>{

+ 1 - 1
src/utils/ajax.js

@@ -67,7 +67,7 @@ const json=(url,data)=>{
   //兼容ie8,axios在ie8下content-type设置不成功且会把headers置为null
   return axios({
     method:'post',
-    url:qhost+url,
+    url:url.indexOf('http:')!=-1?url:qhost+url,
     data
   });/*new Promise((resolve,reject)=>{
     $.ajax({