소스 검색

辅检bug

Luolei 6 년 전
부모
커밋
ecbadb8315

+ 2 - 2
src/common/components/DelToast/index.jsx

@@ -24,9 +24,9 @@ class DelToast extends React.PureComponent{
     cancel&&cancel();
   }
   render(){
-    const {show,name} = this.props;
+    const {show,name,top,right} = this.props;
     if(show){
-      return <div className={style['del-box']} id="delBox">
+      return <div className={style['del-box']} id="delBox" style={{right:right,top:top}}>
         <div className={style['del-con']}>
           <div className={style['del-tri']}></div>
           <div className={style['del-title']} id="delTit" title={'删除 '+name+' ?'}>删除 {name} ?</div>

+ 51 - 63
src/components/AddAssistCheck/index.jsx

@@ -20,7 +20,6 @@ class AddAssistCheck extends React.Component {
       activeName:''
     }
     this.handleShowDate = this.handleShowDate.bind(this)
-    this.getCurrentDate = this.getCurrentDate.bind(this)
     this.getSearchList = this.getSearchList.bind(this)
     this.getAssistLabel = this.getAssistLabel.bind(this)
     this.handleDelClick = this.handleDelClick.bind(this)
@@ -28,6 +27,32 @@ class AddAssistCheck extends React.Component {
     this.handleCancel = this.handleCancel.bind(this)
     this.timeSure = this.timeSure.bind(this)
   }
+  componentDidMount() {
+    $(document).click((event) => {
+      let _con = $('#searchWrapAssist');   // 设置目标区域
+      let _cons = $('#datePick');   // 设置目标区域
+      let _del = document.getElementById("delBox");   // 删除弹窗
+      let _close = document.getElementById("assiClose");   // 删除icon
+      let _closeTil = $('#delTit')[0];   // 弹窗标题
+      if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
+        this.setState({ show: false });
+      }
+      if (!_cons.is(event.target) && _cons.has(event.target).length === 0) { // Mark 1
+        this.setState({ date: false });
+      }
+      
+      if(_del){
+        if($(event.target).attr('id') != 'assiClose' &&!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
+          this.setState({
+            visible: false,
+            id: null,
+            activeName:''
+          })
+        }
+      }
+    });
+    getCurrentDate(1);
+  }
 
   handleDelClick(id,item) {
     this.setState({
@@ -37,10 +62,10 @@ class AddAssistCheck extends React.Component {
     })
   }
 
-  delConfirm() {
+  delConfirm(type) {
     const { handleDelAssist, handlePush } = this.props;
-    const { id } = this.state;
-    handleDelAssist && handleDelAssist(id);
+    const { id,activeName } = this.state;
+    handleDelAssist && handleDelAssist(id,activeName,type);
     handlePush && handlePush();           //右侧推送
     this.setState({
       visible: false,
@@ -58,31 +83,6 @@ class AddAssistCheck extends React.Component {
     })
   }
 
-  componentDidMount() {
-    $(document).click((event) => {
-      let _con = $('#searchWrapAssist');   // 设置目标区域
-      let _cons = $('#datePick');   // 设置目标区域
-      let _del = $('#delBox')[0];   // 删除弹窗
-      let _close = $('#assiClose')[0];   // 删除icon
-      let _closeTil = $('#delTit')[0];   // 弹窗标题
-      if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
-        this.setState({ show: false });
-      }
-      if (!_cons.is(event.target) && _cons.has(event.target).length === 0) { // Mark 1
-        this.setState({ date: false });
-      }
-      if(_del){
-        if(!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
-          this.setState({
-            visible: false,
-            id: null,
-            activeName:''
-          })
-        }
-      }
-    });
-    getCurrentDate(1);
-  }
   handleSearchShow(e) {
     let tmpShow = this.state.show;
     this.setState({ show: !tmpShow,pageTop:getPageCoordinate(e).boxTop })
@@ -94,14 +94,6 @@ class AddAssistCheck extends React.Component {
       active: idx
     })
   }
-  getCurrentDate() {
-    let myDate = new Date();
-    let year = myDate.getFullYear();       //获取完整的年份(4位,1970-????)
-    let mon = myDate.getMonth() - 0 + 1;       //获取当前月份(0-11,0代表1月)
-    let day = myDate.getDate();            //获取当前日(1-31)
-    let date = year + '-' + (mon < 10 ? '0' + mon : mon) + '-' + (day < 10 ? '0' + day : day);
-    this.setState({ dateTime: date })
-  }
 
   getSearchList(list) {      //搜索列表
     const { handleSign } = this.props;
@@ -112,7 +104,7 @@ class AddAssistCheck extends React.Component {
             className={styles.searchLi}
             title={(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
             onClick={() => {
-              handleSign(item.questionId, idx,'search');
+              handleSign(item.conceptId,idx,'search');
               this.setState({ show: false })
             }}
           >
@@ -131,7 +123,7 @@ class AddAssistCheck extends React.Component {
             className={styles.searchLi}
             title={item.name}
             onClick={() => {
-              handleSign(item.questionId, idx,'common');
+              handleSign(item.conceptId, idx,'common');
               this.setState({ show: false })
             }}
           >
@@ -149,12 +141,11 @@ class AddAssistCheck extends React.Component {
 
   getAssistLabel() {
     const { assistLabel,checkedListImport, handleChangeAssistValue, handleChangeDate, isRead, handlePush, winWidth,getInfomation,assistList } = this.props;
-    console.log(checkedListImport)
     const { visible,activeName,id,date } = this.state;
     return <React.Fragment>
       {
         checkedListImport.map((part,index)=>{
-          return <ul className={`${styles.labelWrap} ${styles.labelWrapSpec}`}>
+          return <ul className={`${styles.labelWrap} ${styles.labelWrapSpec} ${styles.labelWrapSpecs}`}>
             {
               part.map((item, idx) => {
                 return (<li className={`${styles.assistLists} ${styles.clearfix}`}>
@@ -169,15 +160,17 @@ class AddAssistCheck extends React.Component {
                   </div>
                   <div className={styles.pointerFinger}>
                     <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
-                    {/* <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span> */}
                   </div>
-                <DelToast show={idx==id?visible:false}
-                          name={activeName} 
-                          cancel={this.handleCancel}
-                          confirm={this.delConfirm}/>
                 </li>)
               })
             }
+            <DelToast show={index==id&&part.name==activeName?visible:false}
+                      name="该导入项"
+                      right={'-34px'}
+                      top={'22px'}
+                      cancel={this.handleCancel}
+                      confirm={()=>this.delConfirm(0)}/>
+            <span className={`${styles.closeIcon} ${styles.closeIcons}`} id="assiClose" onClick={()=>{ this.handleDelClick(index,part)}}></span>
           </ul>
         })
       }
@@ -217,10 +210,18 @@ class AddAssistCheck extends React.Component {
                   this.state.date && idx == this.state.active ?<Calendar timeLis={staticTime} isShow={true} timeSure={(date)=>this.timeSure(date,idx)} needTime={true} sure={true} handleChange={(info) => { this.handleChangeDate(info, idx) }} top={30}></Calendar>:null
                 }
               </div>
-            <DelToast show={idx==id?visible:false}
-                      name={activeName} 
-                      cancel={this.handleCancel}
-                      confirm={this.delConfirm}/>
+              <DelToast show={idx==id&&item.name==activeName?visible:false}
+                  name={activeName}
+                  right={'-34px'}
+                  top={'40px'}
+                  cancel={this.handleCancel}
+                  confirm={()=>this.delConfirm(1)}/>
+              {/* {
+                id == null?null:<DelToast show={idx==id&&item.name==activeName?visible:false}
+                  name={activeName}
+                  cancel={this.handleCancel}
+                  confirm={this.delConfirm}/>
+              } */}
             </li>)
           })
         }
@@ -247,19 +248,6 @@ class AddAssistCheck extends React.Component {
             }
           </SearchOption> : ''}
         </div>
-        {/*<ConfirmModal
-          visible={visible}
-          confirm={this.delConfirm}
-          close={this.handleCancel}
-          cancel={this.handleCancel}
-          okText="删除"
-          cancelText='取消'
-          okBorderColor={'#3B9ED0'}
-          okColor={'#fff'}
-          oKBg={'#3B9ED0'}
-        >
-          <p className={styles['center']}>是否删除该辅检项?</p>
-        </ConfirmModal>*/}
       </div>
     )
   }

+ 32 - 11
src/components/AddAssistCheck/index.less

@@ -80,17 +80,6 @@
                   top: 2px;
                 }
             } */
-      .closeIcon {
-        display: inline-block;
-        width: 15px;
-        height: 15px;
-        cursor: pointer;
-        position: absolute;
-        right: 2px;
-        top: 2px;
-        background: @closeIcon;
-        background-size: 100% 100%;
-      }
 
       p {
         display: inline-block;
@@ -130,7 +119,39 @@
     }
   }
 }
