Browse Source

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

liucf 6 years ago
parent
commit
d1d07a2896

+ 25 - 1
src/common/components/InlineTag/index.jsx

@@ -28,6 +28,7 @@ class InlineTag extends Component {
     this.handleBlur = this.handleBlur.bind(this);
     this.handleInput = this.handleInput.bind(this);
     this.handleFocus = this.handleFocus.bind(this);
+    this.handleFixClick = this.handleFixClick.bind(this);
   }
   changeToEdit(e){
     const {handledbClick,id} = this.props;
@@ -80,12 +81,34 @@ class InlineTag extends Component {
     }
     return style['selected-tag'];
   }
- 
+  moveEnd(obj) {
+    if(window.getSelection){//ie11 10 9 ff safari
+      obj.focus(); //解决ff不获取焦点无法定位问题
+      var range = window.getSelection();//创建range
+      range.selectAllChildren(obj);//range 选择obj下所有子内容
+      range.collapseToEnd();//光标移至最后
+    }
+    else if (document.selection) {//ie10 9 8 7 6 5
+      var range = document.selection.createRange();//创建选择对象
+      range.moveToElementText(obj);//range定位到obj
+      range.collapse(false);//光标移至最后
+      range.select();
+    }
+  }
+  handleFixClick(){
+    this.moveEnd(this.$span.current);
+  }
+  componentDidMount(){
+    //设置最小宽度避免输入后宽度跳动
+    const spanWidth = window.getComputedStyle(this.$span.current).width;
+    this.$span.current.style.minWidth=spanWidth;
+  }
   render(){
     const {placeholder,value,prefix,suffix} = this.props;
     const inp = this.state.value;
     return <div className={this.getStyle()}
                  onDoubleClick={this.changeToEdit}
+                  onClick={this.handleFixClick}
                  onkeydown={handleEnter}
                  onBlur={this.changeToClick} ref={this.$box} contentEditable={this.state.editable}>
                 {prefix}
@@ -94,6 +117,7 @@ class InlineTag extends Component {
                       onBlur={this.handleBlur}
                       onInput={this.handleInput}
                       onFocus={this.handleFocus}
+                      onClick={e=>e.stopPropagation()}
                       onkeydown={handleEnter}
                       ref={this.$span}>{value||(inp?'':placeholder)}</span>
                 {suffix}

BIN
src/common/images/slide-down.png


BIN
src/common/images/slide-up.png


+ 76 - 0
src/components/AddInspect/SlideExcel/index.jsx

@@ -0,0 +1,76 @@
+import React, { Component } from "react";
+import styles from "./index.less";
+import { normalVal,timestampToTime } from '@utils/tools';
+import slideUp from "@common/images/slide-up.png";
+import slideDown from "@common/images/slide-down.png";
+class SlideExcel extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show:false
+    };
+    this.toTime = this.toTime.bind(this)
+    this.handleSlide = this.handleSlide.bind(this)
+  }
+  toTime(time){
+    let tmpTim = time.split(',').join('')-0
+    if(time && tmpTim.toString() != 'NaN'){
+      let date = new Date('1900-01-01');
+      let dateTim = date.getTime();
+      let times = (tmpTim-2)*24*60*60*1000;
+      let result = timestampToTime(dateTim+times).split(' ')[0]
+      return result;
+    }else{
+      return time;
+    }
+  }
+  handleSlide(){
+    let tmpShow = this.state.show
+    this.setState({
+      show:!tmpShow
+    })
+  }
+  render() {
+    const {items,item,idx} = this.props;
+    const {show} = this.state;
+    return (
+      <li className={styles.excelDataLis} style={{border:items.lisExcelRes.length-1 == idx? 0:''}}>
+          <span className={styles.excelDataTitle}>
+              {item.menus}
+          </span>
+          <table className={styles.table}>
+             {  show ? (item.lisExcelItem && item.lisExcelItem.map((value,idx)=>{
+                  return <tr>
+                      <td style={{width:'30%'}}>{value.itemName}</td>
+                      <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
+                      <td style={{width:'25%'}}>
+                          {normalVal(value.min,value.max)}
+                      </td>
+                      <td style={{width:'25%'}}>{value.time == ''?('导入时间: '+this.state.dateTime):'化验时间: '+this.toTime(value.time)}</td>
+                  </tr>
+                })):(item.lisExcelItem && item.lisExcelItem.map((value,idx)=>{
+                  if(idx < 4){
+                    return <tr>
+                        <td style={{width:'30%'}}>{value.itemName}</td>
+                        <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
+                        <td style={{width:'25%'}}>
+                            {normalVal(value.min,value.max)}
+                        </td>
+                        <td style={{width:'25%'}}>{value.time == ''?('导入时间: '+this.state.dateTime):'化验时间: '+this.toTime(value.time)}</td>
+                    </tr>
+                  }
+                }))
+            }
+        </table>
+        {
+          item.lisExcelItem && item.lisExcelItem.length > 5 ?  
+          <div className={styles.slides} onClick={this.handleSlide}>
+              <span>{show ?'收起':'展开'}</span>
+              <img src={show ?slideUp:slideDown} alt=""/>
+          </div>:null
+        }
+      </li>
+    );
+  }
+}
+export default SlideExcel;

+ 142 - 0
src/components/AddInspect/SlideExcel/index.less

@@ -0,0 +1,142 @@
+@import "~@less/variables.less";
+.excelDataLis {
+    // cursor: pointer;
+    color: #767676;
+    position: relative;
+    padding-top: 10px;
+    padding-bottom: 10px;
+    border-bottom:1px dashed #989DA3;
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        &:before {
+            content: '\300C';
+        }
+        &:after {
+            content: '\300D';
+        }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 13px;
+        height: 13px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: 0;
+        top: 12px;
+        background-color: #fff;
+    }
+}
+
+
+.table {
+  color: #000;
+  width: 80%;
+  tr {
+      line-height: 18px;
+      height: 18px;
+      width: 100%;
+      td {
+          padding-top: 3px;
+      }
+  }
+}
+
+
+.itemPart {
+    height: 28px;
+    // line-height: 28px;
+    overflow: hidden;
+    padding-top: 0 !important;
+    width: 290px;
+    float: left;
+    padding: 0 15px;
+    box-sizing: border-box;
+    span {
+        display: inline-block;
+    }
+    .itemPartL {
+        max-width: 180px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        float: left;
+    }
+    .itemPartR {
+        width: 62px;
+        outline: none;
+        float: right;
+    }
+    .itemPartT {
+        float: right;
+        input {
+            width: 40px;
+            text-align: center;
+        }
+        .unit {
+            display: inline-block;
+        }
+    }
+}
+.itemPartOne {
+    width: 100% !important;
+}
+
+.excelDataLis {
+    padding: 2px 0px;
+    border-bottom: 1px dashed #989DA3;
+    .excelDataTitle {
+        display: inline-block;
+        width: 20%;
+        vertical-align: top;
+        padding-left: 10px;
+        float: left;
+        color: #000;
+    }
+    table {
+        width: 80%;
+        tr {
+            height: 16px;
+            line-height: 16px;
+            width: 100%;
+        }
+        td {
+            text-align: left;
+            padding-top: 6px;
+        }
+        .excelUnit {
+            width: auto;
+            margin-left: 5px;
+        }
+    }
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #ccc;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
+}

