historyTemplates.js 728 B

123456789101112131415161718192021222324
  1. import axios from '@utils/ajax';
  2. import { initHistory } from '@store/actions/historyTemplates';
  3. import store from '@store';
  4. export const initItemList = () => {
  5. let baseList = store.getState();
  6. // let whichSign = baseList.typeConfig.typeConfig;
  7. let state = baseList.patInfo.message;
  8. return (dispatch) => {
  9. axios.json('/api/icss/inquiryInfo/hisInquirys',{
  10. "hospitalId": state.hospitalId,
  11. "patientId": state.patientId,
  12. // "sign":whichSign
  13. }).then((res)=>{
  14. const data =res.data;
  15. if(data.code == 0){
  16. dispatch(initHistory(data.data));
  17. }else{
  18. console.log(data)
  19. }
  20. })
  21. }
  22. };