diff --git a/src/component/rain-earthquake/DisasterChainPointComponent.vue b/src/component/rain-earthquake/DisasterChainPointComponent.vue
index b3c0dd9..dd91de2 100644
--- a/src/component/rain-earthquake/DisasterChainPointComponent.vue
+++ b/src/component/rain-earthquake/DisasterChainPointComponent.vue
@@ -31,7 +31,7 @@
diff --git a/src/hooks/useDisasterChainTable.ts b/src/hooks/useDisasterChainTable.ts
index 0beaa52..2625a2c 100644
--- a/src/hooks/useDisasterChainTable.ts
+++ b/src/hooks/useDisasterChainTable.ts
@@ -2,6 +2,14 @@ import { ref } from 'vue';
import type { XianHiddenDangerSpots } from '@/types/base/XianHiddenDangerSpots';
import type { XianRiskSpots } from '@/types/base/XianRiskSpots';
import type { XianHospitals } from '@/types/base/XianHospitals';
+import type { XianDangerousSource } from '@/types/base/XianDangerousSource';
+import type { XianEmergencyShelter } from '@/types/base/XianEmergencyShelter';
+import type { XianFirefighter } from '@/types/base/XianFirefighter';
+import type { XianStorePoints } from '@/types/base/XianStorePoints';
+import type { XianSchool } from '@/types/base/XianSchool';
+import type { XianBridge } from '@/types/base/XianBridge';
+import type { XianReservoirList } from '@/types/base/XianReservoirList';
+import type { XianSubwayStations } from '@/types/base/XianSubwayStations';
import type { PaginationType } from '@/types/common/PaginationType';
import { PointType } from '@/types/common/DisasterType';
import { InfrastructurePointType } from '@/types/common/InfrastructurePointType';
@@ -59,8 +67,19 @@ export const useDisasterChainTable = () => {
/**
* 表格数据
*/
- const tableDatas = ref<(XianHiddenDangerSpots | XianRiskSpots | XianHospitals)[]>([]);
-
+ const tableDatas = ref<(
+ | XianHiddenDangerSpots
+ | XianRiskSpots
+ | XianHospitals
+ | XianDangerousSource
+ | XianEmergencyShelter
+ | XianFirefighter
+ | XianStorePoints
+ | XianSchool
+ | XianBridge
+ | XianReservoirList
+ | XianSubwayStations
+ )[]>([]);
/**
* 分页配置
*/
diff --git a/src/hooks/usePointsHandle.ts b/src/hooks/usePointsHandle.ts
index 4714c28..411c534 100644
--- a/src/hooks/usePointsHandle.ts
+++ b/src/hooks/usePointsHandle.ts
@@ -44,7 +44,30 @@ export const usePointsHandle = () => {
const id = `${prefix}${point.id}`;
ids.push(id);
- info.push({ id, name: point.name!, lon: point.lon, lat: point.lat, scale_grade: point.scale_grade, risk_grade: point.risk_grade, risk_level: point.risk_level, level: point.level });
+ info.push({
+ id,
+ name: point.name!,
+ lon: point.lon,
+ lat: point.lat,
+ scale_grade: point.scale_grade,
+ risk_grade: point.risk_grade,
+ risk_level: point.risk_level,
+ level: point.level,
+ safe_product_level: point.safe_product_level,
+ type: point.type,
+ construction_category: point.construction_category,
+ team_type: point.team_type,
+ fire_type: point.fire_type,
+ department: point.department,
+ school_type: point.school_type,
+ school_creater: point.school_creater,
+ bridge_type: point.bridge_type,
+ build_time: point.build_time,
+ safety_status: point.safety_status,
+ net_flood_capacity: point.net_flood_capacity,
+ line: point.line,
+ depth_of_accumulated_water: point.depth_of_accumulated_water,
+ });
options.push({
id: id,
type: 'billboard',
diff --git a/src/types/base/Point.ts b/src/types/base/Point.ts
index dcde45e..c461b9e 100644
--- a/src/types/base/Point.ts
+++ b/src/types/base/Point.ts
@@ -24,4 +24,32 @@ export interface Point {
risk_level?: string;
/** 医院等级(医院专用) */
level?: string;
+ /** 安全生产标准化等级(危险源专用) */
+ safe_product_level?: string;
+ /** 避难所类型(避难所专用) */
+ type?: string;
+ /** 避难所性质(避难所专用) */
+ construction_category?: string;
+ /** 队伍类型(消防站专用) */
+ team_type?: string;
+ /** 消防站类型(消防站专用) */
+ fire_type?: string;
+ /** 所属部门(储备点/学校专用) */
+ department?: string;
+ /** 学校类型(学校专用) */
+ school_type?: string;
+ /** 所属部门(学校专用) */
+ school_creater?: string;
+ /** 桥梁类型(桥梁专用) */
+ bridge_type?: string;
+ /** 建成时间(桥梁专用) */
+ build_time?: string;
+ /** 水库安全状态编码(水库专用) */
+ safety_status?: string;
+ /** 净防洪库容(水库专用) */
+ net_flood_capacity?: string;
+ /** 地铁线路(地铁站专用) */
+ line?: string;
+ /** 积水深度(地铁站专用) */
+ depth_of_accumulated_water?: string;
}
\ No newline at end of file
diff --git a/src/types/base/XianReservoirList.ts b/src/types/base/XianReservoirList.ts
index 9279e99..13165f9 100644
--- a/src/types/base/XianReservoirList.ts
+++ b/src/types/base/XianReservoirList.ts
@@ -10,8 +10,12 @@ export interface XianReservoirList extends Point {
location?: string;
/** 安全评定结果 */
safetyAssessResult?: string;
+ /** 水库安全状态编码 */
+ safetyStatus?: string;
+ /** 净防洪库容(万m³) */
+ netFloodCapacity?: string;
/** 经度 */
lon?: number;
/** 纬度 */
lat?: number;
-}
+}
\ No newline at end of file
diff --git a/src/types/base/XianSubwayStations.ts b/src/types/base/XianSubwayStations.ts
index 2ff4e44..b6b35db 100644
--- a/src/types/base/XianSubwayStations.ts
+++ b/src/types/base/XianSubwayStations.ts
@@ -6,10 +6,12 @@ import type { Point } from './Point';
export interface XianSubwayStations extends Point {
/** 站点名称 */
stationName?: string;
+ /** 地铁线路 */
+ line?: string;
/** 参照积水点 */
referToTheWaterAccumulationPoint?: string;
/** 积水深度 */
depthOfAccumulatedWater?: string;
/** 核算后积水深度 */
accumulatedWaterAfterAccounting?: string;
-}
+}
\ No newline at end of file
diff --git a/src/views/home/rainstorm/RainstormView.vue b/src/views/home/rainstorm/RainstormView.vue
index 48ce7ad..a488460 100644
--- a/src/views/home/rainstorm/RainstormView.vue
+++ b/src/views/home/rainstorm/RainstormView.vue
@@ -79,6 +79,14 @@
import type { XianHiddenDangerSpots } from '@/types/base/XianHiddenDangerSpots';
import type { XianRiskSpots } from '@/types/base/XianRiskSpots';
import type { XianHospitals } from '@/types/base/XianHospitals';
+ import type { XianDangerousSource } from '@/types/base/XianDangerousSource';
+ import type { XianEmergencyShelter } from '@/types/base/XianEmergencyShelter';
+ import type { XianFirefighter } from '@/types/base/XianFirefighter';
+ import type { XianStorePoints } from '@/types/base/XianStorePoints';
+ import type { XianSchool } from '@/types/base/XianSchool';
+ import type { XianBridge } from '@/types/base/XianBridge';
+ import type { XianReservoirList } from '@/types/base/XianReservoirList';
+ import type { XianSubwayStations } from '@/types/base/XianSubwayStations';
import {
useDisasterChainTable,
type SearchConditions,
@@ -132,6 +140,14 @@
{value: PointType.COLLAPSE, label: '崩塌'},
{value: PointType.RISK_AREA, label: '风险区'},
{value: InfrastructurePointType.HOSPITAL, label: '医院'},
+ {value: InfrastructurePointType.DANGEROUS_SOURCE, label: '危险源'},
+ {value: InfrastructurePointType.REFUGEE_SHELTER, label: '避难所'},
+ {value: InfrastructurePointType.FIRE_STATION, label: '消防站'},
+ {value: InfrastructurePointType.STORE_POINTS, label: '储备点'},
+ {value: InfrastructurePointType.SCHOOL, label: '学校'},
+ {value: InfrastructurePointType.BRIDGE, label: '桥梁'},
+ {value: InfrastructurePointType.RESERVOIR, label: '水库'},
+ {value: InfrastructurePointType.SUBWAY, label: '地铁站'},
]);
// 设置表格列配置(默认显示隐患点的列)
@@ -164,6 +180,70 @@
{title: '位置', key: 'position'},
{title: '医院等级', key: 'level'},
]);
+ } else if (value.hiddenPoint === InfrastructurePointType.DANGEROUS_SOURCE) {
+ // 危险源:显示危险源等级和安全生产标准化等级
+ setTableColumns([
+ {title: '名称', key: 'disasterName'},
+ {title: '位置', key: 'position'},
+ {title: '危险源等级', key: 'level'},
+ {title: '安全生产标准化等级', key: 'safeProductLevel'},
+ ]);
+ } else if (value.hiddenPoint === InfrastructurePointType.REFUGEE_SHELTER) {
+ // 避难所:显示避难所类型和避难所性质
+ setTableColumns([
+ {title: '名称', key: 'disasterName'},
+ {title: '位置', key: 'position'},
+ {title: '避难所类型', key: 'type'},
+ {title: '避难所性质', key: 'constructionCategory'},
+ ]);
+ } else if (value.hiddenPoint === InfrastructurePointType.FIRE_STATION) {
+ // 消防站:显示队伍类型和消防站类型
+ setTableColumns([
+ {title: '名称', key: 'disasterName'},
+ {title: '位置', key: 'position'},
+ {title: '队伍类型', key: 'teamType'},
+ {title: '消防站类型', key: 'fireType'},
+ ]);
+ } else if (value.hiddenPoint === InfrastructurePointType.STORE_POINTS) {
+ // 储备点:显示分级和所属部门
+ setTableColumns([
+ {title: '名称', key: 'disasterName'},
+ {title: '位置', key: 'position'},
+ {title: '分级', key: 'level'},
+ {title: '所属部门', key: 'department'},
+ ]);
+ } else if (value.hiddenPoint === InfrastructurePointType.SCHOOL) {
+ // 学校:显示学校类型和所属部门
+ setTableColumns([
+ {title: '名称', key: 'disasterName'},
+ {title: '位置', key: 'position'},
+ {title: '学校类型', key: 'schoolType'},
+ {title: '所属部门', key: 'schoolCreater'},
+ ]);
+ } else if (value.hiddenPoint === InfrastructurePointType.BRIDGE) {
+ // 桥梁:显示类型和建成时间
+ setTableColumns([
+ {title: '名称', key: 'disasterName'},
+ {title: '位置', key: 'position'},
+ {title: '类型', key: 'bridgeType'},
+ {title: '建成时间', key: 'buildTime'},
+ ]);
+ } else if (value.hiddenPoint === InfrastructurePointType.RESERVOIR) {
+ // 水库:显示安全状态和净防洪库容
+ setTableColumns([
+ {title: '名称', key: 'disasterName'},
+ {title: '位置', key: 'position'},
+ {title: '安全状态', key: 'safetyStatus'},
+ {title: '净防洪库容(万m³)', key: 'netFloodCapacity'},
+ ]);
+ } else if (value.hiddenPoint === InfrastructurePointType.SUBWAY) {
+ // 地铁站:显示地铁线路和积水深度
+ setTableColumns([
+ {title: '名称', key: 'disasterName'},
+ {title: '位置', key: 'position'},
+ {title: '地铁线路', key: 'line'},
+ {title: '积水深度', key: 'depthOfAccumulatedWater'},
+ ]);
} else {
// 隐患点:显示规模等级和险情等级
setTableColumns([
@@ -202,11 +282,20 @@
) {
return true;
}
- // 医院过滤
- if (
- hiddenPointType === InfrastructurePointType.HOSPITAL &&
- point.category === 'hospital'
- ) {
+ // 基础设施点过滤
+ const infrastructureMap: Record = {
+ [InfrastructurePointType.HOSPITAL]: 'hospital',
+ [InfrastructurePointType.DANGEROUS_SOURCE]: 'danger',
+ [InfrastructurePointType.REFUGEE_SHELTER]: 'shelter',
+ [InfrastructurePointType.FIRE_STATION]: 'fire',
+ [InfrastructurePointType.STORE_POINTS]: 'store',
+ [InfrastructurePointType.SCHOOL]: 'school',
+ [InfrastructurePointType.BRIDGE]: 'bridge',
+ [InfrastructurePointType.RESERVOIR]: 'reservoir',
+ [InfrastructurePointType.SUBWAY]: 'subway',
+ };
+ const infraCategory = infrastructureMap[hiddenPointType as InfrastructurePointType];
+ if (infraCategory && point.category === infraCategory) {
return true;
}
return false;
@@ -248,6 +337,150 @@
lon: point.lon,
lat: point.lat,
} as XianHospitals;
+ } else if (point.category === 'danger') {
+ // 危险源数据
+ return {
+ id:
+ typeof point.id === 'number'
+ ? point.id
+ : parseInt(String(point.id), 10),
+ name: point.value,
+ disasterName: point.value,
+ position:
+ point.lon !== undefined && point.lat !== undefined
+ ? `${point.lon.toFixed(4)}, ${point.lat.toFixed(4)}`
+ : '未知位置',
+ level: String(point.level || '未知'),
+ safeProductLevel: String(point.safe_product_level || '未知'),
+ lon: point.lon,
+ lat: point.lat,
+ } as XianDangerousSource;
+ } else if (point.category === 'shelter') {
+ // 避难所数据
+ return {
+ id:
+ typeof point.id === 'number'
+ ? point.id
+ : parseInt(String(point.id), 10),
+ name: point.value,
+ disasterName: point.value,
+ position:
+ point.lon !== undefined && point.lat !== undefined
+ ? `${point.lon.toFixed(4)}, ${point.lat.toFixed(4)}`
+ : '未知位置',
+ type: String(point.type || '未知'),
+ constructionCategory: String(point.construction_category || '未知'),
+ lon: point.lon,
+ lat: point.lat,
+ } as XianEmergencyShelter;
+ } else if (point.category === 'fire') {
+ // 消防站数据
+ return {
+ id:
+ typeof point.id === 'number'
+ ? point.id
+ : parseInt(String(point.id), 10),
+ name: point.value,
+ disasterName: point.value,
+ position:
+ point.lon !== undefined && point.lat !== undefined
+ ? `${point.lon.toFixed(4)}, ${point.lat.toFixed(4)}`
+ : '未知位置',
+ teamType: String(point.team_type || '未知'),
+ fireType: String(point.fire_type || '未知'),
+ lon: point.lon,
+ lat: point.lat,
+ } as XianFirefighter;
+ } else if (point.category === 'store') {
+ // 储备点数据
+ return {
+ id:
+ typeof point.id === 'number'
+ ? point.id
+ : parseInt(String(point.id), 10),
+ name: point.value,
+ disasterName: point.value,
+ position:
+ point.lon !== undefined && point.lat !== undefined
+ ? `${point.lon.toFixed(4)}, ${point.lat.toFixed(4)}`
+ : '未知位置',
+ level: String(point.level || '未知'),
+ department: String(point.department || '未知'),
+ lon: point.lon,
+ lat: point.lat,
+ } as XianStorePoints;
+ } else if (point.category === 'school') {
+ // 学校数据
+ return {
+ id:
+ typeof point.id === 'number'
+ ? point.id
+ : parseInt(String(point.id), 10),
+ name: point.value,
+ disasterName: point.value,
+ position:
+ point.lon !== undefined && point.lat !== undefined
+ ? `${point.lon.toFixed(4)}, ${point.lat.toFixed(4)}`
+ : '未知位置',
+ schoolType: String(point.school_type || '未知'),
+ schoolCreater: String(point.school_creater || '未知'),
+ lon: point.lon,
+ lat: point.lat,
+ } as XianSchool;
+ } else if (point.category === 'bridge') {
+ // 桥梁数据
+ return {
+ id:
+ typeof point.id === 'number'
+ ? point.id
+ : parseInt(String(point.id), 10),
+ name: point.value,
+ disasterName: point.value,
+ position:
+ point.lon !== undefined && point.lat !== undefined
+ ? `${point.lon.toFixed(4)}, ${point.lat.toFixed(4)}`
+ : '未知位置',
+ bridgeType: String(point.bridge_type || '未知'),
+ buildTime: String(point.build_time || '未知'),
+ lon: point.lon,
+ lat: point.lat,
+ } as XianBridge;
+ } else if (point.category === 'reservoir') {
+ // 水库数据
+ return {
+ id:
+ typeof point.id === 'number'
+ ? point.id
+ : parseInt(String(point.id), 10),
+ name: point.value,
+ disasterName: point.value,
+ position:
+ point.lon !== undefined && point.lat !== undefined
+ ? `${point.lon.toFixed(4)}, ${point.lat.toFixed(4)}`
+ : '未知位置',
+ safetyStatus: String(point.safety_status || '未知'),
+ netFloodCapacity: String(point.net_flood_capacity || '未知'),
+ lon: point.lon,
+ lat: point.lat,
+ } as XianReservoirList;
+ } else if (point.category === 'subway') {
+ // 地铁站数据
+ return {
+ id:
+ typeof point.id === 'number'
+ ? point.id
+ : parseInt(String(point.id), 10),
+ name: point.value,
+ disasterName: point.value,
+ position:
+ point.lon !== undefined && point.lat !== undefined
+ ? `${point.lon.toFixed(4)}, ${point.lat.toFixed(4)}`
+ : '未知位置',
+ line: String(point.line || '未知'),
+ depthOfAccumulatedWater: String(point.depth_of_accumulated_water || '未知'),
+ lon: point.lon,
+ lat: point.lat,
+ } as XianSubwayStations;
} else {
// 隐患点数据
return {