|
@@ -53,7 +53,7 @@ export default (state = initSearchList, action) => {
|
|
|
let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempBloodOrder=[],tempTotalOrder=[];
|
|
|
if(tmpLis&&tmpLis.flg == 5){//药品
|
|
|
for(let i = 0;i < tempArr.length;i++){
|
|
|
- if(tempArr[i].time == tmpLis.time){
|
|
|
+ if(action.tip == i){
|
|
|
let flg = tempArr[i].check;
|
|
|
tempArr[i].check = !flg
|
|
|
}
|
|
@@ -61,7 +61,7 @@ export default (state = initSearchList, action) => {
|
|
|
newState.labelListBig = [...tempArr]
|
|
|
}else if(tmpLis&&tmpLis.flg == 6){//手术、操作
|
|
|
for(let i = 0;i < tempArrs.length;i++){
|
|
|
- if(tempArrs[i].time == tmpLis.time){
|
|
|
+ if(action.tip == i){
|
|
|
let flg = tempArrs[i].check;
|
|
|
tempArrs[i].check = !flg
|
|
|
}
|
|
@@ -69,7 +69,7 @@ export default (state = initSearchList, action) => {
|
|
|
newState.labelListSmall = [...tempArrs]
|
|
|
}else if(tmpLis&&tmpLis.flg == 8){//输血
|
|
|
for(let i = 0;i < tmpArr.length;i++){
|
|
|
- if(tmpArr[i].time == tmpLis.time){
|
|
|
+ if(action.tip == i){
|
|
|
let flg = tmpArr[i].check;
|
|
|
tmpArr[i].check = !flg
|
|
|
}
|
|
@@ -91,13 +91,26 @@ export default (state = initSearchList, action) => {
|
|
|
let tmpArr = newState.labelListBlood;
|
|
|
let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempBloodOrder=[],tempTotalOrder=[];
|
|
|
if(tmpLis&&tmpLis.flg == 5){
|
|
|
- tempArr = tempArr.filter((item)=>item.time != tmpLis.time)
|
|
|
+ console.log(action.tip)
|
|
|
+ tempArr = tempArr.filter((item,idx)=>{
|
|
|
+ if(action.tip != idx){
|
|
|
+ return item
|
|
|
+ }
|
|
|
+ })
|
|
|
newState.labelListBig = [...tempArr]
|
|
|
}else if(tmpLis&&tmpLis.flg == 6){
|
|
|
- tempArrs = tempArrs.filter((item)=> item.time != tmpLis.time )
|
|
|
+ tempArrs = tempArrs.filter((item,idx)=> {
|
|
|
+ if(action.tip != idx){
|
|
|
+ return item
|
|
|
+ }
|
|
|
+ } )
|
|
|
newState.labelListSmall = [...tempArrs]
|
|
|
}else if(tmpLis&&tmpLis.flg == 8){
|
|
|
- tmpArr = tmpArr.filter((item)=> item.time != tmpLis.time )
|
|
|
+ tmpArr = tmpArr.filter((item,idx)=> {
|
|
|
+ if(action.tip != idx){
|
|
|
+ return item
|
|
|
+ }
|
|
|
+ } )
|
|
|
newState.labelListBlood = [...tmpArr]
|
|
|
}
|
|
|
tempBigOrder = tempArr.filter((item)=>item.check)
|
|
@@ -119,7 +132,7 @@ export default (state = initSearchList, action) => {
|
|
|
// console.log(action,1111111)
|
|
|
if(tmpLis.flg == 5){//药品
|
|
|
for(let i= 0;i < tempArr.length;i++){
|
|
|
- if(tmpLis.time == tempArr[i].time){
|
|
|
+ if(action.tip == i){
|
|
|
if(action.sign == 1){//时间
|
|
|
tempArr[i].time = action.value
|
|
|
tempArr[i].dateValue = action.value
|
|
@@ -131,7 +144,7 @@ export default (state = initSearchList, action) => {
|
|
|
newState.labelListBig = [...tempArr]
|
|
|
}else if(tmpLis.flg == 6){//手术
|
|
|
for(let i= 0;i < tempArrs.length;i++){
|
|
|
- if(tmpLis.time == tempArrs[i].time){
|
|
|
+ if(action.tip == i){
|
|
|
tempArrs[i].time = action.value
|
|
|
tempArrs[i].dateValue = action.value
|
|
|
}
|
|
@@ -139,7 +152,7 @@ export default (state = initSearchList, action) => {
|
|
|
newState.labelListSmall = [...tempArrs]
|
|
|
}if(tmpLis.flg == 8){//输血
|
|
|
for(let i= 0;i < tmpArr.length;i++){
|
|
|
- if(tmpLis.time == tmpArr[i].time){
|
|
|
+ if(action.tip == i){
|
|
|
if(action.sign == 1){
|
|
|
tmpArr[i].time = action.value
|
|
|
tmpArr[i].dateValue = action.value
|