Forráskód Böngészése

删除电子病历的拦截

xiaochan 5 hónapja
szülő
commit
aa0da1f52e

+ 3 - 31
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/EmrMain.vue

@@ -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 = () => {

+ 1 - 1
src/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/Home.vue

@@ -279,7 +279,7 @@ const queryDisPatient = async () => {
 // 点击全院患者数据
 const allPatientsInTheHospital = async () => {
   if (!queryPatNo.value) {
-    BizException(ExceptionEnum.MESSAGE_ERROR, "请输入住院号。 ");
+    BizException(ExceptionEnum.MESSAGE_ERROR, "请输入住院号。");
   }
   query.value.patNo = queryPatNo.value;
   query.value.state = 1;