|
@@ -26,7 +26,7 @@ export default (state = initSearchList, action) => {
|
|
|
newState.list = action.list
|
|
|
return newState;
|
|
|
}
|
|
|
- if (action.type == GET_ASSIST_LABEL) {
|
|
|
+ if (action.type == GET_ASSIST_LABEL) { //默认
|
|
|
const newState = Object.assign({}, state);
|
|
|
const tempArr = newState.list;
|
|
|
const tempArrs = newState.assistLabel;
|
|
@@ -37,14 +37,14 @@ export default (state = initSearchList, action) => {
|
|
|
tempArrs.push(tempArr[i]);
|
|
|
newState.assistLabel = [...tempArrs];
|
|
|
}
|
|
|
- for (let j = 0; j < tempArrs.length; j++) {
|
|
|
- tmpString += (tempArrs[j].name+(tempArrs[j].value?(','+tempArrs[j].value):'')+(tempArrs[j].time?',报告日期,'+tempArrs[j].time:'')+';')
|
|
|
- }
|
|
|
+ }
|
|
|
+ for (let j = 0; j < tempArrs.length; j++) {
|
|
|
+ tmpString += (tempArrs[j].name+(tempArrs[j].value?(':'+tempArrs[j].value):'')+(tempArrs[j].time?',报告日期:'+tempArrs[j].time:'')+';')
|
|
|
}
|
|
|
newState.dataString = tmpString
|
|
|
return newState;
|
|
|
}
|
|
|
- if (action.type == DEL_ASSIST_LABEL) {
|
|
|
+ if (action.type == DEL_ASSIST_LABEL) { //删除
|
|
|
const newState = Object.assign({}, state);
|
|
|
const tempArr = newState.assistLabel;
|
|
|
let tmpString = '';
|
|
@@ -54,13 +54,13 @@ export default (state = initSearchList, action) => {
|
|
|
return
|
|
|
}
|
|
|
for (let i = 0; i < tempArr.length; i++) {
|
|
|
- tmpString += (tempArr[i].name+(tempArr[i].value?(','+tempArr[i].value):'')+(tempArr[i].time?',报告日期,'+tempArr[i].time:'')+';')
|
|
|
+ tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
|
|
|
}
|
|
|
newState.assistLabel = [...tempArr]
|
|
|
newState.dataString = tmpString
|
|
|
return newState;
|
|
|
}
|
|
|
- if (action.type == CHANGE_ASSIST_VAL) {
|
|
|
+ if (action.type == CHANGE_ASSIST_VAL) { //改变输入值
|
|
|
const newState = Object.assign({}, state);
|
|
|
const tempArr = newState.assistLabel;
|
|
|
let tmpString = '';
|
|
@@ -69,12 +69,12 @@ export default (state = initSearchList, action) => {
|
|
|
tempArr[i].value = action.val
|
|
|
newState.assistLabel = [...tempArr]
|
|
|
}
|
|
|
- tmpString += (tempArr[i].name+(tempArr[i].value?(','+tempArr[i].value):'')+(tempArr[i].time?',报告日期,'+tempArr[i].time:'')+';')
|
|
|
+ tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
|
|
|
}
|
|
|
newState.dataString = tmpString
|
|
|
return newState;
|
|
|
}
|
|
|
- if (action.type == CHANGE_DATE) {
|
|
|
+ if (action.type == CHANGE_DATE) { //新增
|
|
|
const newState = Object.assign({}, state);
|
|
|
const tempArr = newState.assistLabel;
|
|
|
let tmpString = '';
|
|
@@ -83,7 +83,7 @@ export default (state = initSearchList, action) => {
|
|
|
tempArr[i].time = action.date
|
|
|
newState.assistLabel = [...tempArr]
|
|
|
}
|
|
|
- tmpString += (tempArr[i].name+(tempArr[i].value?(','+tempArr[i].value):'')+(tempArr[i].time?',报告日期,'+tempArr[i].time:'')+';')
|
|
|
+ tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
|
|
|
}
|
|
|
newState.dataString = tmpString
|
|
|
return newState;
|