+ 129 - 0
src/components/AddInspect/SlideSelect/index.jsx

@@ -0,0 +1,129 @@
+import React, { Component } from "react";
+import styles from "./index.less";
+import { normalVal,timestampToTime } from '@utils/tools';
+import { InspectCommon, Calendar} from '@commonComp';
+import slideUp from "@common/images/slide-up.png";
+import slideDown from "@common/images/slide-down.png";
+import date1 from '../img/date1.png';
+import close from '../img/close.png';
+class SlideSelect extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      show:false
+    };
+    this.toTime = this.toTime.bind(this)
+    this.handleSlide = this.handleSlide.bind(this)
+  }
+  toTime(time){
+    let tmpTim = time.split(',').join('')-0
+    if(time && tmpTim.toString() != 'NaN'){
+      let date = new Date('1900-01-01');
+      let dateTim = date.getTime();
+      let times = (tmpTim-2)*24*60*60*1000;
+      let result = timestampToTime(dateTim+times).split(' ')[0]
+      return result;
+    }else{
+      return time;
+    }
+  }
+  handleSlide(){
+    let tmpShow = this.state.show
+    this.setState({
+      show:!tmpShow
+    })
+  }
+  render() {
+    const {handleConfirm,changeActivePart,handleDelClick,getItemList,date,item,idx,handleFillShow,showDetails,handleLabelSub,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,handleChangeDate} = this.props;
+    const {show} = this.state;
+    return (
+      <li key={item.questionId} className={styles.slideLi}> 
+        {
+            // 标签,血常规。。
+            item.show ?
+            <p className={styles.staticTagActive}>
+                <span data-flg="current" style={{color:"#000"}} onClick={(e) => { handleLabelSub(e, item.questionId,idx); handleFillShow(e,idx) }}>{item.name}</span>
+            </p>:
+            <p>
+                <i data-flg="current" onClick={(e) => { handleLabelSub(e,item.questionId,idx); handleFillShow(e,idx) }}>{item.name}</i>
+            </p>
+        }
+        {
+            item.show ? 
+                <table className={styles.table}>
+                    {
+                        show?(item.details.map((val)=>{
+                            if(val.value && val.value != ''){
+                                return <tr>
+                                    <td style={{width:'30%'}}>{val.name}</td>
+                                    {showDetails(val)}
+                                    <td style={{width:'25%'}}>
+                                        {normalVal(val.minValue,val.maxValue)}
+                                    </td>
+                                    <td style={{width:'25%'}}>{'化验时间:'+item.time}</td>
+                                </tr>
+                            }
+                        })):(item.details.map((val,num)=>{
+                          if(val.value && val.value != '' && num < 4 ){
+                              return <tr>
+                                  <td style={{width:'30%'}}>{val.name}</td>
+                                  {showDetails(val)}
+                                  <td style={{width:'25%'}}>
+                                      {normalVal(val.minValue,val.maxValue)}
+                                  </td>
+                                  <td style={{width:'25%'}}>{'化验时间:'+item.time}</td>
+                              </tr>
+                          }
+                      }))
+                    }
+                </table>:null
+        }
+        {
+          item.details && item.details.length > 5 ?  
+          <div className={styles.slides} onClick={this.handleSlide}>
+              <span>{show ?'收起':'展开'}</span>
+              <img src={show ?slideUp:slideDown} alt=""/>
+          </div>:null
+        }
+        <div className={styles.searchResult}>
+            {
+                showFill && fillActive.id == item.id && idx == currentIdx ?
+                    <InspectCommon
+                        showFill={showFill}
+                        handleClear={(e)=>{
+                            changeActivePart('','',true)
+                        }}
+                        handleConfirm={(e)=>{
+                            if(JSON.stringify(currentData) == '{}'){
+                                handleConfirm(e,idx,dateTime,fillActive);
+                            }else{
+                                handleConfirm(e,idx,dateTime,currentData);
+                            }
+                            changeShowFill()
+                            handlePush&&handlePush();     //右侧推送
+                        }}
+                    >
+                        <div className={styles.searchResultT}>
+                            <img style={{"position":"absolute","top":"8px","right":"8px"}} src={date1} alt="" onClick={handleShowDate}/>
+                            <p style={{position:"absolute",right:"38px",top:"4px",lineHeight:"28px"}}>
+                                {
+                                  dateTime
+                                }
+                            </p>
+                            <div style={{display:date?"block":"none",position:"relative"}}>
+                                {/* 日期组件 */}
+                                <Calendar isShow={true} handleChange={handleChangeDate}></Calendar>
+                            </div>
+                        </div>
+                            {/* 填写单内容显示 */}
+                            { getItemList() }
+                    </InspectCommon>
+                : null
+            }
+        </div>
+        <img className={styles.partDel} src={close} alt="删除项" onClick={()=>{handleDelClick(1,idx)}}/>
+    </li>
+    );
+  }
+}
+export default SlideSelect;

+ 151 - 0
src/components/AddInspect/SlideSelect/index.less

