|
@@ -181,6 +181,7 @@ import { useSystemStore } from "@/pinia/system-store";
|
|
|
import * as socket from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/socket/useEmrSocket";
|
|
|
import env from "@/utils/setting";
|
|
|
import { useDialog } from "@/components/cy/CyDialog/index";
|
|
|
+import WhySocketConnect from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/components/WhySocketConnect.vue";
|
|
|
|
|
|
const EmrFirstPageOfMedicalRecord = defineAsyncComponent(
|
|
|
() =>
|
|
@@ -535,6 +536,15 @@ declare type saveType = {
|
|
|
documentData: any;
|
|
|
};
|
|
|
|
|
|
+function openWhySocketConnect() {
|
|
|
+ useDialog(WhySocketConnect, {
|
|
|
+ dialogProps: {
|
|
|
+ fullscreen: true,
|
|
|
+ title: "为什么需要连接服务器",
|
|
|
+ },
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
// 点击保存病历
|
|
|
const clickSaveData = async () => {
|
|
|
if (!emrConfig.value.editor) return;
|
|
@@ -547,12 +557,31 @@ const clickSaveData = async () => {
|
|
|
waitForLoadingToComplete();
|
|
|
if (stringNotBlank(editor.documentData._id)) {
|
|
|
if (emrStore.documentSocket.status() !== "OPEN") {
|
|
|
- await CyMessageBox.alert({
|
|
|
- message: "未连接上服务器,无法保存,请刷新页面,或重新打开病历。",
|
|
|
- title: "无法保存",
|
|
|
- type: "warning",
|
|
|
- }).catch(() => {});
|
|
|
- return;
|
|
|
+ await ElMessageBox.confirm(
|
|
|
+ <div>
|
|
|
+ <div>
|
|
|
+ 是否强制保存病历,请注意强制保存,可能会导致其他医生书写的片段不见,主要是病程记录,务必确认在自己之前没有其他医生在书写病历
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span
|
|
|
+ class="emr_span-to-a"
|
|
|
+ onClick={() => {
|
|
|
+ openWhySocketConnect();
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 查看为什么要这样做
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>,
|
|
|
+ "未连接上服务器",
|
|
|
+ {
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ type: "error",
|
|
|
+ confirmButtonText: "强制保存",
|
|
|
+ }
|
|
|
+ ).catch(() => {
|
|
|
+ throw new Error("取消保存");
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
// 判断是否有必填项目
|
|
@@ -1962,4 +1991,13 @@ iframe {
|
|
|
margin-left: 5px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.emr_span-to-a {
|
|
|
+ color: #0a84fd;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.emr_span-to-a:hover {
|
|
|
+ text-decoration: underline;
|
|
|
+}
|
|
|
</style>
|