This commit is contained in:
Daniel
2026-03-04 16:48:17 +08:00
parent 64f4c438c3
commit 26938449f0
34 changed files with 956 additions and 500 deletions

View File

@@ -1,5 +1,4 @@
// TypeScript interfaces for military situation data
import { US_KEY_LOCATIONS, IRAN_KEY_LOCATIONS } from './mapLocations'
export interface ForceAsset {
id: string
@@ -90,6 +89,8 @@ export interface MilitarySituation {
id?: number
status?: 'operational' | 'damaged' | 'attacked'
damage_level?: number
/** 遭袭时间 ISO 字符串,用于状态管理与回放 */
attacked_at?: string | null
}[]
combatLosses: CombatLosses
/** 华尔街财团投入趋势 { time: ISO string, value: 0-100 } */
@@ -108,6 +109,7 @@ export interface MilitarySituation {
id?: number
status?: 'operational' | 'damaged' | 'attacked'
damage_level?: number
attacked_at?: string | null
}[]
combatLosses: CombatLosses
/** 反击情绪指标 0-100 */
@@ -122,6 +124,15 @@ export interface MilitarySituation {
conflictStats?: ConflictStats
/** 平民伤亡合计(不区分阵营) */
civilianCasualtiesTotal?: { killed: number; wounded: number }
/** 地图打击数据(来自 DB被袭美军基地、打击源、源→目标连线含攻击时间便于回放 */
mapData?: {
attackedTargets: [number, number][]
strikeSources: { id: string; name: string; lng: number; lat: number }[]
strikeLines: {
sourceId: string
targets: { lng: number; lat: number; name?: string; struck_at?: string | null }[]
}[]
}
}
export const INITIAL_MOCK_DATA: MilitarySituation = {
@@ -154,7 +165,7 @@ export const INITIAL_MOCK_DATA: MilitarySituation = {
{ id: 'us-8', name: 'MQ-9 死神', type: '无人机', count: 28, status: 'active' },
{ id: 'us-9', name: 'MQ-1C 灰鹰', type: '无人机', count: 45, status: 'active' },
],
keyLocations: US_KEY_LOCATIONS,
keyLocations: [],
combatLosses: {
bases: { destroyed: 0, damaged: 2 },
personnelCasualties: { killed: 127, wounded: 384 },
@@ -211,7 +222,7 @@ export const INITIAL_MOCK_DATA: MilitarySituation = {
{ id: 'ir-8', name: '法塔赫 (Fattah)', type: '导弹', count: 12, status: 'alert' },
{ id: 'ir-9', name: '穆哈杰-6', type: '无人机', count: 280, status: 'active' },
],
keyLocations: IRAN_KEY_LOCATIONS,
keyLocations: [],
combatLosses: {
bases: { destroyed: 3, damaged: 8 },
personnelCasualties: { killed: 2847, wounded: 5620 },
@@ -274,4 +285,74 @@ export const INITIAL_MOCK_DATA: MilitarySituation = {
conflictEvents: [],
conflictStats: { total_events: 0, high_impact_events: 0, estimated_casualties: 0, estimated_strike_count: 0 },
civilianCasualtiesTotal: { killed: 430, wounded: 1255 },
// 与 server/seed.js 一致,首屏与未连 API 时也有打击数据,前端可正常绘制攻击线与动画
mapData: {
attackedTargets: [
[42.441, 33.785],
[44.366, 33.315],
[51.314, 25.117],
[43.963, 36.237],
[35.425, 37.002],
[47.58, 24.062],
[44.256, 33.556],
[42.45, 33.8],
[38.618, 33.49],
[40.73, 36.058],
[40.295, 35.336],
[41.885, 37.015],
[47.799, 28.832],
[47.52, 29.346],
[50.608, 26.236],
[54.547, 24.248],
[46.738, 24.774],
[35.012, 31.208],
[47.456, 29.603],
[51.52, 25.275],
[34.666, 30.776],
[36.259, 32.356],
[37.794, 38.354],
[54.024, 17.666],
[58.89, 20.675],
[30.298, 30.915],
[43.159, 11.547],
] as [number, number][],
strikeSources: [
{ id: 'israel', name: '以色列', lng: 34.78, lat: 32.08 },
{ id: 'lincoln', name: '林肯号航母', lng: 58.4215, lat: 24.1568 },
{ id: 'ford', name: '福特号航母', lng: 24.1002, lat: 35.7397 },
],
strikeLines: [
{
sourceId: 'israel',
targets: [
{ lng: 50.88, lat: 34.64, name: '库姆' },
{ lng: 50.876409, lat: 34.625448, name: '伊朗专家会议秘书处' },
{ lng: 51.916, lat: 33.666, name: '纳坦兹' },
{ lng: 51.002, lat: 35.808, name: '卡拉季无人机厂' },
],
},
{
sourceId: 'lincoln',
targets: [
{ lng: 56.27, lat: 27.18, name: '阿巴斯港海军司令部' },
{ lng: 57.08, lat: 27.13, name: '米纳布' },
{ lng: 56.5, lat: 27.0, name: '霍尔木兹岸防阵地' },
{ lng: 50.838, lat: 28.968, name: '布什尔雷达站' },
{ lng: 51.667, lat: 32.654, name: '伊斯法罕核设施' },
],
},
{
sourceId: 'ford',
targets: [
{ lng: 51.42, lat: 35.69, name: '哈梅内伊官邸' },
{ lng: 51.41, lat: 35.72, name: '总统府/情报部' },
{ lng: 51.15, lat: 35.69, name: '梅赫拉巴德机场' },
{ lng: 46.29, lat: 38.08, name: '大不里士空军基地' },
{ lng: 47.076, lat: 34.314, name: '克尔曼沙赫导弹掩体' },
{ lng: 46.42, lat: 33.64, name: '伊拉姆导弹阵地' },
{ lng: 48.35, lat: 33.48, name: '霍拉马巴德储备库' },
],
},
],
},
}