@@ -0,0 +1,151 @@
+@import "~@less/variables.less";
+.slideLi {
+    // cursor: pointer;
+    color: #767676;
+    position: relative;
+    padding-top: 10px;
+    padding-bottom: 10px;
+    border-bottom:1px dashed #989DA3;
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        &:before {
+            content: '\300C';
+        }
+        &:after {
+            content: '\300D';
+        }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 13px;
+        height: 13px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: 0;
+        top: 12px;
+        background-color: #fff;
+    }
+}
+.staticTagActive {
+    cursor: pointer;
+    color: #333;
+    display: inline-block;
+    position: relative;
+    vertical-align: top;
+    padding: 2px 10px;
+    box-sizing: border-box;
+    width: 20%;
+    float: left;
+    span {
+        border-bottom: 1px solid #666666 ;
+    }
+}
+
+.staticTag {
+    cursor: pointer;
+    // color: #767676;
+    color: @blue;
+    padding-top: 10px;
+    display: inline-block;
+    position: relative;
+    /* &:before {
+        content: '\300C';
+    }
+    &:after {
+        content: '\300D';
+    } */
+}
+.table {
+    color: #000;
+    width: 80%;
+    tr {
+        line-height: 18px;
+        height: 18px;
+        width: 100%;
+        td {
+            padding-top: 3px;
+        }
+    }
+}
+
+.searchResult {
+    .searchResultT {
+        img {
+            float: right;
+        }
+    }
+}
+
+.excelDataLists {
+    position: relative;
+    background-color: #f1f1f1;
+    border: 1px solid #ccc;
+    .close {
+        width: 13px;
+        height: 13px;
+        position: absolute;
+        top: -5px;
+        right: -5px;
+        z-index: 30;
+        background-color: #fff;
+        border-radius: 50%;
+    }
+    .excelDataLis {
+        padding: 2px 0px;
+        border-bottom: 1px dashed #989DA3;
+        .excelDataTitle {
+            display: inline-block;
+            width: 20%;
+            vertical-align: top;
+            padding-left: 10px;
+            float: left;
+        }
+        table {
+            width: 80%;
+            tr {
+                height: 16px;
+                line-height: 16px;
+                width: 100%;
+            }
+            td {
+                text-align: left;
+                padding-top: 6px;
+            }
+            .excelUnit {
+                width: auto;
+                margin-left: 5px;
+            }
+        }
+    }
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #EDEDED;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
+}

+ 41 - 108
src/components/AddInspect/index.jsx

@@ -1,10 +1,13 @@
 import React from 'react';
 import { SearchOption, InspectCommon, Calendar ,Notify,ConfirmModal,Add} from '@commonComp';
-import { deepClone,normalVal,timestampToTime,filterDataArr } from '@utils/tools';
+import SlideExcel from './SlideExcel';
+import SlideSelect from './SlideSelect';
+import { deepClone } from '@utils/tools';
 import styles from './index.less';
 import date1 from './img/date1.png';
-import date2 from './img/date2.png';
 import close from './img/close.png';
