|
@@ -1091,6 +1091,8 @@ const 重试 = {
|
|
|
运行中: false,
|
|
|
};
|
|
|
|
|
|
+let test = true;
|
|
|
+
|
|
|
async function 重试查询患者信息() {
|
|
|
if (重试.运行中) return;
|
|
|
重试.运行中 = true;
|
|
@@ -1141,6 +1143,7 @@ const queryingBasicPatientInformation = async (): Promise<boolean> => {
|
|
|
emrStore.mutation.setEmrPatientData(res.patientData);
|
|
|
extractData = res.extractData;
|
|
|
copy = res.copy;
|
|
|
+ 重试查询患者信息();
|
|
|
return true;
|
|
|
})
|
|
|
.catch(() => {
|
|
@@ -1294,23 +1297,6 @@ async function rightClickOnRegistrationMouse(value) {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * 拦截
|
|
|
- * @param event
|
|
|
- */
|
|
|
-const monitorPageRefresh = event => {
|
|
|
- if (isDev) {
|
|
|
- return;
|
|
|
- }
|
|
|
- if (readonlyPattern()) {
|
|
|
- emrStore.store.isEditorChange = false;
|
|
|
- }
|
|
|
- if (emrStore.store.isEditorChange) {
|
|
|
- event.preventDefault();
|
|
|
- event.returnValue = "是否确实要退出?还有未保存的数据!";
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
const visibility = useDocumentVisibility();
|
|
|
|
|
|
// 创建和编辑病历
|
|
@@ -1665,25 +1651,11 @@ onMounted(async () => {
|
|
|
doctorLevelFunc();
|
|
|
queryingBasicPatientInformation().then(XEUtils.noop);
|
|
|
initEdit();
|
|
|
- window.addEventListener("beforeunload", monitorPageRefresh, {
|
|
|
- capture: true,
|
|
|
- });
|
|
|
emrMittInit();
|
|
|
watchVisibility();
|
|
|
hisSaveEmrInit();
|
|
|
});
|
|
|
|
|
|
-onDeactivated(() => {
|
|
|
- window.removeEventListener("beforeunload", monitorPageRefresh, {
|
|
|
- capture: true,
|
|
|
- });
|
|
|
-});
|
|
|
-
|
|
|
-onBeforeRouteLeave(async (to, from, next) => {
|
|
|
- await checkEmrChange();
|
|
|
- next();
|
|
|
-});
|
|
|
-
|
|
|
const closeWebSocket = () => {};
|
|
|
|
|
|
const changeClear = () => {
|