Browse Source

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

luolei 5 years ago
parent
commit
c4a111aac8

+ 2 - 0
src/common/components/EditableSpan/index.jsx

@@ -49,6 +49,7 @@ class EditableSpan extends Component{
       setTimeout(function(){
         txt = that.$span.current.innerText||that.$span.current.innerHTML;
         that.$span.current.innerHTML = txt;
+        that.moveEnd($(that.$span.current)[0]);     //光标落到最后去
       });
     })
     
@@ -81,6 +82,7 @@ class EditableSpan extends Component{
       if(mainText.length >= config.limited){
         if(text1.length > labelVal.length){
           e.target.innerHTML = labelVal;    //innerHTML兼容FF26
+          e.target.blur();
           Notify.info(config.limitText);
           return
         }else if(text1.length == labelVal.length){

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

@@ -156,7 +156,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
+                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12,showName:item.name+'('+val.name+')'})}></span>                                        
                                       </span>
                                     </td>
                                     {showDetails(val)}
@@ -174,7 +174,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
+                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12,showName:item.name+'('+val.name+')'})}></span>
                                       </span>
                                     </td>
                                     {showDetails(val)}

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

@@ -44,7 +44,7 @@ class CheckBody extends Component{
     return false;
   }
   getLabels(){
-    const {data,showArr,saveText,selecteds,importLabel,setHighter} = this.props;
+    const {data,showArr,saveText,importLabel,setHighter} = this.props;
     let arr = [],list=[];
     const {boxMark,showAll} = this.state;
     const moreNum =data.length-[...data].reverse().findIndex((it)=>it.showInCheck)-1;//被隐藏的位置
@@ -62,7 +62,7 @@ class CheckBody extends Component{
       arr = list.map((it,i)=>{
         const preIsExt = list[i-1]&&list[i-1].specFlag===4?true:false;//前一个标签是否为体征标签
         const afterIsExt = list[i+1]&&list[i+1].specFlag===4?true:false;//后一个标签是否为体征标签
-        return chooseType({item:it,preIsExt,afterIsExt,boxMark,i,showArr,saveText,selecteds,importLabel,setHighter});
+        return chooseType({item:it,preIsExt,afterIsExt,boxMark,i,showArr,saveText,importLabel,setHighter});
       });
     }
     showMoreBtn&&arr.push(more);      //是否显示收起展开按钮

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

@@ -89,14 +89,14 @@ class CurrentIll extends Component{
   }
 
   getInlineTag(){
-    const {data,showArr,selecteds,saveText,insertProcess,symptomIds,allModules} = this.props;
+    const {data,showArr,saveText,insertProcess,symptomIds,allModules} = this.props;
     const boxMark = '2';
 
     let list = data&&data.map((item,i)=>{
       if(item.flag && item.flag==3){
         return <TailInlineTag {...item} showText={item.relationModuleName} handleTailClick={(obj)=>{insertProcess(obj,allModules)}}></TailInlineTag>
       }else {
-        return chooseType({item,boxMark,i,hideTag:false,showArr,selecteds,saveText,mainIds:symptomIds});
+        return chooseType({item,boxMark,i,hideTag:false,showArr,saveText,mainIds:symptomIds});
       }
     })
     return list;

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

@@ -30,13 +30,13 @@ class MainSuit extends Component{
   }
 
   getInlineTag(){
-    const {datas,showArr,handleTailClick,selecteds,saveText,mainIds,allModules} = this.props;
+    const {datas,showArr,handleTailClick,saveText,mainIds,allModules} = this.props;
     const boxMark = '1';
     let list = datas&&datas.map((item,i)=>{
       if(item.flag && item.flag==3){
         return <TailInlineTag {...item} showText={item.relationModuleName} handleTailClick={(obj)=>{handleTailClick(obj,saveText,allModules)}}></TailInlineTag>
       }else {
-        return chooseType({item,boxMark,i,hideTag:false,showArr,selecteds,saveText,mainIds});
+        return chooseType({item,boxMark,i,hideTag:false,showArr,saveText,mainIds});
       }
 
     })

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

@@ -31,7 +31,7 @@ class MedicalInfo extends Component {
         return searchResult && searchResult.map((item) => {
           return <li key={item.conceptId}
                      title='点击查看详情'
-                     onClick={() => getAllConceptDetail({name: item.name, type: item.type, uname: item.uniqueName,position:0})}>
+                     onClick={() => getAllConceptDetail({name: item.name, type: item.type, uname: item.uniqueName,position:0,showName:item.name})}>
             <span>{item.name}</span>
             <i>( {item.libTypeName} )</i>
             {item.retrievalName?<p>• {item.retrievalName}</p>:''}

+ 2 - 3
src/components/MultSpread/index.jsx

@@ -23,7 +23,6 @@ import NumberUnitDrop from '@containers/NumberUnitDrop';
  * ikey:当前组件唯一标识,由模块index+标签index+标签内index三个组成的字符串
  * boxMark:当前所在的模块
  * isImports:是否高亮(仅查体使用)
- * selecteds:选中项数据(仅多选子组件用)
  * saveText:该模块的预览数据
  * textPrefix:前缀
  * textSuffix:后缀
@@ -135,7 +134,7 @@ class MultSpread extends Component{
     }
   }
   getLabels(){
-    const {data,ikey,showArr,copyId,selecteds,boxMark,isExtBlue} = this.props;
+    const {data,ikey,showArr,copyId,boxMark,isExtBlue} = this.props;
     const {wrBmi,bmi} = this.state;
     let show = false;
     let inx = '',count=0;
@@ -165,7 +164,7 @@ class MultSpread extends Component{
                            isExtBlue={isExtBlue}
                            value={it.value}
                            copyType={it.copyType}
-                           selecteds={selecteds ?selecteds[i]:[]}
+                           selecteds={it.selecteds}
                            show={showArr&&showArr[inx]}
                            order={it.textGenerate}
                            type={boxMark}

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

@@ -25,10 +25,10 @@ class OtherHistory extends Component{
     fetchModules&&fetchModules({id:questionId,index:focusTextIndex,name,span,searchInEnd});
   }
   getLabels(){
-    const {data,showArr,selecteds,saveText} = this.props;
+    const {data,showArr,saveText} = this.props;
     const {boxMark} = this.state;
     let list = data.map((item,i)=>{
-      return chooseType({item,boxMark,i,hideTag:false,showArr,selecteds,saveText});
+      return chooseType({item,boxMark,i,hideTag:false,showArr,saveText});
     });
     return list;
   }

+ 2 - 2
src/components/PushItems/DetailsModal/index.jsx

@@ -52,13 +52,13 @@ class DetailsModal extends Component {
     }
     
     render() {
-        const {showTipsDetails, tipsDetails} = this.props;
+        const {showTipsDetails, tipsDetails,showAllName} = this.props;
         const { currentIndex } = this.state
       return <NewPortal visible = {showTipsDetails}>
 
                 <div className={styles['details-wrapper']}>
                     <div className={styles['details-content-wrapper']} id="detailsContentWrap">
-                        <h1 id="detailsContentTitle" className={`${styles['details-content-name']} drag-title`} >{tipsDetails && tipsDetails.name} <img className={styles['details-close']} onClick={this.hideTips} src={close} /></h1>
+                        <h1 id="detailsContentTitle" className={`${styles['details-content-name']} drag-title`} >{tipsDetails && showAllName ? showAllName : tipsDetails &&tipsDetails.name} <img className={styles['details-close']} onClick={this.hideTips} src={close} /></h1>
                         <div className={styles['details-content']} id= 'detailsContent' onScroll={this.handleScrollModal.bind(this, tipsDetails)}>
                             {tipsDetails && tipsDetails.details && tipsDetails.details.map((item, index) => {
                                 return (<div id={item.title}>

+ 2 - 2
src/components/PushItems/TipsMsg/index.jsx

@@ -17,7 +17,7 @@ class TipsMsg extends Component {
     }
 
     render() {
-        const { tips, showTips, tipsDiscalimer, tipsImg, tmpFlg} = this.props;
+        const { tips, showTips, tipsDiscalimer, tipsImg, tmpFlg,showPartName} = this.props;
         return <div id="tipsMsg" className={style["tips"]}>
         <h1>
           <img src={tipsImg} />
@@ -27,7 +27,7 @@ class TipsMsg extends Component {
           {tips && tips.details ? (
             <div>
               <div className={style["title"]}>
-                {tips.name}
+                {showPartName ? showPartName : tips.name}
                 <span
                   className={style["tips-details"]}
                   onClick={() => showTips()}

+ 5 - 1
src/components/PushItems/index.jsx

@@ -127,7 +127,7 @@ class PushItems extends Component {
 
   showTips() {
     const { getTipsDetails, showTipsDetailsModal, clickDiag } = this.props;
-    getTipsDetails && getTipsDetails({name: clickDiag.name, type: clickDiag.type,position:0});
+    getTipsDetails && getTipsDetails({name: clickDiag.name, type: clickDiag.type,position:0,showName:clickDiag.showName });
     //showTipsDetailsModal && showTipsDetailsModal()
   }
   hideTips() {
@@ -162,6 +162,8 @@ class PushItems extends Component {
       showTipsDetails,
       tipsDetails,
       tmpFlg,
+      showPartName,
+      showAllName
     } = this.props.pushMessage;
     const { tipsDiscalimer,chronicPushItems,wholeIndexs,setPushEmergencyIdx,sysConfig,windowHeight,hideAllDrop} = this.props;
     const {
@@ -271,6 +273,7 @@ class PushItems extends Component {
               tips = {tips}
               showTips = {showTips}
               tipsDiscalimer = {tipsDiscalimer}
+              showPartName = {showPartName}
             ></TipsMsg>
           </div>
          {tipsDiscalimer.data && <div  className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data &&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2')&&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2').description}}></div>}
@@ -278,6 +281,7 @@ class PushItems extends Component {
         {showTipsDetails && <DetailsModal  
             showTipsDetails = {showTipsDetails}
             hideTips = {this.hideTips}
+            showAllName = {showAllName}
             tipsDetails = {tipsDetails}/>}
             
             {

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

@@ -15,7 +15,7 @@ import $ from 'jquery';
  * placeholder:灰显文字
  * ikey:当前标签的index
  * copyType:选中后是否复制本身(仅展开类型使用)
- * selecteds:选中选项(仅展开类型使用)
+ * data.selecteds:选中选项(仅展开类型使用)
  * show:是否显示下拉
  * order:成文顺序,0点选顺序,1从上到下从左到右
  * isImports:是否高亮显示(仅查体中使用)
@@ -212,8 +212,6 @@ class SpreadDrop extends Component{
   }
   handleSelect(item,isExclu,joint,listIndex,selected){
     let {withOn,withs,noneOn,exclusion,exists,nowOn,nones,noneIds,ban} = this.state;
-    /*if(this.props.selecteds)
-    console.log(exists,this.props.selecteds.exists,exists===this.props.selecteds.exists)*/
     const id = item.id;
     const linkStr = joint||'';
     const name = item.name+linkStr;

+ 0 - 1
src/containers/CheckBody.js

@@ -22,7 +22,6 @@ function mapStateToProps(state){
     focusTextIndex:checkBody.focusIndex,    //聚焦的自由文本标签index
     span:checkBody.span,
     searchInEnd:checkBody.searchInEnd,      //是否在搜索末尾插入结果
-    selecteds:checkBody.selecteds,       //普通多选选中状态
     importLabel:checkBody.importLabel,    //需高亮的标签id
   }
 }

+ 0 - 1
src/containers/CurrentIll.js

@@ -31,7 +31,6 @@ function mapStateToProps(state) {
         mainTailIds:mainSuit.mainTailIds,//主诉症状选中的id(去重用)
         totalHide: homePage.totalHide,
         saveText:currentIll.saveText,
-        selecteds:currentIll.selecteds,       //普通多选选中状态
         editClear:currentIll.editClear,
         symptomIds:currentIll.symptomIds,//症状id,去重用
         isRead:homePage.isRead,

+ 0 - 1
src/containers/MainSuit.js

@@ -21,7 +21,6 @@ function mapStateToProps(state) {
     update:mainSuit.update,
     CommonSymptoms:mainSuit.CommonSymptoms,//常见症状
     datas:mainSuit.data,//数据源
-    selecteds:mainSuit.selecteds,//数据源
     saveText:mainSuit.saveText,
 	  searchData:mainSuit.searchDatas,//搜索结果
     type: typeConfig.typeConfig,

+ 2 - 0
src/containers/OperationContainer.js

@@ -83,6 +83,7 @@ function mapDispatchToProps(dispatch) {
                '4':RECOVER_TAG_CHECK
             };
             const deledTags = localStorage.getItem('deletedTags')?JSON.parse(localStorage.getItem('deletedTags')):[];
+            const deledSelects = localStorage.getItem('deletedSelects')?JSON.parse(localStorage.getItem('deletedSelects')):[];
             if(deledTags.length===0){
               Notify.info('暂无标签可还原');
               return ;
@@ -91,6 +92,7 @@ function mapDispatchToProps(dispatch) {
             dispatch({
               type:maps[arr[0]],
               data:deledTags[0],
+              select:deledSelects[0],
               index:arr[1]
             });
           dispatch({

+ 0 - 1
src/containers/OtherHistory.js

@@ -24,7 +24,6 @@ function mapStateToProps(state){
     focusTextIndex:otherHistory.focusIndex,    //聚焦的自由文本标签index
     span:otherHistory.span,
     searchInEnd:otherHistory.searchInEnd,      //是否在搜索末尾插入结果
-    selecteds:otherHistory.selecteds,       //普通多选选中状态
     editClear:otherHistory.editClear,       //编辑状态
     isRead:state.homePage.isRead,
     readMode:typeConfig.readMode,       //回读回来的模式(与当前模式并存)

+ 4 - 16
src/containers/SpreadDrop.js

@@ -316,21 +316,14 @@ function mainSuitCheck(dispatch,store,params){
   let withsName = getNames(withs);
   let labelInx = getLabelIndex(ikey);
   let text = filterDataArr(mainSaveText);
-  /*if(text.length >= config.limited){
-    Notify.info(config.limitText);
-    return
-  }*/
-  // let lengths = text.length + existsName.length;
   let lengths = value?(text.length - value.length + existsName.length):(text.length + existsName.length);
   if(lengths > config.limited){
     Notify.info(config.limitText);
     return
   }
-  // const index = params.ikey;
-  // let ikey = getLabelIndex(index);
+  delete params.mainData;       //不需要保存该数据,删除避免死循环
   dispatch({
     type: COMM_CONFIRM,
-    // data: {exists:exists,existsName:existsName,ikey}
     data:Object.assign({},params,{existsName,withsName,labelInx})
   });
   dispatch({//隐藏下拉
@@ -340,7 +333,7 @@ function mainSuitCheck(dispatch,store,params){
 
 //现病史普通多选确定
 function currentCheck(dispatch,store,params){
-  const {ikey,exclusion,excluName,nones,exists,noneIds,noneOn,nowOn,withOn,withs,order} = params;
+  const {ikey,exists,withs,order} = params;
   let existsName = getNames(exists,order);
   let withsName = getNames(withs);
   let labelInx = getLabelIndex(ikey);
@@ -358,6 +351,7 @@ function checkBodyCheck(dispatch,store,params){
   let existsName = getNames(exists,order);
   let withsName = getNames(withs);
   let labelInx = getLabelIndex(ikey);
+  delete params.mainData;     //该数据不用保存到state,删除避免死循环
   dispatch({
     type:SETCHECKBOX,
     // data:{labelInx,ikey,exclusion,excluName,nones,exists,existsName,noneIds,noneOn,nowOn,withOn,withs,withsName}
@@ -372,20 +366,14 @@ function otherHisCheck(dispatch,store,params){
   let labelInx = getLabelIndex(ikey);
   dispatch({
     type:SETOTHERCHECKBOX,
-    // data:{labelInx,ikey,exclusion,excluName,nones,exists,existsName,noneIds,noneOn,nowOn,withOn,withs,withsName}
     data:Object.assign({},params,{existsName,withsName,labelInx})
   })
 }
 
 function handleCheckBox(dispatch,store,params){
-  const {type,mainSaveText} = params;
+  const {type} = params;
   switch (+type){
     case 1:
-      /*let text = filterDataArr(mainSaveText);
-      if(text.length >= config.limited){
-        Notify.info(config.limitText);
-        return
-      }*/
       mainSuitCheck(dispatch,store,params);
       break;
     case 2:

+ 6 - 6
src/containers/eleType.js

@@ -20,7 +20,7 @@ import Multiple from '@containers/Multiple';
 //单选类型
 export function singleRadio(params){
   const data = params.item;
-  const {i,hideTag,boxMark,showArr,selecteds,importLabel} = params;
+  const {i,hideTag,boxMark,showArr,importLabel} = params;
   let isHigh=importLabel&&importLabel.includes(data.id);
   let NumberUnitDropIsHigh =(boxMark ==1 &&data.specFlag == 1)
   const showInx = boxMark+'-'+i+'-0';    //单括号多标签的情况下需要识别同一个标签内多个下拉组件的显示状态
@@ -47,7 +47,7 @@ export function singleRadio(params){
                      value={data.value}
                      copyType={data.copyType}
                      isExtBlue={data.specFlag===4?true:false}
-                     selecteds={selecteds ?selecteds[i]:[]}
+                     selecteds={data.selecteds}
                      show={showArr&&showArr[showInx]}
                      order={data.textGenerate}
                      type={boxMark}
@@ -118,7 +118,7 @@ export function singleRadio(params){
 //多标签组合型
 function multLabels(params){
   const data = params.item;
-  const {i,boxMark,showArr,saveText,selecteds,importLabel} = params;
+  const {i,boxMark,showArr,saveText,importLabel} = params;
   let isHigh=importLabel&&importLabel.includes(data.id);
   return <MultSpread data={data.questionMapping}
                      showAdd = {+data.showAdd===1}
@@ -130,7 +130,7 @@ function multLabels(params){
                      boxMark={boxMark}
                      isImports={isHigh}
                      ikey={boxMark+'-'+i}
-                     selecteds={selecteds&&selecteds[i]}
+                     selecteds={data.selecteds}
                      saveText={saveText}
                      textPrefix={data.prefix}
                      textSuffix={data.suffix}></MultSpread>
@@ -139,7 +139,7 @@ function multLabels(params){
 //多选标签展开型
 function multCheckLabels(params,tagType){
   const data = params.item;
-  const {i,boxMark,showArr,selecteds,importLabel,setHighter} = params;
+  const {i,boxMark,showArr,importLabel,setHighter} = params;
   let isHigh=importLabel&&importLabel.includes(data.id);
   const showInx = boxMark+"-"+i+'-0';
   return <SpreadDrop data={data.questionMapping}
@@ -150,7 +150,7 @@ function multCheckLabels(params,tagType){
                      value={data.value}
                      copyType={data.copyType}
                      isExtBlue={data.specFlag===4?true:false}
-                     selecteds={selecteds ?selecteds[i]:[]}
+                     selecteds={data.selecteds}
                      show={showArr&&showArr[showInx]}
                      order={data.textGenerate}
                      isImports={isHigh}

+ 18 - 33
src/store/actions/checkBody.js

@@ -37,16 +37,16 @@ export const confirm = (state,action) =>{
   const items = [...exists||[],...withs||[]];
   if((!exists||!withs||items.length==0)&&!nones&&!exclusion){       //取消无殊的选中,空白提交
     arr[ikey].value = '';
+    arr[ikey].selecteds = {};
     res.saveText[ikey] = '';
-    res.selecteds.splice(ikey,1);
     res.update=Math.random();
     return res;
   }
   //选中互斥项
   if(exclusion){
     arr[ikey].value = excluName;
+    arr[ikey].selecteds = action.data;
     res.saveText[ikey] = excluName;
-    res.selecteds[ikey] = action.data;
     res.update=Math.random();
     return res;
   }
@@ -60,7 +60,6 @@ export const confirm = (state,action) =>{
   if(items.length==0&&nones){
     arr[ikey-1].value = newPreText;
     res.saveText[ikey-1] = newPreText;
-    res.selecteds[ikey] = null;       //无殊选中状态遗留bug修改
     res.update=Math.random();
     return res;
   }
@@ -93,7 +92,7 @@ export function setCheckBoxValue(state,action) {
     showText = showText.substr(0,showText.length-1);
   }
   res.data[labelInx].value = showText;
-  res.selecteds[labelInx] = action.data;
+  res.data[labelInx].selecteds = action.data;
   res.saveText = checkFullfillText(res.data).saveText;
   res.update = Math.random();
   return res;
@@ -131,13 +130,9 @@ export function insertLabelData(state,action){
     if(searchInEnd){
       res.data.splice(index,1,pText,...spreadLabels,text);
       res.saveText = checkFullfillText(res.data).saveText;
-      //res.saveText.splice(index,1,newText,'','');
-      res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
     }else{
       res.data.splice(index,1,text,...spreadLabels,pText);
       res.saveText = checkFullfillText(res.data).saveText;
-      //res.saveText.splice(index,1,'','',newText);
-      res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
     }
 
   }else{
@@ -145,11 +140,9 @@ export function insertLabelData(state,action){
     if(searchInEnd){
       res.data.splice(index+1,0,spreadLabels,text);
       res.saveText.splice(index+1,0,'','');
-      res.selecteds.splice(index+1,0,null,null);
     }else{
       res.data.splice(index,0,text,spreadLabels);
       res.saveText.splice(index,0,'','');
-      res.selecteds.splice(index,0,null,null);
     }
   }
   res.searchData = [];    //选中清空搜索内容(即关闭搜索弹窗)
@@ -208,7 +201,6 @@ export const changeLabelVal = (state,action)=>{//双击标签输入改变值
     const num = nextIsDot?2:1;
     handleLocalDelTag('4',index,res.data[index]);
     res.data.splice(index,num);
-    res.selecteds.splice(index,num);//杂音类样式选中状态对应
     res.saveText = checkFullfillText(res.data).saveText;
   }
   res.update = Math.random();
@@ -225,7 +217,6 @@ export function clearCheckBody(state,action){  //清空
   res.preData = [];
   res.saveText = action.saveText;
   res.isEmpty = action.isEmpty;
-  res.selecteds = action.selecteds?action.selecteds:[];
   if(action.flg){res.showAll = true}
   return res;
 }
@@ -235,39 +226,33 @@ export function backspaceText(state,action){
   let res = Object.assign({},state);
   const {delIndex,flag} = action;
   const data = res.data;
+  let inx = delIndex-1;     //要删除的(非文本)标签的index
   if(flag == 'backsp'){
     // 前一个是文本标签或者子模板,只改变值
-    if(data[delIndex-1].flag&&data[delIndex-1].flag==3){//子模板不删  
+    if(data[inx].flag&&data[inx].flag==3){//子模板不删
       // data[delIndex].value = text;
-    }else if(data[delIndex-1].tagType==8){
+    }else if(data[inx].tagType==8){
       data.splice(delIndex,1);
-      res.selecteds.splice(delIndex,1);      //杂音类样式选中状态对应
       res.saveText.splice(delIndex,1);
-    }
-    else{
-      handleLocalDelTag(4,delIndex-1,data[delIndex-1]);
-      data.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);
-      res.selecteds.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2); 
-      res.saveText.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);
+    }else{
+      handleLocalDelTag(4,inx,data[inx]);
+      const n = action.text.length>0&&(config.punctuationReg.test(action.text))?1:2;
+      data.splice(inx,n);
+      res.saveText.splice(inx,n);
     }
   }else if(flag == 'del'){
-    if(data[delIndex+1] && data[delIndex+1].flag&&data[delIndex+1].flag==3){//子模板不删  
+    inx = delIndex+1;
+    if(!data[inx]||(data[inx] && data[inx].flag&&data[inx].flag==3)){//子模板不删
       
-    }else if(data[delIndex+1] && data[delIndex+1].tagType==8){
+    }else if(data[inx] && data[inx].tagType==8){
       data.splice(delIndex,1);
-      res.selecteds.splice(delIndex,1);      //杂音类样式选中状态对应
       res.saveText.splice(delIndex,1);
-    }else if(!data[delIndex+1]){//最后一个文本标签不删除
-      
-    }
-    else{
-      handleLocalDelTag(4,delIndex,data[delIndex+1]);
+    }else{
+      handleLocalDelTag(4,delIndex,data[inx]);
       data.splice(delIndex,2);
-      res.selecteds.splice(delIndex,2);  
       res.saveText.splice(delIndex,2);
     }
   }
-  // res.saveText = fullfillText(data).saveText;
   res.update = Math.random();
   return res;
 }
@@ -282,6 +267,7 @@ export function multipleComfirn(state,action){
     let item = data[ikey].questionMapping;
     let arr=[];
     item[index].value = seleData;
+    item[index].selecteds = action.data;
     item.map((it)=>{
       if(it.value){
         arr.push(it.labelPrefix+it.value+it.labelSuffix);
@@ -289,12 +275,11 @@ export function multipleComfirn(state,action){
     });
     res.saveText[ikey] = arr.join("");
     res.update = Math.random();
-    res.selecteds[ikey] = {[index]:action.data};
     return res;
   }
   data[ikey].value = seleData;
+  data[ikey].selecteds = action.data;
   res.saveText[ikey] = seleData;
-  res.selecteds[ikey] = action.data;
   res.update = Math.random();
   return res;
 }

+ 3 - 18
src/store/actions/currentIll.js

@@ -401,8 +401,8 @@ export const setCheckBox = (state,action)=>{
     showText = showText.substr(0,showText.length-1);
   }
   res.data[labelInx].value = showText;
+  res.data[labelInx].selecteds = action.data;
   res.saveText[labelInx] = showText;
-  res.selecteds[labelInx] = action.data;
   res.update=Math.random();
   return res;
 }
@@ -479,7 +479,6 @@ export const clearCurrentIll = (state,action)=>{
   const res = Object.assign({},state);
   res.data = action.data;
   res.saveText = action.saveText;
-  res.selecteds = action.selecteds?action.selecteds:[];
   res.symptomIds = action.symptomIds;
   res.currReadSonM = action.currReadSonM||[];
   if(action.editClear){
@@ -568,32 +567,26 @@ export function insertLabelData(state,action){
         if(strIndex < 1){//前
           res.data.splice(index,1,text,...(FilteredDotMapping1),pText);
           res.saveText = fullfillText(res.data).saveText;
-          res.selecteds.splice(index,1,null,...new Array(FilteredDotMapping1.length).fill(null),null);
         }else{
           res.data.splice(index,1,pText,text,...(FilteredDotMapping1));
           res.saveText = fullfillText(res.data).saveText;
-          res.selecteds.splice(index,1,null,null,...new Array(FilteredDotMapping1.length).fill(null));
         }
       }else{
         if(focusIndex > banIdx){//伴后
           if(strIndex < 1){//前
             res.data.splice(index,1,text,...(FilteredDotMapping2),pText);
             res.saveText = fullfillText(res.data).saveText;
-            res.selecteds.splice(index,1,null,...new Array(FilteredDotMapping2.length).fill(null),null);
           }else{
             res.data.splice(index,1,pText,text,...(FilteredDotMapping2));
             res.saveText = fullfillText(res.data).saveText;
-            res.selecteds.splice(index,1,null,null,...new Array(FilteredDotMapping2.length).fill(null));
           }
         }else{//伴前
           if(strIndex < 1){//前
             res.data.splice(index,1,text,...(FilteredDotMapping1),pText);
             res.saveText = fullfillText(res.data).saveText;
-            res.selecteds.splice(index,1,null,...new Array(FilteredDotMapping1.length).fill(null),null);
           }else{
             res.data.splice(index,1,pText,text,...(FilteredDotMapping1));
             res.saveText = fullfillText(res.data).saveText;
-            res.selecteds.splice(index,1,null,null,...new Array(FilteredDotMapping1.length).fill(null));
           }
         }
       }
@@ -608,11 +601,9 @@ export function insertLabelData(state,action){
         if(preItem&&preItem.tagType==8){
           res.data.splice(index,1,...spreadLabels,pText);
           res.saveText = fullfillText(res.data).saveText;
-          res.selecteds.splice(index,1,...new Array(spreadLabels.length).fill(null),null);
         }else{
           res.data.splice(index,1,textEmpty,...spreadLabels,pText);
           res.saveText = fullfillText(res.data).saveText;
-          res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
         }
         // res.data.splice(focusIndex,0,data,textEmpty);
         
@@ -622,11 +613,9 @@ export function insertLabelData(state,action){
         if(afterItem&&afterItem.tagType==8){
           res.data.splice(index,1,pText,...spreadLabels);
           res.saveText = fullfillText(res.data).saveText;
-          res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null));
         }else{
           res.data.splice(index,1,pText,...spreadLabels,textEmpty);
           res.saveText = fullfillText(res.data).saveText;
-          res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
         }   
       }
     }
@@ -654,13 +643,11 @@ export function backspaceText(state,action){
       // data[delIndex].value = text;
     }else if(data[delIndex-1].tagType==8){
       data.splice(delIndex,1);
-      res.selecteds.splice(delIndex,1);      //杂音类样式选中状态对应
       res.saveText.splice(delIndex,1);
     }
     else{
       handleLocalDelTag(2,delIndex-1,data[delIndex-1]);
       data.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);
-      res.selecteds.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2); 
       res.saveText.splice(delIndex-1,2);
     }
   }else if(flag == 'del'){
@@ -668,7 +655,6 @@ export function backspaceText(state,action){
       
     }else if(data[delIndex+1] && data[delIndex+1].tagType==8){
       data.splice(delIndex,1);
-      res.selecteds.splice(delIndex,1);      //杂音类样式选中状态对应
       res.saveText.splice(delIndex,1);
     }else if(!data[delIndex+1]){//最后一个文本标签不删除
       // console.log("删除最后一个啦");
@@ -676,7 +662,6 @@ export function backspaceText(state,action){
     else{
       handleLocalDelTag(2,delIndex,data[delIndex+1]);
       data.splice(delIndex,2);
-      res.selecteds.splice(delIndex,2);  
       res.saveText.splice(delIndex,2);
     }
   }
@@ -732,6 +717,7 @@ export function multipleComfirn(state,action){
     let item = data[ikey].questionMapping;
     let arr=[];
     item[index].value = seleData;
+    item[index].selecteds = action.data;
     item.map((it)=>{
       if(it.value){
         arr.push(it.labelPrefix+it.value+it.labelSuffix);
@@ -739,12 +725,11 @@ export function multipleComfirn(state,action){
     });
     res.saveText[ikey] = arr.join("");
     res.update = Math.random();
-    res.selecteds[ikey] = {[index]:action.data};
     return res;
   }
   data[ikey].value = seleData;
+  data[ikey].selecteds = action.data;
   res.saveText[ikey] = seleData;
-  res.selecteds[ikey] = action.data;
   return res;
 }
 

+ 3 - 18
src/store/actions/mainSuit.js

@@ -387,8 +387,8 @@ export const commConfirm=(state,action)=>{
     showText = showText.substr(0,showText.length-1);
   }
   res.data[labelInx].value = showText;
+  res.data[labelInx].selecteds = action.data;
   res.saveText[labelInx] = showText;
-  res.selecteds[labelInx] = action.data;
   res.update=Math.random();
   return res;
 }
@@ -594,7 +594,6 @@ export const changeLabelVal = (state,action)=>{
     const num = nextIsDot?2:1;
     handleLocalDelTag('1',index,res.data[index]);
     res.data.splice(index,num);
-    res.selecteds.splice(index,num);//杂音类样式选中状态对应
     res.saveText = fullfillText(res.data).saveText;
   }
   res.update = Math.random();//console.log(222,res);
@@ -620,17 +619,11 @@ export const clearMainSuit = (state,action)=>{//回读和清除
   const res = Object.assign({},state);
   res.data = action.data;
   res.saveText = action.saveText;
-  // res.saveText = fullfillText(action.data).saveText;//解决删除data里的值保存,回读后页面上有内容saveText里没有的情况
-  res.selecteds = action.selecteds?action.selecteds:[];
   res.mainIds = action.mainIds;
   res.mainTailIds = action.mainTailIds || [];
   res.chronicDesease = action.chronicDesease;//慢病疾病字段
   res.mainReadSonM = action.mainReadSonM || [];//子模板
   res.moduleNum.num = 0; //恢复子模板点击次数
-  /*const readModule = action.mainReadSonM;
-  if(readModule&&readModule.length>0){//有回读子模板,则覆盖
-    res.addSmoduleData = readModule;
-  }*/
   if(action.editClear){
     res.editClear = action.editClear;
   }
@@ -675,7 +668,6 @@ export function addLabelItem(state,action){
   if(!data) return res;
   res.data.splice(+i+2,0,JSON.parse(data),textLabel);
   res.saveText.splice(+i+2,0,'','');
-  res.selecteds.splice(+i+2,0,null,null);
   res.update = Math.random();
   return res;
 }
@@ -687,7 +679,6 @@ export function backspaceText(state,action){
   const data = res.data;
   if(flag == 'backsp'){
     if(data[delIndex-1].flag&&data[delIndex-1].flag==3){
-    // if(data[delIndex-1].tagType==8 ||data[delIndex-1].flag&&data[delIndex-1].flag==3){
       // 前一个是文本标签或者子模板 不做处理
     }else if(data[delIndex-1]&&data[delIndex-1].tagType==8){
       data.splice(delIndex,1);
@@ -695,16 +686,13 @@ export function backspaceText(state,action){
     }
     else{
       handleLocalDelTag(1,delIndex-1,data[delIndex-1]);
-      // data.splice(delIndex-1,2);
-      console.log(config.punctuationReg.test(action.text),action.text)
       data.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);//data不为空不能清除
       res.saveText.splice(delIndex-1,action.text.length>0?1:2);
     }
   }else if(flag == 'del'){
     if(data[delIndex+1] && data[delIndex+1].flag&&data[delIndex+1].flag==3){
       // 后一个是文本标签或者子模板 不做处理
-      // data.splice(delIndex,1);
-      // res.saveText.splice(delIndex,1);
+
     }else if(data[delIndex+1] && data[delIndex+1].tagType==8){
       data.splice(delIndex,1);
       res.saveText.splice(delIndex,1);
@@ -715,12 +703,9 @@ export function backspaceText(state,action){
     else{
       handleLocalDelTag(1,delIndex,data[delIndex+1]);
       data.splice(delIndex,2);
-      // data.splice(delIndex,action.text.length>0?1:2);
       res.saveText.splice(delIndex,2);
     }
   }
-  
-  // res.saveText = fullfillText(data).saveText;
   res.update = Math.random();
   return res;
 }
@@ -772,8 +757,8 @@ export function multipleComfirn(state,action){
   const {ikey,seleData} = action.data;
   let data = res.data;
   data[ikey].value = seleData;
+  data[ikey].selecteds = action.data;
   res.saveText[ikey] = seleData;
-  res.selecteds[ikey] = action.data;
   res.update = Math.random();
   return res;
 }

+ 9 - 24
src/store/actions/otherHistory.js

@@ -9,16 +9,16 @@ export const confirm = (state,action) =>{
   const items = [...exists||[],...withs||[]];
   if((!exists||!withs||items.length==0)&&!nones&&!exclusion){       //取消无殊的选中,空白提交
     arr[ikey].value = '';
+    arr[ikey].selecteds = {};
     res.saveText[ikey] = '';
-    res.selecteds.splice(ikey,1);
     res.update=Math.random();
     return res;
   }
   //选中互斥项
   if(exclusion){
     arr[ikey].value = excluName;
+    arr[ikey].selecteds = action.data;
     res.saveText[ikey] = excluName;
-    res.selecteds[ikey] = action.data;
     res.update=Math.random();
     return res;
   }
@@ -32,7 +32,6 @@ export const confirm = (state,action) =>{
   if(items.length==0&&nones){
     arr[ikey-1].value = newPreText;
     res.saveText[ikey-1] = newPreText;
-    res.selecteds[ikey] = null;       //无殊选中状态遗留bug修改
     res.update=Math.random();
     return res;
   }
@@ -75,8 +74,8 @@ export function setCheckBoxValue(state,action) {
     showText = showText.substr(0,showText.length-1);
   }
   res.data[labelInx].value = showText;
+  res.data[labelInx].selecteds = action.data;
   res.saveText[labelInx] = showText;
-  res.selecteds[labelInx] = action.data;
   res.update=Math.random();
   return res;
 }
@@ -106,23 +105,18 @@ export function insertLabelData(state,action){
     if(searchInEnd){
       res.data.splice(index,1,pText,...spreadLabels,text);
       res.saveText = fullfillText(res.data).saveText;
-      res.selecteds.splice(index,1,null,...new Array(spreadLabels.length).fill(null),null);
-      //res.saveText.splice(index,1,newText,'','');
     }else{
       res.data.splice(index,1,...spreadLabels,pText,text);
-      res.saveText = fullfillText(res.data).saveText;//.splice(index,1,'',newText,'');
-      res.selecteds.splice(index,1,...new Array(spreadLabels.length).fill(null),null,null);
+      res.saveText = fullfillText(res.data).saveText;
     }
   }else{
     span.current.innerText?(span.current.innerText = ' '):(span.current.innerHTML = ' ');
     if(searchInEnd){
       res.data.splice(index+1,0,spreadLabels,text);
       res.saveText.splice(index+1,0,'','');
-      res.selecteds.splice(index+1,0,...new Array(spreadLabels.length).fill(null),null);
     }else{
       res.data.splice(index,0,text,spreadLabels);
       res.saveText.splice(index,0,'','');
-      res.selecteds.splice(index,0,null,...new Array(spreadLabels.length).fill(null));
     }
 
   }
@@ -188,7 +182,6 @@ export function changeTextLabel(state,action) {
       res[res.data[index].formulaCode]=undefined;
     }
     res.data.splice(index,num);
-    res.selecteds.splice(index,num);//杂音类样式选中状态对应
     res.saveText = fullfillText(res.data).saveText;
   }
   res.update = Math.random();//console.log(888,res,action);
@@ -206,11 +199,6 @@ export function clearOtherHistory(state,action){       //清空数据
       res[it] = action[it];
     }
   }
-  /*res.data = action.data;
-  res.saveText = action.saveText;
-  res.selecteds = action.selecteds;
-  res.editClear = action.editClear;
-  res.isEmpty = action.isEmpty;*/
   return res;
 }
 //文本模式下值保存
@@ -273,7 +261,6 @@ export function backspaceText(state,action){
       // 前一个是文本标签或者子模板 不做处理
     }else if(data[delIndex-1].tagType==8){
       data.splice(delIndex,1);
-      res.selecteds.splice(delIndex,1);      //杂音类样式选中状态对应
       res.saveText.splice(delIndex,1);
     }
     else{
@@ -281,17 +268,16 @@ export function backspaceText(state,action){
       if(data[delIndex-1].formulaCode){
         res[data[delIndex-1].formulaCode]=undefined;
       }
+      const n = action.text.length>0&&(config.punctuationReg.test(action.text))?1:2;
       handleLocalDelTag(3,delIndex-1,data[delIndex-1]);      //记录被删除的标签
-      data.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);
-      res.selecteds.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);      //杂音类样式选中状态对应
-      res.saveText.splice(delIndex-1,action.text.length>0&&(config.punctuationReg.test(action.text))?1:2);
+      data.splice(delIndex-1,n);
+      res.saveText.splice(delIndex-1,n);
     }
   }else if(flag == 'del'){
     if(data[delIndex+1] && data[delIndex+1].flag&&data[delIndex+1].flag==3){//子模板不删  
       
     }else if(data[delIndex+1] && data[delIndex+1].tagType==8){
       data.splice(delIndex,1);
-      res.selecteds.splice(delIndex,1);      //杂音类样式选中状态对应
       res.saveText.splice(delIndex,1);
     }else if(!data[delIndex+1]){//最后一个文本标签不删除
       
@@ -303,7 +289,6 @@ export function backspaceText(state,action){
       }
       handleLocalDelTag(3,delIndex,data[delIndex+1]);
       data.splice(delIndex,2);
-      res.selecteds.splice(delIndex,2);  
       res.saveText.splice(delIndex,2);
     }
   }
@@ -344,6 +329,7 @@ export function multipleComfirn(state,action){
     let item = data[ikey].questionMapping;
     let arr=[];
     item[index].value = seleData;
+    item[index].selecteds= {[index]:action.data};
     item.map((it)=>{
       if(it.value){
         arr.push(it.labelPrefix+it.value+it.labelSuffix);
@@ -351,12 +337,11 @@ export function multipleComfirn(state,action){
     });
     res.saveText[ikey] = arr.join("");
     res.update = Math.random();
-    res.selecteds[ikey] = {[index]:action.data};
     return res;
   }
   data[ikey].value = seleData;
+  data[ikey].selecteds = action.data;
   res.saveText[ikey] = seleData;
-  res.selecteds[ikey] = action.data;
   return res;
 }
 

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

@@ -182,6 +182,7 @@ export const setTips = (state, action) => {
   const res = Object.assign({}, state)
   res.tips = action.tips;
   res.tmpFlg = action.tmpFlg
+  res.showPartName = action.showPartName
   return res;
 }
 
@@ -189,6 +190,7 @@ export const setTips = (state, action) => {
 export const setTipsDetails = (state, action) => {
   const res = Object.assign({}, state)
   res.tipsDetails = action.tipsDetails;
+  res.showAllName = action.showAllName
   return res;
 }
 

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

@@ -195,7 +195,6 @@ export function setOtherHisModule(){
     const model = otherModel&&otherModel.length>0?deepClone(otherModel):[block];     //其他史模板,没有模板数据则显示一个空文本标签
     const arr = deepClone(initData.otherHis);        //最近其他史数据
     const arrSave = deepClone(initData.otherHisSave);    //最近其他史saveText
-    const selects = initData.otherSelecteds?[...initData.otherSelecteds]:[];  //其他史杂音类选中项
     const isHis = initData.otherIsHis;     //是否是历史数据
     const onlyOneText = arr && arr.length == 1 && arr[0].tagType == 8 && !arr[0].value;    //是否只有一个空的自由文本标签
     //是历史数据且不为空则显示历史数据,否则显示模板
@@ -206,7 +205,6 @@ export function setOtherHisModule(){
     dispatch({
       type: SETDATA,
       data: listObj.newArr,
-      selecteds: selects,
       period: initData.period,
       save: listObj.saveText,
       isEmpty: false

+ 7 - 3
src/store/async-actions/pushMessage.js

@@ -144,7 +144,8 @@ export const getConceptDetail = (item,noTips,noDetails,noNotify) => {
                         dispatch({
                             type: SET_TIPS,
                             tips: res.data.data,
-                            tmpFlg:'midPart'
+                            tmpFlg:'midPart',
+                            showPartName: item.showName
                         })
                     } else {
                         dispatch({
@@ -161,7 +162,8 @@ export const getConceptDetail = (item,noTips,noDetails,noNotify) => {
                     if(!noDetails) {
                       dispatch({
                         type: SET_TIPS_DETAILS,
-                        tipsDetails: res.data.data
+                        tipsDetails: res.data.data,
+                        showAllName: item.showName
                       })
                       dispatch({
                         type: SHOW_TIPS_DETAILS
@@ -190,6 +192,7 @@ export const getConceptDetail = (item,noTips,noDetails,noNotify) => {
 }
 
 export const getAllConceptDetail = (item) => {
+
     return(dispatch, getState) => {
         const state = getState();
       let params = {
@@ -215,7 +218,8 @@ export const getAllConceptDetail = (item) => {
               }
               dispatch({
                 type: SET_TIPS_DETAILS,
-                tipsDetails: res.data.data
+                tipsDetails: res.data.data,
+                showAllName: item.showName
               })
             } else {
                 Notify.info('提示信息未维护');

+ 1 - 1
src/store/reducers/checkBody.js

@@ -13,7 +13,7 @@ const initState = {
                 data:[block],
                 saveText:[],    //saveText为生成的纯文本
                 searchData:[],
-                selecteds:[],
+                //selecteds:[],
                 focusIndex:'',
                 isEmpty:true,      //是否为空白,需要请求数据
                 showSearchBox:false,

+ 0 - 1
src/store/reducers/currentIll.js

@@ -12,7 +12,6 @@ const initState = {
   moduleData:[],
   data:[],
   saveText:[],
-  selecteds:[],
   searchDatas:[],//搜索结果
   editClear:true,
   addModule:[],

+ 0 - 1
src/store/reducers/homePage.js

@@ -53,7 +53,6 @@ export default function (state=initState,action) {
     case SETOTHERHISTORY:
       res.initData.otherHis = action.data;
       res.initData.otherHisSave = action.save;
-      res.initData.otherSelecteds = action.selecteds||[];
       res.initData.otherIsHis = action.otherIsHis!=undefined?action.otherIsHis:true;
       res.initData.period = action.period;
       return res;

+ 0 - 1
src/store/reducers/mainSuit.js

@@ -18,7 +18,6 @@ const initState = {
   addSmoduleData:[],//添加病情变化模板
   data:[],//主诉使用的模板数据
   saveText:[],//主诉框内的值
-  selecteds:[],
   moduleNum:{num:0},//点了几次添加病情变化
   focusIndex:'',
   mainIds:[], //选中的主症状和伴随的id(搜索去重)

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

@@ -12,7 +12,6 @@ const initState = {
                     data:[block],
                     isEmpty:true,
                     saveText:[],
-                    selecteds:[],
                     deledTags:{},
                     focusIndex:'',
                     editClear:true};
@@ -22,7 +21,6 @@ export default function(state=initState,action){//console.log(state)
   switch (action.type){
     case SETDATA:
       res.data = action.data;
-      res.selecteds = action.selecteds||[];
       const period = action.period;
       if(period){
         res.yjs_1=period.yjs_1;

+ 5 - 20
src/utils/tools.js

@@ -94,10 +94,6 @@ const getAllDataList =(baseList) =>{           //获取所有模块结构化的
     jsonData.pacs = baseList.assistCheck.assistLabel;     //辅检
     jsonData.diag = baseList.diagnosticList.diagnosticList;      //诊断
     jsonData.advice = baseList.pushMessage.advice;       //医嘱
-    jsonData.mainSuitSelecteds = baseList.mainSuit.selecteds;      //主诉选中状态保存
-    jsonData.currentIllSelecteds = baseList.currentIll.selecteds;      //主诉选中状态保存
-    jsonData.otherHistorySelecteds = baseList.otherHistory.selecteds;      //主诉选中状态保存
-    jsonData.checkBodySelecteds = baseList.checkBody.selecteds;      //主诉选中状态保存
     //jsonData.addItems = baseList.homePage.addItems||{};
     jsonData.mainsuitIds = baseList.mainSuit.mainIds;      //主诉去重
     jsonData.mainChronicDesease = baseList.mainSuit.chronicDesease;      //主诉慢病{}
@@ -162,10 +158,10 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
       //清除已删除标签记录
       localStorage.removeItem('deletedTags');
       store.dispatch({type: SET_READ_MODE, readMode: -1});      //清除回读模式值
-      store.dispatch({type: CLEAR_MAIN_SUIT,data:[],saveText:[],selecteds:[],editClear:true,mainIds:[],mainTailIds:[],clearAction:true,symptomFeature:[],chronicDesease:null,mainReadSonM:[]});
-        store.dispatch({type: CLEAR_CURRENT_ILL,data:[],saveText:[],selecteds:[],editClear:true,symptomIds:[],currReadSonM:[]});
-        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({type: CLEAR_MAIN_SUIT,data:[],saveText:[],editClear:true,mainIds:[],mainTailIds:[],clearAction:true,symptomFeature:[],chronicDesease:null,mainReadSonM:[]});
+        store.dispatch({type: CLEAR_CURRENT_ILL,data:[],saveText:[],editClear:true,symptomIds:[],currReadSonM:[]});
+        store.dispatch({type: CLEAROTHERHISTORY,data:[block],isEmpty:true,saveText:[],editClear:true,yjs_1:'',yjs_2:'',yjs_3:'',yjs_4:''});
+        store.dispatch({type: CLEARCHECKBODY,data:[block],isEmpty:true,saveText:[]});
         store.dispatch({type:SETREADDITEMS});     //清空已存的血压加号项
         store.dispatch(clearAssistData([],'',[]));
         store.dispatch(clearAllLabel([],[],''));
@@ -248,7 +244,6 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                 store.dispatch({
                     type: CLEAR_MAIN_SUIT,
                     data:dataJson.chief,
-                    selecteds:dataJson.mainSuitSelecteds?dataJson.mainSuitSelecteds:[],
                     saveText:JSON.parse(dataJsonStr.chief),
                     mainIds:dataJson.mainsuitIds?dataJson.mainsuitIds:[],
                     chronicDesease:dataJson.mainChronicDesease,
@@ -257,7 +252,6 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                 store.dispatch({
                     type: CLEAR_CURRENT_ILL,
                     data:dataJson.present,
-                    selecteds:dataJson.currentIllSelecteds?dataJson.currentIllSelecteds:[],
                     saveText:JSON.parse(dataJsonStr.present),
                     symptomIds:dataJson.currentIds?dataJson.currentIds:[],
                     currReadSonM:dataJson.currReadSonM
@@ -269,7 +263,6 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                     yjs_2:dataJson.yjs_2,
                     yjs_3:dataJson.yjs_3,
                     yjs_4:dataJson.yjs_4,
-                    selecteds:dataJson.otherHistorySelecteds?dataJson.otherHistorySelecteds:[],
                     isEmpty:onlyOneText?true:false,//dataJson.otherHistoryIsEmpty,
                     saveText:JSON.parse(dataJsonStr.other),
                     editClear:dataJson.other.length>0?false:true
@@ -277,7 +270,6 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                 store.dispatch({
                     type: CLEARCHECKBODY,
                     data:dataJson.vital,
-                    selecteds:dataJson.checkBodySelecteds?dataJson.checkBodySelecteds:[],
                     isEmpty:dataJson.checkBodyIsEmpty,
                     saveText:JSON.parse(dataJsonStr.vital)
                 });
@@ -310,14 +302,10 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
               //tab跳回辅助信息
               store.dispatch(tabChange('0'));
             }else{    //结构化历史病历回读
-                /*let dataJson = JSON.parse(reData.dataJson);*/
                 let dataJsonStr = reData.detailList;
-              // console.log(dataJsonStr,'结构化历史病历回读')
-                // console.log(dataJson.mainSuitSelecteds,7887)
                 store.dispatch({
                     type: CLEAR_MAIN_SUIT,
                     data:dataJson.chief,
-                    selecteds:dataJson.mainSuitSelecteds?dataJson.mainSuitSelecteds:[],
                     saveText:dataJsonStr[0].content ? JSON.parse(dataJsonStr[0].content) :[],
                     mainIds:dataJson.mainsuitIds?dataJson.mainsuitIds:[],
                     chronicDesease:dataJson.mainChronicDesease,
@@ -326,7 +314,6 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                 store.dispatch({
                     type: CLEAR_CURRENT_ILL,
                     data:dataJson.present,
-                    selecteds:dataJson.currentIllSelecteds?dataJson.currentIllSelecteds:[],
                     saveText:dataJsonStr[1].content ? JSON.parse(dataJsonStr[1].content):[],
                     symptomIds:dataJson.currentIds?dataJson.currentIds:[],
                     currReadSonM:dataJson.currReadSonM
@@ -338,7 +325,6 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                     yjs_2:dataJson.yjs_2,
                     yjs_3:dataJson.yjs_3,
                     yjs_4:dataJson.yjs_4,
-                    selecteds:dataJson.otherHistorySelecteds?dataJson.otherHistorySelecteds:[],
                     saveText:dataJsonStr[2].content ? JSON.parse(dataJsonStr[2].content):[],
                     isEmpty:onlyOneText?true:false,//dataJson.otherHistoryIsEmpty,回读回来后判断是否只有一个空标签,是的话要使用模板
                     editClear:dataJson.other.length>0?false:true
@@ -346,7 +332,6 @@ const pushAllDataList =(whichSign,action,reData,type) =>{           //回读清
                 store.dispatch({
                     type: CLEARCHECKBODY,
                     data:dataJson.vital,
-                    selecteds:dataJson.checkBodySelecteds?dataJson.checkBodySelecteds:[],
                     isEmpty:dataJson.checkBodyIsEmpty,
                     saveText:dataJsonStr[3].content ? JSON.parse(dataJsonStr[3].content):[]
                 });
@@ -1316,7 +1301,7 @@ function resetTagtype(data){
 //记录最近3次被删除的标签
 function handleLocalDelTag(mark,index,tag){
   const deledTag =  localStorage.getItem('deletedTags')?JSON.parse(localStorage.getItem('deletedTags')):[];
-  deledTag.unshift(Object.assign(tag,{delIndex:mark+'-'+index}));
+  deledTag.unshift(Object.assign({},tag,{delIndex:mark+'-'+index}));
   deledTag.length = deledTag.length>config.recoverTagNum?config.recoverTagNum:deledTag.length;
   localStorage.setItem('deletedTags',JSON.stringify(deledTag));
 }

+ 0 - 1
src/utils/utils.js

@@ -172,7 +172,6 @@ export function addLabelItem(state,action,boxMark){
   if(!data) return res;
   res.data.splice(+i+2,0,JSON.parse(data),textLabel);
   res.saveText.splice(+i+2,0,'','');
-  res.selecteds.splice(+i+2,0,null,null);
   res.update = Math.random();
   return res;
 }