瀏覽代碼

其他史查体搜索的标签后加逗号

zhouna 6 年之前
父節點
當前提交
30000aad93
共有 2 個文件被更改,包括 10 次插入10 次删除
  1. 5 5
      src/store/actions/checkBody.js
  2. 5 5
      src/store/actions/otherHistory.js

+ 5 - 5
src/store/actions/checkBody.js

@@ -200,12 +200,12 @@ export function insertLabelData(state,action){
     span.current.innerText = newText;
     const pText = Object.assign({},text,{value:newText});
     if(searchInEnd){
-      res.data.splice(index,1,pText,...spreadLabels,text);
+      res.data.splice(index,1,pText,...spreadLabels,Object.assign(text,{value:','}));
       res.saveText = fullfillText(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.data.splice(index,1,text,...spreadLabels,Object.assign(pText,{value:','}));
       res.saveText = fullfillText(res.data).saveText;
       //res.saveText.splice(index,1,'','',newText);
       res.selecteds.splice(index,1,null,new Array(spreadLabels.length).fill(null),null);
@@ -214,12 +214,12 @@ export function insertLabelData(state,action){
   }else{
     span.current.innerText = ' ';
     if(searchInEnd){
-      res.data.splice(index+1,0,spreadLabels,text);
+      res.data.splice(index+1,0,spreadLabels,Object.assign(text,{value:','}));
       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.data.splice(index,0,text,spreadLabels,Object.assign(text,{value:','}));
+      res.saveText.splice(index,0,'','',',');
       res.selecteds.splice(index,0,null,null);
     }
   }

+ 5 - 5
src/store/actions/otherHistory.js

@@ -190,21 +190,21 @@ export function insertLabelData(state,action){
     span.current.innerText = newText;
     const pText = Object.assign({},text,{value:newText});
     if(searchInEnd){
-      res.data.splice(index,1,pText,...spreadLabels,text);
+      res.data.splice(index,1,pText,...spreadLabels,Object.assign(text,{value:','}));
       res.saveText = fullfillText(res.data).saveText;
       //res.saveText.splice(index,1,newText,'','');
     }else{
-      res.data.splice(index,1,...spreadLabels,pText,text);
+      res.data.splice(index,1,...spreadLabels,pText,Object.assign(text,{value:','}));
       res.saveText = fullfillText(res.data).saveText;//.splice(index,1,'',newText,'');
     }
   }else{
     span.current.innerText = ' ';
     if(searchInEnd){
-      res.data.splice(index+1,0,spreadLabels,text);
+      res.data.splice(index+1,0,spreadLabels,Object.assign(text,{value:','}));
       res.saveText.splice(index+1,0,'','');
     }else{
-      res.data.splice(index,0,text,spreadLabels);
-      res.saveText.splice(index,0,'','');
+      res.data.splice(index,0,text,spreadLabels,Object.assign(text,{value:','}));
+      res.saveText.splice(index,0,'','',',');
     }
 
   }