|
@@ -1,4 +1,7 @@
|
|
|
import { SET_DIAG_TO_MAINSUIT } from '@store/types/diagnosticList';
|
|
|
+import {getAllDataList,getAllDataStringList,isAllClear,filterDataArr} from '@utils/tools';
|
|
|
+import {getChronic} from '@store/async-actions/homePage.js';
|
|
|
+import {storageLocal} from '@utils/tools'
|
|
|
import { SAVE_FREE } from '@store/types/mainSuit';
|
|
|
import {ISREAD} from "../types/homePage";
|
|
|
export const isAddMainSuit = () =>{
|
|
@@ -27,3 +30,31 @@ export const isAddMainSuit = () =>{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+export const isChronicMag = (item) => {
|
|
|
+ return (dispatch, getState) => {
|
|
|
+ const state = getState();
|
|
|
+ let jsonData = getAllDataList(state);
|
|
|
+ let jsonStr = getAllDataStringList(state);
|
|
|
+ let flg = isAllClear(jsonData,jsonStr,state);
|
|
|
+ if(!flg) {
|
|
|
+ console.log('页面为空');
|
|
|
+ // 从缓存取慢病列表
|
|
|
+ let chronicList = JSON.parse(storageLocal.get('chronic'));
|
|
|
+ if(!chronicList){
|
|
|
+ getChronic();
|
|
|
+ chronicList = JSON.parse(storageLocal.get('chronic'));
|
|
|
+ }
|
|
|
+ console.log(999,chronicList)
|
|
|
+ for(let i=0; i<chronicList.length; i++){
|
|
|
+ if(chronicList[i].id==item.id&&chronicList[i].name==item.name){
|
|
|
+ //弹窗提示 “是否引用往期病例”?--往期病例接口、弹窗、引用
|
|
|
+ // 是--引用 否--走慢病流程
|
|
|
+ console.log("是慢病1111!")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|