+import slideUp from "@common/images/slide-up.png";
+import slideDown from "@common/images/slide-down.png";
 import store from '@store';
 import $ from 'jquery';
 class Inspect extends React.Component {
@@ -22,7 +25,8 @@ class Inspect extends React.Component {
             toastText:'',
             visible:false,
             type:null,
-            id:null
+            id:null,
+            tmpIds:[],      //内层外层
         }
         this.handleChangeDate = this.handleChangeDate.bind(this)
         this.handleShowDate = this.handleShowDate.bind(this)
@@ -34,6 +38,9 @@ class Inspect extends React.Component {
         this.delConfirm = this.delConfirm.bind(this)
         this.handleCancel = this.handleCancel.bind(this)
         this.handleSearchShow = this.handleSearchShow.bind(this)
+        this.changeShowFill = this.changeShowFill.bind(this)
+        this.handleFillShow = this.handleFillShow.bind(this)
+        this.handleDelClick = this.handleDelClick.bind(this)
     }
     delConfirm(){//弹窗确定
         const{delPartItem,handleCloseExcel,handlePush} = this.props;
@@ -97,6 +104,9 @@ class Inspect extends React.Component {
             this.setState({num:0})
         }
     }
+    changeShowFill(){
+      this.setState({showFill:false})
+    }
     handleChangeDate(info) {
         let date = info.year+'-'+(info.month<10?'0'+info.month:info.month)+'-'+(info.day<10?'0'+info.day:info.day);
         this.setState({dateTime:date,date:false})
@@ -253,21 +263,9 @@ class Inspect extends React.Component {
             return <td style={{width:'20%'}}><span className={(val.value - 0).toString() == 'NaN'?"red":(val.maxValue || val.minValue) ? (val.value > val.maxValue || val.value < val.minValue?"red":''):''}>{val.value}</span> { val.labelSuffix}</td>
         }
     }
-    toTime(time){
-      let tmpTim = time.split(',').join('')-0
-      if(time && tmpTim.toString() != 'NaN'){
-        let date = new Date('1900-01-01');
-        let dateTim = date.getTime();
-        let times = (tmpTim-2)*24*60*60*1000;
-        let result = timestampToTime(dateTim+times).split(' ')[0]
-        return result;
-      }else{
-        return time;
-      }
-    }
     render() {
         const { handleChangeValue, list, labelList,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive,getExcelDataList,handleCloseExcel,handlePush } = this.props;
-        const {toastText,visible} = this.state;
+        const {toastText,visible,tmpId,tmpIdx} = this.state;
         return (
             <div className={styles.wrapper}>
                 <div className={styles.check}>
@@ -279,25 +277,12 @@ class Inspect extends React.Component {
                                     <img className={styles.close} src={close} alt="关闭导入excel数据" onClick={()=>{this.handleDelClick(2,id)}}/>
                                     {
                                         items.lisExcelRes.map((item,idx)=>{
-                                            return <li className={styles.excelDataLis} style={{border:items.lisExcelRes.length-1 == idx? 0:''}}>
-                                                <span className={styles.excelDataTitle}>
-                                                    {item.menus}
-                                                </span>
-                                                <table>
-                                                    {
-                                                        item.lisExcelItem && item.lisExcelItem.map((value)=>{
-                                                            return <tr>
-                                                                <td style={{width:'30%'}}>{value.itemName}</td>
-                                                                <td style={{width:'20%'}}><span className={value.type == 1?'red':null}>{value.value}</span> {value.unit}</td>
-                                                                <td style={{width:'25%'}}>
-                                                                    {normalVal(value.min,value.max)}
-                                                                </td>
-                                                                <td style={{width:'25%'}}>{value.time == ''?('导入时间: '+this.state.dateTime):'化验时间: '+this.toTime(value.time)}</td>
-                                                            </tr>
-                                                        })
-                                                    }
-                                                </table>
-                                            </li>
+                                            return <SlideExcel
+                                              items={items}
+                                              item={item}
+                                              idx={idx}
+                                              dateTime={this.state.dateTime}
+                                            ></SlideExcel>
                                         })
                                     }
                                 </ul>:null
@@ -308,79 +293,27 @@ class Inspect extends React.Component {
                     <ul className={styles.labelWrap} >
                         {
                             labelList && labelList.map((item,idx) => {
-                                return <li key={item.questionId}> 
-                                    {
-                                        // 标签,血常规。。
-                                        item.show ?
-                                        <p className={styles.staticTagActive}>
-                                            <span data-flg="current" style={{color:"#000"}} onClick={(e) => { handleLabelSub(e, item.questionId,idx); this.handleFillShow(e,idx) }}>{item.name}</span>
-                                        </p>:
-                                        <p>
-                                            <i data-flg="current" onClick={(e) => { handleLabelSub(e,item.questionId,idx); this.handleFillShow(e,idx) }}>{item.name}</i>
-                                        </p>
-                                    }
-                                    {
-                                        item.show ? 
-                                            <table className={styles.table}>
-                                                {
-                                                    item.details.map((val)=>{
-                                                        if(val.value && val.value != ''){
-                                                            return <tr>
-                                                                <td style={{width:'30%'}}>{val.name}</td>
-                                                                {this.showDetails(val)}
-                                                                <td style={{width:'25%'}}>
-                                                                    {normalVal(val.minValue,val.maxValue)}
-                                                                </td>
-                                                                <td style={{width:'25%'}}>{'化验时间:'+item.time}</td>
-                                                            </tr>
-                                                        }
-                                                    })
-                                                }
-                                            </table>:null
-                                    }
-                                    <div className={styles.searchResult}>
-                                        {
-                                            this.state.showFill && fillActive.id == item.id && idx == this.state.currentIdx ?
-                                                <InspectCommon
-                                                    showFill={this.state.showFill}
-                                                    handleClear={(e)=>{
-                                                        // handleClear(e,idx)
-                                                        this.changeActivePart('','',true)
-                                                        this.setState({
-                                                          // currentData:fillActive
-                                                        })
-                                                    }}
-                                                    handleConfirm={(e)=>{
-                                                        // handleConfirm(e,idx,this.state.dateTime,fillActive);
-                                                        if(JSON.stringify(this.state.currentData) == '{}'){
-                                                            handleConfirm(e,idx,this.state.dateTime,fillActive);
-                                                        }else{
-                                                            handleConfirm(e,idx,this.state.dateTime,this.state.currentData);
-                                                        }
-                                                        this.setState({showFill:false})
-                                                        handlePush&&handlePush();     //右侧推送
-                                                    }}
-                                                >
-                                                    <div className={styles.searchResultT}>
-                                                        <img style={{"position":"absolute","top":"8px","right":"8px"}} src={date1} alt="" onClick={this.handleShowDate}/>
-                                                        <p style={{position:"absolute",right:"38px",top:"4px",lineHeight:"28px"}}>
-                                                            {
-                                                              this.state.dateTime
-                                                            }
-                                                        </p>
-                                                        <div style={{display:this.state.date?"block":"none",position:"relative"}}>
-                                                            {/* 日期组件 */}
-                                                            <Calendar isShow={true} handleChange={this.handleChangeDate}></Calendar>
-                                                        </div>
-                                                    </div>
-                                                        {/* 填写单内容显示 */}
-                                                        { this.getItemList(idx) }
-                                                </InspectCommon>
-                                            : null
-                                        }
-                                    </div>
-                                    <img className={styles.partDel} src={close} alt="删除项" onClick={()=>{this.handleDelClick(1,idx)}}/>
-                                </li>
+                                return <SlideSelect
+                                  item={item}
+                                  idx={idx}
+                                  showFill={this.state.showFill}
+                                  handlePush={handlePush}
+                                  fillActive={fillActive}
+                                  handleLabelSub={handleLabelSub}
+                                  date={this.state.date}
+                                  dateTime={this.state.dateTime}
+                                  currentIdx={this.state.currentIdx}
+                                  currentData={this.state.currentData}
+                                  showDetails={this.showDetails}
+                                  handleShowDate={this.handleShowDate}
+                                  handleChangeDate={this.handleChangeDate}
+                                  changeShowFill={this.changeShowFill}
+                                  handleFillShow={this.handleFillShow}
+                                  getItemList={this.getItemList}
+                                  changeActivePart={this.changeActivePart}
+                                  handleDelClick={this.handleDelClick}
+                                  handleConfirm={handleConfirm}
+                                ></SlideSelect>
                             })
                         }
                     </ul>

+ 15 - 1
src/components/AddInspect/index.less

@@ -190,7 +190,7 @@
             }
             td {
                 text-align: left;
-                padding-top: 3px;
+                padding-top: 6px;
             }
             .excelUnit {
                 width: auto;
@@ -204,4 +204,18 @@
     font-size: 16px;
     padding-top: 10px;
     padding-bottom: 50px;
+}
+.slides {
+  background-color: #ccc;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
 }

+ 1 - 0
src/components/Inspect/index.jsx

@@ -106,6 +106,7 @@ class Inspect extends React.Component {
                                 }
                                 $("#choose").val("");
                             }else{
+                                let res = JSON.parse(xhr.response);
                                 Notify.error(res.msg)
                             }
                         }

+ 14 - 11
src/components/PushItems/DetailsModal/index.jsx

@@ -67,18 +67,21 @@ class DetailsModal extends Component {
                     })}
                     
                 </div>
-                <div className={styles['content-menu']}>
-                    {tipsDetails && tipsDetails.introduceDetailList && tipsDetails.introduceDetailList.map((item, index) => {
-                            return (<div>
-                                <div className={styles['details-menu-title-box']}>
-                                    {index === 0 ? '' : <div className={styles['details-content-menu-line']}></div>}
-                                    <span onClick={this.handleClickMenu.bind(this, index, item, tipsDetails)} className={styles['details-content-menu-name']} style = {index === currentIndex ? {color:'#0089be'} : ''}>
-                                        <span className={styles['details-content-menu-circle']} style = {index === currentIndex ? {background:'#0089be'} : ''}></span>{item.title}
-                                    </span>
-                                </div>
-                            </div>)
-                        })}
+                <div className={styles['content-menu-box']}>
+                    <div className={styles['content-menu']}>
+                        {tipsDetails && tipsDetails.introduceDetailList && tipsDetails.introduceDetailList.map((item, index) => {
+                                return (<div>
+                                    <div className={styles['details-menu-title-box']}>
+                                        {index === 0 ? '' : <div className={styles['details-content-menu-line']}></div>}
+                                        <span onClick={this.handleClickMenu.bind(this, index, item, tipsDetails)} className={styles['details-content-menu-name']} style = {index === currentIndex ? {color:'#0089be'} : ''}>
+                                            <span className={styles['details-content-menu-circle']} style = {index === currentIndex ? {background:'#0089be'} : ''}></span>{item.title}
+                                        </span>
+                                    </div>
+                                </div>)
+                            })}
+                    </div>
                 </div>
