Переглянути джерело

现病史搜索去重调整

liucf 6 роки тому
батько
коміт
9dc3033bd8
1 змінених файлів з 5 додано та 2 видалено
  1. 5 2
      src/store/actions/currentIll.js

+ 5 - 2
src/store/actions/currentIll.js

@@ -727,7 +727,8 @@ export function insertLabelData(state,action){
   let id = data.id;
   let searchData = action.name;
   // res.symptomIds.push(id);
-  const text = Object.assign(JSON.parse(config.textLabel),{name:searchData},{id:id});
+  // const text = Object.assign(JSON.parse(config.textLabel),{name:searchData},{id:id});
+  const text = Object.assign(JSON.parse(config.textLabel),{name:searchData},{id:id},{conceptId:conceptId});
   const textEmpty = Object.assign({},JSON.parse(config.textLabel));
   let focusIndex = res.focusIndex;
   let saveText = res.saveText;
@@ -908,7 +909,8 @@ export function removeId(state,action){
   let res = Object.assign({},state);
   const {index,text} = action;
   const data = res.data;
-  const id = data[index].id;
+  // const id = data[index].id;
+  const id = data[index].conceptId;
   let ids = res.symptomIds;
   if(ids.includes(id)){
     ids.splice(ids.indexOf(id),1);
@@ -918,6 +920,7 @@ export function removeId(state,action){
     res.saveText.splice(index,1);
   }else{
     data[index].id = "";
+    data[index].conceptId = "";
     data[index].name = text;
     data[index].value = text;
   }