|
@@ -6,6 +6,7 @@ import {getUrlArgObject,pushAllDataList} from '@utils/tools';
|
|
|
import {getInitModules} from '@store/async-actions/homePage.js';
|
|
|
import store from '@store'
|
|
|
import {ISREAD} from "../types/homePage";
|
|
|
+import { initItemList } from '@store/async-actions/tabTemplate';
|
|
|
|
|
|
const api = {
|
|
|
getPatInfo: '/api/icss/patientInfo/getTopPatientInfo',
|
|
@@ -20,6 +21,7 @@ export const initPersonInfo = (dispatch, getState) => {
|
|
|
const data = res.data;
|
|
|
if (data.code == 0) {
|
|
|
dispatch(getInfos(data.data));
|
|
|
+ console.log(data.data)
|
|
|
getPatientMessage(dispatch, getState);
|
|
|
} else {
|
|
|
console.log(res)
|
|
@@ -47,16 +49,14 @@ export const initHistoryDetails = (dispatch) => {
|
|
|
type:ISREAD
|
|
|
});
|
|
|
// 设置初始模式
|
|
|
- if(detail.sign == 1){
|
|
|
+ if(detail.sign == 1 || detail.sign == 0){
|
|
|
dispatch({
|
|
|
type: CONFIRM_TYPE,
|
|
|
- confirmType: 1
|
|
|
- })
|
|
|
- }else if(detail.sign == 0){
|
|
|
- dispatch({
|
|
|
- type: CONFIRM_TYPE,
|
|
|
- confirmType: 0
|
|
|
+ confirmType: detail.sign
|
|
|
})
|
|
|
+ if(baseList.tabTemplate.items.length == 0){
|
|
|
+ dispatch(initItemList()); //模板列表没有就获取模板列表用于保存时做数据对比是否保存过
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
console.log(res)
|
|
@@ -68,6 +68,7 @@ export const initHistoryDetails = (dispatch) => {
|
|
|
export const getPatientMessage = (dispatch, getState) => {
|
|
|
const state = getState();
|
|
|
const urlDatas = state.getInfoByUuid;
|
|
|
+ console.log(urlDatas)
|
|
|
const params = {
|
|
|
hospitalCode:urlDatas.hospitalId,
|
|
|
hospitalDeptCode: urlDatas.deptNo,
|
|
@@ -94,5 +95,8 @@ export const getPatientMessage = (dispatch, getState) => {
|
|
|
type: CONFIRM_TYPE,
|
|
|
confirmType:data1.modeValue
|
|
|
});
|
|
|
+ if(state.tabTemplate.items.length == 0){
|
|
|
+ dispatch(initItemList(data1.modeValue)); //模板列表没有就获取模板列表用于保存时做数据对比是否保存过
|
|
|
+ }
|
|
|
})
|
|
|
};
|