|
@@ -1,25 +1,26 @@
|
|
import {
|
|
import {
|
|
- SEARCH_LIST,
|
|
|
|
- SET_LABEL,
|
|
|
|
- FILL_ACTIVE,
|
|
|
|
- GET_EXCEL,
|
|
|
|
- CHECK_VALUE_IS_CHANGE,
|
|
|
|
- CLEAR_LABEL,
|
|
|
|
- RESET_LABEL,
|
|
|
|
- CLEAR_ALL_LABEL,
|
|
|
|
- DEL_PART_ITEM,
|
|
|
|
- DEL_EXCEL_LIST,
|
|
|
|
- ADD_LABEL,
|
|
|
|
- SET_CONTEXT,
|
|
|
|
- SET_TIP_NEW,
|
|
|
|
- SEARCH_TYPE,
|
|
|
|
- DEL_ONE_PIC,
|
|
|
|
- CHECK_ON_OFF,
|
|
|
|
- REINSPECTDATA,
|
|
|
|
- CLEARINSPECTDATA,
|
|
|
|
|
|
+ SEARCH_LIST,
|
|
|
|
+ SET_LABEL,
|
|
|
|
+ FILL_ACTIVE,
|
|
|
|
+ GET_EXCEL,
|
|
|
|
+ CHECK_VALUE_IS_CHANGE,
|
|
|
|
+ CLEAR_LABEL,
|
|
|
|
+ RESET_LABEL,
|
|
|
|
+ CLEAR_ALL_LABEL,
|
|
|
|
+ DEL_PART_ITEM,
|
|
|
|
+ DEL_EXCEL_LIST,
|
|
|
|
+ ADD_LABEL,
|
|
|
|
+ SET_CONTEXT,
|
|
|
|
+ SET_TIP_NEW,
|
|
|
|
+ SEARCH_TYPE,
|
|
|
|
+ DEL_ONE_PIC,
|
|
|
|
+ CHECK_ON_OFF,
|
|
|
|
+ REINSPECTDATA,
|
|
|
|
+ CLEARINSPECTDATA,
|
|
} from '../types/inspect';
|
|
} from '../types/inspect';
|
|
import store from '@store';
|
|
import store from '@store';
|
|
-import { getStringPlus, getPushLists, getPushList,getCurrentDate} from '@utils/tools.js';
|
|
|
|
|
|
+import { Notify } from '@commonComp';
|
|
|
|
+import { getStringPlus, getPushLists, getPushList, getCurrentDate, compareDate } from '@utils/tools.js';
|
|
|
|
|
|
const initSearchList = {
|
|
const initSearchList = {
|
|
list: [], //搜索的结果
|
|
list: [], //搜索的结果
|
|
@@ -28,17 +29,17 @@ const initSearchList = {
|
|
fillActive: {}, //选中的标签的填写单
|
|
fillActive: {}, //选中的标签的填写单
|
|
|
|
|
|
getExcelData: {}, //导入的数据
|
|
getExcelData: {}, //导入的数据
|
|
- inspectStrPlus:'',
|
|
|
|
|
|
+ inspectStrPlus: '',
|
|
|
|
|
|
getExcelDataList: [], //导入的数据
|
|
getExcelDataList: [], //导入的数据
|
|
- pushItem:[], //推送的数据
|
|
|
|
- pushItems:[], //右侧模板预览的数据
|
|
|
|
- inspectVal:'',
|
|
|
|
- context:{},
|
|
|
|
- shType:2,
|
|
|
|
- labelListBig:[],//大项
|
|
|
|
- labelListSmall:[],//小项
|
|
|
|
- totalOrder:[],//开单项
|
|
|
|
|
|
+ pushItem: [], //推送的数据
|
|
|
|
+ pushItems: [], //右侧模板预览的数据
|
|
|
|
+ inspectVal: '',
|
|
|
|
+ context: {},
|
|
|
|
+ shType: 2,
|
|
|
|
+ labelListBig: [],//大项
|
|
|
|
+ labelListSmall: [],//小项
|
|
|
|
+ totalOrder: [],//开单项
|
|
}
|
|
}
|
|
|
|
|
|
export default (state = initSearchList, action) => {
|
|
export default (state = initSearchList, action) => {
|
|
@@ -46,81 +47,114 @@ export default (state = initSearchList, action) => {
|
|
const newState = Object.assign({}, state);
|
|
const newState = Object.assign({}, state);
|
|
let tempArr = newState.labelListBig;
|
|
let tempArr = newState.labelListBig;
|
|
let tempArrs = newState.labelListSmall;
|
|
let tempArrs = newState.labelListSmall;
|
|
- let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempTotalOrder=[];
|
|
|
|
- if(tmpLis&&tmpLis.flg == 1){
|
|
|
|
- for(let i = 0;i < tempArr.length;i++){
|
|
|
|
- if(action.tip == i){
|
|
|
|
|
|
+ let tmpLis = action.item, tempBigOrder = [], tempSmallOrder = [], tempTotalOrder = [];
|
|
|
|
+ if (tmpLis && tmpLis.flg == 1) {
|
|
|
|
+ for (let i = 0; i < tempArr.length; i++) {
|
|
|
|
+ if (action.tip == i) {
|
|
let flg = tempArr[i].check;
|
|
let flg = tempArr[i].check;
|
|
tempArr[i].check = !flg
|
|
tempArr[i].check = !flg
|
|
}
|
|
}
|
|
}
|
|
}
|
|
newState.labelListBig = [...tempArr]
|
|
newState.labelListBig = [...tempArr]
|
|
- }else{
|
|
|
|
- for(let i = 0;i < tempArrs.length;i++){
|
|
|
|
- if(action.tip==i){
|
|
|
|
|
|
+ } else {
|
|
|
|
+ for (let i = 0; i < tempArrs.length; i++) {
|
|
|
|
+ if (action.tip == i) {
|
|
let flg = tempArrs[i].check;
|
|
let flg = tempArrs[i].check;
|
|
tempArrs[i].check = !flg
|
|
tempArrs[i].check = !flg
|
|
}
|
|
}
|
|
}
|
|
}
|
|
newState.labelListSmall = [...tempArrs]
|
|
newState.labelListSmall = [...tempArrs]
|
|
}
|
|
}
|
|
- tempBigOrder = tempArr.filter((item)=>item.check)
|
|
|
|
- tempSmallOrder = tempArrs.filter((item)=>item.check)
|
|
|
|
- tempTotalOrder=tempBigOrder.concat(tempSmallOrder)
|
|
|
|
- newState.totalOrder=[...tempTotalOrder]
|
|
|
|
|
|
+ tempBigOrder = tempArr.filter((item) => item.check)
|
|
|
|
+ tempSmallOrder = tempArrs.filter((item) => item.check)
|
|
|
|
+ tempTotalOrder = tempBigOrder.concat(tempSmallOrder)
|
|
|
|
+ newState.totalOrder = [...tempTotalOrder]
|
|
return newState;
|
|
return newState;
|
|
}
|
|
}
|
|
if (action.type == DEL_ONE_PIC) {
|
|
if (action.type == DEL_ONE_PIC) {
|
|
const newState = Object.assign({}, state);
|
|
const newState = Object.assign({}, state);
|
|
let tempArr = newState.labelListBig;
|
|
let tempArr = newState.labelListBig;
|
|
let tempArrs = newState.labelListSmall;
|
|
let tempArrs = newState.labelListSmall;
|
|
- let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempTotalOrder=[];
|
|
|
|
- if(tmpLis&&tmpLis.flg == 1){//大项
|
|
|
|
- tempArr = tempArr.filter((item,idx)=>{
|
|
|
|
- if(action.tip != idx){
|
|
|
|
|
|
+ let tmpLis = action.item, tempBigOrder = [], tempSmallOrder = [], tempTotalOrder = [];
|
|
|
|
+ if (tmpLis && tmpLis.flg == 1) {//大项
|
|
|
|
+ tempArr = tempArr.filter((item, idx) => {
|
|
|
|
+ if (action.tip != idx) {
|
|
return item
|
|
return item
|
|
}
|
|
}
|
|
})
|
|
})
|
|
newState.labelListBig = [...tempArr]
|
|
newState.labelListBig = [...tempArr]
|
|
- }else{//小项
|
|
|
|
- tempArrs = tempArrs.filter((item,idx)=> {
|
|
|
|
- if(action.tip != idx){
|
|
|
|
|
|
+ } else {//小项
|
|
|
|
+ tempArrs = tempArrs.filter((item, idx) => {
|
|
|
|
+ if (action.tip != idx) {
|
|
return item
|
|
return item
|
|
}
|
|
}
|
|
})
|
|
})
|
|
newState.labelListSmall = [...tempArrs]
|
|
newState.labelListSmall = [...tempArrs]
|
|
}
|
|
}
|
|
- tempBigOrder = tempArr.filter((item)=>item.check)
|
|
|
|
- tempSmallOrder = tempArrs.filter((item)=>item.check)
|
|
|
|
- tempTotalOrder=tempBigOrder.concat(tempSmallOrder)
|
|
|
|
- newState.totalOrder=[...tempTotalOrder]
|
|
|
|
|
|
+ tempBigOrder = tempArr.filter((item) => item.check)
|
|
|
|
+ tempSmallOrder = tempArrs.filter((item) => item.check)
|
|
|
|
+ tempTotalOrder = tempBigOrder.concat(tempSmallOrder)
|
|
|
|
+ newState.totalOrder = [...tempTotalOrder]
|
|
return newState;
|
|
return newState;
|
|
}
|
|
}
|
|
-
|
|
|
|
if (action.type == SET_TIP_NEW) {
|
|
if (action.type == SET_TIP_NEW) {
|
|
const newState = Object.assign({}, state);
|
|
const newState = Object.assign({}, state);
|
|
let tempArr = newState.labelListBig;
|
|
let tempArr = newState.labelListBig;
|
|
let tempArrs = newState.labelListSmall;
|
|
let tempArrs = newState.labelListSmall;
|
|
let tmpLis = action.item
|
|
let tmpLis = action.item
|
|
- if(tmpLis.flg == 1){//大项,改的只能是时间
|
|
|
|
- tempArr = tempArr.filter((item,idx)=>{
|
|
|
|
- if(action.sign==idx){
|
|
|
|
- item.time = action.value
|
|
|
|
- item.dateValue = action.value
|
|
|
|
|
|
+ if (tmpLis.flg == 1) {//大项,改的只能是时间
|
|
|
|
+ tempArr = tempArr.filter((item, idx) => {
|
|
|
|
+ if (action.sign == idx) {
|
|
|
|
+ if (action.tip == 1) {
|
|
|
|
+ if (compareDate(action.value) > compareDate(item.finishDateValue)) {
|
|
|
|
+ Notify.error("报告时间不能早于开单时间");
|
|
|
|
+ return item
|
|
|
|
+ }
|
|
|
|
+ if (action.value == ''){
|
|
|
|
+ Notify.error("开单时间不能为空");
|
|
|
|
+ return item
|
|
|
|
+ }
|
|
|
|
+ item.time = action.value
|
|
|
|
+ item.dateValue = action.value
|
|
|
|
+ } else {
|
|
|
|
+ if (compareDate(item.dateValue) > compareDate(action.value)) {
|
|
|
|
+ Notify.error("报告时间不能早于开单时间");
|
|
|
|
+ return item
|
|
|
|
+ }
|
|
|
|
+ item.finishDateValue = action.value
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return item
|
|
return item
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
- tempArrs = tempArrs.filter((item,idx)=>{
|
|
|
|
- if(action.sign == idx){
|
|
|
|
- if(action.tip==1){//小项改时间
|
|
|
|
|
|
+ } else {
|
|
|
|
+ tempArrs = tempArrs.filter((item, idx) => {
|
|
|
|
+ if (action.sign == idx) {
|
|
|
|
+ if (action.tip == 1) {//小项改时间
|
|
|
|
+ if (compareDate(action.value) > compareDate(item.finishDateValue)) {
|
|
|
|
+ Notify.error("报告时间不能早于开单时间");
|
|
|
|
+ return item
|
|
|
|
+ }
|
|
|
|
+ if (action.value == '') {
|
|
|
|
+ Notify.error("开单时间不能为空");
|
|
|
|
+ return item
|
|
|
|
+ }
|
|
item.time = action.value
|
|
item.time = action.value
|
|
item.dateValue = action.value
|
|
item.dateValue = action.value
|
|
- }else{//小项该数值
|
|
|
|
- if(isNumber(action.value-0)){
|
|
|
|
|
|
+ } else if (action.tip == 3) {
|
|
|
|
+ if (compareDate(item.dateValue) > compareDate(action.value)) {
|
|
|
|
+ Notify.error("报告时间不能早于开单时间");
|
|
|
|
+ return item
|
|
|
|
+ }
|
|
|
|
+ if (action.value == '') {
|
|
|
|
+ Notify.error("检验细项报告时间不能为空");
|
|
|
|
+ return item
|
|
|
|
+ }
|
|
|
|
+ item.finishDateValue = action.value
|
|
|
|
+ } else {//小项该数值
|
|
|
|
+ if (isNumber(action.value - 0)) {
|
|
item.value = action.value
|
|
item.value = action.value
|
|
item.otherValue = ''
|
|
item.otherValue = ''
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
item.otherValue = action.value
|
|
item.otherValue = action.value
|
|
item.value = ''
|
|
item.value = ''
|
|
}
|
|
}
|
|
@@ -145,10 +179,11 @@ export default (state = initSearchList, action) => {
|
|
let tmpLis = action.list
|
|
let tmpLis = action.list
|
|
tmpLis['dateValue'] = getCurrentDate(1)
|
|
tmpLis['dateValue'] = getCurrentDate(1)
|
|
tmpLis['time'] = getCurrentDate(1)
|
|
tmpLis['time'] = getCurrentDate(1)
|
|
- if(tmpLis.flg == 1){//大项
|
|
|
|
|
|
+ tmpLis['finishDateValue'] = getCurrentDate(1)
|
|
|
|
+ if (tmpLis.flg == 1) {//大项
|
|
tempArr.push(tmpLis)
|
|
tempArr.push(tmpLis)
|
|
newState.labelListBig = [...tempArr]
|
|
newState.labelListBig = [...tempArr]
|
|
- }else{//小项
|
|
|
|
|
|
+ } else {//小项
|
|
tempArrs.push(tmpLis)
|
|
tempArrs.push(tmpLis)
|
|
newState.labelListSmall = [...tempArrs]
|
|
newState.labelListSmall = [...tempArrs]
|
|
}
|
|
}
|
|
@@ -163,11 +198,11 @@ export default (state = initSearchList, action) => {
|
|
if (action.type == SET_LABEL) { //选中的结果
|
|
if (action.type == SET_LABEL) { //选中的结果
|
|
const newState = Object.assign({}, state);
|
|
const newState = Object.assign({}, state);
|
|
let tempArr = [];
|
|
let tempArr = [];
|
|
- if(action.sign == 'common'){
|
|
|
|
- let tmpInspectList = store.getState().homePage.inspectList
|
|
|
|
- tempArr = tmpInspectList;
|
|
|
|
- }else{
|
|
|
|
- tempArr = newState.list
|
|
|
|
|
|
+ if (action.sign == 'common') {
|
|
|
|
+ let tmpInspectList = store.getState().homePage.inspectList
|
|
|
|
+ tempArr = tmpInspectList;
|
|
|
|
+ } else {
|
|
|
|
+ tempArr = newState.list
|
|
}
|
|
}
|
|
const tempArrs = newState.labelList;
|
|
const tempArrs = newState.labelList;
|
|
for (let i = 0; i < tempArr.length; i++) {
|
|
for (let i = 0; i < tempArr.length; i++) {
|
|
@@ -176,24 +211,24 @@ export default (state = initSearchList, action) => {
|
|
newState.labelList = [...tempArrs]
|
|
newState.labelList = [...tempArrs]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
let tmpArr = newState.getExcelDataList;
|
|
let tmpArr = newState.getExcelDataList;
|
|
let tmpArr2 = newState.labelList;
|
|
let tmpArr2 = newState.labelList;
|
|
- newState.pushItems = getPushLists(tmpArr,tmpArr2);
|
|
|
|
|
|
+ newState.pushItems = getPushLists(tmpArr, tmpArr2);
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
return newState;
|
|
return newState;
|
|
}
|
|
}
|
|
if (action.type == ADD_LABEL) { //右侧推送的检验检查项,点击开单放到左侧检验检查的位置上
|
|
if (action.type == ADD_LABEL) { //右侧推送的检验检查项,点击开单放到左侧检验检查的位置上
|
|
const newState = Object.assign({}, state);
|
|
const newState = Object.assign({}, state);
|
|
const tempArr = newState.labelList;
|
|
const tempArr = newState.labelList;
|
|
- for(let i = 0;i <action.lis.length;i++){
|
|
|
|
- tempArr.push(action.lis[i]);
|
|
|
|
|
|
+ for (let i = 0; i < action.lis.length; i++) {
|
|
|
|
+ tempArr.push(action.lis[i]);
|
|
}
|
|
}
|
|
newState.labelList = [...tempArr]
|
|
newState.labelList = [...tempArr]
|
|
-
|
|
|
|
|
|
+
|
|
let tmpArr = newState.getExcelDataList;
|
|
let tmpArr = newState.getExcelDataList;
|
|
let tmpArr2 = newState.labelList;
|
|
let tmpArr2 = newState.labelList;
|
|
- newState.pushItems = getPushLists(tmpArr,tmpArr2);
|
|
|
|
|
|
+ newState.pushItems = getPushLists(tmpArr, tmpArr2);
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems);
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems);
|
|
return newState;
|
|
return newState;
|
|
}
|
|
}
|
|
@@ -214,11 +249,11 @@ export default (state = initSearchList, action) => {
|
|
let tmpArr = newState.getExcelDataList;
|
|
let tmpArr = newState.getExcelDataList;
|
|
let tmpArr2 = newState.labelList;
|
|
let tmpArr2 = newState.labelList;
|
|
for (let i = 0; i < tempArr.length; i++) {
|
|
for (let i = 0; i < tempArr.length; i++) {
|
|
- // tempArr[i].value = ''
|
|
|
|
|
|
+ // tempArr[i].value = ''
|
|
}
|
|
}
|
|
tempArrs.show = false;
|
|
tempArrs.show = false;
|
|
- newState.pushItem = getPushList(tmpArr,tmpArr2);
|
|
|
|
- newState.pushItems = getPushLists(tmpArr,tmpArr2);
|
|
|
|
|
|
+ newState.pushItem = getPushList(tmpArr, tmpArr2);
|
|
|
|
+ newState.pushItems = getPushLists(tmpArr, tmpArr2);
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
return newState;
|
|
return newState;
|
|
}
|
|
}
|
|
@@ -230,21 +265,21 @@ export default (state = initSearchList, action) => {
|
|
|
|
|
|
tmpArr.push(action.data)
|
|
tmpArr.push(action.data)
|
|
newState.getExcelDataList = [...tmpArr]
|
|
newState.getExcelDataList = [...tmpArr]
|
|
- newState.pushItem = getPushList(tmpArr,tmpArr2);
|
|
|
|
- newState.pushItems = getPushLists(tmpArr,tmpArr2);
|
|
|
|
|
|
+ newState.pushItem = getPushList(tmpArr, tmpArr2);
|
|
|
|
+ newState.pushItems = getPushLists(tmpArr, tmpArr2);
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
// getExcelString(action,newState,tmpArr,tmpArr2)
|
|
// getExcelString(action,newState,tmpArr,tmpArr2)
|
|
return newState;
|
|
return newState;
|
|
}
|
|
}
|
|
- if(action.type == DEL_EXCEL_LIST){ //删除excel列表的某个数据
|
|
|
|
|
|
+ if (action.type == DEL_EXCEL_LIST) { //删除excel列表的某个数据
|
|
const newState = Object.assign({}, state);
|
|
const newState = Object.assign({}, state);
|
|
const tempArr2 = newState.labelList;
|
|
const tempArr2 = newState.labelList;
|
|
let tmpArr = newState.getExcelDataList;
|
|
let tmpArr = newState.getExcelDataList;
|
|
- tmpArr.splice(action.idx,1);
|
|
|
|
|
|
+ tmpArr.splice(action.idx, 1);
|
|
newState.getExcelDataList = [...tmpArr];
|
|
newState.getExcelDataList = [...tmpArr];
|
|
let tempArr1 = newState.getExcelDataList;
|
|
let tempArr1 = newState.getExcelDataList;
|
|
- newState.pushItem = getPushList(tempArr1,tempArr2);
|
|
|
|
- newState.pushItems = getPushLists(tempArr1,tempArr2);
|
|
|
|
|
|
+ newState.pushItem = getPushList(tempArr1, tempArr2);
|
|
|
|
+ newState.pushItems = getPushLists(tempArr1, tempArr2);
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
return newState;
|
|
return newState;
|
|
}
|
|
}
|
|
@@ -260,59 +295,59 @@ export default (state = initSearchList, action) => {
|
|
newState.fillActive = tempArr;
|
|
newState.fillActive = tempArr;
|
|
newState.labelList = tempArrs;
|
|
newState.labelList = tempArrs;
|
|
// tempArrAct.show = true;
|
|
// tempArrAct.show = true;
|
|
- newState.pushItem = getPushList(tmpArr,tempArrs);
|
|
|
|
- newState.pushItems = getPushLists(tmpArr,tempArrs);
|
|
|
|
|
|
+ newState.pushItem = getPushList(tmpArr, tempArrs);
|
|
|
|
+ newState.pushItems = getPushLists(tmpArr, tempArrs);
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
return newState;
|
|
return newState;
|
|
}
|
|
}
|
|
if (action.type == CLEAR_ALL_LABEL) { //清空所有数据
|
|
if (action.type == CLEAR_ALL_LABEL) { //清空所有数据
|
|
const newState = Object.assign({}, state);
|
|
const newState = Object.assign({}, state);
|
|
- newState.labelList =action.data;
|
|
|
|
|
|
+ newState.labelList = action.data;
|
|
newState.getExcelDataList = action.dataExcel;
|
|
newState.getExcelDataList = action.dataExcel;
|
|
let tmpArr = action.dataExcel;
|
|
let tmpArr = action.dataExcel;
|
|
const tempArrs = action.data;
|
|
const tempArrs = action.data;
|
|
- newState.pushItem = getPushList(tmpArr,tempArrs);
|
|
|
|
|
|
+ newState.pushItem = getPushList(tmpArr, tempArrs);
|
|
newState.inspectStrPlus = action.saveTextData;
|
|
newState.inspectStrPlus = action.saveTextData;
|
|
return newState;
|
|
return newState;
|
|
}
|
|
}
|
|
if (action.type == DEL_PART_ITEM) { //清空填寫数据
|
|
if (action.type == DEL_PART_ITEM) { //清空填寫数据
|
|
const newState = Object.assign({}, state);
|
|
const newState = Object.assign({}, state);
|
|
const tempArr = newState.labelList;
|
|
const tempArr = newState.labelList;
|
|
- tempArr.splice(action.idx,1);
|
|
|
|
|
|
+ tempArr.splice(action.idx, 1);
|
|
newState.labelList = [...tempArr];
|
|
newState.labelList = [...tempArr];
|
|
let tmpArr = newState.getExcelDataList;
|
|
let tmpArr = newState.getExcelDataList;
|
|
- newState.pushItem = getPushList(tmpArr,tempArr);
|
|
|
|
- newState.pushItems = getPushLists(tmpArr,tempArr);
|
|
|
|
|
|
+ newState.pushItem = getPushList(tmpArr, tempArr);
|
|
|
|
+ newState.pushItems = getPushLists(tmpArr, tempArr);
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
return newState;
|
|
return newState;
|
|
}
|
|
}
|
|
- if (action.type == SET_CONTEXT) {
|
|
|
|
|
|
+ if (action.type == SET_CONTEXT) {
|
|
const newState = Object.assign({}, state);
|
|
const newState = Object.assign({}, state);
|
|
newState.context = action.obj
|
|
newState.context = action.obj
|
|
return newState;
|
|
return newState;
|
|
}
|
|
}
|
|
if (action.type == REINSPECTDATA) {
|
|
if (action.type == REINSPECTDATA) {
|
|
- const newState = Object.assign({}, state);
|
|
|
|
- const data = action.params[8].content.labelListBig;
|
|
|
|
- const arr = data.filter((it)=>{
|
|
|
|
|
|
+ const newState = Object.assign({}, state);
|
|
|
|
+ const data = action.params[8].content.labelListBig;
|
|
|
|
+ const arr = data.filter((it) => {
|
|
return it.check;
|
|
return it.check;
|
|
});
|
|
});
|
|
newState.labelListBig = data
|
|
newState.labelListBig = data
|
|
- newState.labelListSmall = action.params[8].content.labelListSmall;
|
|
|
|
|
|
+ newState.labelListSmall = action.params[8].content.labelListSmall;
|
|
newState.totalOrder = arr;
|
|
newState.totalOrder = arr;
|
|
- return newState;
|
|
|
|
|
|
+ return newState;
|
|
|
|
|
|
}
|
|
}
|
|
if (action.type == CLEARINSPECTDATA) {
|
|
if (action.type == CLEARINSPECTDATA) {
|
|
- let newState = Object.assign({}, state);
|
|
|
|
- newState.labelListBig = [];
|
|
|
|
- newState.labelListSmall = [];
|
|
|
|
- newState.totalOrder = [];
|
|
|
|
- return newState;
|
|
|
|
|
|
+ let newState = Object.assign({}, state);
|
|
|
|
+ newState.labelListBig = [];
|
|
|
|
+ newState.labelListSmall = [];
|
|
|
|
+ newState.totalOrder = [];
|
|
|
|
+ return newState;
|
|
}
|
|
}
|
|
return state;
|
|
return state;
|
|
}
|
|
}
|
|
|
|
|
|
-function isNumber(obj) {
|
|
|
|
- return typeof obj === 'number' && !isNaN(obj)
|
|
|
|
|
|
+function isNumber(obj) {
|
|
|
|
+ return typeof obj === 'number' && !isNaN(obj)
|
|
}
|
|
}
|