+.assistLists:hover {
+  background: #F2F2F2;
 
+  .closeIcon {
+    background: @closeHor;
+    background-color: #fff;
+    background-size: 100% 100%;
+  }
+}
+.labelWrapSpecs{position: relative;}
+.labelWrapSpecs:hover {
+  .closeIcons {
+    background: @closeHor;
+    background-color: #fff;
+    background-size: 100% 100%;
+  }
+}
+.closeIcon {
+  display: inline-block;
+  width: 15px;
+  height: 15px;
+  cursor: pointer;
+  position: absolute;
+  right: -7px;
+  top: 2px;
+  background: @closeIcon;
+  background-color: #fff;
+  background-size: 100% 100%;
+}
+.closeIcons {
+  right: -8px;
+  top: -8px;
+}
 .center {
   text-align: center;
   font-size: 16px;

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

@@ -221,6 +221,8 @@ class SlideSelect extends Component {
         <span id="addClose" className={styles.partDel} onClick={this.handleDel}></span>
         <DelToast show={showToast&&activeInd?true:false}
                     name={activeName} 
+                    right={'-34px'}
+                    top={'30px'}
                     cancel={this.handleCancel}
                     confirm={this.delConfirm}/>
     </li>

+ 2 - 0
src/components/AddInspect/index.jsx

@@ -331,6 +331,8 @@ class Inspect extends React.Component {
                     {/*<img className={styles.close} src={close} alt="关闭导入excel数据" onClick={() => { this.handleDelClick(2, id) }} />*/}
                     <span className={styles.close} id="impClose" onClick={() => { this.handleDelClick(2, ind) }}></span>
                     <DelToast show={impId == ind ? true : false}
+                      top={'22px'}
+                      right={'-34px'}
                       name="该导入项"
                       cancel={this.handleCancel}
                       confirm={this.delConfirm} />

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

@@ -198,7 +198,7 @@ class AssistCheck extends React.Component {
                           </div> : null
                       }
                     {
-                      hide ? <WrapModalContainer title={'导入辅检数据'} width={1000} height={650} onClose={onClose}>
+                      hide ? <WrapModalContainer hide={hide} title={'导入辅检数据'} width={1000} height={650} onClose={onClose}>
                         <WrapModalBodyPac
                           hospitalSonInspect={hospitalSonInspect}
                           hospitalPac={hospitalPac}

+ 8 - 4
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -12,10 +12,15 @@ import { dragBox } from '@utils/drag';
 class HistoryCaseContainer extends React.Component {
     constructor(props){
         super(props);
+        this.handleCaseClick=this.handleCaseClick.bind(this)
     }
     componentDidMount(){
       dragBox('hisWrapMove','closeHis','add')
     }
+    handleCaseClick(e,idx){ 
+      const {handleCaseClick} = this.props
+      handleCaseClick&&handleCaseClick(e,idx)
+    }
     render(){
         const { items,handleCaseClick,handleQuoteClick,handleSortClick,showHistoryBox,activeHistory,preInfo } = this.props;
         let baseList = store.getState();
@@ -40,9 +45,8 @@ class HistoryCaseContainer extends React.Component {
         }
         return (
             <div className={styles.mainHistory} id="hisWrapMove">
-                <div className={`${styles.closeHis} drag-title`} id="closeHis">
-                    <img className={styles.close} src={close} alt="关闭历史病历" onClick={showHistoryBox}/>
-                </div>
+                <div className={`${styles.closeHis} drag-title`} id="closeHis"></div>
+                <img className={styles.close} src={close} alt="关闭历史病历" onClick={showHistoryBox}/>
                 <div className={styles.mainHistoryLeft}>
                     <div className={styles.title}>
                         <span className={styles.his}>历史病历</span>
@@ -52,7 +56,7 @@ class HistoryCaseContainer extends React.Component {
                         <ul>
                             {
                                 (items && items.length > 0)? items.map((val,idx)=>{
-                                    return <li key={val.id} className={val.id == activeHistory.id?styles.bgc:''} onClick={(e)=>{handleCaseClick(e,idx)}}>
+                                    return <li key={val.id} className={val.id == activeHistory.id?styles.bgc:''} onClick={(e)=>{this.handleCaseClick(e,idx)}}>
                                         <span title={val.diagnose}>{val.diagnose}</span>
                                         {/* <span className={val.id == activeHistory.id?`${styles.time} ${styles.quoteHide}`:styles.time}>{val.inquiryDate}</span>
                                         <button 

+ 2 - 1
src/components/HistoryCaseContainer/HistoryList/index.less

@@ -15,6 +15,7 @@
         top: 0;
         right: 0;
         cursor: pointer;
+        z-index: 9999;
     }
     .mainHistoryLeft {
         width: 300px;
@@ -112,7 +113,7 @@
       height: 40px;
       margin-left: 300px;
       position: absolute;
-      z-index: 9999;
+      z-index: 9998;
       // border-bottom: 1px solid #EAEDF1;
     }
 }

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

@@ -15,6 +15,7 @@ class HistoryCaseContainer extends React.Component {
     constructor(props){
         super(props);
         this.close = this.close.bind(this);
+        this.showHistoryBox = this.showHistoryBox.bind(this);
     }
     makeSure(){
         let baseList = store.getState();
@@ -31,17 +32,21 @@ class HistoryCaseContainer extends React.Component {
     close(){
       store.dispatch(visibleHistory(false));
     }
+    showHistoryBox(){   
+      const {showHistoryBox} = this.props
+      showHistoryBox&&showHistoryBox()
+    }
     render(){
         const { visible,showHistoryCases,showHistoryBox,items,handleCaseClick,handleQuoteClick,handleSortClick,activeHistory,preInfo } = this.props;
         const domNode = document.getElementById('root');
         return ReactDom.createPortal(
               showHistoryCases?<div className={styles.historyCaseWrap}>
-                <div className={styles.maskHistory} onClick={showHistoryBox}></div>
+                <div className={styles.maskHistory} onClick={this.showHistoryBox}></div>
                 <HistoryList 
                     items={items}
                     showHistoryCases={showHistoryCases}
                     activeHistory={activeHistory}
-                    showHistoryBox={showHistoryBox}
+                    showHistoryBox={this.showHistoryBox}
                     handleCaseClick={handleCaseClick}
                     handleQuoteClick={handleQuoteClick}
                     handleSortClick={handleSortClick}

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

@@ -174,6 +174,7 @@ class Operation extends Component {
           jsonStr.other == JSON.stringify(eval('('+JSON.parse(dataStr).other+')')) && 
           jsonStr.vital == JSON.stringify(eval('('+JSON.parse(dataStr).vital+')'))  &&
           JSON.stringify(jsonData.chief) == JSON.stringify(JSON.parse(dataJson).chief) &&    
+          JSON.stringify(jsonData.checkedListImport) == JSON.stringify(JSON.parse(dataJson).checkedListImport) &&    
           JSON.stringify(jsonData.present) == JSON.stringify(JSON.parse(dataJson).present)  &&     
           JSON.stringify(jsonData.other) == JSON.stringify(JSON.parse(dataJson).other) &&
           JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 

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

@@ -63,6 +63,7 @@ class TimeInterval extends React.Component {
         startTime: getCalendarDate(date, true),//页面显示的时间
         timeLisStart: date//事件组件的日期
       })
+      
       getStartTime(getCalendarDate(date, true))
     } else if (this.state.flg == 2) {
       this.setState({

+ 1 - 0
src/components/WrapModalBody/WrapModalTable/index.jsx

@@ -5,6 +5,7 @@ class WrapModalTable extends React.Component {
   constructor(props) {
     super(props)
   }
+  
   shouldComponentUpdate(nextProps,nextState){
     if(JSON.stringify(nextProps.hospitalInspect) == JSON.stringify(this.props.hospitalInspect)){
       return false

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

@@ -9,6 +9,7 @@ class WrapModalBody extends React.Component {
   constructor(props) {
     super(props)
   }
+
   render() {
     const { handleSearch, hospitalInspect,height,selectOneCheck,showInIcss, handleGetSonList,selectWaring,message, hospitalSonInspect,allCheckImport,allCheck,checkedList,selectGroupList } = this.props;
     return <div className={style['container']}>

+ 2 - 2
src/containers/AssistCheck.js

@@ -57,8 +57,8 @@ function mapDispatchToProps(dispatch, store) {
         handleSign(id,idx,type){
             dispatch(assistLable(id,idx,type))
         },
-        handleDelAssist(idx){
-            dispatch(delAssistLabel(idx))
+        handleDelAssist(idx,name,type){
+            dispatch(delAssistLabel(idx,name,type))
             dispatch({
               type:ISREAD
             })

+ 7 - 4
src/store/actions/assistCheck.js

@@ -36,9 +36,11 @@ export const addAssistLabel = (lis) => ({         //右侧推送交到左侧
     type:ADD_ASSIST_LABEL,
     lis
 })
-export const delAssistLabel = (idx) => ({         //删除数据
+export const delAssistLabel = (idx,name,flg) => ({         //删除数据
     type:DEL_ASSIST_LABEL,
-    idx
+    idx,
+    name,
+    flg
 })
 export const changeAssistVal = (val,idx) => ({         //更改数据
     type:CHANGE_ASSIST_VAL,
@@ -50,8 +52,9 @@ export const changeDate = (date,idx) => ({         //更改时间
     date,
     idx
 })
-export const clearAssistData = (data,saveText) => ({         //清空
+export const clearAssistData = (data,saveText,checkedListImport) => ({         //清空回读
     type:CLEAR_ASSIST_DATA,
     data,
-    saveText
+    saveText,
+    checkedListImport
 })

+ 2 - 2
src/store/actions/pushMessage.js

@@ -94,7 +94,7 @@ export const addScheme = (state, action) => {
     for (let j = 0; j < treatment[i].medicitionsList.length; j++) {
       if(treatment[i].medicitionsList[j].selected) {
 				treatmentStr = treatmentStr + treatment[i].medicitionsList[j].medicitionName + ', '
-				drugList.push({questionId: treatment[i].medicitionsList[j].id, tagName: treatment[i].medicitionsList[j].medicitionName })
+				drugList.push({conceptId: treatment[i].medicitionsList[j].conceptId, conceptName: treatment[i].medicitionsList[j].medicitionName })
 			}
 	}
 	treatment[i].treatmentStr = treatmentStr.substring(0,treatmentStr.length-2)
@@ -125,7 +125,7 @@ export const addScheme = (state, action) => {
 						} else {
 							scheme[RepeatIndex].treatment[i].treatmentStr = scheme[RepeatIndex].treatment[i].treatmentStr + '' + treatment[j].medicitionsList[z].medicitionName
 						}
-						scheme[RepeatIndex].treatment[i].drugList.push({questionId: treatment[j].medicitionsList[z].id, tagName: treatment[j].medicitionsList[z].medicitionName })
+						scheme[RepeatIndex].treatment[i].drugList.push({conceptId: treatment[j].medicitionsList[z].conceptId, conceptName: treatment[j].medicitionsList[z].medicitionName })
 
 					}
 				}

+ 39 - 48
src/store/reducers/assistCheck.js

@@ -25,6 +25,7 @@ const initSearchList = {
   allCheck: false, //全选反选
   checkedList: [], //选中的小项
   checkedListImport: [], //辅检导入
+  allCheckLis:[],//所有导入数据
   msgObj:{
     name:'',
     patientNum:''
@@ -38,7 +39,7 @@ export default (state = initSearchList, action) => {
     const newState = Object.assign({}, state);
     let tmpGroup = JSON.parse(JSON.stringify(newState.selectGroupList))
     let tmpListImport = JSON.parse(JSON.stringify(newState.checkedListImport))
-    let tempArrs = newState.assistLabel,tmpString ='',importLis=[];
+    let tempArrs = JSON.parse(JSON.stringify(newState.assistLabel)),importLis=[];
     for (let i = 0; i < tmpGroup.length; i++) {
       for (let k = 0; k < tmpGroup[i].pacsResultDTO.length; k++) {
         let tmpObj = {}
@@ -53,12 +54,8 @@ export default (state = initSearchList, action) => {
     }
     tmpListImport.push(importLis)
     newState.checkedListImport = [...tmpListImport]
-    for (let j = 0; j < tempArrs.length; j++) {
-      let tmpVal = tempArrs[j].value ? tempArrs[j].value.trim() : tempArrs[j].value;
-      tmpString += (tempArrs[j].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArrs[j].time ? '报告日期:' + tempArrs[j].time : '') + ';')
-    }
-    newState.assistLabel = [...tempArrs]
-    newState.dataString = tmpString
+    newState.allCheckLis = [...tempArrs]
+    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
 
     newState.hospitalPac = [] //医院检索到的
     newState.hospitalPacObj = {} //组对应的明细(单选多选全选)
@@ -191,39 +188,33 @@ export default (state = initSearchList, action) => {
     newState.hospitalPacObj = {}
     return newState;
   }
-
-
   if (action.type == ADD_ASSIST_LABEL) {
     const newState = Object.assign({}, state);
-    let tempArr = newState.assistLabel,
-      tmpString = '';
+    let tempArr = newState.assistLabel;
     for (let i = 0; i < action.lis.length; i++) {
       tempArr.push(action.lis[i]);
     }
-
     for (let i = 0; i < tempArr.length; i++) {
       if (i == action.idx) {
         tempArr[i].time = action.date
         newState.assistLabel = [...tempArr]
       }
-      let tmpVal = tempArr[i].value ? tempArr[i].value.trim() : tempArr[i].value;
-      tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + ';')
     }
     newState.assistLabel = [...tempArr]
-    newState.dataString = tmpString
+    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
     return newState;
   }
   if (action.type == GET_ASSIST_SEARCH_LIST) { //右侧推送添加到左侧
     const newState = Object.assign({}, state);
     newState.list = action.list
     newState.assistVal = action.val
+    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
     return newState;
   }
   if (action.type == GET_ASSIST_LABEL) { //默认
     const newState = Object.assign({}, state);
     const tempArrs = newState.assistLabel;
     let tempArr = [];
-    let tmpString = '';
     let tmpCommonLis = store.getState().homePage.assistList;
     if (action.sign == 'common') {
       let tmpAssistList = JSON.parse(JSON.stringify(tmpCommonLis))
@@ -232,78 +223,78 @@ export default (state = initSearchList, action) => {
       tempArr = newState.list
     }
     for (let i = 0; i < tempArr.length; i++) {
-      if (tempArr[i].questionId == action.id && i == action.idx) {
+      if (tempArr[i].conceptId == action.id && i == action.idx) {
         tempArr[i].time = getCurrentDate(1);
         tempArrs.push(tempArr[i]);
         newState.assistLabel = [...tempArrs];
       }
     }
-    for (let j = 0; j < tempArrs.length; j++) {
-      let tmpVal = tempArrs[j].value ? tempArrs[j].value.trim() : tempArrs[j].value;
-      tmpString += (tempArrs[j].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArrs[j].time ? '报告日期:' + tempArrs[j].time : '') + ';')
-    }
-    newState.dataString = tmpString
+    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
     return newState;
   }
   if (action.type == DEL_ASSIST_LABEL) { //删除
     const newState = Object.assign({}, state);
-    let tempArr = newState.assistLabel,
-      tempArrs = [];
-    let tmpString = '';
-    // tempArr.splice(action.idx, 1)
-    // let tempArrs = tempArr.slice()
-    for (let k = 0; k < tempArr.length; k++) {
-      if (k != action.idx) {
-        tempArrs.push(tempArr[k])
+    let tempArr = newState.assistLabel,tempArrs = [];
+    let tmpImportLis = newState.checkedListImport;
+    if(action.flg == 0){//删除辅检导入
+      tmpImportLis.splice(action.idx,1)
+    }else{
+      for (let k = 0; k < tempArr.length; k++) {
+        if (k != action.idx) {
+          tempArrs.push(tempArr[k])
+        }
       }
+      newState.assistLabel = [...tempArrs]
     }
-    if (tempArrs == []) {
-      tmpString == ''
-      return
-    }
-    for (let i = 0; i < tempArrs.length; i++) {
-      let tmpVal = tempArrs[i].value ? tempArrs[i].value.trim() : tempArrs[i].value;
-      tmpString += (tempArrs[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArrs[i].time ? '报告日期:' + tempArrs[i].time : '') + ';')
-    }
-    newState.assistLabel = [...tempArrs]
-    newState.dataString = tmpString
+    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
     return newState;
   }
   if (action.type == CHANGE_ASSIST_VAL) { //改变输入值
     const newState = Object.assign({}, state);
     const tempArr = newState.assistLabel;
-    let tmpString = '';
     for (let i = 0; i < tempArr.length; i++) {
       if (i == action.idx) {
         tempArr[i].value = action.val
         newState.assistLabel = [...tempArr]
       }
-      let tmpVal = tempArr[i].value ? tempArr[i].value.trim() : tempArr[i].value;
-      tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + ';')
     }
-    newState.dataString = tmpString
+    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
     return newState;
   }
   if (action.type == CHANGE_DATE) { //新增
     const newState = Object.assign({}, state);
     const tempArr = newState.assistLabel;
-    let tmpString = '';
     for (let i = 0; i < tempArr.length; i++) {
       if (i == action.idx) {
         tempArr[i].time = action.date
         newState.assistLabel = [...tempArr]
       }
-      let tmpVal = tempArr[i].value ? tempArr[i].value.trim() : tempArr[i].value;
-      tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + ';')
     }
-    newState.dataString = tmpString
+    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
     return newState;
   }
   if (action.type == CLEAR_ASSIST_DATA) {
     const newState = Object.assign({}, state);
     newState.assistLabel = [...action.data];
     newState.dataString = action.saveText;
+    newState.checkedListImport = action.checkedListImport;
     return newState;
   }
   return state;
+}
+
+
+function getAllString(checkedListImport,assistLabel){
+  let tmpImportLis = [],tmpString='';
+  for(let i = 0;i < checkedListImport.length;i++){
+    for(let j = 0;j < checkedListImport[i].length;j++){
+      tmpImportLis.push(checkedListImport[i][j])
+    }
+  }
+  let tempArr = tmpImportLis.concat(assistLabel)
+  for (let i = 0; i < tempArr.length; i++) {
+    let tmpVal = tempArr[i].value ? tempArr[i].value.trim() : tempArr[i].value;
+    tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ': ') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + ';')
+  }
+  return tmpString;
 }

+ 8 - 5
src/utils/tools.js

@@ -236,7 +236,7 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
         store.dispatch({type: CLEAR_CURRENT_ILL,data:[],saveText:[],selecteds:[],editClear:true,symptomIds:[]});
         store.dispatch({type: CLEAROTHERHISTORY,data:[block],isEmpty:true,saveText:[],selecteds:[],editClear:true,yjs_1:'',yjs_2:'',yjs_3:'',yjs_4:''});
         store.dispatch({type: CLEARCHECKBODY,data:[block],isEmpty:true,saveText:[],selecteds:[]});
-        store.dispatch(clearAssistData([],''));
+        store.dispatch(clearAssistData([],'',[]));
         store.dispatch(clearAllLabel([],[],''));
         store.dispatch({
             type: SET_TIPS,
@@ -316,7 +316,7 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                     dataJsonStr.lis.split('-')[0],
                     dataJsonStr.lis.split('-')[1]
                 ));
-                store.dispatch(clearAssistData(dataJson.pacs,dataJsonStr.pacs));
+                store.dispatch(clearAssistData(dataJson.pacs,dataJsonStr.pacs,dataJson.checkedListImport||[]));
                 store.dispatch({
                     type: CLEAR_ALL_DIAG,
                     data:dataJson.diag,
@@ -385,7 +385,8 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                 ));
                 store.dispatch(clearAssistData(
                     dataJson.pacs,
-                    dataJsonStr[5].content ? dataJsonStr[5].content:''
+                    dataJsonStr[5].content ? dataJsonStr[5].content:'',
+                    dataJson.checkedListImport||[]
                 ));
                 store.dispatch({
                     type: CLEAR_ALL_DIAG,
@@ -440,7 +441,7 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                     dataJsonStr.lis.split('-')[0],
                     dataJsonStr.lis.split('-')[1]
                 ));
-                store.dispatch(clearAssistData(dataJson.pacs,dataJsonStr.pacs));
+                store.dispatch(clearAssistData(dataJson.pacs,dataJsonStr.pacs,dataJson.checkedListImport||[]));
                 store.dispatch({
                     type: CLEAR_ALL_DIAG,
                     data:dataJson.diag,
@@ -498,7 +499,8 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                 ));
                 store.dispatch(clearAssistData(
                     dataJson.pacs,
-                    dataJsonStr[5].content ? dataJsonStr[5].content:''
+                    dataJsonStr[5].content ? dataJsonStr[5].content:'',
+                    dataJson.checkedListImport||[]
                 ));
                 store.dispatch({
                     type: CLEAR_ALL_DIAG,
@@ -684,6 +686,7 @@ function isAllClear(jsonData,jsonStr,baseList){
     //jsonData.vital.length < 1 &&
     (jsonData.vital.length > 0 ? baseList.checkBody.isEmpty : true) &&
     jsonData.diag.length < 1 &&
+    jsonData.checkedListImport.length < 1 &&
     jsonData.pacs.length < 1 &&
     jsonData.lis.labelList.length < 1 &&
     jsonData.lis.getExcelDataList.length < 1 &&