Explorar o código

查体重新加载bug修改2915

zhouna %!s(int64=5) %!d(string=hai) anos
pai
achega
3329c55270

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

@@ -4,7 +4,6 @@ import {ItemBox,Notify,Textarea,TailInlineTag} from '@commonComp';
 import chooseType from '@containers/eleType.js';
 import SearchDrop from '@components/SearchDrop';
 import {filterDataArr,getPageCoordinate,windowEventHandler,isIE} from '@utils/tools'
-import $ from 'jquery';
 
 class CurrentIll extends Component{
   constructor(props){

+ 6 - 2
src/store/actions/checkBody.js

@@ -1,5 +1,5 @@
 import config from '@config/index.js';
-import {formatContinueDots,getLabelIndex,handleLocalDelTag,checkFullfillText,shiftLocalDelTag,getLifeLabels,getValuedLabels,removeRepeat} from '@utils/tools.js';
+import {formatContinueDots,getLabelIndex,handleLocalDelTag,checkFullfillText,shiftLocalDelTag,getLifeLabels,getValuedLabels,removeRepeat,getIds} from '@utils/tools.js';
 
 export function preSetCheckbody(state,action) {
   let res = Object.assign({},state);
@@ -345,7 +345,11 @@ export function reflashLabels(state,action) {
   const oldValuedLabels = getValuedLabels(res.data);    //旧已填值标签
   const lifeLabels = removeRepeat(newLifeLabels,oldLifeLabels);   //将被保留的生命体征标签
   const newUnlifeLabels = getLifeLabels(action.data,true);    //新非生命体征标签
-  const addTextsArr = checkFullfillText([...lifeLabels,...oldValuedLabels,...newUnlifeLabels]);
+  const ids = getIds(oldValuedLabels);
+  const stayUnlifeLabels = newUnlifeLabels.filter((it)=>{   //已填值的相同标签已被移到上面,这里去重
+    return !ids.includes(it.id);
+  });
+  const addTextsArr = checkFullfillText([...lifeLabels,...oldValuedLabels,...stayUnlifeLabels]);
   res.data = addTextsArr.newArr;
   res.saveText = addTextsArr.saveText;
   res.update = Math.random();

+ 1 - 1
src/utils/tools.js

@@ -1617,7 +1617,7 @@ function removeRepeat(arr1,arr2){     //arr1被完全保留的数组
       newArr.push(item);
     }
     return newArr;
-  },[...arr1]);console.log(arr)
+  },[...arr1]);
   return arr;
 }