Forráskód Böngészése

Merge remote-tracking branch 'origin/ChronicMag' into dev/new1

zhouna 6 éve
szülő
commit
2ccd3a6fcf

+ 1 - 1
src/common/components/MiniToast/index.less

@@ -3,7 +3,7 @@
   top:27px;
   width: 388px;
   background: #fff;
-  z-index: 66;
+  z-index: 40;
   border: 1px solid #EAEDF1;
   box-shadow: 0 5px 10px 0 rgba(0,0,0,0.10);
   .infoTitle{

+ 5 - 0
src/common/js/func.js

@@ -118,6 +118,11 @@ export const fullfillText = (arr,noPre=false,noEnd=false,ifEmpty=true)=>{
         tempText = getSaveText(it);
       }
       saveText.push(tempText);
+      // 模板只有一个标签时第一项后面也要加空标签
+      if(arr.length==1){
+        newArr.push(textLabel);
+        saveText.push('');
+      }
     }else{
       pre = arr[i-1];
       item = !ifEmpty&&cNum<config.showCheckNum?Object.assign({},it,{showInCheck:true}):it;

+ 3 - 3
src/components/AddAssistCheck/index.jsx

@@ -151,7 +151,7 @@ class AddAssistCheck extends React.Component {
     </ul>
   }
   render() {
-    const { handleChangeValue, list } = this.props;
+    const { handleChangeValue, list,assistVal } = this.props;
     const { visible } = this.state;
     return (
       <div className={styles.wrapper}>
@@ -159,9 +159,9 @@ class AddAssistCheck extends React.Component {
         <div id="searchWrapAssist" style={{ position: "relative", clear: 'both' }}>
           <Add showText="添加辅检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck" />
           {this.state.show ? <SearchOption handleChangeValue={handleChangeValue} visible={true}>
-            {list && list.length>0?this.getSearchList(list):''}
+            {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
             {
-              list && list.length>0?'':<div>
+              list && list.length>0 || (assistVal != '')?'':<div>
                 <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用辅检项</p>
                 {
                   this.getCommonList()

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

@@ -26,7 +26,7 @@
 .searchLiUl {
   overflow-y: auto;
   max-height: 225px;
-  min-height: 80px;
+  // min-height: 80px;
 }
 .searchLi:hover {
     border: 1px solid @blue;

+ 4 - 3
src/components/AddInspect/index.jsx

@@ -284,8 +284,9 @@ class Inspect extends React.Component {
     }
   }
   render() {
-    const { getInfomation,handleChangeValue, list, labelList, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
+    const { getInfomation,handleChangeValue,inspectVal, list, labelList, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
     const { toastText, visible, tmpId, tmpIdx } = this.state;
+
     return (
       <div className={styles.wrapper}>
         <div className={styles.check}>
@@ -343,9 +344,9 @@ class Inspect extends React.Component {
         <div style={{ position: "relative", clear: "both" }}>
           <Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
           {this.state.show ? <SearchOption handleChangeValue={handleChangeValue} visible={true}>
-            {list && list.length>0?this.getSearchList(list):''}
+            {list && list.length>0?this.getSearchList(list):(inspectVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
             {
-              list && list.length>0?'':<div>
+              list && list.length>0 || (inspectVal != '')?'':<div>
                   <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用化验项</p>
                   {
                     this.getCommonList()

+ 3 - 3
src/components/AddInspect/index.less

@@ -91,7 +91,7 @@
 .searchLiUl {
   overflow-y: auto;
   max-height: 225px;
-  min-height: 80px;
+  // min-height: 80px;
 }
 .searchLi {
     height: 36px;
@@ -127,7 +127,7 @@
 }
 .itemPart {
     height: 28px;
-    // line-height: 28px;
+    line-height: 28px;
     overflow: hidden;
     padding-top: 0 !important;
     width: 330px;
@@ -151,7 +151,7 @@
     }
     .itemPartT {
         float: right;
-        width: 110px;
+        max-width: 110px;
         input {
             width: 40px;
             text-align: center;

+ 6 - 1
src/components/AssessResult/ChartItem/index.jsx

@@ -172,8 +172,13 @@ class Chart extends Component{
         }
       },
       legend: {
+        type:'scroll',
+        /*formatter: function (name) {
+          return name.split("-")[name.split("-").length-1];
+        },*/
         data:names,
-        bottom:210
+        padding:0,
+        itemHeight:16,
       },
       grid:{
         top:80

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

@@ -10,7 +10,7 @@ class AssistCheck extends React.Component {
     }
 
     render(){
-        const {list,getInfomation,assistLabel,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
+        const {list,getInfomation,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
         return (
             <div className={styles.wrapper}>
                 <div className={styles.top}>
@@ -38,6 +38,7 @@ class AssistCheck extends React.Component {
                             winWidth={winWidth}
                             getInfomation={getInfomation}
                             assistList={assistList}
+                            assistVal={assistVal}
                         >
 
                         </AddAssistCheck>

+ 7 - 14
src/components/CheckBody/index.jsx

@@ -36,7 +36,7 @@ class CheckBody extends Component{
     const moreNum =data.length-[...data].reverse().findIndex((it)=>it.showInCheck)-1;//被隐藏的位置
     const moreText = filterDataArr([...saveText].splice(moreNum+1));     //被收起的标签中是否有有值得,有则不能再收起showMoreBtn?more:''
     const more = showAll?<span className={style['more']} onClick={this.showHide}>收起<img src={hideImg} /></span>:<span className={style['more']} onClick={this.showHide}>展开<img src={showImg} /></span>;
-    const showMoreBtn = data.length>config.showCheckNum&&(data.length>moreNum&&!data[0].full)&&!moreText;
+    const showMoreBtn = data.length>config.showCheckNum&&(data.length-1>moreNum&&!data[0].full)&&!moreText;
     let showArray = data.filter((it)=>{
       if(it.showInCheck)
         return it;
@@ -71,17 +71,14 @@ class CheckBody extends Component{
       }
       leftL = ele.offsetLeft+90
     }
-    getSearchLocation(getPageCoordinate(e).boxTop,leftL)
+    getSearchLocation(getPageCoordinate(e).boxTop,leftL);
     this.setState({
-      // boxLeft:getPageCoordinate(e).boxLeft,
-      // boxLeft:leftL,
-      // boxTop:getPageCoordinate(e).boxTop,
       tmpScroll: $("#addScrollEvent")[0].scrollTop,
       tmpTop:getPageCoordinate(e).boxTop
     });
     windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
       let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      let boxTop = this.state.tmpTop - scrollYs + this.state.tmpScroll
+      let boxTop = this.state.tmpTop - scrollYs + this.state.tmpScroll;
       getSearchLocation(boxTop,this.state.boxLeft)
     },$("#addScrollEvent")[0])
   }
@@ -93,18 +90,14 @@ class CheckBody extends Component{
   getData(){
     //第一次聚焦查体时,主诉有数据则调接口,主诉无数据则显示提示;其他时间查体模板数据不调接口
     const {hasMain,isEmpty} = this.props;
-
+    if(!hasMain&&isEmpty){
+      Notify.error("无法操作,请先输入主诉");
+      return;
+    }
     //无主诉提示在EditableSpan里
     //有主诉时且本身无数据,第一次点击获取数据,(不论获取成功与否)再点击不获取(直到刷新成空白页或清空)
     if(hasMain&&isEmpty!=false){
       this.props.getInit();
-      //隐藏区域有默认选中项,默认全部展开-有延迟,弃用
-      /*const that = this;
-      setTimeout(function(){
-        that.props.showAll&&that.setState({
-          showAll:true
-        });
-      },900)*/
 
     }
   }

+ 1 - 0
src/components/Information/index.less

@@ -3,6 +3,7 @@
   font-size: 24px;
   margin-bottom: 30px;
   text-align:center;
+  padding-top: 15px;
 }
 .patInfo {
   margin: 0px 0px 30px 0px;

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

@@ -147,7 +147,7 @@ class Inspect extends React.Component {
         </ul>
     }
     render() {
-        const {fetchPushInfos,getInfomation, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem,inspectList } = this.props;
+        const {fetchPushInfos,getInfomation,inspectVal, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList,delPartItem,inspectList } = this.props;
         const {ieVersion,isIE} = this.state;
         return (
             <div className={styles.wrapper} >
@@ -185,6 +185,7 @@ class Inspect extends React.Component {
                             delPartItem={delPartItem}
                             inspectList={inspectList}
                             getInfomation={getInfomation}
+                            inspectVal={inspectVal}
                         >
                         </AddInspect>
                     </div>

+ 8 - 2
src/components/Preview/index.less

@@ -22,14 +22,20 @@
     bottom: 7%;
     height: 86%;
     overflow: hidden;
+    padding-top: 45px;
   }
   .close { 
-    padding:  15px 15px 15px 20px;
+    padding:  0 15px;
+    height: 45px;
+    line-height: 45px;
     border-bottom: 1px solid #EAEDF1;
+    position: absolute;
+    width: 100%;
+    top: 0;
     img{
       float:right;
       cursor: pointer;
-      margin-top: -5px;
+      margin-top: 10px;
     }
   }
 }

+ 25 - 22
src/components/PreviewBody/index.jsx

@@ -154,28 +154,26 @@ class PreviewBody extends Component {
               }
               {
                 dataJson.lis.labelList && dataJson.lis.labelList.map((item, idx) => {
-                  // if (item.show) {
-                    return <table style={{ margin: '8px 0', width: '100%' }}>
-                      {
-                        item.show?<tr style={{ fontSize: '14px', lineHeight: '1.5' }}><td><span style={{ borderBottom: '1px solid #666666' }}> {item.name} </span></td></tr>:
-                        <tr style={{ fontSize: '14px', lineHeight: '1.5' }}><td><span style={{ position:'relative',left:'-10px' }}>「{item.name}」</span></td></tr>
-                      }
-                      {
-                        item.details.map((val) => {
-                          if (val.value && val.value != '') {
-                            return <tr style={{ lineHeight: '1.5', width: '100%', fontSize: '12px' }}>
-                              <td style={{ width: '32%', fontSize: '12px' }}>{val.name}</td>
-                              {this.showDetails(val)}
-                              <td style={{ width: '24%', fontSize: '12px' }}>
-                                {normalVal(val.minValue, val.maxValue)}
-                              </td>
-                              <td style={{ width: '28%', fontSize: '12px' }}>{'化验时间:' + item.time}</td>
-                            </tr>
-                          }
-                        })
-                      }
-                    </table>
-                  // }
+                  return <table style={{ margin: '8px 0', width: '100%' }}>
+                    {
+                      item.show?<tr style={{ fontSize: '14px', lineHeight: '1.5' }}><td><span style={{ borderBottom: '1px solid #666666' }}> {item.name} </span></td></tr>:
+                      <tr style={{ fontSize: '14px', lineHeight: '1.5' }}><td><span style={{ position:'relative',left:'-10px' }}>「{item.name}」</span></td></tr>
+                    }
+                    {
+                      item.details.map((val) => {
+                        if (val.value && val.value != '') {
+                          return <tr style={{ lineHeight: '1.5', width: '100%', fontSize: '12px' }}>
+                            <td style={{ width: '32%', fontSize: '12px' }}>{val.name}</td>
+                            {this.showDetails(val)}
+                            <td style={{ width: '24%', fontSize: '12px' }}>
+                              {normalVal(val.minValue, val.maxValue)}
+                            </td>
+                            <td style={{ width: '28%', fontSize: '12px' }}>{'化验时间:' + item.time}</td>
+                          </tr>
+                        }
+                      })
+                    }
+                  </table>
                 })
               }
             </td>
@@ -203,10 +201,15 @@ class PreviewBody extends Component {
           <tr className={style['patInfoFst']}>
             <td className={style['patInfoSec']}>医嘱:</td>
             <td className={style['patInfoSec']} style={{ fontSize: '14px', padding: '1px 0px 8px 0px', lineHeight: '20px' }}>
+              {((dataJson.advice.assay && dataJson.advice.assay.length > 0) || (dataJson.advice.check && dataJson.advice.assay.check > 0)) && <p style={{ fontSize: '14px', marginBottom: '8px', marginTop: '8px' }}><span>开单项目</span></p>}
+              {
+                ((dataJson.advice.assay && dataJson.advice.assay.length > 0) || (dataJson.advice.check && dataJson.advice.assay.check > 0)) && <div style={{ padding: '0px 0px 5px 0px',wordBreak:"break-all" }}>{dataJson.advice.check?dataJson.advice.check+',':''} {dataJson.advice.assay}</div>
+              }
               {dataJson.advice.commontreatment && dataJson.advice.commontreatment.length > 0 && <p style={{ fontSize: '14px', marginBottom: '8px', marginTop: '8px' }}><span>一般治疗</span></p>}
               {
                 dataJson.advice.commontreatment && <div style={{ padding: '0px 0px 5px 0px',wordBreak:"break-all" }}>{dataJson.advice.commontreatment}</div>
               }
+              {dataJson.advice.followUp && dataJson.advice.followUp.length > 0 && <p style={{ fontSize: '14px', marginBottom: '8px', marginTop: '8px' }}><span>回访时间:<span className={style['bbtm']}>{dataJson.advice.followUp}</span> 后回访,不适随诊</span></p>}
               {dataJson.advice.scheme && dataJson.advice.scheme.length > 0 && <p style={{ fontSize: '14px', marginBottom: '8px', marginTop: '8px' }}><span>治疗方案</span></p>}
               {
                 dataJson.advice.scheme && dataJson.advice.scheme.map((item, index) => {

+ 4 - 1
src/components/PreviewBody/index.less

@@ -5,7 +5,7 @@
   height: 100%;
   top:0px;
   width: 820px;
-  padding: 15px 0px 100px 0px;
+  padding-bottom: 100px;
   box-sizing: border-box;
   .contents {
     position: relative;
@@ -46,4 +46,7 @@ table{
   tr td:first-child{
     width: 31%;
   }
+}
+.bbtm {
+  border-bottom: 1px solid #333;
 }

+ 8 - 2
src/components/PrintPreview/index.less

@@ -22,14 +22,20 @@
       bottom: 7%;
       height: 86%;
       overflow: hidden;
+      padding-top: 45px;
     }
     .close { 
-      padding:  15px 15px 15px 20px;
+      padding:  0 15px;
+      height: 45px;
+      line-height: 45px;
       border-bottom: 1px solid #EAEDF1;
+      position: absolute;
+      width: 100%;
+      top: 0;
       img{
         float:right;
         cursor: pointer;
-        margin-top: -5px;
+        margin-top: 10px;
       }
     }
     .button {

+ 7 - 2
src/components/ScaleTable/index.jsx

@@ -240,11 +240,16 @@ class ScaleTable extends React.Component{
                 return <div className={style['group']}>
                   <p className={style['groupName']}>{v.groupName}</p>
                   {v.rows&&v.rows.map((it,ind)=>{
-                    return <div>
+                    return <div className={style['rows']}>
+                        {it.required==1&&it.row.length>1?<span className={style['tip']}>本组选项可多选或根据需要选择某一条选项</span>:''}
                       {it.row.map((item,index)=>{
                         if(item.controlType==0){
                           return <div className={style['block']} style={{border:it.required==1&&!item.isSelect&&start?'1px solid #f00':'none'}}>
-                              <p className={style['miniName']}>{item.name}</p>
+                              {/*<p className={style['miniName']}>{item.name}</p>*/}
+                              <p className={style['miniName']}> 
+                                <i>{index==0?it.indexId + '.':''}</i> 
+                                {item.name}
+                              </p>
                               {item.details&&item.details.map((vv,ii)=>{
                                 return <div className={style['item']}>
                                         <Radio label={vv.detailName+'('+vv.score+')'}

+ 21 - 5
src/components/ScaleTable/index.less

@@ -32,14 +32,20 @@ strong{
     }
     .block{
       margin-top: 20px;
-      padding-top: 5px;
+      padding: 5px 0 0 30px;
     }
     .redBorder{
       border: 1px solid #f00;
     }
-    // .miniName{
-    //   margin-top: 25px;
-    // }
+    .miniName{
+      margin-left: -30px;
+      i{
+        display: inline-block;
+        width: 25px;
+        text-align: center;
+        margin-right: 5px;
+      }
+    }
   }
   .groupName{
     font-size: 14px;
@@ -47,10 +53,20 @@ strong{
     color:#000;
     margin: 25px 0;
   }
+  .rows{
+    border-bottom: 1px solid #EBEBEB;
+    position: relative;
+    .tip{
+      position: absolute;
+      top:-16px;
+      color: #c9c9c9;
+      font-size: 12px;
+    }
+  }
   .subTotal{
     height: 49px;
     line-height: 49px;
-    border-top: 1px solid #EBEBEB;
+    // border-top: 1px solid #EBEBEB;
     text-align: right;
     margin-top: 10px;
   }

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

@@ -27,8 +27,6 @@ class ScaleTableHis extends React.Component{
   }
 
   getContent(datas){
-    const {title,formulaResult,data} = this.props;
-    // const datas = valueData&&valueData.group?valueData:mocks.newData;
     let content =  datas&&datas.group&&datas.group.map((v,i)=>{
                 return <div className={style['group']}>
                   <p className={style['groupName']}>{v.groupName}</p>
@@ -36,7 +34,7 @@ class ScaleTableHis extends React.Component{
                     return <div>
                       {it.row.map((item,index)=>{
                         if(item.controlType==0){
-                          return <div className={style['block']} style={{border:it.required==1&&!item.isSelect&&start?'1px solid #f00':'none'}}>
+                          return <div className={style['block']}>
                               <p className={style['miniName']}>{item.name}</p>
                               {item.details&&item.details.map((vv,ii)=>{
                                 return <div className={style['item']}>

+ 2 - 1
src/containers/AssistCheck.js

@@ -8,13 +8,14 @@ import { getSearchList,getInstroduce } from '@store/async-actions/assistCheck';
 import {ISREAD} from '@store/types/homePage.js';
 import {billing} from '@store/async-actions/pushMessage';
 
-function mapStateToProps(state) {//console.log(state)
+function mapStateToProps(state) {
     return {
         list:state.assistCheck.list,
         assistLabel:state.assistCheck.assistLabel,
         isRead:state.homePage.isRead,
         winWidth:state.homePage.windowWidth,
         assistList:state.homePage.assistList,
+        assistVal:state.assistCheck.assistVal,
     }
 }
 

+ 1 - 0
src/containers/Inspect.js

@@ -12,6 +12,7 @@ function mapStateToProps(state) {//console.log(state)
         getExcelDataList:state.inspect.getExcelDataList,
         labelListActive:state.inspect.labelListActive,
         inspectList:state.homePage.inspectList,
+        inspectVal:state.inspect.inspectVal
     }
 }
 

+ 2 - 0
src/containers/OperationContainer.js

@@ -11,6 +11,7 @@ import {
 import {saveMessage,clearMessages} from "../store/async-actions/print";
 import {saveTemplateDetail} from '@store/async-actions/tabTemplate';
 import {saveClickNum,getInitModules} from '@store/async-actions/homePage';
+import {getOtherHisRecord} from '@store/async-actions/fetchModules';
 
 // function mapStateToProps({print}) {
 function mapStateToProps(state) {
@@ -51,6 +52,7 @@ function mapDispatchToProps(dispatch) {
         },
         clear: (flag) => {
             clearMessages();
+            dispatch(getOtherHisRecord());      //清除后重新获取其他史记录
             // 清除时如果是慢病模板则重新获取模板
             if(flag){
                 dispatch(getInitModules);

+ 3 - 2
src/store/actions/assistCheck.js

@@ -1,8 +1,9 @@
 import {GET_ASSIST_SEARCH_LIST,GET_ASSIST_LABEL,DEL_ASSIST_LABEL,CHANGE_ASSIST_VAL,CHANGE_DATE,CLEAR_ASSIST_DATA,ADD_ASSIST_LABEL} from '../types/assistCheck';
 
-export const searchList = (list) => ({         //获取搜索数据
+export const searchList = (list,val) => ({         //获取搜索数据
     type:GET_ASSIST_SEARCH_LIST,
-    list
+    list,
+    val
 })
 export const assistLable = (id,idx,sign) => ({         //添加数据
     type:GET_ASSIST_LABEL,

+ 9 - 8
src/store/actions/currentIll.js

@@ -147,8 +147,8 @@ export const setData = (state,action) =>{
   }
   
   if (useEmpty) {
-    // res.data = res.emptyData;
-    res.data = res.emptyData&&res.emptyData.length>0?JSON.parse(JSON.stringify(res.emptyData)):moduleData;
+    const data = res.emptyData?JSON.parse(JSON.stringify(res.emptyData)):[];
+    res.data = fullfillText(data).newArr;
   } else {
     if(mainData&&mainData.length>0){//主诉使用模板
       // 目前只需要将第一个主诉病程移植到现病史
@@ -351,7 +351,7 @@ export const confirm = (state,action) =>{
   let res = Object.assign({},state);
   let length1 = res.data.length;
   let arr = JSON.parse(JSON.stringify(res.data));
-  const {nones,exists,withs,ikey,exclusion,excluName,ban,noneIds} = action.data;console.log(111,action)
+  const {nones,exists,withs,ikey,exclusion,excluName,ban,noneIds} = action.data;
   let existsId = exists && exists.length>0?getIds(exists):[];
   let withsId = withs && withs.length>0?getIds(withs):[];
   res.symptomIds = res.symptomIds.concat(existsId,withsId,noneIds);//搜索去重
@@ -620,7 +620,8 @@ export const changeLabelVal = (state,action)=>{
   }else{//删除完标签内容则删除该标签
     const num = nextIsDot?2:1;
     res.data.splice(index,num);
-    res.saveText = fullfillText(res.data).saveText;
+    res.saveText.splice(index,num);
+    // res.saveText = fullfillText(res.data).saveText;
   } 
   res.update = Math.random();
   return res;
@@ -651,7 +652,8 @@ export const changeNumLabelVal = (state,action)=>{
   }else{//删除完标签内容则删除该标签
     const num = nextIsDot?2:1;
     res.data.splice(index,num);
-    res.saveText = fullfillText(res.data).saveText;
+    res.saveText.splice(index,num);
+    // res.saveText = fullfillText(res.data).saveText;
   }
   res.update = Math.random();
   return res;
@@ -746,7 +748,7 @@ export function insertLabelData(state,action){
     let resData = JSON.parse(JSON.stringify(res.data));
     resData.splice(focusIndex,1,text,...(FilteredDotMapping2));
     res.data = fullfillText(resData).newArr;
-    res.saveText[focusIndex] = searchData;
+    res.saveText = fullfillText(res.data).saveText;
   }else{
     let resData;
     const searchStr = res.searchStr;
@@ -915,7 +917,6 @@ export function removeId(state,action){
     data[index].name = text;
     data[index].value = text;
   }
-  //console.log(345,action,res);
   res.update = Math.random();
   return res;
 }
@@ -924,7 +925,7 @@ export function removeId(state,action){
 export function multipleComfirn(state,action){
   let res = Object.assign({},state);
   const {ikey,seleData,fullIkey} = action.data;
-  let data = res.data;//console.log(action,data[ikey])
+  let data = res.data;
   let index = fullIkey.substr(fullIkey.length-1,1);
   if(data[ikey].tagType==3){    //在组合项中
     let item = data[ikey].questionMapping;

+ 3 - 2
src/store/actions/inspect.js

@@ -1,8 +1,9 @@
 import {ADD_LABEL,SEARCH_LIST,SET_LABEL,FILL_ACTIVE,FILL_ACTIVE_DETAIL,GET_EXCEL,CHECK_VALUE_IS_CHANGE,CLEAR_LABEL,RESET_LABEL,CLEAR_ALL_LABEL,DEL_PART_ITEM,DEL_EXCEL_LIST} from '../types/inspect';
 
-export const searchList = (list) => ({         //初始化数据
+export const searchList = (list,val) => ({         //初始化数据
     type:SEARCH_LIST,
-    list
+    list,
+    val
 })
 
 export const setLabel = (idx,sign) => ({          //搜索后点击选中的结果

+ 2 - 2
src/store/async-actions/assistCheck.js

@@ -7,7 +7,7 @@ import { SET_TIPS } from '../types/pushMessage';
 export const getSearchList = (val) => {
     if(val.trim() == ''){
         const data = [];
-        return (dispatch) => dispatch(searchList(data));
+        return (dispatch) => dispatch(searchList(data,''));
     }
     let baseList = store.getState();
     let sex = baseList.patInfo.message.patientSex;
@@ -20,7 +20,7 @@ export const getSearchList = (val) => {
         })
         .then((res)=>{
             const data = res.data.data;
-            dispatch(searchList(data));
+            dispatch(searchList(data,val.trim()));
         })
     }
 };

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

@@ -259,7 +259,7 @@ export function getIndexData(range){
     const param = {
       diseaseId:21773,
       startTime:range[0],
-      endTime:range[1],
+      endTime:range[1]+" 23:23:59",
       patientId:patInfo.message.patientId,
     };
     return json(api.getIndexData,param);

+ 2 - 2
src/store/async-actions/inspect.js

@@ -7,7 +7,7 @@ import { SET_TIPS } from '../types/pushMessage';
 export const getSearchList = (val) => {
     if(val.trim() == ''){
         const data = [];
-        return (dispatch) => dispatch(searchList(data));
+        return (dispatch) => dispatch(searchList(data,''));
     }
     let baseList = store.getState();
     let sex = baseList.patInfo.message.patientSex;
@@ -20,7 +20,7 @@ export const getSearchList = (val) => {
         })
         .then((res)=>{
             const data = res.data.data;
-            dispatch(searchList(data));
+            dispatch(searchList(data,val.trim()));
         })
     }
 };

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

@@ -12,6 +12,7 @@ const initSearchList = {
     list: [], //点击的结果
     assistLabel: [], //搜索的结果
     dataString:'',      //结果拼接
+    assistVal:''
 }
 function getCurrentDate() {
     let myDate = new Date();
@@ -44,6 +45,7 @@ export default (state = initSearchList, action) => {
     if (action.type == GET_ASSIST_SEARCH_LIST) {    //右侧推送添加到左侧
         const newState = Object.assign({}, state);
         newState.list = action.list
+        newState.assistVal = action.val
         return newState;
     }
     if (action.type == GET_ASSIST_LABEL) {             //默认

+ 4 - 1
src/store/reducers/inspect.js

@@ -26,12 +26,14 @@ const initSearchList = {
     getExcelDataList: [], //导入的数据
     pushItem:[],    //推送的数据
     pushItems:[],    //右侧模板预览的数据
+    inspectVal:''
 }
 
 export default (state = initSearchList, action) => {
     if (action.type == SEARCH_LIST) {
         const newState = Object.assign({}, state);
         newState.list = action.list
+        newState.inspectVal = action.val
         return newState;
     }
     if (action.type == SET_LABEL) {             //选中的结果    
@@ -353,4 +355,5 @@ function getPushLists(data1,data2){     //推送数据
     })
     totalTmpArr = tmpArr1.concat(tmpArr2);
     return totalTmpArr;
-}
+}
+

+ 1 - 1
src/utils/tools.js

@@ -880,7 +880,7 @@ function inspectAndAssist(){
     if (tmpInspect[i].controlType == 0) {
       tmpDetail = tmpInspect[i].questionMapping
     }else if(tmpInspect[i].controlType == 1 || tmpInspect[i].controlType == 6){
-      tmpDetail.push(tmpInspect[i])
+      tmpDetail = new Array(tmpInspect[i])
     }
     tmpObj.questionId = tmpInspect[i].id
     tmpObj.name = tmpInspect[i].name