Browse Source

回读selecteds删除

zhouna 5 years atrás
parent
commit
a5f0bf37d1

+ 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});
       }
 
     })

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

@@ -23,7 +23,6 @@ import NumberUnitDrop from '@containers/NumberUnitDrop';
  * ikey:当前组件唯一标识,由模块index+标签index+标签内index三个组成的字符串
  * boxMark:当前所在的模块
  * isImports:是否高亮(仅查体使用)
- * selecteds:选中项数据(仅多选子组件用)
  * saveText:该模块的预览数据
  * textPrefix:前缀
  * textSuffix:后缀

+ 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;
   }

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

@@ -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;

+ 2 - 2
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';    //单括号多标签的情况下需要识别同一个标签内多个下拉组件的显示状态
@@ -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}

+ 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

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

+ 4 - 19
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):[]
                 });

+ 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;
 }