|
@@ -1,30 +1,30 @@
|
|
|
<template>
|
|
|
<div class="layout_container">
|
|
|
<header style="margin: 0">
|
|
|
- <EmrHeader />
|
|
|
+ <EmrHeader/>
|
|
|
<div style="padding: 5px">
|
|
|
- <EmrSelectPat v-if="emrConfig.editor" :overViewList />
|
|
|
+ <EmrSelectPat v-if="emrConfig.editor" :overViewList/>
|
|
|
|
|
|
<el-input
|
|
|
- v-model="queryPatNo"
|
|
|
- placeholder="住院号"
|
|
|
- style="width: 100px"
|
|
|
- @blur="queryPatNo = $event.target.value.trim()"
|
|
|
+ v-model="queryPatNo"
|
|
|
+ placeholder="住院号"
|
|
|
+ style="width: 100px"
|
|
|
+ @blur="queryPatNo = $event.target.value.trim()"
|
|
|
/>
|
|
|
- <el-divider direction="vertical" />
|
|
|
+ <el-divider direction="vertical"/>
|
|
|
<el-button-group>
|
|
|
<el-button
|
|
|
- @click="allPatientsInTheHospital"
|
|
|
- :disabled="query.state === 4"
|
|
|
+ @click="allPatientsInTheHospital"
|
|
|
+ :disabled="query.state === 4"
|
|
|
>
|
|
|
在院
|
|
|
</el-button>
|
|
|
<EmrLeaveHospitalPatient
|
|
|
- :patNo="queryPatNo"
|
|
|
- @rowClick="disPatients"
|
|
|
+ :patNo="queryPatNo"
|
|
|
+ @rowClick="disPatients"
|
|
|
/>
|
|
|
</el-button-group>
|
|
|
- <el-divider direction="vertical" />
|
|
|
+ <el-divider direction="vertical"/>
|
|
|
{{ patientInfo.name }}
|
|
|
性别:<span style="color: red">{{ cptSex(patientInfo.sex) }}</span>
|
|
|
年龄:<span style="color: red">{{
|
|
@@ -34,29 +34,29 @@
|
|
|
XEUtils.addUnit(patientInfo.actIptDays, "天")
|
|
|
}}</span>
|
|
|
入院时间:<span style="color: red">{{ patientInfo.admissDate }}</span>
|
|
|
- <el-divider direction="vertical" />
|
|
|
+ <el-divider direction="vertical"/>
|
|
|
<el-button-group
|
|
|
- v-if="
|
|
|
+ v-if="
|
|
|
query.state === emrStateEnum.在院编辑 ||
|
|
|
query.state === emrStateEnum.在院只读
|
|
|
"
|
|
|
>
|
|
|
- <el-button type="primary" @click="clickPatientNext">上一位</el-button>
|
|
|
+ <el-button type="primary" @click="() =>clickPatientNext()">上一位</el-button>
|
|
|
<el-button type="primary" @click="clickPatientNext(false)"
|
|
|
- >下一位
|
|
|
+ >下一位
|
|
|
</el-button>
|
|
|
</el-button-group>
|
|
|
</div>
|
|
|
</header>
|
|
|
<div class="layout_main">
|
|
|
- <emr-main v-if="show" ref="emrMainRef" />
|
|
|
+ <emr-main v-if="show" ref="emrMainRef"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<LoadingProgress
|
|
|
- :describes="describes"
|
|
|
- loading-name="病历加载中"
|
|
|
- ref="progressRef"
|
|
|
+ :describes="describes"
|
|
|
+ loading-name="病历加载中"
|
|
|
+ ref="progressRef"
|
|
|
/>
|
|
|
</template>
|
|
|
|
|
@@ -66,9 +66,9 @@ import {
|
|
|
getPatientInfo,
|
|
|
} from "@/api/zhu-yuan-yi-sheng/emr-patient";
|
|
|
import router from "@/router";
|
|
|
-import { BizException, ExceptionEnum } from "@/utils/BizException";
|
|
|
-import { getServerDateApi } from "@/api/public-api";
|
|
|
-import { subtractTime } from "@/utils/date";
|
|
|
+import {BizException, ExceptionEnum} from "@/utils/BizException";
|
|
|
+import {getServerDateApi} from "@/api/public-api";
|
|
|
+import {subtractTime} from "@/utils/date";
|
|
|
import {
|
|
|
applicationData,
|
|
|
canIUnlockIt,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
unlockEnum,
|
|
|
useLiftingRestrictions,
|
|
|
} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
|
|
|
-import { getMyUnlockByPatNo } from "@/api/zhu-yuan-yi-sheng/emr-control-rule";
|
|
|
+import {getMyUnlockByPatNo} from "@/api/zhu-yuan-yi-sheng/emr-control-rule";
|
|
|
import {
|
|
|
ElButton,
|
|
|
ElMessage,
|
|
@@ -89,27 +89,27 @@ import {
|
|
|
ElNotification,
|
|
|
} from "element-plus";
|
|
|
import LoadingProgress from "@/components/loading-progress/LoadingProgress.vue";
|
|
|
-import { defineAsyncComponent, nextTick, onMounted, ref } from "vue";
|
|
|
-import { CyMessageBox } from "@/components/cy/message-box";
|
|
|
+import {defineAsyncComponent, nextTick, onMounted, ref} from "vue";
|
|
|
+import {CyMessageBox} from "@/components/cy/message-box";
|
|
|
import sleep from "@/utils/sleep";
|
|
|
-import { isDev, windowBtoaAndAtob } from "@/utils/public";
|
|
|
-import { useUserStore } from "@/pinia/user-store";
|
|
|
+import {isDev, windowBtoaAndAtob} from "@/utils/public";
|
|
|
+import {useUserStore} from "@/pinia/user-store";
|
|
|
import useCompRef from "@/utils/useCompRef";
|
|
|
-import { cptSex } from "@/utils/computed";
|
|
|
-import { getOverView } from "@/api/inpatient/patient";
|
|
|
+import {cptSex} from "@/utils/computed";
|
|
|
+import {getOverView} from "@/api/inpatient/patient";
|
|
|
import XEUtils from "xe-utils";
|
|
|
|
|
|
const EmrLeaveHospitalPatient = defineAsyncComponent(
|
|
|
- () => import("@/components/zhu-yuan-yi-sheng/emr/EmrLeaveHospitalPatient.vue")
|
|
|
+ () => import("@/components/zhu-yuan-yi-sheng/emr/EmrLeaveHospitalPatient.vue")
|
|
|
);
|
|
|
const EmrSelectPat = defineAsyncComponent(
|
|
|
- () => import("@/components/zhu-yuan-yi-sheng/EmrSelectPat.vue")
|
|
|
+ () => import("@/components/zhu-yuan-yi-sheng/EmrSelectPat.vue")
|
|
|
);
|
|
|
const EmrMain = defineAsyncComponent(
|
|
|
- () =>
|
|
|
- import(
|
|
|
- "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/EmrMain.vue"
|
|
|
- )
|
|
|
+ () =>
|
|
|
+ import(
|
|
|
+ "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/EmrMain.vue"
|
|
|
+ )
|
|
|
);
|
|
|
const EmrHeader = defineAsyncComponent(() => import("./EmrHeader.vue"));
|
|
|
|
|
@@ -123,8 +123,8 @@ const queryPatNo = ref("");
|
|
|
const disPatients = async () => {
|
|
|
if (query.value.times === 0 || !query.value.patNo) {
|
|
|
BizException(
|
|
|
- ExceptionEnum.MESSAGE_ERROR,
|
|
|
- "请输入住院号,住院次数不能为 0 "
|
|
|
+ ExceptionEnum.MESSAGE_ERROR,
|
|
|
+ "请输入住院号,住院次数不能为 0 "
|
|
|
);
|
|
|
}
|
|
|
query.value.state = 2;
|
|
@@ -150,16 +150,16 @@ const noPatient = () => {
|
|
|
return true;
|
|
|
},
|
|
|
})
|
|
|
- .then(({ action, value }) => {
|
|
|
- query.value.patNo = value;
|
|
|
- allPatientsInTheHospital();
|
|
|
- })
|
|
|
- .catch(({ action, value }) => {
|
|
|
- if (action === "cancel") {
|
|
|
+ .then(({action, value}) => {
|
|
|
query.value.patNo = value;
|
|
|
- emrMitt.emit("queryDischarge");
|
|
|
- }
|
|
|
- });
|
|
|
+ allPatientsInTheHospital();
|
|
|
+ })
|
|
|
+ .catch(({action, value}) => {
|
|
|
+ if (action === "cancel") {
|
|
|
+ query.value.patNo = value;
|
|
|
+ emrMitt.emit("queryDischarge");
|
|
|
+ }
|
|
|
+ });
|
|
|
sleep(500).then(() => {
|
|
|
progressRef.value.close();
|
|
|
});
|
|
@@ -181,8 +181,8 @@ const routerFunc = async () => {
|
|
|
}
|
|
|
// @ts-ignore
|
|
|
let reqUnlock = await getMyUnlockByPatNo(
|
|
|
- query.value.patNo,
|
|
|
- query.value.times
|
|
|
+ query.value.patNo,
|
|
|
+ query.value.times
|
|
|
).catch(e => {
|
|
|
return null;
|
|
|
});
|
|
@@ -196,14 +196,14 @@ const routerFunc = async () => {
|
|
|
// 在院编辑病历
|
|
|
if (query.value.state === 1) {
|
|
|
await getPatientInfo(query.value.patNo)
|
|
|
- .then(res => {
|
|
|
- patientInfo.value.$inOutFlag = 1;
|
|
|
- patientInfo.value = res;
|
|
|
- show.value = true;
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- progressRef.value.close();
|
|
|
- });
|
|
|
+ .then(res => {
|
|
|
+ patientInfo.value.$inOutFlag = 1;
|
|
|
+ patientInfo.value = res;
|
|
|
+ show.value = true;
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ progressRef.value.close();
|
|
|
+ });
|
|
|
} else if (query.value.state === 2) {
|
|
|
// 出院编辑病历,
|
|
|
await queryDisPatient();
|
|
@@ -224,8 +224,8 @@ const queryDisPatient = async () => {
|
|
|
patientInfo.value = await getDisPatient(query.value.patNo, query.value.times);
|
|
|
patientInfo.value.$inOutFlag = 2;
|
|
|
patientInfo.value.dischargeDays = subtractTime(
|
|
|
- await getServerDateApi(),
|
|
|
- patientInfo.value.disDate
|
|
|
+ await getServerDateApi(),
|
|
|
+ patientInfo.value.disDate
|
|
|
);
|
|
|
|
|
|
// 如果患者的出院时间大于 7 天就只能看病历和打印病历了
|
|
@@ -238,31 +238,31 @@ const queryDisPatient = async () => {
|
|
|
|
|
|
if (!emrConfig.value.editor) {
|
|
|
const message =
|
|
|
- "患者出院超7天,无法编辑病历,如需编辑请点击【解锁限制】,待审核完成后刷新页面即可。";
|
|
|
+ "患者出院超7天,无法编辑病历,如需编辑请点击【解锁限制】,待审核完成后刷新页面即可。";
|
|
|
const notification = ElNotification({
|
|
|
message: (
|
|
|
- <div>
|
|
|
- <div>{message}</div>
|
|
|
- <div style={{ textAlign: "end" }}>
|
|
|
- <ElButton text type="danger" onClick={() => notification.close()}>
|
|
|
- {{
|
|
|
- default: () => "关闭",
|
|
|
- }}
|
|
|
- </ElButton>
|
|
|
- <ElButton
|
|
|
- text
|
|
|
- type="primary"
|
|
|
- onClick={() => {
|
|
|
- useLiftingRestrictions();
|
|
|
- notification.close();
|
|
|
- }}
|
|
|
- >
|
|
|
- {{
|
|
|
- default: () => "解锁限制",
|
|
|
- }}
|
|
|
- </ElButton>
|
|
|
+ <div>
|
|
|
+ <div>{message}</div>
|
|
|
+ <div style={{textAlign: "end"}}>
|
|
|
+ <ElButton text type="danger" onClick={() => notification.close()}>
|
|
|
+ {{
|
|
|
+ default: () => "关闭",
|
|
|
+ }}
|
|
|
+ </ElButton>
|
|
|
+ <ElButton
|
|
|
+ text
|
|
|
+ type="primary"
|
|
|
+ onClick={() => {
|
|
|
+ useLiftingRestrictions();
|
|
|
+ notification.close();
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ default: () => "解锁限制",
|
|
|
+ }}
|
|
|
+ </ElButton>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
),
|
|
|
duration: 1000 * 10,
|
|
|
type: "warning",
|
|
@@ -298,8 +298,8 @@ const queryAllPatients = async flag => {
|
|
|
const channel = new BroadcastChannel("login-channel");
|
|
|
channel.addEventListener("message", event => {
|
|
|
if (
|
|
|
- navigator.userAgent.indexOf("Firefox") !== -1 ||
|
|
|
- navigator.userAgent.indexOf("Chrome") !== -1
|
|
|
+ navigator.userAgent.indexOf("Firefox") !== -1 ||
|
|
|
+ navigator.userAgent.indexOf("Chrome") !== -1
|
|
|
) {
|
|
|
emrMainRef.value!.changeClear();
|
|
|
window.location.href = "about:blank";
|
|
@@ -315,17 +315,19 @@ channel.addEventListener("message", event => {
|
|
|
const whetherKickedOut = () => {
|
|
|
const data = localStorage.getItem("强制刷新");
|
|
|
if (data) {
|
|
|
- const { userInfo, saveSuccess } = JSON.parse(data);
|
|
|
+ const {userInfo, saveSuccess} = JSON.parse(data);
|
|
|
// @ts-ignore
|
|
|
ElMessageBox.alert(
|
|
|
- `您已经被强制踢出,操作人:【${userInfo.name}】,您的病历保存【${saveSuccess ? "成功" : "失败"}】。`,
|
|
|
- "提示",
|
|
|
- {
|
|
|
- type: "warning",
|
|
|
- }
|
|
|
+ `您已经被强制踢出,操作人:【${userInfo.name}】,您的病历保存【${saveSuccess ? "成功" : "失败"}】。`,
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
)
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {});
|
|
|
+ .then(() => {
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ });
|
|
|
|
|
|
localStorage.removeItem("强制刷新");
|
|
|
}
|
|
@@ -376,11 +378,11 @@ async function clickPatientNext(upper: boolean = true) {
|
|
|
}
|
|
|
|
|
|
watch(
|
|
|
- () => router.currentRoute.value,
|
|
|
- () => {
|
|
|
- window.location.reload();
|
|
|
- },
|
|
|
- { deep: true }
|
|
|
+ () => router.currentRoute.value,
|
|
|
+ () => {
|
|
|
+ window.location.reload();
|
|
|
+ },
|
|
|
+ {deep: true}
|
|
|
);
|
|
|
|
|
|
onMounted(async () => {
|