2025-10-16 11:20:50 +08:00
|
|
|
<template>
|
2025-10-22 17:36:25 +08:00
|
|
|
<div class="clinical_box">
|
|
|
|
|
<!-- 临床意义 -->
|
2025-10-29 18:02:33 +08:00
|
|
|
<div class="info-text" v-html="info"></div>
|
2025-10-16 11:20:50 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2025-10-29 18:02:33 +08:00
|
|
|
import { ref, reactive, watch, toRaw, onUnmounted, onMounted } from 'vue'
|
|
|
|
|
import { clinicInfo } from '@/api/liswork/work/LisWork';
|
|
|
|
|
import emitter from '@/utils/mitt';
|
|
|
|
|
const info = ref('')
|
|
|
|
|
const getClinicalInfo = (data: any) => {
|
|
|
|
|
clinicInfo(data).then((res: any) => {
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
console.log('临床意义==>', res.data);
|
|
|
|
|
info.value = res.data
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
// 1. 组件挂载后,先检查缓存中是否有数据
|
|
|
|
|
const cachedData = emitter.getCache?.('refreshClinical');
|
|
|
|
|
if (cachedData) {
|
|
|
|
|
getClinicalInfo(cachedData); // 补触发缓存的数据
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
emitter.on('refreshClinical', (data) => {
|
2025-11-21 18:01:14 +08:00
|
|
|
console.log('data==>', data);
|
2025-10-29 18:02:33 +08:00
|
|
|
getClinicalInfo(data)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
emitter.off('refreshClinical'); // 移除监听
|
|
|
|
|
});
|
2025-10-16 11:20:50 +08:00
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
2025-10-22 17:36:25 +08:00
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.clinical_box {
|
|
|
|
|
height: 82vh;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
2025-10-29 18:02:33 +08:00
|
|
|
|
|
|
|
|
.info-text {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
text-indent: 2rem;
|
|
|
|
|
color: #2b2a2a;
|
|
|
|
|
font-family: SourceHanSansCN, SourceHanSansCN;
|
|
|
|
|
}
|
2025-10-22 17:36:25 +08:00
|
|
|
</style>
|