|
@@ -11,8 +11,8 @@ import { useWebSocket } from "@vueuse/core";
|
|
import { useUserStore } from "@/pinia/user-store";
|
|
import { useUserStore } from "@/pinia/user-store";
|
|
import { useDialog } from "@/components/cy/CyDialog/index";
|
|
import { useDialog } from "@/components/cy/CyDialog/index";
|
|
import ArchiveUpload from "./ArchiveUpload.vue";
|
|
import ArchiveUpload from "./ArchiveUpload.vue";
|
|
-import { ElNotification } from "element-plus";
|
|
|
|
import ArchiveAllLog from "@/views/archive/ArchiveAllLog.vue";
|
|
import ArchiveAllLog from "@/views/archive/ArchiveAllLog.vue";
|
|
|
|
+import { ElButton, ElNotification } from "element-plus";
|
|
|
|
|
|
type PatInfo = {
|
|
type PatInfo = {
|
|
inpatientNo: string;
|
|
inpatientNo: string;
|
|
@@ -69,6 +69,40 @@ export const useArchive = () => {
|
|
mainTabsValue: "pdf",
|
|
mainTabsValue: "pdf",
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ function notification(message) {
|
|
|
|
+ const MessageNode = (
|
|
|
|
+ <div>
|
|
|
|
+ <div>{message}</div>
|
|
|
|
+ <div>
|
|
|
|
+ <ElButton
|
|
|
|
+ text
|
|
|
|
+ type="danger"
|
|
|
|
+ onClick={() => ElNotification.closeAll()}
|
|
|
|
+ >
|
|
|
|
+ 取消
|
|
|
|
+ </ElButton>
|
|
|
|
+ <ElButton
|
|
|
|
+ text
|
|
|
|
+ type="primary"
|
|
|
|
+ onClick={() => {
|
|
|
|
+ ElNotification.closeAll();
|
|
|
|
+ mutation.getData();
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ 更新目录
|
|
|
|
+ </ElButton>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ ElNotification.success({
|
|
|
|
+ title: "文件有变化",
|
|
|
|
+ position: "bottom-right",
|
|
|
|
+ duration: 0,
|
|
|
|
+ message: MessageNode,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
const socket = useSocket({
|
|
const socket = useSocket({
|
|
log: data => {
|
|
log: data => {
|
|
store.logMessage.push(JSON.parse(data));
|
|
store.logMessage.push(JSON.parse(data));
|
|
@@ -77,13 +111,12 @@ export const useArchive = () => {
|
|
},
|
|
},
|
|
change: data => {
|
|
change: data => {
|
|
if (useUserStore().userInfo.code !== data.code) {
|
|
if (useUserStore().userInfo.code !== data.code) {
|
|
- ElNotification.success({
|
|
|
|
- title: "文件有变化",
|
|
|
|
- message: data.message,
|
|
|
|
- });
|
|
|
|
- mutation.getData();
|
|
|
|
|
|
+ notification(data.message);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ taskComplete: () => {
|
|
|
|
+ mutation.getData();
|
|
|
|
+ },
|
|
});
|
|
});
|
|
|
|
|
|
const mutation = {
|
|
const mutation = {
|