diff --git a/components.d.ts b/components.d.ts index da4b015..6a3b3e4 100644 --- a/components.d.ts +++ b/components.d.ts @@ -54,6 +54,8 @@ declare module 'vue' { Collapsible: typeof import('./src/components/ui/collapsible/Collapsible.vue')['default'] CollapsibleContent: typeof import('./src/components/ui/collapsible/CollapsibleContent.vue')['default'] CollapsibleTrigger: typeof import('./src/components/ui/collapsible/CollapsibleTrigger.vue')['default'] + Day_cycle_power_wave_plot: typeof import('./src/components/dense/saber/day_cycle_power_wave_plot.vue')['default'] + Day_fft_ifft_plot: typeof import('./src/components/dense/saber/day_fft_ifft_plot.vue')['default'] DenseFramework: typeof import('./src/components/DenseFramework.vue')['default'] Drawer: typeof import('./src/components/ui/drawer/Drawer.vue')['default'] DrawerContent: typeof import('./src/components/ui/drawer/DrawerContent.vue')['default'] @@ -101,6 +103,7 @@ declare module 'vue' { MenubarSubContent: typeof import('./src/components/ui/menubar/MenubarSubContent.vue')['default'] MenubarSubTrigger: typeof import('./src/components/ui/menubar/MenubarSubTrigger.vue')['default'] MenubarTrigger: typeof import('./src/components/ui/menubar/MenubarTrigger.vue')['default'] + Month_power_wave_plot: typeof import('./src/components/dense/saber/month_power_wave_plot.vue')['default'] NavigationMenu: typeof import('./src/components/ui/navigation-menu/NavigationMenu.vue')['default'] NavigationMenuContent: typeof import('./src/components/ui/navigation-menu/NavigationMenuContent.vue')['default'] NavigationMenuIndicator: typeof import('./src/components/ui/navigation-menu/NavigationMenuIndicator.vue')['default'] @@ -116,9 +119,11 @@ declare module 'vue' { NumberFieldIncrement: typeof import('./src/components/ui/number-field/NumberFieldIncrement.vue')['default'] NumberFieldInput: typeof import('./src/components/ui/number-field/NumberFieldInput.vue')['default'] ParamsCard: typeof import('./src/components/ParamsCard.vue')['default'] + Plot_wave_fitting: typeof import('./src/components/dense/saber/plot_wave_fitting.vue')['default'] Popover: typeof import('./src/components/ui/popover/Popover.vue')['default'] PopoverContent: typeof import('./src/components/ui/popover/PopoverContent.vue')['default'] PopoverTrigger: typeof import('./src/components/ui/popover/PopoverTrigger.vue')['default'] + RadarSingle: typeof import('./src/components/dense/RadarSingle.vue')['default'] RadioGroup: typeof import('./src/components/ui/radio-group/RadioGroup.vue')['default'] RadioGroupItem: typeof import('./src/components/ui/radio-group/RadioGroupItem.vue')['default'] ResizableHandle: typeof import('./src/components/ui/resizable/ResizableHandle.vue')['default'] diff --git a/src/App.vue b/src/App.vue index d509dff..9fb48e1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -65,12 +65,20 @@ const data = { isActive: true, items: [ { - title: '潮汐波强度', - url: '/radar/v1', + title: '潮汐波提取', + url: '/radar/TW-single', }, { - title: '潮汐波时空变化', - url: '/radar/v2', + title: '潮汐波统计', + url: '/radar/TW-stats', + }, + { + title: '行星波提取', + url: '/radar/PW-single', + }, + { + title: '行星波统计', + url: '/radar/PW-stats', }, ], }, @@ -81,20 +89,12 @@ const data = { isActive: true, items: [ { - title: '波动拟合图', - url: '/saber/plot_wave_fitting', + title: '重力波提取', + url: '/saber/gw/single', }, { - title: '日数据傅里叶变换分析', - url: '/saber/day_fft_ifft_plot', - }, - { - title: '日周期波动能量分析', - url: '/saber/day_cycle_power_wave_plot', - }, - { - title: '月度波动能量分析', - url: '/saber/month_power_wave_plot', + title: '重力波统计', + url: '/saber/gw/stats', }, ], diff --git a/src/CONSTANT.ts b/src/CONSTANT.ts index 2e3de48..0bab08c 100644 --- a/src/CONSTANT.ts +++ b/src/CONSTANT.ts @@ -1,3 +1,4 @@ +const KURONEKO_API = 'http://100.89.232.74:18200' // export const API_BASE_URL = 'http://localhost:5000' -export const API_BASE_URL = import.meta.env.PROD ? 'https://gca-api.dustella.net:8443' : 'http://localhost:18200' +export const API_BASE_URL = import.meta.env.PROD ? 'https://gca-api.dustella.net:8443' : KURONEKO_API // export const API_BASE_URL = 'https://gca-api.dustella.net:8443' diff --git a/src/components/dense/RadarSingle.vue b/src/components/dense/RadarSingle.vue new file mode 100644 index 0000000..c0ed661 --- /dev/null +++ b/src/components/dense/RadarSingle.vue @@ -0,0 +1,226 @@ + + + + + + + + 行星波类型 + + + + {{ m.replace("行星波", "") }} + + + + + 风类型 + + + + 纬向风 + + + 经向风 + + + + + 日期类型 + + + + + 月 + + + 年 + + + + + 观测站 + + + + + + + 观测站 + + {{ station }} + + + + + 高度 + + + + + + + + 年份 + + + + + + + 年 + + {{ year }} + + + + + + 日期 + + + + + + + 天 + + {{ date }} + + + + + + + 月份 + + + + + + + 月 + + {{ month }} + + + + + + + + + + + diff --git a/src/pages/saber/day_cycle_power_wave_plot.vue b/src/components/dense/saber/day_cycle_power_wave_plot.vue similarity index 99% rename from src/pages/saber/day_cycle_power_wave_plot.vue rename to src/components/dense/saber/day_cycle_power_wave_plot.vue index 63be541..cd03f7b 100644 --- a/src/pages/saber/day_cycle_power_wave_plot.vue +++ b/src/components/dense/saber/day_cycle_power_wave_plot.vue @@ -58,6 +58,7 @@ watch(() => selected.path, async () => { + 纬度带 diff --git a/src/pages/saber/day_fft_ifft_plot.vue b/src/components/dense/saber/day_fft_ifft_plot.vue similarity index 99% rename from src/pages/saber/day_fft_ifft_plot.vue rename to src/components/dense/saber/day_fft_ifft_plot.vue index 62b3aa5..7cbcb48 100644 --- a/src/pages/saber/day_fft_ifft_plot.vue +++ b/src/components/dense/saber/day_fft_ifft_plot.vue @@ -58,6 +58,7 @@ watch(() => selected.path, async () => { + 纬度带 diff --git a/src/pages/saber/month_power_wave_plot.vue b/src/components/dense/saber/month_power_wave_plot.vue similarity index 100% rename from src/pages/saber/month_power_wave_plot.vue rename to src/components/dense/saber/month_power_wave_plot.vue diff --git a/src/pages/saber/plot_wave_fitting.vue b/src/components/dense/saber/plot_wave_fitting.vue similarity index 99% rename from src/pages/saber/plot_wave_fitting.vue rename to src/components/dense/saber/plot_wave_fitting.vue index af674ba..cd99fc1 100644 --- a/src/pages/saber/plot_wave_fitting.vue +++ b/src/components/dense/saber/plot_wave_fitting.vue @@ -72,6 +72,7 @@ function mapHeightValue(input: number) { + 纬度带 diff --git a/src/components/dense/saber/utils.ts b/src/components/dense/saber/utils.ts new file mode 100644 index 0000000..1a80d0b --- /dev/null +++ b/src/components/dense/saber/utils.ts @@ -0,0 +1,49 @@ +import { API_BASE_URL } from '~/CONSTANT' + +const saberPaths = ref([]) +const currentSaberDays = ref('') + +async function refreshPath() { + if (saberPaths.value.length) + return + const resp = await baseFetch(`${API_BASE_URL}/saber/metadata`).json() + const data = resp.data.value + saberPaths.value = data! +} + +async function refreshCurrentSaberDays(path: string) { + const resp = await baseFetch(`${API_BASE_URL}/saber/metadata/list_days?path=${path}`).json() + const data = resp.data.value + currentSaberDays.value = data! +} +function renderPath(path: string) { + const yearPattern = /\/data\/(\d{4})/ + const year = path.match(yearPattern)?.[1] + const monthPattern = /Temp_O3_(.*)(\d{4})/ + const month_mapping = { + January: '01月', + February: '02月', + March: '03月', + April: '04月', + May: '05月', + June: '06月', + July: '07月', + August: '08月', + September: '09月', + October: '10月', + November: '11月', + December: '12月', + } as const + const month = path.match(monthPattern)?.[1] as keyof typeof month_mapping + return `${year}年${month_mapping[month]}` +} + +function parseDayOfYear(dateString: string): Date { + const year = Number.parseInt(dateString.substring(0, 4)) + const dayOfYear = Number.parseInt(dateString.substring(4)) - 1 // subtract 1 because JS dates are 0-based + const date = new Date(year, 0) // Start with January 1st of the year + date.setDate(dayOfYear + 1) // Add the days + return date +} + +export { currentSaberDays, parseDayOfYear, refreshCurrentSaberDays, refreshPath, renderPath, saberPaths } diff --git a/src/pages/radar/PW-single.vue b/src/pages/radar/PW-single.vue new file mode 100644 index 0000000..b55fa25 --- /dev/null +++ b/src/pages/radar/PW-single.vue @@ -0,0 +1,24 @@ + + { + "meta":{ + "title":"流星雷达 行星波单次", + "description":"行星波提取", + "group":"流星雷达", + "item_name":"行星波提取" + } + } + + + + + + + + + diff --git a/src/pages/radar/PW-stats.vue b/src/pages/radar/PW-stats.vue new file mode 100644 index 0000000..0b128cd --- /dev/null +++ b/src/pages/radar/PW-stats.vue @@ -0,0 +1,14 @@ + + { + "meta": { + "title": "流星雷达", + "description": "行星波统计", + "group": "流星雷达", + "item_name": "行星波统计" + } + } + + + + + diff --git a/src/pages/radar/TW-single.vue b/src/pages/radar/TW-single.vue new file mode 100644 index 0000000..395ae33 --- /dev/null +++ b/src/pages/radar/TW-single.vue @@ -0,0 +1,24 @@ + +{ + "meta":{ + "title":"潮汐波单次", + "description":"潮汐波提取", + "group":"流星雷达", + "item_name":"潮汐波提取" + } +} + + + + + + + + + diff --git a/src/pages/radar/TW-stats.vue b/src/pages/radar/TW-stats.vue new file mode 100644 index 0000000..368f779 --- /dev/null +++ b/src/pages/radar/TW-stats.vue @@ -0,0 +1,14 @@ + +{ + "meta": { + "title": "流星雷达", + "description": "潮汐波统计", + "group": "流星雷达", + "item_name": "潮汐波统计" +} +} + + + + + diff --git a/src/pages/saber/gw/single.vue b/src/pages/saber/gw/single.vue new file mode 100644 index 0000000..7a3d0ec --- /dev/null +++ b/src/pages/saber/gw/single.vue @@ -0,0 +1,40 @@ + + + + + + 选择模式 + + + + {{ { + day_cycle_power_wave_plot: '逐日波功率谱', + day_fft_ifft_plot: '逐日FFT/IFFT', + plot_wave_fitting: '逐日波形拟合', + }[key] }} + + + + + + + + diff --git a/src/pages/saber/gw/stats.vue b/src/pages/saber/gw/stats.vue new file mode 100644 index 0000000..4de5163 --- /dev/null +++ b/src/pages/saber/gw/stats.vue @@ -0,0 +1,3 @@ + + + diff --git a/src/pages/saber/utils.ts b/src/pages/saber/utils.ts index 1a80d0b..337a5d3 100644 --- a/src/pages/saber/utils.ts +++ b/src/pages/saber/utils.ts @@ -1,4 +1,4 @@ -import { API_BASE_URL } from '~/CONSTANT' +import { ref } from 'vue' const saberPaths = ref([]) const currentSaberDays = ref('') @@ -6,13 +6,13 @@ const currentSaberDays = ref('') async function refreshPath() { if (saberPaths.value.length) return - const resp = await baseFetch(`${API_BASE_URL}/saber/metadata`).json() + const resp = await baseFetch(`/saber/metadata`).json() const data = resp.data.value saberPaths.value = data! } async function refreshCurrentSaberDays(path: string) { - const resp = await baseFetch(`${API_BASE_URL}/saber/metadata/list_days?path=${path}`).json() + const resp = await baseFetch(`/saber/metadata/list_days?path=${path}`).json() const data = resp.data.value currentSaberDays.value = data! } diff --git a/typed-router.d.ts b/typed-router.d.ts index 24540fa..4e8a3b8 100644 --- a/typed-router.d.ts +++ b/typed-router.d.ts @@ -25,12 +25,14 @@ declare module 'vue-router/auto-routes' { '/balloon/year': RouteRecordInfo<'/balloon/year', '/balloon/year', Record, Record>, '/cosmic/single': RouteRecordInfo<'/cosmic/single', '/cosmic/single', Record, Record>, '/cosmic/stats': RouteRecordInfo<'/cosmic/stats', '/cosmic/stats', Record, Record>, + '/radar/PW-single': RouteRecordInfo<'/radar/PW-single', '/radar/PW-single', Record, Record>, + '/radar/PW-stats': RouteRecordInfo<'/radar/PW-stats', '/radar/PW-stats', Record, Record>, + '/radar/TW-single': RouteRecordInfo<'/radar/TW-single', '/radar/TW-single', Record, Record>, + '/radar/TW-stats': RouteRecordInfo<'/radar/TW-stats', '/radar/TW-stats', Record, Record>, '/radar/v1': RouteRecordInfo<'/radar/v1', '/radar/v1', Record, Record>, '/radar/v2': RouteRecordInfo<'/radar/v2', '/radar/v2', Record, Record>, - '/saber/day_cycle_power_wave_plot': RouteRecordInfo<'/saber/day_cycle_power_wave_plot', '/saber/day_cycle_power_wave_plot', Record, Record>, - '/saber/day_fft_ifft_plot': RouteRecordInfo<'/saber/day_fft_ifft_plot', '/saber/day_fft_ifft_plot', Record, Record>, - '/saber/month_power_wave_plot': RouteRecordInfo<'/saber/month_power_wave_plot', '/saber/month_power_wave_plot', Record, Record>, - '/saber/plot_wave_fitting': RouteRecordInfo<'/saber/plot_wave_fitting', '/saber/plot_wave_fitting', Record, Record>, + '/saber/gw/single': RouteRecordInfo<'/saber/gw/single', '/saber/gw/single', Record, Record>, + '/saber/gw/stats': RouteRecordInfo<'/saber/gw/stats', '/saber/gw/stats', Record, Record>, '/tidi/month_stats': RouteRecordInfo<'/tidi/month_stats', '/tidi/month_stats', Record, Record>, '/tidi/waves': RouteRecordInfo<'/tidi/waves', '/tidi/waves', Record, Record>, }