|
@@ -1,12 +1,11 @@
|
|
|
<script setup lang="ts">
|
|
|
import {
|
|
|
emrRootContextKey,
|
|
|
- EmrStore
|
|
|
+ EmrStore,
|
|
|
} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-func/useEmrStore";
|
|
|
-import * as socketFun
|
|
|
- from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/socket/useEmrSocket";
|
|
|
+import * as socketFun from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/socket/useEmrSocket";
|
|
|
import warning from "@/assets/warning.png";
|
|
|
-import {useIntervalFn} from "@vueuse/core";
|
|
|
+import { useIntervalFn } from "@vueuse/core";
|
|
|
|
|
|
const root = inject(emrRootContextKey) as EmrStore;
|
|
|
const showButton = ref(true);
|
|
@@ -19,7 +18,7 @@ function handleOpen() {
|
|
|
root.kicked.b.message = [];
|
|
|
root.kicked.b.wsSend({
|
|
|
code: socketFun.KickedType.openDialog,
|
|
|
- data: null
|
|
|
+ data: null,
|
|
|
});
|
|
|
const link = document.querySelector("link[rel~='icon']") as HTMLLinkElement;
|
|
|
oldHighlightConfig.title = document.title;
|
|
@@ -29,22 +28,22 @@ function handleOpen() {
|
|
|
}
|
|
|
|
|
|
const saveTimesOut = useIntervalFn(
|
|
|
- () => {
|
|
|
- frequency.value--;
|
|
|
- if (frequency.value === 1) {
|
|
|
- saveTimesOut.pause();
|
|
|
- agree();
|
|
|
- return;
|
|
|
- }
|
|
|
- root.kicked.b.wsSend({
|
|
|
- code: socketFun.KickedType.countDown,
|
|
|
- data: frequency.value,
|
|
|
- });
|
|
|
- },
|
|
|
- 1000,
|
|
|
- {
|
|
|
- immediate: false,
|
|
|
+ () => {
|
|
|
+ frequency.value--;
|
|
|
+ if (frequency.value === 1) {
|
|
|
+ saveTimesOut.pause();
|
|
|
+ agree();
|
|
|
+ return;
|
|
|
}
|
|
|
+ root.kicked.b.wsSend({
|
|
|
+ code: socketFun.KickedType.countDown,
|
|
|
+ data: frequency.value,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ 1000,
|
|
|
+ {
|
|
|
+ immediate: false,
|
|
|
+ }
|
|
|
);
|
|
|
|
|
|
const oldHighlightConfig = {
|
|
@@ -55,17 +54,17 @@ const oldHighlightConfig = {
|
|
|
link: document.querySelector("link[rel~='icon']") as HTMLLinkElement,
|
|
|
};
|
|
|
|
|
|
-const {pause, resume} = useIntervalFn(
|
|
|
- () => {
|
|
|
- // @ts-ignore
|
|
|
- oldHighlightConfig.link.href = warning;
|
|
|
- oldHighlightConfig.toggleTitle = !oldHighlightConfig.toggleTitle;
|
|
|
- document.title = oldHighlightConfig.toggleTitle
|
|
|
- ? "有人需要编辑当前病历"
|
|
|
- : "\u200E\u200E";
|
|
|
- },
|
|
|
- 1000,
|
|
|
- {immediate: false}
|
|
|
+const { pause, resume } = useIntervalFn(
|
|
|
+ () => {
|
|
|
+ // @ts-ignore
|
|
|
+ oldHighlightConfig.link.href = warning;
|
|
|
+ oldHighlightConfig.toggleTitle = !oldHighlightConfig.toggleTitle;
|
|
|
+ document.title = oldHighlightConfig.toggleTitle
|
|
|
+ ? "有人需要编辑当前病历"
|
|
|
+ : "\u200E\u200E";
|
|
|
+ },
|
|
|
+ 1000,
|
|
|
+ { immediate: false }
|
|
|
);
|
|
|
|
|
|
function closed() {
|
|
@@ -92,13 +91,13 @@ function agree() {
|
|
|
|
|
|
<template>
|
|
|
<el-dialog
|
|
|
- v-model="root.kicked.b.dialog"
|
|
|
- :title="root.kicked.b.title"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :close-on-press-escape="false"
|
|
|
- :show-close="false"
|
|
|
- @open="handleOpen"
|
|
|
- @closed="closed"
|
|
|
+ v-model="root.kicked.b.dialog"
|
|
|
+ :title="root.kicked.b.title"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ :show-close="false"
|
|
|
+ @open="handleOpen"
|
|
|
+ @closed="closed"
|
|
|
>
|
|
|
<div class="refresh_countdown">
|
|
|
倒计时结束未响应,强制同意,剩余【{{ frequency }}】 秒
|
|
@@ -107,10 +106,10 @@ function agree() {
|
|
|
<div>
|
|
|
<ul class="refresh_infinite-list" style="overflow: auto">
|
|
|
<li
|
|
|
- v-for="i in root.kicked.b.message"
|
|
|
- :key="i"
|
|
|
- class="refresh_infinite-list-item"
|
|
|
- :class="`type-${i.type}`"
|
|
|
+ v-for="i in root.kicked.b.message"
|
|
|
+ :key="i"
|
|
|
+ class="refresh_infinite-list-item"
|
|
|
+ :class="`type-${i.type}`"
|
|
|
>
|
|
|
{{ i.message }}
|
|
|
</li>
|