+               
            </div>
            <div className={styles['details-mask']} onClick={this.hideTips}>
            </div>

+ 7 - 2
src/components/PushItems/DetailsModal/index.less

@@ -61,10 +61,15 @@
     padding: 0 180px 0 40px;
     overflow-y: auto;
 }
-.content-menu {
+.content-menu-box {
     position: absolute;
     top: 50px;
-    right: 20px;
+    right: -20px;
+    width: 200px;
+    height: 80%;
+    overflow-y: auto;
+}
+.content-menu {
     background: #eee;
     border: 1px solid #eee;
     width: 160px;

+ 44 - 7
src/components/PushItems/index.jsx

@@ -151,13 +151,31 @@ class PushItems extends Component {
       showTips
     } = this;
     let assayNum = 0;
+    let assayNum2 = 0; 
     let assayHide = assay.map((item, index) => {
       assayNum = assayNum + item.name.length + 2;
-      if (assayNum > 23) {
-        return;
+      if (assayNum > 28) {
+        assayNum2 = assayNum2 + item.name.length + 2; 
+        if(assayNum2 > 23) {
+          return;
+        } else {
+          return (
+            <span>
+              
+              <input
+                id={item.id + item.name}
+                onChange={() => changeAssay(item)}
+                type="checkbox"
+                checked={item.checked}
+              />
+              <label for={item.id + item.name}>{item.name}</label>
+            </span>
+          );
+        }
       } else {
         return (
           <span>
+            
             <input
               id={item.id + item.name}
               onChange={() => changeAssay(item)}
@@ -185,10 +203,29 @@ class PushItems extends Component {
     });
 
     let checkNum = 0;
+    let checkNum2 = 0;
     let checkHide = check.map((item, index) => {
       checkNum = checkNum + item.name.length + 2;
-      if (checkNum > 23) {
-        return;
+      if (checkNum > 28) {
+        checkNum2 = checkNum2 + item.name.length + 2; 
+        if(checkNum2 > 23) {
+          return;
+        }else {
+          return (
+            <span>
+              <input
+                id={item.id + item.name}
+                onChange={() => changeCheck(item)}
+                type="checkbox"
+                checked={item.checked}
+              />
+              <label for={item.id + item.name}>{item.name}</label>
+            </span>
+          );
+        }
+
+
+        
       } else {
         return (
           <span>
@@ -219,7 +256,7 @@ class PushItems extends Component {
     });
 
     const vigilants = vigilant.map((item, index) => {
-      return <DiagnosticItem item={item} />;
+      return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item}/></div>;
     });
 
     return (
@@ -293,7 +330,7 @@ class PushItems extends Component {
                           : moreAssay
                           ? assays
                           : assayHide}
-                        {assayNum > 28 ? (
+                        {assayNum2 > 23 ? (
                           <span
                             style={
                               moreAssay
@@ -331,7 +368,7 @@ class PushItems extends Component {
                           : moreCheck
                           ? checks
                           : checkHide}
-                        {checkNum > 28 ? (
+                        {checkNum2 > 23 ? (
                           <span
                             style={
                               moreCheck

+ 10 - 7
src/components/PushItems/index.less

@@ -12,18 +12,15 @@
   .vigilant{
     background: #FF8D54;
     overflow: hidden;
-    margin: 1px;
-    margin-bottom: 15px;
-    line-height: 26px;
-    padding: 20px 0;
+    padding: 10px 0;
     .title{
       color:#fff;
       font-size: 14px;
       float: left;
-      margin: 0 10px 0 0;
+      margin: 10px 10px 0 0;
       img {
         float: left;
-        margin: 4px 2px 0 20px;
+        margin: 1px 2px 0 20px;
         width: 18px;
         height: 17px;
       }
@@ -32,11 +29,17 @@
       float:left;
       width: 340px;
       span {
-        font-size: 16px;
+        font-size: 14px;
         color: #fff;
         display:inline-block;
       }
     }
+    .push-diag-item {
+        display: inline-block;
+        margin-right: 10px;
+        margin-top: 10px;
+        cursor: pointer;
+    }
   }
   .diagnose{
     padding-bottom: 15px;

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

@@ -99,11 +99,11 @@ class RadioDrop extends Component{
     },$("#addScrollEvent")[0])
   }
   componentDidMount(){    //默认值选中
-    const {data,ikey,handleSelect} = this.props;
+    const {data,ikey,handleSelect,hideTag} = this.props;
     const selected = data.find((it)=>{
       return it.selected === undefined&&+it.defaultSelect===1;
     });
-    if(selected){
+    if(!hideTag&&selected){
       // const text = selected.labelPrefix+selected.name+selected.labelSuffix;
       const text = selected.name;
       handleSelect&&handleSelect({ikey,id:selected.id,text});

+ 10 - 3
src/components/SpreadDrop/index.jsx

@@ -224,14 +224,21 @@ class SpreadDrop extends Component{
       return;
     }
     //操作单选项
-    if(selected){
+    if(!noneOn&&selected){
       const tIndex= exists.findIndex((it)=>it.questionId===item.questionId);
+      const bIndex= withs.findIndex((it)=>it.questionId===item.questionId);
       if(tIndex!=-1){
         exists.splice(tIndex,1,item);
         this.setState({
           exists,
         })
       }
+      if(bIndex!=-1){
+        withs.splice(tIndex,1,item);
+        this.setState({
+          withs,
+        })
+      }
       return;
     }
     if(exclusion!==''){     //互斥项被选中,其他不可操作
@@ -287,7 +294,7 @@ class SpreadDrop extends Component{
         nones += name+'、';
         noneIds.push(id);
       }else if(nowOn=='with'){
-        withs.push({id:id,name:name});
+        withs.push({id:id,name:name,questionId:item.questionId});
       }else{
         exists.push({id:id,name:name,listIndex,questionId:item.questionId});
       }
@@ -421,7 +428,7 @@ class ListItem extends Component{
         return exists.findIndex((i)=>i.questionId===it.id)!==-1||noneIds.includes(it.id)||withs.findIndex((i)=>i.questionId===it.id)!==-1;
       });*/
       if(selected&&selected.id!=item.id){     //该列已有选中项,传回已选中的id,name取消选中
-        handleClick&&handleClick(item,isExclu,joint,index,{id:selected.id,name:selected.name});
+        handleClick&&handleClick(item,isExclu,joint,index,{id:selected.id,name:selected.name,questionId:selected.questionId});
       }else{
         handleClick&&handleClick(item,isExclu,joint,index);
       }

+ 16 - 11
src/components/TreatDesc/DrugInfo/index.jsx

@@ -54,17 +54,22 @@ class DrugInfo extends Component {
                             <div className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content}}></div> 
                         </div>
                     })}
-                    <div className={style['content-menu']}>
-                        {drugInfo.drugDesc.map((item, index) => {
-                            return (<div>
-                                <div className={style['details-menu-title-box']}>
-                                    {index === 0 ? '' : <div className={style['details-content-menu-line']}></div>}
-                                    <span onClick={this.handleClickMenu.bind(this, index, item, drugInfo.drugDesc)} className={style['details-content-menu-name']} style = {index === currentIndex ? {color:'#0089be'} : ''}>
-                                        <span className={style['details-content-menu-circle']} style = {index === currentIndex ? {background:'#0089be'} : ''}></span>{item.title}
-                                    </span>
-                                </div>
-                            </div>)
-                        })}
+                    <div className={style['content-menu-box']}>
+                        
+                        <div className={style['content-menu']}>
+                            {drugInfo.drugDesc.map((item, index) => {
+                                return (<div >
+                                    <div className={style['details-menu-title-box']}>
+                                        {index === 0 ? '' : <div className={style['details-content-menu-line']}></div>}
+                                        <span onClick={this.handleClickMenu.bind(this, index, item, drugInfo.drugDesc)} className={style['details-content-menu-name']} style = {index === currentIndex ? {color:'#0089be'} : ''}>
+                                            <span className={style['details-content-menu-circle']} style = {index === currentIndex ? {background:'#0089be'} : ''}></span>{item.title}
+                                        </span>
+                                    </div>
+                                </div>)
+                            })}
+
+                        </div>
+                    
                     </div>
                 </div> }
                 { !drugInfo || (drugInfo && drugInfo.drugDesc.length === 0) && <div className={style['drug-desc-wrapper']}>

+ 10 - 3
src/components/TreatDesc/DrugInfo/index.less

@@ -1,5 +1,6 @@
 .drug-info-wrapper {
     position: fixed;
+    overflow: hidden;
     width: 950px;
     height: 80%;
     left: 50%;
@@ -66,13 +67,19 @@
 .drug-desc-content {
     /*width: 100%;*/
     margin-left: 210px;
-    margin-right: 180px;
+    margin-right: 160px;
 }
 
-.content-menu {
+.content-menu-box {
     position: absolute;
     top: 50px;
-    right: 20px;
+    right: -20px;
+    width: 200px;
+    height: 80%;
+    overflow-y: auto;
+}
+.content-menu {
+    
     background: #eee;
     border: 1px solid #eee;
     width: 160px;

+ 3 - 0
src/store/actions/diagnosticList.js

@@ -52,9 +52,12 @@ export const getDiagnosticStr = (state, action) => {
     const res = Object.assign({}, state)
     const diagnosticList = res.diagnosticList
     let diagnosticStr= '';
+    let diagnosticStrNoType = ''
     for (let i = 0; i < diagnosticList.length; i++) {
         diagnosticStr = diagnosticStr + diagnosticList[i].name + '(' + getDiagType(diagnosticList[i].type) + '); '
+        diagnosticStrNoType = diagnosticStrNoType + diagnosticList[i].name + ';'
     }
+    res.diagnosticStrNoType = diagnosticStrNoType
     res.diagnosticStr = diagnosticStr
     return res;
 }

+ 3 - 3
src/store/actions/patInfo.js

@@ -1,6 +1,6 @@
 export const updatePatientMessage=(state,action)=>{
     const res=Object.assign({},state);
-    const mock = {
+    // const mock = {
       // doctorCode: "YS001",
       // doctorId: 1,
       // doctorName: "付",
@@ -24,9 +24,9 @@ export const updatePatientMessage=(state,action)=>{
       // idNo: "9696969",
       // name: "沈强",
       // sex: 2
-    };
+    // };
     res.message = action.data;
-    if(!action.data.selfDeptId){
+    if(!action.data.selfDeptId){    //selfDeptId这个参数是跟外部对接用的
         res.message = mock;
     }
     return res;

+ 9 - 0
src/store/async-actions/print.js

@@ -7,6 +7,7 @@ import {
     getAllDataList,
     getAllDataStringList,
     pushAllDataList,
+    filterDataArr
 } from '@utils/tools';
 
 export const saveMessage = (bool) => {
@@ -25,27 +26,35 @@ export const saveMessage = (bool) => {
         "dataJson": JSON.stringify(getAllDataList(baseList)),
         "detailList": [{
             "content": jsonStr.chief,
+            "contentValue":filterDataArr(JSON.parse(jsonStr.chief)),
             "type": 1
         }, {
             "content": jsonStr.present,
+            "contentValue":filterDataArr(JSON.parse(jsonStr.present)),
             "type": 2
         }, {
             "content": jsonStr.other,
+            "contentValue":filterDataArr(JSON.parse(jsonStr.other)),
             "type": 3
         }, {
             "content": jsonStr.vital,
+            "contentValue":filterDataArr(JSON.parse(jsonStr.vital)),
             "type": 4
         }, {
             "content": jsonStr.lis,
+            "contentValue":jsonStr.lis,
             "type": 5
         }, {
             "content": jsonStr.pacs,
+            "contentValue":jsonStr.pacs,
             "type": 6
         }, {
             "content": jsonStr.diag,
+            "contentValue":jsonStr.diag,
             "type": 7
         }, {
             "content": jsonStr.advice,
+            "contentValue":jsonStr.advice,
             "type": 8
         }],
         "sign": whichSign, //类型0结构化 1文本

+ 1 - 1
src/store/async-actions/treat.js

@@ -103,7 +103,7 @@ export const getTreatResult = (item) =>{
         let diag = '';
         if(diagnosticList) {
             for (let i = 0; i < diagnosticList.length; i++ ) {
-                if(i ===0 ) {
+                if(i === 0 ) {
                     diag = diag + diagnosticList[i].name;
                 } else {
                     diag = diag + ',' + diagnosticList[i].name;

+ 21 - 2
src/store/reducers/inspect.js

@@ -57,7 +57,7 @@ export default (state = initSearchList, action) => {
         }
         newState.labelList = [...tempArr]
         return newState;
-    } 
+    }
     if (action.type == FILL_ACTIVE) {                        //点击标签放到暂存里
         const newState = Object.assign({}, state);
         const tempArr = newState.labelList;
@@ -82,11 +82,30 @@ export default (state = initSearchList, action) => {
         newState.inspectStrPlus = getStringPlus(newState.pushItem)
         return newState;
     }
-    if (action.type == GET_EXCEL) {
+    if (action.type == GET_EXCEL) {              //导入数据
         const newState = Object.assign({}, state);
         let tmpArr = newState.getExcelDataList;
         let tmpArr2 = newState.labelList;
         let temPush = newState.pushItem;
+        // if(action.data && action.data.lisExcelRes){     //前面五条数据显示,超出折叠
+        //   for(let i = 0;i < action.data.lisExcelRes.length;i++){
+        //     let tmpEx = action.data.lisExcelRes[i]
+        //     if(tmpEx && tmpEx.lisExcelItem){
+        //       if(tmpEx.lisExcelItem.length > 4){ //数据超过四条的,显示展开true,点击展开后改变值为false,用于判断页面展开还是收起
+        //         tmpEx.slideDir = true
+        //       }
+        //       for(let k = 0;k < tmpEx.lisExcelItem.length;k++){
+        //         let tmpLisItm = tmpEx.lisExcelItem[k]
+        //         if(k > 3){
+        //           tmpLisItm.isShow = false
+
+        //         }else{
+        //           tmpLisItm.isShow = true
+        //         }
+        //       }
+        //     }
+        //   }
+        // }
         newState.getExcelData = action.data
         tmpArr.push(action.data)
         newState.getExcelDataList = [...tmpArr]

+ 0 - 2
src/store/reducers/pushMessage.js

@@ -8,8 +8,6 @@ const initState = {
   assay: [],
   determine: [],
   check: [ //辅检
-    // {name: '胸部CT', id: 7, checked: false},
-    // {name: '心肌酶谱', id: 8, checked: false},
   ],
   tips: {},
   advice: {

+ 1 - 0
src/utils/config.js

@@ -1,4 +1,5 @@
 // const host='http://192.168.3.100:5050';//王峰
+// const host='http://192.168.3.101:5050';//任国宾
 // const host='http://192.168.2.241:5050';//后端接口访问地址
 const host='http://192.168.2.236:5050';//后端接口访问地址
 //const host='http://192.168.2.164:8080';

+ 1 - 1
src/utils/tools.js

@@ -605,7 +605,7 @@ function getEMRParams(){
     vital = filterDataArr(checkBody.saveText)||'',
     lis = inspect.pushItem,    //化验推送所需数据
     pacs = assistCheck.dataString||'',
-    dis=diagnosticList.diagnosticStr||'',
+    dis=diagnosticList.diagnosticStrNoType||'',
     advice = '',
     diseaeId = [];
   const age = message.patientAge;

+ 49 - 32
static/pages/diag_push.html

@@ -30,7 +30,7 @@
             font-family: 'Microsoft YaHei', arial, tahoma, sans-serif;
         }
         tr{
-            height: 30px;
+            line-height: 30px;
         }
         td{
             vertical-align: top;
@@ -41,13 +41,13 @@
             margin-left: 5px;
         }
         a{
-            margin-right: 10px;
             color: blue;
             cursor: default;
             cursor: pointer;
             text-decoration: underline;
         }
         a.info{
+            margin-right: 10px;
             display: inline-block;
             width:14px;
             height: 14px;
@@ -74,9 +74,6 @@
             border-radius: 3px;
             cursor: pointer;
         }
-        .item-box{
-            display: none;
-        }
         .clearfix{
             zoom: 1;
         }
@@ -88,55 +85,61 @@
             visibility: hidden;
         }
         .vertical,.horizontal{
-            display: none;
-        }
-        .vertical .item-box{
-            margin-top:20px;
-        }
-        .vertical .title{
-            font-size: 14px;
-        }
-        .vertical .item-title{
+             display: none;
+         }
+        .item-title{
             font-weight: bold;
             font-size: 14px;
             line-height: 30px;
             border-bottom: 1px #ccc solid;
         }
-        .vertical .item-content{
+        .item-content{
             font-size: 13px;
             line-height: 30px;
-
+        }
+        .little{
+            float: left;
+        }
+        .info-item .title,.info-item .content{
+            float: left;
+        }
+        .box7,.box8,.box9{
+            display: none;
+        }
+        .item-content .inner-item{
+            display: inline-block;
+           white-space:nowrap;
         }
     </style>
 </head>
 <body>
 <table class="container horizontal" cellspacing="0">
     <tbody>
-    <tr class="item-box box1">
-        <td rowspan="7">
+    <tr class="item-box box7">
+        <!--<td rowspan="5">
             <div class="clearfix">
-                <span>智<br/>能<br/>推<br/>送</span>
+                <span class="little" style="margin-top: 17px;">智<br/>能<br/>推<br/>送</span>
                 <span class="little">︵<br/>仅<br/>供<br/>参<br/>考<br/>︶</span>
             </div>
-        </td>
+        </td>-->
         <td>
-            <label>>伴随症状:</label>
+            <label>>初步诊断:</label>
         </td>
         <td class="item-content">
         </td>
     </tr>
-    <tr class="item-box box4">
+    <tr class="item-box box8">
         <td>
-            <label>>查&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;体:</label>
+            <label>>疑似诊断:</label>
         </td>
         <td>
             <div class="item-content">
             </div>
         </td>
     </tr>
-    <tr class="item-box box7">
+    <tr class="item-box box9">
         <td>
-            <label>>初步诊断:</label>
+            <label>>警惕:</label>
         </td>
         <td>
             <div class="item-content">
@@ -167,23 +170,33 @@
         </td>
         <td>
             <div class="item-content box">
+                无
+            </div>
+        </td>
+    </tr>
+    <tr class="item-box box0">
+        <td style="vertical-align: text-bottom;">
+            <label>>提示信息:</label>
+        </td>
+        <td>
+            <div class="item-content box0">
             </div>
         </td>
     </tr>
     </tbody>
 </table>
-<div class="vertical">
+<div class="container vertical">
     <div class="title">智能推送(仅供参考)</div>
-    <div class="item-box box1">
-        <div class="item-title">伴随症状</div>
+    <div class="item-box box7">
+        <div class="item-title">初步诊断</div>
         <div class="item-content"></div>
     </div>
-    <div class="item-box box4">
-        <div class="item-title">查体</div>
+    <div class="item-box box8">
+        <div class="item-title">疑似诊断</div>
         <div class="item-content"></div>
     </div>
-    <div class="item-box box7">
-        <div class="item-title">初步诊断</div>
+    <div class="item-box box9">
+        <div class="item-title">警惕</div>
         <div class="item-content"></div>
     </div>
     <div class="item-box box5">
@@ -196,6 +209,10 @@
     </div>
     <div class="item-box box">
         <div class="item-title">治疗建议</div>
+        <div class="item-content">无</div>
+    </div>
+    <div class="item-box box0">
+        <div class="item-title">提示信息</div>
         <div class="item-content"></div>
     </div>
 </div>

+ 71 - 25
static/pages/hisLib/diag_push.js

@@ -1,8 +1,8 @@
 (function ($) {
   var urls = {
-    'host':"/icss-web",
     //His推送接口
-    'get_push':'http://192.168.2.234:5008/push-web/algorithm/neural'
+    'get_push':'http://192.168.2.236/api/icss/emr/pushEMR',
+    'get_info':'http://192.168.2.236/api/icss/emr/getIntroduceByEMR'
   };
   $.support.cors = true;
   var config = {
@@ -13,7 +13,7 @@
   };
   var urlSearch = parseUrl();
   handleConfig();
-  getPushData();
+  //getPushData();
 
   function parseUrl() {
     var r = window.location.search.substr(1).split("&"),
@@ -28,13 +28,10 @@
   };
 
   function handleConfig(){
-    $("tr td:last-child,.item-box").css({width:config.width});
+    $(".container").css({'width':'560px'});
+    getPushData();
     $('.'+config.mode).show();
-    $('.item-box:visible:first td:first').attr('rowspan',config.models.length);
-    //显示对应项目
-    config.models.map((it)=>{
-      $('.'+config.mode+" .box"+it).show();
-    });
+
   }
   function getPushData(){
     var url = urls.get_push;
@@ -43,21 +40,25 @@
       past: urlSearch.pastJson||"",
       other: urlSearch.otherJson||"",
       vital: urlSearch.vitalsJson||"",
-      lis: urlSearch.labsJson||"",
+      lis: JSON.parse(urlSearch.labsJson||null),
       pacs: urlSearch.pacsJson||"",
       diag: urlSearch.disJson||"",
-      featureType: config.models.join(",")
+      featureType: config.models.join(","),
+      hosCode:'A001',
+      age:urlSearch.age,
+      sex:urlSearch.sexType
     };
 
     $.ajax({
       url: url,
       type:'post',
       dataType: "json",
+      cache:false,
       contentType:"application/json",
       data:JSON.stringify(myParam),
       success:function(response){
         var data = response.data;
-        if(response.ret=='0'){
+        if(response.code=='0'){
           fillPushData(data);
         }
       },
@@ -70,42 +71,87 @@
     });
   }
 
+  function getTreatInfo(type,name,detailName){
+    var url = urls.get_info;
+    var myParam = {
+      icdCode:urlSearch.icd,
+      type:type,
+      name:name,
+      detailName:detailName,
+      hosCode:'A001',
+      age:urlSearch.age,
+      sex:urlSearch.sexType
+    };
+
+    $.ajax({
+      url: url,
+      type:'post',
+      dataType: "json",
+      cache:false,
+      contentType:"application/json",
+      data:JSON.stringify(myParam),
+      success:function(response){
+        var data = response.data;
+        if(response.code=='0'){
+          fillInfomation(data);
+        }
+      },
+      error:function(error){
+        console.log("error:"+error);
+      },
+      complete:function(){
+        console.log("complete")
+      }
+    });
+  }
+
+  //填入提示信息
+  function fillInfomation(data){
+    var dom='';
+    for(var i=0;i<data.length;i++){
+      dom+='<div class="info-item clearfix"><span class="title">'+data[i].title+':</span><p class="content">'+data[i].text+'</p></div>';
+    }
+    $(".box0 .item-content").html(dom);
+  }
+
   //填入推送信息
   function fillPushData(data){
-    var maps = {1:'symptom',4:'vitals',5:'labs',6:'pacs',7:'dis',};
     if(!data||JSON.stringify(data)=='{}'){
       console.warn("获取推送数据为空!");
       return ;
     }
     var key='',modeClass='.'+config.mode;
-    config.models.map((it)=>{
-        key = maps[it];
-        var arr = [];
-      for(var n = 0;n <data[key].length; n++){
-        arr.push(data[key][n].featureName);
-      }
-      mapItem(modeClass+" .box"+it+' .item-content', arr);
+    mapItem(modeClass+" .box5", data['lisList'],5);   //化验
+    mapItem(modeClass+" .box6", data['pacsList'],6);   //辅捡
+    data['dis']['可能诊断'].length>0&&mapItem(modeClass+" .box7", data['dis']['可能诊断'],7);   //初步诊断
+    data['dis']['确诊'].length>0&&mapItem(modeClass+" .box8", data['dis']['确诊'],7);   //疑似诊断
+    data['dis']['警惕'].length>0&&mapItem(modeClass+" .box9", data['dis']['警惕'],7);   //警惕
+
+    $("a.info").click(function(e){
+      getTreatInfo($(e.target).attr('type'),$(e.target).attr('name'),$(e.target).attr('detailName'))
     });
+
     //$(modeClass+" .box .item-content").html(str);         //治疗建议
   }
   //遍历数据
-  function mapItem(dom,item){
+  function mapItem(dom,item,type){
     var itemDom = '';
     for(var i=0;i<item.length;i++){
       if(i>config.num-1){
-        itemDom += '<a href="##" class="hide">'+item[i]+'</a>';
+        itemDom += '<p class="inner-item"><a href="##" class="hide">'+(item[i].name||item[i].uniqueName)+'</a><a class="info hide" target="_blank name="'+item[i].name+'" type='+type+' detail="'+item[i].detailName+'>i</a></p>';
       }else{
-        itemDom += '<a href="##">'+item[i]+'</a>';
+        itemDom += '<p class="inner-item"><a href="##">'+(item[i].name||item[i].uniqueName)+'</a><a class="info" target="_blank" name='+item[i].name+' type="'+type+'" detail="'+item[i].detailName+'">i</a></p>';
       }
     }
-    $(dom).html(itemDom||"无");
+    $(dom+" .item-content").html(itemDom||"无");
+    $(dom).show();
     var hide = $(dom).find(".hide")[0];
     if(hide){
       $("<a class='more'>...</a>").insertBefore(hide);
       $(".more").click(function(e){
         $(e.target).siblings(".hide").removeClass("hide");
         $(e.target).hide();
-      })
+      });
     }
   }
 })(jQuery);