|
@@ -1,4 +1,4 @@
|
|
|
-import {getLabelIndex,fullfillText,getIds,resetTagtype,storageLocal} from '@utils/tools.js';
|
|
|
+import {getLabelIndex,fullfillText,getIds,resetTagtype,storageLocal,handleLocalDelTag,shiftLocalDelTag} from '@utils/tools.js';
|
|
|
import config from '@config/index.js';
|
|
|
import {Notify} from '@commonComp';
|
|
|
|
|
@@ -131,7 +131,7 @@ export const insertMain = (state,action) => {
|
|
|
storageLocal.set('mainSymp',newArr.slice(newArr.length-5,));
|
|
|
}else{
|
|
|
storageLocal.set('mainSymp',newArr);
|
|
|
- }
|
|
|
+ }
|
|
|
}else{
|
|
|
storageLocal.set('mainSymp',items);
|
|
|
}
|
|
@@ -219,7 +219,7 @@ export const confirm = (state,action) =>{
|
|
|
}else{
|
|
|
storageLocal.set('mainSymp',newArr);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}else{
|
|
|
storageLocal.set('mainSymp',items);
|
|
|
}
|
|
@@ -430,8 +430,8 @@ export const insertSearch = (state,action)=>{
|
|
|
arr.push(items);
|
|
|
storageLocal.set('mainSymp',arr);
|
|
|
}
|
|
|
-
|
|
|
- if(data.length==0){
|
|
|
+
|
|
|
+ if(data.length==0){
|
|
|
let inserIndx = null;
|
|
|
moduleData.map((it,i)=>{
|
|
|
if(it.flag == 1){//在此处插入主诉数据
|
|
@@ -833,6 +833,7 @@ export function backspaceText(state,action){
|
|
|
res.saveText.splice(delIndex,1);
|
|
|
}
|
|
|
else{
|
|
|
+ handleLocalDelTag(1,delIndex-1,data[delIndex-1]);
|
|
|
data.splice(delIndex-1,2);
|
|
|
res.saveText.splice(delIndex-1,2);
|
|
|
}
|
|
@@ -844,6 +845,7 @@ export function backspaceText(state,action){
|
|
|
res.saveText.splice(delIndex,1);
|
|
|
}
|
|
|
else{
|
|
|
+ handleLocalDelTag(1,delIndex,data[delIndex]);
|
|
|
data.splice(delIndex,2);
|
|
|
res.saveText.splice(delIndex,2);
|
|
|
}
|
|
@@ -940,4 +942,17 @@ export function getSymptomFeature(state,action){
|
|
|
}
|
|
|
res.update = Math.random();
|
|
|
return res;
|
|
|
+}
|
|
|
+
|
|
|
+//恢复已删除的标签
|
|
|
+export function recoveTag(state,action) {
|
|
|
+ let res = Object.assign({},state);
|
|
|
+ let arr = [...res.data];
|
|
|
+ const text = Object.assign({},JSON.parse(config.textLabel));
|
|
|
+ arr.splice(action.index,0,action.data,text);
|
|
|
+ res.data = fullfillText(arr).newArr;
|
|
|
+ res.saveText = fullfillText(arr).saveText;
|
|
|
+ shiftLocalDelTag();
|
|
|
+ res.update = Math.random();
|
|
|
+ return res;
|
|
|
}
|