|
@@ -336,23 +336,27 @@ export function getAllHis(item){
|
|
|
return (dispatch,getStore)=>{
|
|
|
const state = getStore();
|
|
|
const {message} = state.patInfo;
|
|
|
- const params = {
|
|
|
- "current": item.current,
|
|
|
- // "endDate": item.endDate,
|
|
|
- "hospitalDeptId": message.hospitalDeptId,
|
|
|
- "hospitalId": message.hospitalId,
|
|
|
- "size": 6,
|
|
|
- // "startDate": item.startDate,
|
|
|
+ const {params} = state.emergencyHis;
|
|
|
+ let param = {};
|
|
|
+ if(JSON.stringify(params) == '{}'){
|
|
|
+ param = {
|
|
|
+ "current": item.current,
|
|
|
+ "hospitalDeptId": message.hospitalDeptId,
|
|
|
+ "hospitalId": message.hospitalId,
|
|
|
+ "size": 6,
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ param = Object.assign({},params,{current:item.current})
|
|
|
}
|
|
|
|
|
|
- json(api.getAllHisURL,params).then((res)=>{
|
|
|
+ json(api.getAllHisURL,param).then((res)=>{
|
|
|
const result = res.data;
|
|
|
if(result.code == 0){
|
|
|
dispatch({
|
|
|
type:GET_ALL_HIS,
|
|
|
data:result.data.inquiryList,
|
|
|
total:result.data.total,
|
|
|
- params:params,
|
|
|
+ params:param,
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -366,13 +370,14 @@ export function getFilterHis(obj){
|
|
|
const {params} = state.emergencyHis;
|
|
|
let newParam = {};
|
|
|
if(obj.flag == 999){//时间筛选
|
|
|
- newParam = Object.assign(params,{startDate:obj.startDate,endDate:obj.endDate})
|
|
|
+ newParam = Object.assign(params,{startDate:obj.startDate,endDate:obj.endDate,current:1})
|
|
|
}else{
|
|
|
- if(obj.flag==-1){
|
|
|
+ /*if(obj.flag==-1){
|
|
|
newParam = Object.assign(params,{current:1})
|
|
|
}else{
|
|
|
- newParam = Object.assign({},params,{isHasSecond:obj.flag})
|
|
|
- }
|
|
|
+ newParam = Object.assign({},params,{isHasSecond:obj.flag,current:1})
|
|
|
+ }*/
|
|
|
+ newParam = Object.assign({},params,{isHasSecond:obj.flag,current:1})
|
|
|
}
|
|
|
|
|
|
json(api.getAllHisURL,newParam).then((res)=>{
|
|
@@ -382,7 +387,8 @@ export function getFilterHis(obj){
|
|
|
type:FILTER_ALL_HIS,
|
|
|
data:result.data.inquiryList,
|
|
|
total:result.data.total,
|
|
|
- params:Object.assign(params,{current:1}),
|
|
|
+ // params:Object.assign(params,{current:1}),
|
|
|
+ params:Object.assign(newParam,{current:1}),
|
|
|
})
|
|
|
}
|
|
|
})
|