|
@@ -1,28 +1,28 @@
|
|
|
import {
|
|
|
- SEARCH_LIST,
|
|
|
- SET_LABEL,
|
|
|
- FILL_ACTIVE,
|
|
|
- GET_EXCEL,
|
|
|
- CHECK_VALUE_IS_CHANGE,
|
|
|
- CLEAR_LABEL,
|
|
|
- RESET_LABEL_NEW,
|
|
|
- CLEAR_ALL_LABEL,
|
|
|
- DEL_PART_ITEM_NEW,
|
|
|
- DEL_EXCEL_LIST,
|
|
|
- ADD_LABEL,
|
|
|
- SET_CONTEXT,
|
|
|
- SET_TIP_ADVICE,
|
|
|
- DEL_ONE_PIC_NEW,
|
|
|
- SEARCH_TYPE_NEW,
|
|
|
- CHECK_OFF_ON_NEW,
|
|
|
- RENEWADVICEDATA,
|
|
|
- CLEARNEWADVICEDATA,
|
|
|
- SELECTJITYPE,
|
|
|
- HANDLESELECTSHOW,
|
|
|
- HANDLESUI,
|
|
|
+ SEARCH_LIST,
|
|
|
+ SET_LABEL,
|
|
|
+ FILL_ACTIVE,
|
|
|
+ GET_EXCEL,
|
|
|
+ CHECK_VALUE_IS_CHANGE,
|
|
|
+ CLEAR_LABEL,
|
|
|
+ RESET_LABEL_NEW,
|
|
|
+ CLEAR_ALL_LABEL,
|
|
|
+ DEL_PART_ITEM_NEW,
|
|
|
+ DEL_EXCEL_LIST,
|
|
|
+ ADD_LABEL,
|
|
|
+ SET_CONTEXT,
|
|
|
+ SET_TIP_ADVICE,
|
|
|
+ DEL_ONE_PIC_NEW,
|
|
|
+ SEARCH_TYPE_NEW,
|
|
|
+ CHECK_OFF_ON_NEW,
|
|
|
+ RENEWADVICEDATA,
|
|
|
+ CLEARNEWADVICEDATA,
|
|
|
+ SELECTJITYPE,
|
|
|
+ HANDLESELECTSHOW,
|
|
|
+ HANDLESUI,
|
|
|
} from '../types/newAdvice';
|
|
|
import store from '@store';
|
|
|
-import {getStringPlus,getPushLists,getPushList,getCurrentDate} from '@utils/tools.js';
|
|
|
+import { getStringPlus, getPushLists, getPushList, getCurrentDate } from '@utils/tools.js';
|
|
|
|
|
|
const initSearchList = {
|
|
|
list: [], //搜索的结果
|
|
@@ -31,22 +31,22 @@ const initSearchList = {
|
|
|
fillActive: {}, //选中的标签的填写单
|
|
|
|
|
|
getExcelData: {}, //导入的数据
|
|
|
- inspectStrPlus:'',
|
|
|
+ inspectStrPlus: '',
|
|
|
|
|
|
getExcelDataList: [], //导入的数据
|
|
|
- pushItem:[], //推送的数据
|
|
|
- pushItems:[], //右侧模板预览的数据
|
|
|
- inspectVal:'',
|
|
|
- context:{},
|
|
|
- shType:5,
|
|
|
- labelListBig:[],//大项
|
|
|
- labelListSmall:[],//小项
|
|
|
- labelListBlood:[],//输血
|
|
|
- drugOrder:[],//开单项
|
|
|
- operationOrder:[],//开单项
|
|
|
- transfusionOrder:[],
|
|
|
- activeIdx:'',
|
|
|
- operationName:{}
|
|
|
+ pushItem: [], //推送的数据
|
|
|
+ pushItems: [], //右侧模板预览的数据
|
|
|
+ inspectVal: '',
|
|
|
+ context: {},
|
|
|
+ shType: 5,
|
|
|
+ labelListBig: [],//大项
|
|
|
+ labelListSmall: [],//小项
|
|
|
+ labelListBlood: [],//输血
|
|
|
+ drugOrder: [],//开单项
|
|
|
+ operationOrder: [],//开单项
|
|
|
+ transfusionOrder: [],
|
|
|
+ activeIdx: '',
|
|
|
+ operationName: {}
|
|
|
}
|
|
|
|
|
|
export default (state = initSearchList, action) => {
|
|
@@ -54,10 +54,10 @@ export default (state = initSearchList, action) => {
|
|
|
const newState = Object.assign({}, state);
|
|
|
let tempArr = newState.labelListSmall;
|
|
|
let tmpLis = action.item
|
|
|
- for(let i = 0;i < tempArr.length;i++){
|
|
|
- if(action.idx == i){
|
|
|
+ for (let i = 0; i < tempArr.length; i++) {
|
|
|
+ if (action.idx == i) {
|
|
|
tempArr[i].hasTreat = 1
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
tempArr[i].hasTreat = 0
|
|
|
}
|
|
|
}
|
|
@@ -73,11 +73,11 @@ export default (state = initSearchList, action) => {
|
|
|
if (action.type == HANDLESELECTSHOW) {
|
|
|
const newState = Object.assign({}, state);
|
|
|
let tempArr = newState.labelListBig;
|
|
|
- for(let i = 0;i < tempArr.length;i++){
|
|
|
- if(action.idx == i){
|
|
|
+ for (let i = 0; i < tempArr.length; i++) {
|
|
|
+ if (action.idx == i) {
|
|
|
let flg = tempArr[i].selectShow;
|
|
|
- tempArr[i].selectShow = action.sign==1?true:action.sign==0?false:!flg
|
|
|
- newState.activeIdx = action.idx
|
|
|
+ tempArr[i].selectShow = action.sign == 1 ? true : action.sign == 0 ? false : !flg
|
|
|
+ newState.activeIdx = action.idx
|
|
|
}
|
|
|
}
|
|
|
newState.labelListBig = [...tempArr]
|
|
@@ -86,8 +86,8 @@ export default (state = initSearchList, action) => {
|
|
|
if (action.type == SELECTJITYPE) {
|
|
|
const newState = Object.assign({}, state);
|
|
|
let tempArr = newState.labelListBig;
|
|
|
- for(let i = 0;i < tempArr.length;i++){
|
|
|
- if(action.idx == i){
|
|
|
+ for (let i = 0; i < tempArr.length; i++) {
|
|
|
+ if (action.idx == i) {
|
|
|
tempArr[i].selectShow = false
|
|
|
tempArr[i].form = action.part.name
|
|
|
tempArr[i].selectVal = action.part.val
|
|
@@ -101,38 +101,38 @@ export default (state = initSearchList, action) => {
|
|
|
let tempArr = newState.labelListBig;
|
|
|
let tempArrs = newState.labelListSmall;
|
|
|
let tmpArr = newState.labelListBlood;
|
|
|
- let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempBloodOrder=[],tempTotalOrder=[];
|
|
|
- if(tmpLis&&tmpLis.flg == 5){//药品
|
|
|
- for(let i = 0;i < tempArr.length;i++){
|
|
|
- if(action.tip == i){
|
|
|
+ let tmpLis = action.item, tempBigOrder = [], tempSmallOrder = [], tempBloodOrder = [], tempTotalOrder = [];
|
|
|
+ if (tmpLis && tmpLis.flg == 5) {//药品
|
|
|
+ for (let i = 0; i < tempArr.length; i++) {
|
|
|
+ if (action.tip == i) {
|
|
|
let flg = tempArr[i].check;
|
|
|
tempArr[i].check = !flg
|
|
|
}
|
|
|
}
|
|
|
newState.labelListBig = [...tempArr]
|
|
|
- }else if(tmpLis&&tmpLis.flg == 6){//手术、操作
|
|
|
- for(let i = 0;i < tempArrs.length;i++){
|
|
|
- if(action.tip == i){
|
|
|
+ } else if (tmpLis && tmpLis.flg == 6) {//手术、操作
|
|
|
+ for (let i = 0; i < tempArrs.length; i++) {
|
|
|
+ if (action.tip == i) {
|
|
|
let flg = tempArrs[i].check;
|
|
|
tempArrs[i].check = !flg
|
|
|
}
|
|
|
}
|
|
|
newState.labelListSmall = [...tempArrs]
|
|
|
- }else if(tmpLis&&tmpLis.flg == 8){//输血
|
|
|
- for(let i = 0;i < tmpArr.length;i++){
|
|
|
- if(action.tip == i){
|
|
|
+ } else if (tmpLis && tmpLis.flg == 8) {//输血
|
|
|
+ for (let i = 0; i < tmpArr.length; i++) {
|
|
|
+ if (action.tip == i) {
|
|
|
let flg = tmpArr[i].check;
|
|
|
tmpArr[i].check = !flg
|
|
|
}
|
|
|
}
|
|
|
newState.labelListBlood = [...tmpArr]
|
|
|
}
|
|
|
- tempBigOrder = tempArr.filter((item)=>item.check)
|
|
|
- tempSmallOrder = tempArrs.filter((item)=>item.check)
|
|
|
- tempBloodOrder = tmpArr.filter((item)=>item.check)
|
|
|
- newState.drugOrder=[...tempBigOrder]
|
|
|
- newState.operationOrder=[...tempSmallOrder]
|
|
|
- newState.transfusionOrder=[...tempBloodOrder]
|
|
|
+ tempBigOrder = tempArr.filter((item) => item.check)
|
|
|
+ tempSmallOrder = tempArrs.filter((item) => item.check)
|
|
|
+ tempBloodOrder = tmpArr.filter((item) => item.check)
|
|
|
+ newState.drugOrder = [...tempBigOrder]
|
|
|
+ newState.operationOrder = [...tempSmallOrder]
|
|
|
+ newState.transfusionOrder = [...tempBloodOrder]
|
|
|
return newState;
|
|
|
}
|
|
|
if (action.type == DEL_ONE_PIC_NEW) {
|
|
@@ -140,29 +140,29 @@ export default (state = initSearchList, action) => {
|
|
|
let tempArr = newState.labelListBig;
|
|
|
let tempArrs = newState.labelListSmall;
|
|
|
let tmpArr = newState.labelListBlood;
|
|
|
- let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempBloodOrder=[],tempTotalOrder=[],num=0;
|
|
|
- if(tmpLis&&tmpLis.flg == 5){
|
|
|
- tempArr = tempArr.filter((item,idx)=>{
|
|
|
- if(action.tip != idx){
|
|
|
+ let tmpLis = action.item, tempBigOrder = [], tempSmallOrder = [], tempBloodOrder = [], tempTotalOrder = [], num = 0;
|
|
|
+ if (tmpLis && tmpLis.flg == 5) {
|
|
|
+ tempArr = tempArr.filter((item, idx) => {
|
|
|
+ if (action.tip != idx) {
|
|
|
return item
|
|
|
}
|
|
|
})
|
|
|
newState.labelListBig = [...tempArr]
|
|
|
- }else if(tmpLis&&tmpLis.flg == 6){
|
|
|
- tempArrs = tempArrs.filter((item,idx)=> {
|
|
|
- if(action.tip != idx){
|
|
|
+ } else if (tmpLis && tmpLis.flg == 6) {
|
|
|
+ tempArrs = tempArrs.filter((item, idx) => {
|
|
|
+ if (action.tip != idx) {
|
|
|
return item
|
|
|
}
|
|
|
})
|
|
|
- if(tempArrs.length == 0){
|
|
|
+ if (tempArrs.length == 0) {
|
|
|
newState.operationName = {}
|
|
|
- }else{
|
|
|
- for(let i = 0;i < tempArrs.length;i++){
|
|
|
- if(tempArrs[i].hasTreat != 1){
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < tempArrs.length; i++) {
|
|
|
+ if (tempArrs[i].hasTreat != 1) {
|
|
|
++num
|
|
|
}
|
|
|
}
|
|
|
- if(tempArrs.length>0&&num == tempArrs.length){
|
|
|
+ if (tempArrs.length > 0 && num == tempArrs.length) {
|
|
|
tempArrs[0]['hasTreat'] = 1
|
|
|
let obj = {
|
|
|
"dateValue": tempArrs[0].dateValue,
|
|
@@ -173,48 +173,48 @@ export default (state = initSearchList, action) => {
|
|
|
}
|
|
|
}
|
|
|
newState.labelListSmall = [...tempArrs]
|
|
|
- }else if(tmpLis&&tmpLis.flg == 8){
|
|
|
- tmpArr = tmpArr.filter((item,idx)=> {
|
|
|
- if(action.tip != idx){
|
|
|
+ } else if (tmpLis && tmpLis.flg == 8) {
|
|
|
+ tmpArr = tmpArr.filter((item, idx) => {
|
|
|
+ if (action.tip != idx) {
|
|
|
return item
|
|
|
}
|
|
|
})
|
|
|
newState.labelListBlood = [...tmpArr]
|
|
|
}
|
|
|
- tempBigOrder = tempArr.filter((item)=>item.check)
|
|
|
- tempSmallOrder = tempArrs.filter((item)=>item.check)
|
|
|
- tempBloodOrder = tmpArr.filter((item)=>item.check)
|
|
|
- tempTotalOrder=tempBigOrder.concat(tempSmallOrder)
|
|
|
- newState.drugOrder=[...tempBigOrder]
|
|
|
- newState.operationOrder=[...tempSmallOrder]
|
|
|
- newState.transfusionOrder=[...tempBloodOrder]
|
|
|
+ tempBigOrder = tempArr.filter((item) => item.check)
|
|
|
+ tempSmallOrder = tempArrs.filter((item) => item.check)
|
|
|
+ tempBloodOrder = tmpArr.filter((item) => item.check)
|
|
|
+ tempTotalOrder = tempBigOrder.concat(tempSmallOrder)
|
|
|
+ newState.drugOrder = [...tempBigOrder]
|
|
|
+ newState.operationOrder = [...tempSmallOrder]
|
|
|
+ newState.transfusionOrder = [...tempBloodOrder]
|
|
|
return newState;
|
|
|
}
|
|
|
|
|
|
- if (action.type == SET_TIP_ADVICE) {
|
|
|
+ if (action.type == SET_TIP_ADVICE) {
|
|
|
const newState = Object.assign({}, state);
|
|
|
let tempArr = newState.labelListBig;
|
|
|
let tempArrs = newState.labelListSmall;
|
|
|
let tmpArr = newState.labelListBlood;
|
|
|
let tmpLis = action.item
|
|
|
- if(tmpLis.flg == 5){//药品
|
|
|
- for(let i= 0;i < tempArr.length;i++){
|
|
|
- if(action.tip == i){
|
|
|
- if(action.sign == 1){//时间
|
|
|
+ if (tmpLis.flg == 5) {//药品
|
|
|
+ for (let i = 0; i < tempArr.length; i++) {
|
|
|
+ if (action.tip == i) {
|
|
|
+ if (action.sign == 1) {//时间
|
|
|
tempArr[i].time = action.value
|
|
|
tempArr[i].dateValue = action.value
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
tempArr[i].value = action.value
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
newState.labelListBig = tempArr
|
|
|
- }else if(tmpLis.flg == 6){//手术
|
|
|
- for(let i= 0;i < tempArrs.length;i++){
|
|
|
- if(action.tip == i){
|
|
|
+ } else if (tmpLis.flg == 6) {//手术
|
|
|
+ for (let i = 0; i < tempArrs.length; i++) {
|
|
|
+ if (action.tip == i) {
|
|
|
tempArrs[i].time = action.value
|
|
|
tempArrs[i].dateValue = action.value
|
|
|
- if(tmpLis.hasTreat){
|
|
|
+ if (tmpLis.hasTreat) {
|
|
|
let obj = {
|
|
|
"dateValue": action.value,
|
|
|
"name": tmpLis.name,
|
|
@@ -225,13 +225,13 @@ export default (state = initSearchList, action) => {
|
|
|
}
|
|
|
}
|
|
|
newState.labelListSmall = tempArrs
|
|
|
- }if(tmpLis.flg == 8){//输血
|
|
|
- for(let i= 0;i < tmpArr.length;i++){
|
|
|
- if(action.tip == i){
|
|
|
- if(action.sign == 1){
|
|
|
+ } if (tmpLis.flg == 8) {//输血
|
|
|
+ for (let i = 0; i < tmpArr.length; i++) {
|
|
|
+ if (action.tip == i) {
|
|
|
+ if (action.sign == 1) {
|
|
|
tmpArr[i].time = action.value
|
|
|
tmpArr[i].dateValue = action.value
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
tmpArr[i].value = action.value
|
|
|
}
|
|
|
}
|
|
@@ -250,20 +250,20 @@ export default (state = initSearchList, action) => {
|
|
|
const tempArr = newState.labelListBig;
|
|
|
const tempArrs = newState.labelListSmall;
|
|
|
const tmpArr = newState.labelListBlood;
|
|
|
- let tmpLis = action.list,num=0
|
|
|
+ let tmpLis = action.list, num = 0
|
|
|
tmpLis['time'] = getCurrentDate(1)
|
|
|
tmpLis['dateValue'] = getCurrentDate(1)
|
|
|
- if(tmpLis.flg == 5){
|
|
|
+ if (tmpLis.flg == 5) {
|
|
|
tempArr.push(tmpLis)
|
|
|
newState.labelListBig = [...tempArr]
|
|
|
- }else if(tmpLis.flg == 6){
|
|
|
+ } else if (tmpLis.flg == 6) {
|
|
|
tempArrs.push(tmpLis)
|
|
|
- for(let i = 0;i < tempArrs.length;i++){
|
|
|
- if(!tempArrs[i].hasTreat){
|
|
|
+ for (let i = 0; i < tempArrs.length; i++) {
|
|
|
+ if (!tempArrs[i].hasTreat) {
|
|
|
++num
|
|
|
}
|
|
|
}
|
|
|
- if(num == tempArrs.length){
|
|
|
+ if (num == tempArrs.length) {
|
|
|
tempArrs[0]['hasTreat'] = 1
|
|
|
let obj = {
|
|
|
"dateValue": tmpLis.dateValue,
|
|
@@ -273,7 +273,7 @@ export default (state = initSearchList, action) => {
|
|
|
newState.operationName = obj
|
|
|
}
|
|
|
newState.labelListSmall = [...tempArrs]
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
tmpArr.push(tmpLis)
|
|
|
newState.labelListBlood = [...tmpArr]
|
|
|
}
|
|
@@ -288,11 +288,11 @@ export default (state = initSearchList, action) => {
|
|
|
if (action.type == SET_LABEL) { //选中的结果
|
|
|
const newState = Object.assign({}, state);
|
|
|
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;
|
|
|
for (let i = 0; i < tempArr.length; i++) {
|
|
@@ -301,24 +301,24 @@ export default (state = initSearchList, action) => {
|
|
|
newState.labelList = [...tempArrs]
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
let tmpArr = newState.getExcelDataList;
|
|
|
let tmpArr2 = newState.labelList;
|
|
|
- newState.pushItems = getPushLists(tmpArr,tmpArr2);
|
|
|
+ newState.pushItems = getPushLists(tmpArr, tmpArr2);
|
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems)
|
|
|
return newState;
|
|
|
}
|
|
|
if (action.type == ADD_LABEL) { //右侧推送的检验检查项,点击开单放到左侧检验检查的位置上
|
|
|
const newState = Object.assign({}, state);
|
|
|
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]
|
|
|
-
|
|
|
+
|
|
|
let tmpArr = newState.getExcelDataList;
|
|
|
let tmpArr2 = newState.labelList;
|
|
|
- newState.pushItems = getPushLists(tmpArr,tmpArr2);
|
|
|
+ newState.pushItems = getPushLists(tmpArr, tmpArr2);
|
|
|
newState.inspectStrPlus = getStringPlus(newState.pushItems);
|
|
|
return newState;
|
|
|
}
|
|
@@ -339,11 +339,11 @@ export default (state = initSearchList, action) => {
|
|
|
let tmpArr = newState.getExcelDataList;
|
|
|
let tmpArr2 = newState.labelList;
|
|
|
for (let i = 0; i < tempArr.length; i++) {
|
|
|
- // tempArr[i].value = ''
|
|
|
+ // tempArr[i].value = ''
|
|
|
}
|
|
|
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)
|
|
|
return newState;
|
|
|
}
|
|
@@ -355,21 +355,21 @@ export default (state = initSearchList, action) => {
|
|
|
|
|
|
tmpArr.push(action.data)
|
|
|
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)
|
|
|
// getExcelString(action,newState,tmpArr,tmpArr2)
|
|
|
return newState;
|
|
|
}
|
|
|
- if(action.type == DEL_EXCEL_LIST){ //删除excel列表的某个数据
|
|
|
+ if (action.type == DEL_EXCEL_LIST) { //删除excel列表的某个数据
|
|
|
const newState = Object.assign({}, state);
|
|
|
const tempArr2 = newState.labelList;
|
|
|
let tmpArr = newState.getExcelDataList;
|
|
|
- tmpArr.splice(action.idx,1);
|
|
|
+ tmpArr.splice(action.idx, 1);
|
|
|
newState.getExcelDataList = [...tmpArr];
|
|
|
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)
|
|
|
return newState;
|
|
|
}
|
|
@@ -385,66 +385,70 @@ export default (state = initSearchList, action) => {
|
|
|
newState.fillActive = tempArr;
|
|
|
newState.labelList = tempArrs;
|
|
|
// 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)
|
|
|
return newState;
|
|
|
}
|
|
|
if (action.type == CLEAR_ALL_LABEL) { //清空所有数据
|
|
|
const newState = Object.assign({}, state);
|
|
|
- newState.labelList =action.data;
|
|
|
+ newState.labelList = action.data;
|
|
|
newState.getExcelDataList = action.dataExcel;
|
|
|
let tmpArr = action.dataExcel;
|
|
|
const tempArrs = action.data;
|
|
|
- newState.pushItem = getPushList(tmpArr,tempArrs);
|
|
|
+ newState.pushItem = getPushList(tmpArr, tempArrs);
|
|
|
newState.inspectStrPlus = action.saveTextData;
|
|
|
return newState;
|
|
|
}
|
|
|
if (action.type == DEL_PART_ITEM_NEW) { //清空填寫数据
|
|
|
const newState = Object.assign({}, state);
|
|
|
const tempArr = newState.labelList;
|
|
|
- tempArr.splice(action.idx,1);
|
|
|
+ tempArr.splice(action.idx, 1);
|
|
|
newState.labelList = [...tempArr];
|
|
|
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)
|
|
|
return newState;
|
|
|
}
|
|
|
- if (action.type == SET_CONTEXT) {
|
|
|
+ if (action.type == SET_CONTEXT) {
|
|
|
const newState = Object.assign({}, state);
|
|
|
newState.context = action.obj
|
|
|
return newState;
|
|
|
}
|
|
|
if (action.type == RENEWADVICEDATA) {
|
|
|
- const newState = Object.assign({}, state);
|
|
|
- const data = action.params[11].content.labelListBig;
|
|
|
- const drugArr = data.filter((it)=>{
|
|
|
- return it.check;
|
|
|
- });
|
|
|
- const data1 = action.params[11].content.labelListSmall;
|
|
|
- const operationArr =data1.filter((it)=>{
|
|
|
- return it.check;
|
|
|
- });
|
|
|
- newState.labelListBig = data;
|
|
|
- newState.labelListSmall = data1;
|
|
|
- newState.drugOrder = drugArr;
|
|
|
- newState.operationOrder = operationArr;
|
|
|
- newState.labelListBlood = action.params[11].content.labelListBlood;
|
|
|
- newState.transfusionOrder = action.params[11].content.transfusionOrder;
|
|
|
- newState.operationName = action.params[11].content.operationName;
|
|
|
- return newState;
|
|
|
+ const newState = Object.assign({}, state);
|
|
|
+ const data = action.params[11].content.labelListBig;
|
|
|
+ const drugArr = data.filter((it) => {
|
|
|
+ return it.check;
|
|
|
+ });
|
|
|
+ const data1 = action.params[11].content.labelListSmall;
|
|
|
+ const operationArr = data1.filter((it) => {
|
|
|
+ return it.check;
|
|
|
+ });
|
|
|
+ const data2 = action.params[11].content.labelListBlood;
|
|
|
+ const transfusionOrder = data2.filter((it) => {
|
|
|
+ return it.check;
|
|
|
+ });
|
|
|
+ newState.labelListBig = data;
|
|
|
+ newState.labelListSmall = data1;
|
|
|
+ newState.drugOrder = drugArr;
|
|
|
+ newState.operationOrder = operationArr;
|
|
|
+ newState.labelListBlood = action.params[11].content.labelListBlood;
|
|
|
+ newState.transfusionOrder = transfusionOrder;
|
|
|
+ newState.operationName = action.params[11].content.operationName;
|
|
|
+ return newState;
|
|
|
}
|
|
|
if (action.type == CLEARNEWADVICEDATA) {
|
|
|
- const newState = Object.assign({}, state);
|
|
|
- newState.labelListBig = [];
|
|
|
- newState.labelListSmall = [];
|
|
|
- newState.drugOrder = [];
|
|
|
- newState.operationOrder = [];
|
|
|
- newState.labelListBlood = [];
|
|
|
- newState.transfusionOrder = [];
|
|
|
- newState.operationName = {};
|
|
|
- return newState;
|
|
|
+ const newState = Object.assign({}, state);
|
|
|
+ newState.labelListBig = [];
|
|
|
+ newState.labelListSmall = [];
|
|
|
+ newState.drugOrder = [];
|
|
|
+ newState.operationOrder = [];
|
|
|
+ newState.labelListBlood = [];
|
|
|
+ newState.transfusionOrder = [];
|
|
|
+ newState.operationName = {};
|
|
|
+ return newState;
|
|
|
}
|
|
|
return state;
|
|
|
}
|