区分显示和加载状态,添加医院显示逻辑

This commit is contained in:
wzy-warehouse
2026-04-18 16:40:04 +08:00
parent fe258cd249
commit da7745b7a9
26 changed files with 941 additions and 388 deletions
@@ -15,11 +15,11 @@
<InformationBox
:data="riskPointDetail as Record<string, any>"
:field="field"
v-if="useLoadingInformationStore().getLoadingRiskPointInformationStatus()"
v-if="useLoadingInformationStore().riskPoint.loading"
:title="informationBoxTitle"
:offset-x="offsetX"
:offset-y="offsetY"
:key="useLoadingInformationStore().getRiskPointId()"
:key="useLoadingInformationStore().riskPoint.id"
/>
</div>
</template>
@@ -53,13 +53,13 @@
// 监听id变化
watch(
() => useLoadingInformationStore().getRiskPointId(),
() => useLoadingInformationStore().riskPoint.id,
async (newId: number) => {
if (newId === -1) {
return;
}
// 获取风险点数据
const clickObject = useLoadingInformationStore().getClickObject();
const clickObject = useLoadingInformationStore().clickObject;
if (!clickObject || !clickObject.primitive) {
console.warn('点击对象或图元不存在');
@@ -67,7 +67,7 @@
}
const res = await $api.riskSpots.getPointDetailById(
useLoadingInformationStore().getRiskPointId()
useLoadingInformationStore().riskPoint.id
);
// 更新数据
@@ -82,7 +82,7 @@
offsetY.value = screenPos.y;
// 显示新的信息框
useLoadingInformationStore().setLoadingRiskPointInformationStatus(true);
useLoadingInformationStore().riskPoint.loading = true;
} catch (error) {
throw new Error(`坐标转换失败:${error}`);
}