From 4848f892c5f796d61061db794199ebec739d481f Mon Sep 17 00:00:00 2001 From: pengjunchao <499766544@qq.com> Date: Wed, 3 Dec 2025 17:37:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/chart/pages/Calculation.vue | 6 ++++-- src/views/chart/pages/WindMap.vue | 15 +++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/views/chart/pages/Calculation.vue b/src/views/chart/pages/Calculation.vue index d05dced..5de36e6 100644 --- a/src/views/chart/pages/Calculation.vue +++ b/src/views/chart/pages/Calculation.vue @@ -230,6 +230,7 @@ export default { }, created() {}, mounted() { + this.chart() this.onSearch() this.getDataset() }, @@ -240,9 +241,10 @@ export default { }) }, onSearch () { - debugger this.loading = true - this.$axios.post(window.CONFIG.baseUrl + '/train-oneday/train_models', this.queryParams).then((res) => { + this.$axios.post(window.CONFIG.baseUrl + '/train-oneday/train_models', this.queryParams, { + headers: { 'Content-Type': 'application/x-www-form-urlencoded' } + }).then((res) => { this.tableData = res.data.items this.total = res.data.pagination.total_count }).finally(() => { diff --git a/src/views/chart/pages/WindMap.vue b/src/views/chart/pages/WindMap.vue index ae0c08c..bcb9aae 100644 --- a/src/views/chart/pages/WindMap.vue +++ b/src/views/chart/pages/WindMap.vue @@ -43,16 +43,16 @@ export default { // 2024-05-18到2024-05-24是有数据的 let params = { date: '2024-05-20', - lon_center: 116.38, - lat_center: 39.9, + lon_center: 116, + lat_center: 39, grid_halfwidth_deg: 1 } this.loading = true - const res = await this.$axios.post(window.CONFIG.baseUrl + '/nuclide-sim/calculate_atmospheric_stability', params) + const res = await this.$axios.post(window.CONFIG.baseUrl + '/nuclide-sim/calculate_atmospheric_stability', params, { + headers: { 'Content-Type': 'application/x-www-form-urlencoded' } + }) this.loading = false - // const res = Atmospheric - this.atmosphericData = res.stability_result.stability_result }, // 获取风场、温度场、气压场数据 @@ -65,7 +65,9 @@ export default { } try { this.loading = true - const res = await this.$axios.post(window.CONFIG.baseUrl + '/nuclide-sim/get_wind_temperature_pressure_data', params) + const res = await this.$axios.post(window.CONFIG.baseUrl + '/nuclide-sim/get_wind_temperature_pressure_data', params, { + headers: { 'Content-Type': 'application/x-www-form-urlencoded' } + }) this.loading = false // const res = Wind @@ -91,6 +93,7 @@ export default { loadWindfieldWithDataNew(this.viewer, this.windData) break case 'AtmosphericStability': + debugger loadHeatmapByData(this.viewer, this.atmosphericData) break case 'AirPressure':