|
@@ -11,7 +11,7 @@ import {
|
|
|
DEL_EXCEL_LIST,
|
|
|
ADD_LABEL,
|
|
|
SET_CONTEXT,
|
|
|
- SET_TIP,
|
|
|
+ SET_TIP_NEW,
|
|
|
SEARCH_TYPE,
|
|
|
DEL_ONE_PIC,
|
|
|
CHECK_ON_OFF,
|
|
@@ -89,21 +89,30 @@ export default (state = initSearchList, action) => {
|
|
|
return newState;
|
|
|
}
|
|
|
|
|
|
- if (action.type == SET_TIP) {
|
|
|
+ if (action.type == SET_TIP_NEW) {
|
|
|
const newState = Object.assign({}, state);
|
|
|
let tempArr = newState.labelListBig;
|
|
|
let tempArrs = newState.labelListSmall;
|
|
|
let tmpLis = action.item
|
|
|
+ tempArr = tempArr.filter((item)=>{
|
|
|
+ item.time = action.value
|
|
|
+ return item
|
|
|
+ })
|
|
|
tempArrs = tempArrs.filter((item)=>{
|
|
|
if(item.time == tmpLis.time){
|
|
|
- if(isNumber(action.value-0)){
|
|
|
- item.value = action.value
|
|
|
+ if(action.sign ==1){
|
|
|
+ item.time = action.value
|
|
|
}else{
|
|
|
- item.otherValue = action.value
|
|
|
+ if(isNumber(action.value-0)){
|
|
|
+ item.value = action.value
|
|
|
+ }else{
|
|
|
+ item.otherValue = action.value
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return item
|
|
|
})
|
|
|
+ newState.labelListBig = [...tempArr]
|
|
|
newState.labelListSmall = [...tempArrs]
|
|
|
return newState;
|
|
|
}
|
|
@@ -268,6 +277,7 @@ export default (state = initSearchList, action) => {
|
|
|
const newState = Object.assign({}, state);
|
|
|
newState.labelListBig = action.params[8].content.labelListBig
|
|
|
newState.labelListSmall = action.params[8].content.labelListSmall;
|
|
|
+ newState.totalOrder = action.params[8].content.totalOrder;
|
|
|
return newState;
|
|
|
|
|
|
}
|
|
@@ -275,71 +285,12 @@ export default (state = initSearchList, action) => {
|
|
|
let newState = Object.assign({}, state);
|
|
|
newState.labelListBig = [];
|
|
|
newState.labelListSmall = [];
|
|
|
+ newState.totalOrder = [];
|
|
|
return newState;
|
|
|
}
|
|
|
return state;
|
|
|
}
|
|
|
|
|
|
-function getExcelString(action,newState,tmpArr,tmpArr2) {
|
|
|
- let tmpString = '';
|
|
|
- if(JSON.stringify(action.data||{}) != '{}' && action.data.lisExcelRes.length > 0){
|
|
|
- action.data.lisExcelRes.map((item)=>{
|
|
|
- item.lisExcelItem.map((part)=>{
|
|
|
- if(part.type == 1){
|
|
|
- if(part.max != '' && (part.value-0) > (part.max-0) ) {
|
|
|
- let rate = (part.value/part.max).toFixed(2);
|
|
|
- let tmpStr = part.mealName+','+part.itemName+','+part.value+' '+part.unit+'升高'+rate+';'
|
|
|
- tmpString += tmpStr;
|
|
|
- }else if(part.min != '' && (part.value-0) < (part.min-0) ){
|
|
|
- let rate = (part.value/part.min).toFixed(2);
|
|
|
- let tmpStr = part.mealName+','+part.itemName+','+part.value+' '+part.unit+'降低'+rate+';'
|
|
|
- tmpString += tmpStr;
|
|
|
- }else{
|
|
|
- let tmpStr = part.mealName+','+part.itemName+','+part.value+' '+part.unit+'异常;'
|
|
|
- tmpString += tmpStr;
|
|
|
- }
|
|
|
- }else{
|
|
|
- let tmpStr = part.mealName+','+part.itemName+','+part.value+' '+part.unit+'正常;'
|
|
|
- tmpString += tmpStr;
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- newState.pushItem = getPushList(tmpArr,tmpArr2);
|
|
|
- newState.pushItems = getPushLists(tmpArr,tmpArr2);
|
|
|
- newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
|
- }else{
|
|
|
- newState.inspectStrPlus = '';
|
|
|
- newState.pushItem = []
|
|
|
- }
|
|
|
-}
|
|
|
-function getString(lists) {
|
|
|
- let tmpString = '';
|
|
|
- lists.map((item)=>{
|
|
|
- if(item.show == true){
|
|
|
- item.details.map((part)=>{
|
|
|
- if(part.value){
|
|
|
- if(typeof(part.value) == "number"){
|
|
|
- if(part.maxValue != '' && (part.value-0) > (part.maxValue-0) ) {
|
|
|
- let rate = (part.value/part.maxValue).toFixed(2);
|
|
|
- let tmpStr = item.name+','+part.name+','+part.value+' '+part.labelSuffix+'升高'+rate+';'
|
|
|
- tmpString += tmpStr;
|
|
|
- }else if(part.minValue != '' && (part.value-0) < (part.minValue-0) ){
|
|
|
- let rate = (part.value/part.minValue).toFixed(2);
|
|
|
- let tmpStr = item.name+','+part.name+','+part.value+' '+part.labelSuffix+'降低'+rate+';'
|
|
|
- tmpString += tmpStr;
|
|
|
- }else{
|
|
|
- let tmpStr = item.name+','+part.name+','+part.value+' '+part.labelSuffix+';'
|
|
|
- tmpString += tmpStr;
|
|
|
- }
|
|
|
- }else{
|
|
|
- tmpString += item.name+','+part.name+','+part.value+' '+part.labelSuffix+';'
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- return tmpString;
|
|
|
-}
|
|
|
function isNumber(obj) {
|
|
|
return typeof obj === 'number' && !isNaN(obj)
|
|
|
}
|