|
@@ -1,239 +1,274 @@
|
|
|
<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()"/>
|
|
|
- <el-divider direction="vertical"/>
|
|
|
+ <el-input
|
|
|
+ v-model="queryPatNo"
|
|
|
+ placeholder="住院号"
|
|
|
+ style="width: 100px"
|
|
|
+ @blur="queryPatNo = $event.target.value.trim()"
|
|
|
+ />
|
|
|
+ <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;">{{ XEUtils.addUnit(patientInfo.age, '岁') }}</span>
|
|
|
- 住院天数:<span style="color:red;">{{ XEUtils.addUnit(patientInfo.actIptDays, '天') }}</span>
|
|
|
- 入院时间:<span style="color:red;">{{ patientInfo.admissDate }}</span>
|
|
|
- <el-divider direction="vertical"/>
|
|
|
- <el-button-group v-if="query.state === emrStateEnum.在院编辑 || query.state === emrStateEnum.在院只读 ">
|
|
|
+ 性别:<span style="color: red">{{ cptSex(patientInfo.sex) }}</span>
|
|
|
+ 年龄:<span style="color: red">{{
|
|
|
+ XEUtils.addUnit(patientInfo.age, "岁")
|
|
|
+ }}</span>
|
|
|
+ 住院天数:<span style="color: red">{{
|
|
|
+ XEUtils.addUnit(patientInfo.actIptDays, "天")
|
|
|
+ }}</span>
|
|
|
+ 入院时间:<span style="color: red">{{ patientInfo.admissDate }}</span>
|
|
|
+ <el-divider direction="vertical" />
|
|
|
+ <el-button-group
|
|
|
+ v-if="
|
|
|
+ query.state === emrStateEnum.在院编辑 ||
|
|
|
+ query.state === emrStateEnum.在院只读
|
|
|
+ "
|
|
|
+ >
|
|
|
<el-button type="primary" @click="clickPatientNext">上一位</el-button>
|
|
|
- <el-button type="primary" @click="clickPatientNext(false)">下一位</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"/>
|
|
|
+ <LoadingProgress
|
|
|
+ :describes="describes"
|
|
|
+ loading-name="病历加载中"
|
|
|
+ ref="progressRef"
|
|
|
+ />
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="tsx">
|
|
|
-import {getDisPatient, getPatientInfo} from "@/api/zhu-yuan-yi-sheng/emr-patient";
|
|
|
+import {
|
|
|
+ getDisPatient,
|
|
|
+ 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,
|
|
|
emrConfig,
|
|
|
emrMitt,
|
|
|
+ emrStateEnum,
|
|
|
+ patientInfo,
|
|
|
query,
|
|
|
resolveRoute,
|
|
|
unlockEnum,
|
|
|
- patientInfo, emrStateEnum, useLiftingRestrictions,
|
|
|
+ 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 {ElMessage, ElMessageBox, ElNotification} from "element-plus";
|
|
|
+import { getMyUnlockByPatNo } from "@/api/zhu-yuan-yi-sheng/emr-control-rule";
|
|
|
+import {
|
|
|
+ ElButton,
|
|
|
+ ElMessage,
|
|
|
+ ElMessageBox,
|
|
|
+ ElNotification,
|
|
|
+} from "element-plus";
|
|
|
import LoadingProgress from "@/components/loading-progress/LoadingProgress.vue";
|
|
|
-import {ref, onMounted, nextTick} 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 {defineAsyncComponent} from 'vue';
|
|
|
-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";
|
|
|
-import {ElButton} from "element-plus";
|
|
|
|
|
|
-const EmrLeaveHospitalPatient = defineAsyncComponent(() =>
|
|
|
- import('@/components/zhu-yuan-yi-sheng/emr/EmrLeaveHospitalPatient.vue'));
|
|
|
-const EmrSelectPat = defineAsyncComponent(() => 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'));
|
|
|
-const EmrHeader = defineAsyncComponent(() => import('./EmrHeader.vue'))
|
|
|
-
|
|
|
-const emrMainRef = useCompRef(EmrMain)
|
|
|
+const EmrLeaveHospitalPatient = defineAsyncComponent(
|
|
|
+ () => import("@/components/zhu-yuan-yi-sheng/emr/EmrLeaveHospitalPatient.vue")
|
|
|
+);
|
|
|
+const EmrSelectPat = defineAsyncComponent(
|
|
|
+ () => 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"
|
|
|
+ )
|
|
|
+);
|
|
|
+const EmrHeader = defineAsyncComponent(() => import("./EmrHeader.vue"));
|
|
|
+
|
|
|
+const emrMainRef = useCompRef(EmrMain);
|
|
|
// 是否显示页面
|
|
|
-const show = ref(false)
|
|
|
+const show = ref(false);
|
|
|
|
|
|
-const queryPatNo = ref('')
|
|
|
+const queryPatNo = ref("");
|
|
|
|
|
|
// 点击查询出院患者
|
|
|
const disPatients = async () => {
|
|
|
if (query.value.times === 0 || !query.value.patNo) {
|
|
|
- BizException(ExceptionEnum.MESSAGE_ERROR, '请输入住院号,住院次数不能为 0 ')
|
|
|
+ BizException(
|
|
|
+ ExceptionEnum.MESSAGE_ERROR,
|
|
|
+ "请输入住院号,住院次数不能为 0 "
|
|
|
+ );
|
|
|
}
|
|
|
- query.value.state = 2
|
|
|
- let te = JSON.stringify(query.value)
|
|
|
- await router.push('/myEmrEditor/' + window.btoa(te))
|
|
|
- location.reload()
|
|
|
-}
|
|
|
+ query.value.state = 2;
|
|
|
+ let te = JSON.stringify(query.value);
|
|
|
+ await router.push("/myEmrEditor/" + window.btoa(te));
|
|
|
+ location.reload();
|
|
|
+};
|
|
|
|
|
|
const noPatient = () => {
|
|
|
CyMessageBox({
|
|
|
showInput: true,
|
|
|
- cancelButtonText: '出院',
|
|
|
- confirmButtonText: '在院',
|
|
|
+ cancelButtonText: "出院",
|
|
|
+ confirmButtonText: "在院",
|
|
|
closeOnPressEscape: false,
|
|
|
closeOnClickModal: false,
|
|
|
- message: '住院号',
|
|
|
+ message: "住院号",
|
|
|
showIcon: false,
|
|
|
- beforeClose: (inputValue) => {
|
|
|
+ beforeClose: inputValue => {
|
|
|
if (inputValue.length === 0) {
|
|
|
- ElMessage.error('请输入住院号')
|
|
|
- return false
|
|
|
+ ElMessage.error("请输入住院号");
|
|
|
+ return false;
|
|
|
}
|
|
|
- return true
|
|
|
- }
|
|
|
- }).then(({action, value}) => {
|
|
|
- query.value.patNo = value
|
|
|
- allPatientsInTheHospital()
|
|
|
- }).catch(({action, value}) => {
|
|
|
- if (action === 'cancel') {
|
|
|
- query.value.patNo = value
|
|
|
- emrMitt.emit('queryDischarge')
|
|
|
- }
|
|
|
+ return true;
|
|
|
+ },
|
|
|
})
|
|
|
+ .then(({ action, value }) => {
|
|
|
+ query.value.patNo = value;
|
|
|
+ allPatientsInTheHospital();
|
|
|
+ })
|
|
|
+ .catch(({ action, value }) => {
|
|
|
+ if (action === "cancel") {
|
|
|
+ query.value.patNo = value;
|
|
|
+ emrMitt.emit("queryDischarge");
|
|
|
+ }
|
|
|
+ });
|
|
|
sleep(500).then(() => {
|
|
|
- progressRef.value.close()
|
|
|
- })
|
|
|
-}
|
|
|
+ progressRef.value.close();
|
|
|
+ });
|
|
|
+};
|
|
|
|
|
|
// 解析路由数据
|
|
|
const routerFunc = async () => {
|
|
|
- emrMainRef.value?.closeWebSocket()
|
|
|
- show.value = false
|
|
|
+ emrMainRef.value?.closeWebSocket();
|
|
|
+ show.value = false;
|
|
|
if (!router.currentRoute.value.params.pat) {
|
|
|
- noPatient()
|
|
|
- return
|
|
|
+ noPatient();
|
|
|
+ return;
|
|
|
}
|
|
|
try {
|
|
|
- resolveRoute(router.currentRoute.value.params.pat)
|
|
|
+ resolveRoute(router.currentRoute.value.params.pat);
|
|
|
} catch (e) {
|
|
|
- console.error(e)
|
|
|
- noPatient()
|
|
|
- return
|
|
|
+ console.error(e);
|
|
|
+ noPatient();
|
|
|
+ return;
|
|
|
}
|
|
|
// @ts-ignore
|
|
|
- let reqUnlock = await getMyUnlockByPatNo(query.value.patNo, query.value.times).catch(e => {
|
|
|
+ let reqUnlock = await getMyUnlockByPatNo(
|
|
|
+ query.value.patNo,
|
|
|
+ query.value.times
|
|
|
+ ).catch(e => {
|
|
|
return null;
|
|
|
- })
|
|
|
+ });
|
|
|
if (reqUnlock != null) {
|
|
|
- reqUnlock.unlockJson = JSON.parse(reqUnlock.unlockJson)
|
|
|
- applicationData.value = reqUnlock
|
|
|
+ reqUnlock.unlockJson = JSON.parse(reqUnlock.unlockJson);
|
|
|
+ applicationData.value = reqUnlock;
|
|
|
} else {
|
|
|
// @ts-ignore
|
|
|
- applicationData.value = null
|
|
|
+ applicationData.value = null;
|
|
|
}
|
|
|
// 在院编辑病历
|
|
|
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()
|
|
|
- });
|
|
|
+ await getPatientInfo(query.value.patNo)
|
|
|
+ .then(res => {
|
|
|
+ patientInfo.value.$inOutFlag = 1;
|
|
|
+ patientInfo.value = res;
|
|
|
+ show.value = true;
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ progressRef.value.close();
|
|
|
+ });
|
|
|
} else if (query.value.state === 2) {
|
|
|
// 出院编辑病历,
|
|
|
- await queryDisPatient()
|
|
|
+ await queryDisPatient();
|
|
|
} else if (query.value.state === 4) {
|
|
|
// 在院只读病历
|
|
|
patientInfo.value = await getPatientInfo(query.value.patNo);
|
|
|
patientInfo.value.$inOutFlag = 1;
|
|
|
- await queryAllPatients(false)
|
|
|
+ await queryAllPatients(false);
|
|
|
} else if (query.value.state === 5) {
|
|
|
// 出院只读病历
|
|
|
- await queryDisPatient()
|
|
|
- emrConfig.value.editor = false
|
|
|
+ await queryDisPatient();
|
|
|
+ emrConfig.value.editor = false;
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
+};
|
|
|
|
|
|
// 查询出院患者信息
|
|
|
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)
|
|
|
+ patientInfo.value = await getDisPatient(query.value.patNo, query.value.times);
|
|
|
+ patientInfo.value.$inOutFlag = 2;
|
|
|
+ patientInfo.value.dischargeDays = subtractTime(
|
|
|
+ await getServerDateApi(),
|
|
|
+ patientInfo.value.disDate
|
|
|
+ );
|
|
|
|
|
|
// 如果患者的出院时间大于 7 天就只能看病历和打印病历了
|
|
|
emrConfig.value.editor = (patientInfo.value!.dischargeDays as number) <= 7;
|
|
|
|
|
|
// 如果超过了七天就去查看是否有申请编辑
|
|
|
if (!emrConfig.value.editor) {
|
|
|
- emrConfig.value.editor = canIUnlockIt(unlockEnum.出院编辑)
|
|
|
+ emrConfig.value.editor = canIUnlockIt(unlockEnum.出院编辑);
|
|
|
}
|
|
|
|
|
|
if (!emrConfig.value.editor) {
|
|
|
- const message = '患者出院超7天,无法编辑病历,如需编辑请点击【解锁限制】,待审核完成后刷新页面即可。'
|
|
|
+ const message =
|
|
|
+ "患者出院超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>
|
|
|
+ <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>
|
|
|
),
|
|
|
duration: 1000 * 10,
|
|
|
- type: 'warning',
|
|
|
- position: 'bottom-right'
|
|
|
- })
|
|
|
+ type: "warning",
|
|
|
+ position: "bottom-right",
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
if (isDev) {
|
|
@@ -241,121 +276,127 @@ const queryDisPatient = async () => {
|
|
|
}
|
|
|
|
|
|
show.value = true;
|
|
|
-}
|
|
|
+};
|
|
|
|
|
|
// 点击全院患者数据
|
|
|
const allPatientsInTheHospital = async () => {
|
|
|
if (!queryPatNo.value) {
|
|
|
- BizException(ExceptionEnum.MESSAGE_ERROR, '请输入住院号。 ')
|
|
|
+ BizException(ExceptionEnum.MESSAGE_ERROR, "请输入住院号。 ");
|
|
|
}
|
|
|
- query.value.patNo = queryPatNo.value
|
|
|
- query.value.state = 1
|
|
|
- const te = windowBtoaAndAtob.btoa(query.value)
|
|
|
- await router.push('/myEmrEditor/' + te)
|
|
|
- location.reload()
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-const queryAllPatients = async (flag) => {
|
|
|
- query.value.times = patientInfo.value!.admissTimes as number
|
|
|
- show.value = true
|
|
|
- emrConfig.value.editor = flag
|
|
|
-}
|
|
|
-
|
|
|
-const channel = new BroadcastChannel('login-channel');
|
|
|
-channel.addEventListener('message', (event) => {
|
|
|
- if (navigator.userAgent.indexOf("Firefox") !== -1 || navigator.userAgent.indexOf("Chrome") !== -1) {
|
|
|
- emrMainRef.value!.changeClear()
|
|
|
+ query.value.patNo = queryPatNo.value;
|
|
|
+ query.value.state = 1;
|
|
|
+ const te = windowBtoaAndAtob.btoa(query.value);
|
|
|
+ await router.push("/myEmrEditor/" + te);
|
|
|
+ location.reload();
|
|
|
+};
|
|
|
+
|
|
|
+const queryAllPatients = async flag => {
|
|
|
+ query.value.times = patientInfo.value!.admissTimes as number;
|
|
|
+ show.value = true;
|
|
|
+ emrConfig.value.editor = flag;
|
|
|
+};
|
|
|
+
|
|
|
+const channel = new BroadcastChannel("login-channel");
|
|
|
+channel.addEventListener("message", event => {
|
|
|
+ if (
|
|
|
+ navigator.userAgent.indexOf("Firefox") !== -1 ||
|
|
|
+ navigator.userAgent.indexOf("Chrome") !== -1
|
|
|
+ ) {
|
|
|
+ emrMainRef.value!.changeClear();
|
|
|
window.location.href = "about:blank";
|
|
|
window.close();
|
|
|
} else {
|
|
|
- emrMainRef.value!.changeClear()
|
|
|
+ emrMainRef.value!.changeClear();
|
|
|
window.opener = null;
|
|
|
window.open("", "_self");
|
|
|
window.close();
|
|
|
}
|
|
|
-})
|
|
|
+});
|
|
|
|
|
|
const whetherKickedOut = () => {
|
|
|
- const data = localStorage.getItem("强制刷新")
|
|
|
+ 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',
|
|
|
- }).then(() => {
|
|
|
- }).catch(() => {
|
|
|
- })
|
|
|
+ ElMessageBox.alert(
|
|
|
+ `您已经被强制踢出,操作人:【${userInfo.name}】,您的病历保存【${saveSuccess ? "成功" : "失败"}】。`,
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {});
|
|
|
|
|
|
- localStorage.removeItem("强制刷新")
|
|
|
+ localStorage.removeItem("强制刷新");
|
|
|
}
|
|
|
-}
|
|
|
+};
|
|
|
|
|
|
-const progressRef = useCompRef(LoadingProgress)
|
|
|
+const progressRef = useCompRef(LoadingProgress);
|
|
|
const describes = [
|
|
|
- '被删除的病历可在回收站恢复,(如果出院了需要先召回)',
|
|
|
- '粘贴内容时,鼠标右键文本粘贴或使用(ctrl + shift + v)',
|
|
|
- '如果写错了尝试使用(ctrl + z / ctrl + y)',
|
|
|
- '假的进度条,长时间未加载完成,按下F5',
|
|
|
+ "被删除的病历可在回收站恢复,(如果出院了需要先召回)",
|
|
|
+ "粘贴内容时,鼠标右键文本粘贴或使用(ctrl + shift + v)",
|
|
|
+ "如果写错了尝试使用(ctrl + z / ctrl + y)",
|
|
|
+ "假的进度条,长时间未加载完成,按下F5",
|
|
|
"在管理员导入病历时,此页面无法使用,可以稍后刷新(大约 5 - 10 分钟)",
|
|
|
- "在患者列表中打开的患者,都是只读模式"
|
|
|
-]
|
|
|
+ "在患者列表中打开的患者,都是只读模式",
|
|
|
+];
|
|
|
|
|
|
-const overViewList = ref([])
|
|
|
+const overViewList = ref([]);
|
|
|
|
|
|
async function clickPatientNext(upper: boolean = true) {
|
|
|
-
|
|
|
- let index = XEUtils.findIndexOf(overViewList.value, (item) => {
|
|
|
- return item.inpatientNo === patientInfo.value.inpatientNo
|
|
|
- })
|
|
|
+ let index = XEUtils.findIndexOf(overViewList.value, item => {
|
|
|
+ return item.inpatientNo === patientInfo.value.inpatientNo;
|
|
|
+ });
|
|
|
|
|
|
if (index === -1) {
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
if (upper) {
|
|
|
if (index === 0) {
|
|
|
- index = overViewList.value.length - 1
|
|
|
+ index = overViewList.value.length - 1;
|
|
|
} else {
|
|
|
- index -= 1
|
|
|
+ index -= 1;
|
|
|
}
|
|
|
} else {
|
|
|
if (index === overViewList.value.length - 1) {
|
|
|
- index = 0
|
|
|
+ index = 0;
|
|
|
} else {
|
|
|
- index += 1
|
|
|
+ index += 1;
|
|
|
}
|
|
|
}
|
|
|
const item = overViewList.value[index];
|
|
|
const data = {
|
|
|
patNo: item.inpatientNo,
|
|
|
times: item.admissTimes,
|
|
|
- state: query.value.state
|
|
|
- }
|
|
|
- const te = windowBtoaAndAtob.btoa(data)
|
|
|
- await router.push('/myEmrEditor/' + te)
|
|
|
- window.location.reload()
|
|
|
+ state: query.value.state,
|
|
|
+ };
|
|
|
+ const te = windowBtoaAndAtob.btoa(data);
|
|
|
+ await router.push("/myEmrEditor/" + te);
|
|
|
+ window.location.reload();
|
|
|
}
|
|
|
|
|
|
-watch(() => router.currentRoute.value, () => {
|
|
|
- window.location.reload()
|
|
|
-}, {deep: true})
|
|
|
+watch(
|
|
|
+ () => router.currentRoute.value,
|
|
|
+ () => {
|
|
|
+ window.location.reload();
|
|
|
+ },
|
|
|
+ { deep: true }
|
|
|
+);
|
|
|
|
|
|
onMounted(async () => {
|
|
|
- await useUserStore().getUserInfo
|
|
|
- whetherKickedOut()
|
|
|
- emrMitt.on('closeProgress', () => {
|
|
|
- progressRef.value!.close()
|
|
|
- })
|
|
|
+ await useUserStore().getUserInfo;
|
|
|
+ whetherKickedOut();
|
|
|
+ emrMitt.on("closeProgress", () => {
|
|
|
+ progressRef.value!.close();
|
|
|
+ });
|
|
|
if (!isDev) {
|
|
|
- progressRef.value!.start()
|
|
|
+ progressRef.value!.start();
|
|
|
}
|
|
|
await nextTick();
|
|
|
await routerFunc();
|
|
|
- getOverView(patientInfo.value.ward).then((res) => {
|
|
|
- overViewList.value = res
|
|
|
- })
|
|
|
-})
|
|
|
-
|
|
|
+ getOverView(patientInfo.value.ward).then(res => {
|
|
|
+ overViewList.value = res;
|
|
|
+ });
|
|
|
+});
|
|
|
</script>
|
|
|
-
|
|
|
-
|