From 3aff577410781a63be11e3645ef336eee098d784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=AF=E5=B0=91=E5=BA=B7?= <2496371772@qq.com> Date: Tue, 11 Aug 2026 11:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E8=BF=90=E6=A8=A1=E6=8B=9F=E6=BB=91?= =?UTF-8?q?=E5=9D=97=E5=9B=BE=E4=BE=8B=EF=BC=8C=E5=A4=A9=E6=B0=94=E9=A2=84?= =?UTF-8?q?=E6=8A=A5=E8=BF=90=E7=AE=97=E9=A2=84=E6=B5=8B=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E5=B8=A7=E4=B8=8D=E8=AF=B7=E6=B1=82=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Drawer/index.vue | 4 + src/gis/worker/playbackWorkerMa.ts | 24 ++--- src/layout/Container/index.vue | 105 ++++++++++++++------- src/layout/Container/mapTimeSlider.vue | 46 +++++++--- src/layout/Container/newSymnLegend.vue | 121 +++++++++++++++++++++++++ src/pages/symn/index.vue | 57 +++++++++--- src/pages/tqybjs/index.vue | 16 ++++ src/utils/axios/fskjk/index.ts | 18 +++- 8 files changed, 318 insertions(+), 73 deletions(-) create mode 100644 src/layout/Container/newSymnLegend.vue diff --git a/src/components/Drawer/index.vue b/src/components/Drawer/index.vue index 9734684f..4402ca80 100644 --- a/src/components/Drawer/index.vue +++ b/src/components/Drawer/index.vue @@ -41,6 +41,10 @@ function closeGis() { key: 'showLengend', value: false, }); + + playback_EventBusCallback.publish('newSymnLegendShow', { + flag:false, + }); // 清空要素 clearGridFeatures(); sendPlaybackPostMassage({ code: 'abortSYMN', data: false }, {}); diff --git a/src/gis/worker/playbackWorkerMa.ts b/src/gis/worker/playbackWorkerMa.ts index 49cc4396..288d2dd6 100644 --- a/src/gis/worker/playbackWorkerMa.ts +++ b/src/gis/worker/playbackWorkerMa.ts @@ -106,15 +106,15 @@ export function initPlaybackWorkerMa(): void { setShouldAnimate(true); // 显示图例 - playback_EventBusCallback.publish('legendUiData', { - key: 'showLengend', - value: true, - }); + // playback_EventBusCallback.publish('legendUiData', { + // key: 'showLengend', + // value: true, + // }); // 更改图例最大值 - playback_EventBusCallback.publish('symnLegendUpdateMax', { - maxValue, - minValue, - }); + // playback_EventBusCallback.publish('symnLegendUpdateMax', { + // maxValue, + // minValue, + // }); } break; case 'drawSYMN':{ // 绘制输运模拟自定义热力图 @@ -142,10 +142,10 @@ export function initPlaybackWorkerMa(): void { // 加载自定义热力图 addCustomGridLayer(gridData, maxValue, minValue); // 更改最大值 - playback_EventBusCallback.publish('symnLegendUpdateMax', { - maxValue, - minValue, - }); + // playback_EventBusCallback.publish('symnLegendUpdateMax', { + // maxValue, + // minValue, + // }); } break; case 'querySYMNOneFail': // 输运模拟接口请求失败 diff --git a/src/layout/Container/index.vue b/src/layout/Container/index.vue index 7dc07d93..0419d5aa 100644 --- a/src/layout/Container/index.vue +++ b/src/layout/Container/index.vue @@ -1,19 +1,26 @@ @@ -177,8 +205,17 @@ onMounted(() => { - + + diff --git a/src/layout/Container/mapTimeSlider.vue b/src/layout/Container/mapTimeSlider.vue index ba3e7b45..ea7c52d5 100644 --- a/src/layout/Container/mapTimeSlider.vue +++ b/src/layout/Container/mapTimeSlider.vue @@ -103,7 +103,7 @@ const slodtooltip: any = (toolNum: number) => { const active = ref("浓度分布"); -const _isPlayFirstFrame = ref(false); +const _isPlayFirstFrame = ref(false); function switchActive(tab: string) { if (playFalg.value) return; @@ -242,6 +242,10 @@ function stopAnimation() { key: "showLengend", value: false, }); + + playback_EventBusCallback.publish("newSymnLegendShow", { + flag: false, + }); // 清空要素 clearGridFeatures(); clearHeatmapLayer(); @@ -269,16 +273,23 @@ function updateTimeLabel(ctime: any) { props.activeMenu === "输运模拟" ? currentHourDiff % 3 === 0 : currentHourDiff % 1 === 0; - + // 仅当currentHourDiff是marks中的刻度值时,才更新滑块 if ( - (currentHourDiff >= 0 && - currentHourDiff <= totalHours.value && - // && markKeys.includes(currentHourDiff) // 关键判断:是否为刻度值 - isDifferentValue && // 只有值不同时才更新 - is6HourInterval)||!_isPlayFirstFrame.value + (currentHourDiff > 0 && + currentHourDiff <= totalHours.value && + // && markKeys.includes(currentHourDiff) // 关键判断:是否为刻度值 + isDifferentValue && // 只有值不同时才更新 + is6HourInterval) || + !_isPlayFirstFrame.value || + (currentHourDiff == 0 && + tqybysTabValue.value != "预测任务" && + currentHourDiff <= totalHours.value && + // && markKeys.includes(currentHourDiff) // 关键判断:是否为刻度值 + isDifferentValue && // 只有值不同时才更新 + is6HourInterval) ) { - _isPlayFirstFrame.value = true + _isPlayFirstFrame.value = true; value.value = currentHourDiff; if (markKeys.includes(currentHourDiff)) { // 获取当前currentHourDiff在markKeys中的索引(第几个刻度) @@ -308,20 +319,20 @@ function updateTimeLabel(ctime: any) { EventBusTool.getEventBus().publish("playData", { key: "addyctqjsGis", data: res, - weatherType:params.weatherType + weatherType: params.weatherType, }); }); // // 判定风场数据 - if (weathFlag[3] === true&&gisImgOpt.weatherType!=3) { + if (weathFlag[3] === true && gisImgOpt.weatherType != 3) { const params1 = { ...params, weatherType: 3 }; delete params1.key; delete params1.endTime; playbackSearchData(params1, true, (res) => { // 往态势传递数据 - EventBusTool.getEventBus().publish('playData', { - key: 'addyctqjsGis', + EventBusTool.getEventBus().publish("playData", { + key: "addyctqjsGis", data: res, - weatherType:3 + weatherType: 3, }); }); } @@ -350,6 +361,8 @@ const speciesValueChange = () => { const ssmnOption = ref({}); +const tqybysTabValue = ref("预测任务"); + // 监听 speciesList 变化(比如父组件异步获取数据后更新) watch( () => props.speciesList, @@ -448,7 +461,12 @@ onMounted(() => { EventBusTool.getEventBus().subscribe("updateHfKsFlag", (opt: any) => { _isPlayFirstFrame.value = opt; - labelText.value = "" + labelText.value = ""; + }); + + EventBusTool.getEventBus().subscribe("updateTqybysTabValue", (opt: any) => { + tqybysTabValue.value = opt.value; + console.log(tqybysTabValue.value, "21321"); }); }); diff --git a/src/layout/Container/newSymnLegend.vue b/src/layout/Container/newSymnLegend.vue new file mode 100644 index 00000000..d4ed0093 --- /dev/null +++ b/src/layout/Container/newSymnLegend.vue @@ -0,0 +1,121 @@ + + + + + \ No newline at end of file diff --git a/src/pages/symn/index.vue b/src/pages/symn/index.vue index 6231f2de..fcdda4cd 100644 --- a/src/pages/symn/index.vue +++ b/src/pages/symn/index.vue @@ -32,13 +32,17 @@ import { importFile, pinToTop, unpin, + getTaskSimulationNuclide, } from "@/utils/axios/symn"; import fhdfx from "./compliance/index.vue"; import gxfx from "./contribution/index.vue"; import log from "./log/index.vue"; import sxfx from "./timingAnalysis/index.vue"; +import { playback_EventBusCallback } from "@/gis/worker/playbackWorkerMa"; import { activeMoudleInf } from "@/gis/ol"; +import { getRwNcMaxValue } from "@/utils/axios/fskjk"; + const { t, locale } = useI18n(); const formEl = ref(); const dialogVisible = ref(true); @@ -290,6 +294,41 @@ const pinToTopTask = (row: any, isPin: boolean) => { function viewTask(task: any) { console.log("查看任务:", task); + if (task.taskMode == 1) { + getTaskSimulationNuclide({ taskId: task.id }, (res: any) => { + const keys = Object.keys(res); + const values = Object.values(res); + let arr = []; + console.log("res", res); + keys.map((item, index) => { + arr.push({ + name: values[index], + id: keys[index], + }); + }); + if (arr.length) { + getRwNcMaxValue({ taskId: task.id, speciesId: arr[0].id }, (res) => { + console.log(res, "21234"); + const startExp = Math.ceil(Math.log10(res.result)); + + playback_EventBusCallback.publish("newSymnLegendShow", { + flag: true, + startExp, + }); + }); + } + }); + } else { + getRwNcMaxValue({ taskId: task.id }, (res) => { + const startExp = Math.ceil(Math.log10(res.result)); + + playback_EventBusCallback.publish("newSymnLegendShow", { + flag: true, + startExp, + }); + }); + } + if (task.taskMode == -1 && sessionStorage.getItem("symnZxHsId")) { sessionStorage.removeItem("symnZxHsId"); } @@ -299,6 +338,7 @@ function viewTask(task: any) { form.value = { ...task, }; + drawerVisible.value = true; // if (task.taskStatus === 2) { // 测试代码 @@ -1952,21 +1992,16 @@ getStations();