|
@@ -86,7 +86,6 @@ export default (state = initSearchList, action) => {
|
|
|
if (action.type == SELECTJITYPE) {
|
|
|
const newState = Object.assign({}, state);
|
|
|
let tempArr = newState.labelListBig;
|
|
|
- console.log(tempArr)
|
|
|
for(let i = 0;i < tempArr.length;i++){
|
|
|
if(action.idx == i){
|
|
|
tempArr[i].selectShow = false
|
|
@@ -151,26 +150,27 @@ export default (state = initSearchList, action) => {
|
|
|
newState.labelListBig = [...tempArr]
|
|
|
}else if(tmpLis&&tmpLis.flg == 6){
|
|
|
tempArrs = tempArrs.filter((item,idx)=> {
|
|
|
- if(item['hasTreat'] = 1){
|
|
|
- newState.operationName = {}
|
|
|
- }
|
|
|
if(action.tip != idx){
|
|
|
return item
|
|
|
}
|
|
|
})
|
|
|
- for(let i = 0;i < tempArrs.length;i++){
|
|
|
- if(!tempArrs[i].hasTreat){
|
|
|
- ++num
|
|
|
+ if(tempArrs.length == 0){
|
|
|
+ newState.operationName = {}
|
|
|
+ }else{
|
|
|
+ for(let i = 0;i < tempArrs.length;i++){
|
|
|
+ if(tempArrs[i].hasTreat != 1){
|
|
|
+ ++num
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- if(tempArrs.length>0&&num == tempArrs.length){
|
|
|
- tempArrs[0]['hasTreat'] = 1
|
|
|
- let obj = {
|
|
|
- "dateValue": tempArrs[0].dateValue,
|
|
|
- "name": tempArrs[0].name,
|
|
|
- "uniqueName": tempArrs[0].name
|
|
|
+ if(tempArrs.length>0&&num == tempArrs.length){
|
|
|
+ tempArrs[0]['hasTreat'] = 1
|
|
|
+ let obj = {
|
|
|
+ "dateValue": tempArrs[0].dateValue,
|
|
|
+ "name": tempArrs[0].name,
|
|
|
+ "uniqueName": tempArrs[0].name
|
|
|
+ }
|
|
|
+ newState.operationName = obj
|
|
|
}
|
|
|
- newState.operationName = obj
|
|
|
}
|
|
|
newState.labelListSmall = [...tempArrs]
|
|
|
}else if(tmpLis&&tmpLis.flg == 8){
|