输运模拟滑块图例,天气预报运算预测任务第一帧不请求接口
This commit is contained in:
parent
3fc729fdb5
commit
3aff577410
|
|
@ -41,6 +41,10 @@ function closeGis() {
|
||||||
key: 'showLengend',
|
key: 'showLengend',
|
||||||
value: false,
|
value: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
playback_EventBusCallback.publish('newSymnLegendShow', {
|
||||||
|
flag:false,
|
||||||
|
});
|
||||||
// 清空要素
|
// 清空要素
|
||||||
clearGridFeatures();
|
clearGridFeatures();
|
||||||
sendPlaybackPostMassage({ code: 'abortSYMN', data: false }, {});
|
sendPlaybackPostMassage({ code: 'abortSYMN', data: false }, {});
|
||||||
|
|
|
||||||
|
|
@ -106,15 +106,15 @@ export function initPlaybackWorkerMa(): void {
|
||||||
setShouldAnimate(true);
|
setShouldAnimate(true);
|
||||||
|
|
||||||
// 显示图例
|
// 显示图例
|
||||||
playback_EventBusCallback.publish('legendUiData', {
|
// playback_EventBusCallback.publish('legendUiData', {
|
||||||
key: 'showLengend',
|
// key: 'showLengend',
|
||||||
value: true,
|
// value: true,
|
||||||
});
|
// });
|
||||||
// 更改图例最大值
|
// 更改图例最大值
|
||||||
playback_EventBusCallback.publish('symnLegendUpdateMax', {
|
// playback_EventBusCallback.publish('symnLegendUpdateMax', {
|
||||||
maxValue,
|
// maxValue,
|
||||||
minValue,
|
// minValue,
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'drawSYMN':{ // 绘制输运模拟自定义热力图
|
case 'drawSYMN':{ // 绘制输运模拟自定义热力图
|
||||||
|
|
@ -142,10 +142,10 @@ export function initPlaybackWorkerMa(): void {
|
||||||
// 加载自定义热力图
|
// 加载自定义热力图
|
||||||
addCustomGridLayer(gridData, maxValue, minValue);
|
addCustomGridLayer(gridData, maxValue, minValue);
|
||||||
// 更改最大值
|
// 更改最大值
|
||||||
playback_EventBusCallback.publish('symnLegendUpdateMax', {
|
// playback_EventBusCallback.publish('symnLegendUpdateMax', {
|
||||||
maxValue,
|
// maxValue,
|
||||||
minValue,
|
// minValue,
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'querySYMNOneFail': // 输运模拟接口请求失败
|
case 'querySYMNOneFail': // 输运模拟接口请求失败
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,26 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { mapPalyUiEvet } from '@/gis/ol/interface/common';
|
import type { mapPalyUiEvet } from "@/gis/ol/interface/common";
|
||||||
import { initMap } from '@/gis/ol/index';
|
import { initMap } from "@/gis/ol/index";
|
||||||
import { initOlListenHanlde } from '@/gis/ol/mapEventListen';
|
import { initOlListenHanlde } from "@/gis/ol/mapEventListen";
|
||||||
import { setShouldAnimate } from '@/gis/ol/olClock';
|
import { setShouldAnimate } from "@/gis/ol/olClock";
|
||||||
|
|
||||||
import { initPlaybackWorkerMa, playback_EventBusCallback } from '@/gis/worker/playbackWorkerMa';
|
import {
|
||||||
import { getResultGlobalAttr, getTaskSimulationSpecies } from '@/utils/axios/symn/index';
|
initPlaybackWorkerMa,
|
||||||
import MapRightMenuEvent from './mapRightMenu.vue';
|
playback_EventBusCallback,
|
||||||
|
} from "@/gis/worker/playbackWorkerMa";
|
||||||
|
import {
|
||||||
|
getResultGlobalAttr,
|
||||||
|
getTaskSimulationSpecies,
|
||||||
|
} from "@/utils/axios/symn/index";
|
||||||
|
import MapRightMenuEvent from "./mapRightMenu.vue";
|
||||||
|
|
||||||
import MapTimeSlider from './mapTimeSlider.vue';
|
import MapTimeSlider from "./mapTimeSlider.vue";
|
||||||
import MeteorologyMenu from './meteorologyMenu.vue';
|
import MeteorologyMenu from "./meteorologyMenu.vue";
|
||||||
import PollutionLegend from './pollutionLegend.vue';
|
import PollutionLegend from "./pollutionLegend.vue";
|
||||||
import SymnLegend from './symnLegend.vue';
|
import SymnLegend from "./symnLegend.vue";
|
||||||
|
import newSymnLegend from "./newSymnLegend.vue";
|
||||||
|
|
||||||
import weathLength from './weathLength.vue';
|
import weathLength from "./weathLength.vue";
|
||||||
|
|
||||||
interface playUIEventOpt {
|
interface playUIEventOpt {
|
||||||
activeMenu?: string;
|
activeMenu?: string;
|
||||||
|
|
@ -41,6 +48,9 @@ const legengUIFalg = ref<boolean>(false);
|
||||||
const legengUIObj = ref<any>(null);
|
const legengUIObj = ref<any>(null);
|
||||||
// 输运模拟图例UI标识
|
// 输运模拟图例UI标识
|
||||||
const symnUIFalg = ref<boolean>(false);
|
const symnUIFalg = ref<boolean>(false);
|
||||||
|
|
||||||
|
// 新绘制的输运模拟图例组件
|
||||||
|
const newSymnUIFalg = ref<boolean>(false);
|
||||||
// 气象图例标识
|
// 气象图例标识
|
||||||
const weathLengthUIFalg = ref<any>(false);
|
const weathLengthUIFalg = ref<any>(false);
|
||||||
const weathLengthUIObj = ref<any>(null);
|
const weathLengthUIObj = ref<any>(null);
|
||||||
|
|
@ -48,21 +58,23 @@ const weathLengthUIObj = ref<any>(null);
|
||||||
// 气象菜单UI标识
|
// 气象菜单UI标识
|
||||||
const meteorologyUIFalg = ref<boolean>(false);
|
const meteorologyUIFalg = ref<boolean>(false);
|
||||||
|
|
||||||
|
const startExp = ref(0);
|
||||||
|
|
||||||
// gis动画UI事件
|
// gis动画UI事件
|
||||||
const playUIEvents: any = {
|
const playUIEvents: any = {
|
||||||
start(menuInf: playUIEventOpt) {
|
start(menuInf: playUIEventOpt) {
|
||||||
animationUIFalg.value = true;
|
animationUIFalg.value = true;
|
||||||
activeMenu.value = menuInf.activeMenu;
|
activeMenu.value = menuInf.activeMenu;
|
||||||
// 天气预报运算模块下显示气象菜单
|
// 天气预报运算模块下显示气象菜单
|
||||||
if (menuInf.activeMenu === '天气预报运算') {
|
if (menuInf.activeMenu === "天气预报运算") {
|
||||||
meteorologyUIFalg.value = true;
|
meteorologyUIFalg.value = true;
|
||||||
// 隐藏tabs页
|
// 隐藏tabs页
|
||||||
isShowTabs.value = false;
|
isShowTabs.value = false;
|
||||||
}
|
}
|
||||||
if (menuInf.activeMenu === '数据分析') {
|
if (menuInf.activeMenu === "数据分析") {
|
||||||
setShouldAnimate(true);
|
setShouldAnimate(true);
|
||||||
}
|
}
|
||||||
if (menuInf.activeMenu === '输运模拟') {
|
if (menuInf.activeMenu === "输运模拟") {
|
||||||
// 隐藏tabs页
|
// 隐藏tabs页
|
||||||
isShowTabs.value = false;
|
isShowTabs.value = false;
|
||||||
// 显示下拉菜单
|
// 显示下拉菜单
|
||||||
|
|
@ -77,29 +89,32 @@ const playUIEvents: any = {
|
||||||
if (menuInf.eventOpt.task.taskMode === 1) {
|
if (menuInf.eventOpt.task.taskMode === 1) {
|
||||||
// 获取回放前置条件参数
|
// 获取回放前置条件参数
|
||||||
getTaskSimulationSpecies({ taskId: taskId.value }, (res: any) => {
|
getTaskSimulationSpecies({ taskId: taskId.value }, (res: any) => {
|
||||||
speciesList.value = Object.entries(res).map(([key, item]: [string | number, any]) => {
|
speciesList.value = Object.entries(res).map(
|
||||||
|
([key, item]: [string | number, any]) => {
|
||||||
return {
|
return {
|
||||||
label: item, // 原 value 作为显示文本
|
label: item, // 原 value 作为显示文本
|
||||||
value: key, // 原 key 作为绑定值
|
value: key, // 原 key 作为绑定值
|
||||||
};
|
};
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
else {
|
);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
speciesList.value = [];
|
speciesList.value = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (menuInf.activeMenu === '核事件模拟') {
|
if (menuInf.activeMenu === "核事件模拟") {
|
||||||
taskId.value = menuInf.eventOpt.task.id;
|
taskId.value = menuInf.eventOpt.task.id;
|
||||||
// 隐藏tabs页
|
// 隐藏tabs页
|
||||||
isShowTabs.value = false;
|
isShowTabs.value = false;
|
||||||
// 显示下拉菜单
|
// 显示下拉菜单
|
||||||
isShowSelect.value = true;
|
isShowSelect.value = true;
|
||||||
// 图层选项
|
// 图层选项
|
||||||
layerList.value = [{
|
layerList.value = [
|
||||||
|
{
|
||||||
label: `0`,
|
label: `0`,
|
||||||
value: '0',
|
value: "0",
|
||||||
}];
|
},
|
||||||
|
];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
|
|
@ -110,6 +125,9 @@ const playUIEvents: any = {
|
||||||
symnUIFalg.value = false;
|
symnUIFalg.value = false;
|
||||||
isShowTabs.value = true;
|
isShowTabs.value = true;
|
||||||
isShowSelect.value = false;
|
isShowSelect.value = false;
|
||||||
|
|
||||||
|
|
||||||
|
newSymnUIFalg.value = false;
|
||||||
},
|
},
|
||||||
showLegeng(opt?: any) {
|
showLegeng(opt?: any) {
|
||||||
legengUIFalg.value = true;
|
legengUIFalg.value = true;
|
||||||
|
|
@ -147,12 +165,12 @@ const playUIEvents: any = {
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 初始化二维地图实例
|
// 初始化二维地图实例
|
||||||
initMap('olContainer');
|
initMap("olContainer");
|
||||||
initOlListenHanlde();
|
initOlListenHanlde();
|
||||||
|
|
||||||
// 主题其它模块与gis交互全局事件
|
// 主题其它模块与gis交互全局事件
|
||||||
const eventBus: any = EventBusTool.getEventBus();
|
const eventBus: any = EventBusTool.getEventBus();
|
||||||
eventBus.subscribe('playUI', (opt: mapPalyUiEvet) => {
|
eventBus.subscribe("playUI", (opt: mapPalyUiEvet) => {
|
||||||
playUIEvents[opt.key] && playUIEvents[opt.key](opt);
|
playUIEvents[opt.key] && playUIEvents[opt.key](opt);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -160,15 +178,25 @@ onMounted(() => {
|
||||||
// 初始化worker
|
// 初始化worker
|
||||||
initPlaybackWorkerMa();
|
initPlaybackWorkerMa();
|
||||||
});
|
});
|
||||||
playback_EventBusCallback.subscribe('legendUiData', (opt: any) => {
|
playback_EventBusCallback.subscribe("legendUiData", (opt: any) => {
|
||||||
switch (opt.key) {
|
switch (opt.key) {
|
||||||
case 'showLengend': // 动画轴是否禁用
|
case "showLengend": // 动画轴是否禁用
|
||||||
symnUIFalg.value = opt.value;
|
symnUIFalg.value = opt.value;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
playback_EventBusCallback.subscribe("newSymnLegendShow", (opt: any) => {
|
||||||
|
newSymnUIFalg.value = opt.flag;
|
||||||
|
|
||||||
|
if(opt.flag){
|
||||||
|
startExp.value = opt.startExp;
|
||||||
|
}else{
|
||||||
|
startExp.value = 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -177,8 +205,17 @@ onMounted(() => {
|
||||||
<MapRightMenuEvent />
|
<MapRightMenuEvent />
|
||||||
<PollutionLegend v-show="legengUIFalg" ref="legengUIObj" />
|
<PollutionLegend v-show="legengUIFalg" ref="legengUIObj" />
|
||||||
<SymnLegend v-show="symnUIFalg" />
|
<SymnLegend v-show="symnUIFalg" />
|
||||||
<MapTimeSlider v-show="animationUIFalg" :is-show-tabs="isShowTabs" :is-show-select="isShowSelect" :task-id="taskId"
|
<newSymnLegend v-show="newSymnUIFalg" :startExp="startExp"></newSymnLegend>
|
||||||
:species-list="speciesList" :active-menu="activeMenu" :global-attr="globalAttr" :layer-list="layerList" />
|
<MapTimeSlider
|
||||||
|
v-show="animationUIFalg"
|
||||||
|
:is-show-tabs="isShowTabs"
|
||||||
|
:is-show-select="isShowSelect"
|
||||||
|
:task-id="taskId"
|
||||||
|
:species-list="speciesList"
|
||||||
|
:active-menu="activeMenu"
|
||||||
|
:global-attr="globalAttr"
|
||||||
|
:layer-list="layerList"
|
||||||
|
/>
|
||||||
<MeteorologyMenu v-show="meteorologyUIFalg" />
|
<MeteorologyMenu v-show="meteorologyUIFalg" />
|
||||||
<weathLength v-show="weathLengthUIFalg" ref="weathLengthUIObj" />
|
<weathLength v-show="weathLengthUIFalg" ref="weathLengthUIObj" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -242,6 +242,10 @@ function stopAnimation() {
|
||||||
key: "showLengend",
|
key: "showLengend",
|
||||||
value: false,
|
value: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
playback_EventBusCallback.publish("newSymnLegendShow", {
|
||||||
|
flag: false,
|
||||||
|
});
|
||||||
// 清空要素
|
// 清空要素
|
||||||
clearGridFeatures();
|
clearGridFeatures();
|
||||||
clearHeatmapLayer();
|
clearHeatmapLayer();
|
||||||
|
|
@ -272,13 +276,20 @@ function updateTimeLabel(ctime: any) {
|
||||||
|
|
||||||
// 仅当currentHourDiff是marks中的刻度值时,才更新滑块
|
// 仅当currentHourDiff是marks中的刻度值时,才更新滑块
|
||||||
if (
|
if (
|
||||||
(currentHourDiff >= 0 &&
|
(currentHourDiff > 0 &&
|
||||||
currentHourDiff <= totalHours.value &&
|
currentHourDiff <= totalHours.value &&
|
||||||
// && markKeys.includes(currentHourDiff) // 关键判断:是否为刻度值
|
// && markKeys.includes(currentHourDiff) // 关键判断:是否为刻度值
|
||||||
isDifferentValue && // 只有值不同时才更新
|
isDifferentValue && // 只有值不同时才更新
|
||||||
is6HourInterval)||!_isPlayFirstFrame.value
|
is6HourInterval) ||
|
||||||
|
!_isPlayFirstFrame.value ||
|
||||||
|
(currentHourDiff == 0 &&
|
||||||
|
tqybysTabValue.value != "预测任务" &&
|
||||||
|
currentHourDiff <= totalHours.value &&
|
||||||
|
// && markKeys.includes(currentHourDiff) // 关键判断:是否为刻度值
|
||||||
|
isDifferentValue && // 只有值不同时才更新
|
||||||
|
is6HourInterval)
|
||||||
) {
|
) {
|
||||||
_isPlayFirstFrame.value = true
|
_isPlayFirstFrame.value = true;
|
||||||
value.value = currentHourDiff;
|
value.value = currentHourDiff;
|
||||||
if (markKeys.includes(currentHourDiff)) {
|
if (markKeys.includes(currentHourDiff)) {
|
||||||
// 获取当前currentHourDiff在markKeys中的索引(第几个刻度)
|
// 获取当前currentHourDiff在markKeys中的索引(第几个刻度)
|
||||||
|
|
@ -308,20 +319,20 @@ function updateTimeLabel(ctime: any) {
|
||||||
EventBusTool.getEventBus().publish("playData", {
|
EventBusTool.getEventBus().publish("playData", {
|
||||||
key: "addyctqjsGis",
|
key: "addyctqjsGis",
|
||||||
data: res,
|
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 };
|
const params1 = { ...params, weatherType: 3 };
|
||||||
delete params1.key;
|
delete params1.key;
|
||||||
delete params1.endTime;
|
delete params1.endTime;
|
||||||
playbackSearchData(params1, true, (res) => {
|
playbackSearchData(params1, true, (res) => {
|
||||||
// 往态势传递数据
|
// 往态势传递数据
|
||||||
EventBusTool.getEventBus().publish('playData', {
|
EventBusTool.getEventBus().publish("playData", {
|
||||||
key: 'addyctqjsGis',
|
key: "addyctqjsGis",
|
||||||
data: res,
|
data: res,
|
||||||
weatherType:3
|
weatherType: 3,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -350,6 +361,8 @@ const speciesValueChange = () => {
|
||||||
|
|
||||||
const ssmnOption = ref({});
|
const ssmnOption = ref({});
|
||||||
|
|
||||||
|
const tqybysTabValue = ref("预测任务");
|
||||||
|
|
||||||
// 监听 speciesList 变化(比如父组件异步获取数据后更新)
|
// 监听 speciesList 变化(比如父组件异步获取数据后更新)
|
||||||
watch(
|
watch(
|
||||||
() => props.speciesList,
|
() => props.speciesList,
|
||||||
|
|
@ -448,7 +461,12 @@ onMounted(() => {
|
||||||
|
|
||||||
EventBusTool.getEventBus().subscribe("updateHfKsFlag", (opt: any) => {
|
EventBusTool.getEventBus().subscribe("updateHfKsFlag", (opt: any) => {
|
||||||
_isPlayFirstFrame.value = opt;
|
_isPlayFirstFrame.value = opt;
|
||||||
labelText.value = ""
|
labelText.value = "";
|
||||||
|
});
|
||||||
|
|
||||||
|
EventBusTool.getEventBus().subscribe("updateTqybysTabValue", (opt: any) => {
|
||||||
|
tqybysTabValue.value = opt.value;
|
||||||
|
console.log(tqybysTabValue.value, "21321");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
121
src/layout/Container/newSymnLegend.vue
Normal file
121
src/layout/Container/newSymnLegend.vue
Normal file
|
|
@ -0,0 +1,121 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { watch } from "vue";
|
||||||
|
// 10组:颜色 + 对应刻度,从上到下顺序
|
||||||
|
const colorList = ref([]);
|
||||||
|
|
||||||
|
// [
|
||||||
|
// { color: "#991a20", label: "10⁴" },
|
||||||
|
// { color: "#e63920", label: "10²" },
|
||||||
|
// { color: "#ffc125", label: "10⁰" },
|
||||||
|
// { color: "#ffdd55", label: "10⁻¹" },
|
||||||
|
// { color: "#207830", label: "10⁻²" },
|
||||||
|
// { color: "#42b883", label: "10⁻³" },
|
||||||
|
// { color: "#72c8dd", label: "10⁻⁴" },
|
||||||
|
// { color: "#b4d8e8", label: "10⁻⁵" },
|
||||||
|
// { color: "#e2ccb0", label: "10⁻⁶" },
|
||||||
|
// { color: "#f0e8dd", label: "10⁻⁷" },
|
||||||
|
// ];
|
||||||
|
|
||||||
|
const colorArr = [
|
||||||
|
"bisque",
|
||||||
|
"tan",
|
||||||
|
"lightblue",
|
||||||
|
"dodgerblue",
|
||||||
|
"lightgreen",
|
||||||
|
"green",
|
||||||
|
"yellow",
|
||||||
|
"orange",
|
||||||
|
"red",
|
||||||
|
"darkred",
|
||||||
|
];
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
startExp: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.startExp, // 函数写法,监听props属性(推荐)
|
||||||
|
(newVal, oldVal) => {
|
||||||
|
console.log("父组件传过来的值变化了", newVal, oldVal);
|
||||||
|
// 在这里写你的业务:生成10个对数刻度、重新渲染图表等
|
||||||
|
handleGenTicks(newVal);
|
||||||
|
},
|
||||||
|
{ immediate: true } // immediate:true 组件初始化时立刻执行一次,非常常用!
|
||||||
|
);
|
||||||
|
|
||||||
|
function handleGenTicks(maxVal) {
|
||||||
|
console.log("执行生成刻度", maxVal);
|
||||||
|
colorList.value = [];
|
||||||
|
colorArr.forEach((item, index) => {
|
||||||
|
let item1 = {
|
||||||
|
color: item,
|
||||||
|
label: maxVal - index,
|
||||||
|
};
|
||||||
|
|
||||||
|
colorList.value.push(item1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="legend-wrap">
|
||||||
|
<!-- 颜色条:10个色块 -->
|
||||||
|
<div class="color-bar">
|
||||||
|
<div
|
||||||
|
v-for="(item, index) in colorList"
|
||||||
|
:key="index"
|
||||||
|
class="color-item"
|
||||||
|
:style="{ backgroundColor: item.color }"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
<!-- 刻度:10个,一一对应每个色块 -->
|
||||||
|
<div class="ticks">
|
||||||
|
<span v-for="(item, index) in colorList" :key="index"
|
||||||
|
>10<sup>{{ item.label }}</sup></span
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
>10<sup>{{ startExp - 10 }}</sup></span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.legend-wrap {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 8px;
|
||||||
|
position: absolute;
|
||||||
|
right: 70px;
|
||||||
|
bottom: 40px;
|
||||||
|
z-index: 10;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-bar {
|
||||||
|
width: 24px;
|
||||||
|
height: 320px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-item {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ticks {
|
||||||
|
height: 330px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: sans‑serif;
|
||||||
|
position: absolute;
|
||||||
|
right: -30px;
|
||||||
|
bottom: -3px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -32,13 +32,17 @@ import {
|
||||||
importFile,
|
importFile,
|
||||||
pinToTop,
|
pinToTop,
|
||||||
unpin,
|
unpin,
|
||||||
|
getTaskSimulationNuclide,
|
||||||
} from "@/utils/axios/symn";
|
} from "@/utils/axios/symn";
|
||||||
import fhdfx from "./compliance/index.vue";
|
import fhdfx from "./compliance/index.vue";
|
||||||
import gxfx from "./contribution/index.vue";
|
import gxfx from "./contribution/index.vue";
|
||||||
import log from "./log/index.vue";
|
import log from "./log/index.vue";
|
||||||
import sxfx from "./timingAnalysis/index.vue";
|
import sxfx from "./timingAnalysis/index.vue";
|
||||||
|
import { playback_EventBusCallback } from "@/gis/worker/playbackWorkerMa";
|
||||||
import { activeMoudleInf } from "@/gis/ol";
|
import { activeMoudleInf } from "@/gis/ol";
|
||||||
|
|
||||||
|
import { getRwNcMaxValue } from "@/utils/axios/fskjk";
|
||||||
|
|
||||||
const { t, locale } = useI18n();
|
const { t, locale } = useI18n();
|
||||||
const formEl = ref<FormInstance>();
|
const formEl = ref<FormInstance>();
|
||||||
const dialogVisible = ref(true);
|
const dialogVisible = ref(true);
|
||||||
|
|
@ -290,6 +294,41 @@ const pinToTopTask = (row: any, isPin: boolean) => {
|
||||||
function viewTask(task: any) {
|
function viewTask(task: any) {
|
||||||
console.log("查看任务:", task);
|
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")) {
|
if (task.taskMode == -1 && sessionStorage.getItem("symnZxHsId")) {
|
||||||
sessionStorage.removeItem("symnZxHsId");
|
sessionStorage.removeItem("symnZxHsId");
|
||||||
}
|
}
|
||||||
|
|
@ -299,6 +338,7 @@ function viewTask(task: any) {
|
||||||
form.value = {
|
form.value = {
|
||||||
...task,
|
...task,
|
||||||
};
|
};
|
||||||
|
|
||||||
drawerVisible.value = true;
|
drawerVisible.value = true;
|
||||||
// if (task.taskStatus === 2) {
|
// if (task.taskStatus === 2) {
|
||||||
// 测试代码
|
// 测试代码
|
||||||
|
|
@ -1952,21 +1992,16 @@ getStations();
|
||||||
<!-- 样品ID -->
|
<!-- 样品ID -->
|
||||||
<ElTableColumn :label="t('sampleId')" width="95">
|
<ElTableColumn :label="t('sampleId')" width="95">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input
|
<el-input v-model="scope.row.sampleId" type="number" />
|
||||||
v-model="scope.row.sampleId"
|
|
||||||
type="number"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</ElTableColumn>
|
</ElTableColumn>
|
||||||
|
|
||||||
<!-- 样品类型 -->
|
<!-- 样品类型 -->
|
||||||
<ElTableColumn :label="t('sampleType')" width="80">
|
<ElTableColumn :label="t('sampleType')" width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-select
|
<el-select v-model="scope.row.sampleType">
|
||||||
v-model="scope.row.sampleType"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in ['B','P']"
|
v-for="item in ['B', 'P']"
|
||||||
:key="item"
|
:key="item"
|
||||||
:label="item"
|
:label="item"
|
||||||
:value="item"
|
:value="item"
|
||||||
|
|
@ -1978,11 +2013,9 @@ getStations();
|
||||||
<!-- 样品级别 -->
|
<!-- 样品级别 -->
|
||||||
<ElTableColumn :label="t('sampleLevel')" width="80">
|
<ElTableColumn :label="t('sampleLevel')" width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-select
|
<el-select v-model="scope.row.sampleCategory">
|
||||||
v-model="scope.row.sampleCategory"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in [1,2,3,4,5]"
|
v-for="item in [1, 2, 3, 4, 5]"
|
||||||
:key="item"
|
:key="item"
|
||||||
:label="item"
|
:label="item"
|
||||||
:value="item"
|
:value="item"
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,19 @@ watch(drawerVisible, (newValue) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => tabActive.value, // 函数写法,监听props属性(推荐)
|
||||||
|
(newVal, oldVal) => {
|
||||||
|
console.log('父组件传过来的值变化了', newVal, oldVal)
|
||||||
|
// 更新天气预报运算teb的值
|
||||||
|
EventBusTool.getEventBus().publish('updateTqybysTabValue', {
|
||||||
|
value:newVal,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
{ immediate: true } // immediate:true 组件初始化时立刻执行一次,非常常用!
|
||||||
|
)
|
||||||
|
|
||||||
// function handleSendData(data: any) {
|
// function handleSendData(data: any) {
|
||||||
// console.log('选中的回放数据,需要传至gis --->', data);
|
// console.log('选中的回放数据,需要传至gis --->', data);
|
||||||
// // 往态势传递数据
|
// // 往态势传递数据
|
||||||
|
|
@ -152,6 +165,9 @@ function initCharts(data: any) {
|
||||||
Chart.setOption(option);
|
Chart.setOption(option);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
EventBusTool.getEventBus().subscribe('tqybjsUiEvent', (opt: any) => {
|
EventBusTool.getEventBus().subscribe('tqybjsUiEvent', (opt: any) => {
|
||||||
console.log('timeBatch', opt);
|
console.log('timeBatch', opt);
|
||||||
|
|
|
||||||
|
|
@ -98,3 +98,19 @@ export async function getHcQxData(
|
||||||
callback?.(response);
|
callback?.(response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取任务NC文件最大值
|
||||||
|
export async function getRwNcMaxValue(
|
||||||
|
params: any,
|
||||||
|
callback?: (data: any) => void,
|
||||||
|
): Promise<any> {
|
||||||
|
const response = await request({
|
||||||
|
url: `${serverIp}${baseURL}/transportResult/getNCResultGlobalMaximum`,
|
||||||
|
method: "GET",
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.success && response.code === 200) {
|
||||||
|
callback?.(response);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user