|
@@ -152,28 +152,31 @@
|
|
|
<EmrStyleBar ref="styleBarRef"/>
|
|
|
<div class="emr-iframe">
|
|
|
<div :id="emrTutorialGetId('editor_tabs')">
|
|
|
+ <!-- @click="showIframe = 1" :type="btnIframeTabs(IframeTabs.正在编辑 , showIframe)"-->
|
|
|
<el-button :id="emrTutorialGetId('editor1')"
|
|
|
- @click="showIframe = 1" :type="showIframe === 1 ? 'primary' : ''">正在编辑
|
|
|
+ v-iframe-tabs="IframeTabs.正在编辑">
|
|
|
+ 正在编辑
|
|
|
</el-button>
|
|
|
<el-button :id="emrTutorialGetId('editor2')"
|
|
|
@click="showIframe = 2"
|
|
|
- :type="showIframe === 2? 'primary' : ''">
|
|
|
+ v-iframe-tabs="IframeTabs.已保存病历"
|
|
|
+ :type="btnIframeTabs(IframeTabs.已保存病历 , showIframe)">
|
|
|
已保存病历
|
|
|
</el-button>
|
|
|
- <el-button :id="emrTutorialGetId('editor3')" @click="showIframe = 3"
|
|
|
- :type="showIframe === 3? 'primary' : ''">同时打开
|
|
|
+ <el-button :id="emrTutorialGetId('editor3')" v-iframe-tabs="IframeTabs.同时打开">
|
|
|
+ 同时打开
|
|
|
</el-button>
|
|
|
- <el-button :id="emrTutorialGetId('editor4')" @click="showIframe = 4"
|
|
|
- :type="showIframe === 4? 'primary' : ''">病案首页
|
|
|
+ <el-button :id="emrTutorialGetId('editor4')" v-iframe-tabs="IframeTabs.病案首页">
|
|
|
+ 病案首页
|
|
|
</el-button>
|
|
|
- <el-button :id="emrTutorialGetId('editor5')" @click="showIframe = 5"
|
|
|
- :type="showIframe === 5? 'primary' : ''">审核
|
|
|
+ <el-button :id="emrTutorialGetId('editor5')" v-iframe-tabs="IframeTabs.审核">
|
|
|
+ 审核
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div style="display: flex;width: 100%"
|
|
|
:id="emrTutorialGetId('editor')">
|
|
|
<div :style="emrMainWidth()"
|
|
|
- v-show="showIframe === 1 || showIframe === 3 || showIframe === 5">
|
|
|
+ v-show="showIframeIsList(IframeTabs.正在编辑 , IframeTabs.同时打开, IframeTabs.审核)">
|
|
|
<div style="position: relative">
|
|
|
<emr-popup ref="popupRef"
|
|
|
@fill-data="popupFunc.fillData"/>
|
|
@@ -209,16 +212,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div v-show="showIframe === 5" style="width: 40%;">
|
|
|
+ <div v-show="showIframeIsList(IframeTabs.审核)" style="width: 40%;">
|
|
|
<emr-audit/>
|
|
|
</div>
|
|
|
|
|
|
- <div :style="{width: showIframe === 3 ? '50%' : '100%',height :iframeHeight()}"
|
|
|
+ <div :style="{width:showIframeIsList(IframeTabs.同时打开) ? '50%' : '100%',height :iframeHeight()}"
|
|
|
ref="hisSaveEmrDivRef"
|
|
|
- v-show="showIframe === 2 || showIframe === 3">
|
|
|
+ v-show="showIframeIsList(IframeTabs.已保存病历 , IframeTabs.同时打开)">
|
|
|
</div>
|
|
|
|
|
|
- <div v-show="showIframe === 4"
|
|
|
+ <div v-show="showIframeIsList(IframeTabs.病案首页)"
|
|
|
style="width: 100%;overflow-y:auto"
|
|
|
:style="{height : iframeHeight() }">
|
|
|
<!-- 病案首页 -->
|
|
@@ -298,12 +301,20 @@
|
|
|
<script setup lang="ts">
|
|
|
import EmrSidebar from "@/components/zhu-yuan-yi-sheng/emr/emr-template/EmrSidebar.vue";
|
|
|
import {
|
|
|
+ btnIframeTabs,
|
|
|
copyEnum,
|
|
|
delEmrCopy,
|
|
|
emrConfig,
|
|
|
- emrMitt, EmrParam,
|
|
|
- getEmrCopy, loadingTime, parsingDataElements, patientInfo,
|
|
|
- query
|
|
|
+ emrMitt,
|
|
|
+ EmrParam,
|
|
|
+ getEmrCopy,
|
|
|
+ IframeTabs,
|
|
|
+ loadingTime,
|
|
|
+ parsingDataElements,
|
|
|
+ patientInfo,
|
|
|
+ query,
|
|
|
+ vIframeTabs,
|
|
|
+ showIframe, showIframeIsList
|
|
|
} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
|
|
|
import {ElInput, ElMessage, ElMessageBox} from "element-plus";
|
|
|
import {BizException, ExceptionEnum} from "@/utils/BizException";
|
|
@@ -318,7 +329,7 @@ import {
|
|
|
hotSearchSorting,
|
|
|
submitMedicalRecord
|
|
|
} from "@/api/zhu-yuan-yi-sheng/emr-patient";
|
|
|
-import {useDocumentVisibility, useElementSize} from "@vueuse/core";
|
|
|
+import {MaybeComputedElementRef, useDocumentVisibility, useElementSize} from "@vueuse/core";
|
|
|
import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
|
|
|
import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
import HistoricalEmr from "@/components/zhu-yuan-yi-sheng/emr/HistoricalEmr.vue";
|
|
@@ -473,12 +484,12 @@ const getId = () => {
|
|
|
}
|
|
|
|
|
|
const emrMainWidth = () => {
|
|
|
- if (showIframe.value === 3) {
|
|
|
+ if (showIframeIsList(IframeTabs.同时打开)) {
|
|
|
return {
|
|
|
width: '50%'
|
|
|
}
|
|
|
}
|
|
|
- if (showIframe.value === 5) {
|
|
|
+ if (showIframeIsList(IframeTabs.审核)) {
|
|
|
return {
|
|
|
width: '60%'
|
|
|
}
|
|
@@ -1546,7 +1557,6 @@ const queryHistoryFunc = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-const showIframe = ref(1)
|
|
|
const visibility = useDocumentVisibility()
|
|
|
|
|
|
// 创建和编辑病历
|
|
@@ -1630,8 +1640,8 @@ const restoreDefaultSettings = () => {
|
|
|
const loadDocument = (param: EmrParam): Promise<void> => {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
const {loadDocument: load} = editMain
|
|
|
- if (!(showIframe.value === 1 || showIframe.value == 3)) {
|
|
|
- showIframe.value = 1
|
|
|
+ if (!(showIframeIsList(IframeTabs.正在编辑, IframeTabs.同时打开))) {
|
|
|
+ showIframe.value = IframeTabs.正在编辑
|
|
|
}
|
|
|
if (emrConfig.value.loadDocument) {
|
|
|
resolve()
|
|
@@ -1682,9 +1692,9 @@ const emrMittInit = () => {
|
|
|
})
|
|
|
emrMitt.on('只读病历', (id: string) => {
|
|
|
if (getId()) {
|
|
|
- showIframe.value = 3
|
|
|
+ showIframe.value = IframeTabs.同时打开
|
|
|
} else {
|
|
|
- showIframe.value = 2
|
|
|
+ showIframe.value = IframeTabs.已保存病历
|
|
|
}
|
|
|
hisSaveEmr.loadDocument({documentId: id}).then(res => {
|
|
|
hisSaveEmr.editor.setDocument(res, true);
|
|
@@ -1916,7 +1926,7 @@ const outlineData = ref<Outline[]>([])
|
|
|
const outlineRef = ref<{
|
|
|
changeElementById: (id: string) => void
|
|
|
}>()
|
|
|
-const fragmentOrOutlineRef = ref<HTMLDivElement>()
|
|
|
+const fragmentOrOutlineRef = ref<MaybeComputedElementRef>()
|
|
|
const {height: fragmentOrOutlineHeight} = useElementSize(fragmentOrOutlineRef)
|
|
|
|
|
|
function fragmentOrOutlineActivationClassName(val: number) {
|
|
@@ -1972,7 +1982,6 @@ defineExpose({
|
|
|
closeWebSocket,
|
|
|
changeClear
|
|
|
})
|
|
|
-
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|