区分显示和加载状态,添加医院显示逻辑
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user