瀏覽代碼

化验大项的小项超出4条折叠

Luolei 6 年之前
父節點
當前提交
52cc12f179

二進制
src/common/images/slide-down.png


二進制
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: #ccc;
+  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)
                             }
                         }

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

@@ -26,8 +26,8 @@ export const updatePatientMessage=(state,action)=>{
       // sex: 2
     // };
     res.message = action.data;
-    // if(!action.data.selfDeptId){
-    //     res.message = mock;
-    // }
+    if(!action.data.selfDeptId){    //selfDeptId这个参数是跟外部对接用的
+        res.message = mock;
+    }
     return res;
 };

+ 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]