diff --git a/src/assets/css/ele.css b/src/assets/css/ele.css index 18d517ed..372fe0cb 100644 --- a/src/assets/css/ele.css +++ b/src/assets/css/ele.css @@ -253,8 +253,8 @@ background-color: #409eff !important; /* 高亮色,与背景区分 */ } - .el-select-dropdown .el-select-dropdown__item.selected { - background-color: #409eff !important; /* 选中色 */ + .el-select-dropdown .el-select-dropdown__item.selected, .el-select-dropdown .el-select-dropdown__item.is-selected { + background-color: #297CD1 !important; /* 选中色 */ } .el-popper { diff --git a/src/gis/ol/interface/common.ts b/src/gis/ol/interface/common.ts index 3a843e71..06f95d4c 100644 --- a/src/gis/ol/interface/common.ts +++ b/src/gis/ol/interface/common.ts @@ -45,7 +45,8 @@ export interface mapRightMenu { pointData?: () => void; // 二三维切换 ts3D?: () => void; - + // gif + gif?: () => void; } // 定位参数接口 diff --git a/src/gis/ol/olClock.ts b/src/gis/ol/olClock.ts index e604f5ab..8e82817b 100644 --- a/src/gis/ol/olClock.ts +++ b/src/gis/ol/olClock.ts @@ -67,6 +67,7 @@ export function setMultiplier(num: number) { // 设置动画时间 export function setAnimationTime(opt: any) { if (olClock && opt) { + if (!opt.startTime || !opt.endTime) { return } olClock.startTime = JulianDate.fromDate(new Date(opt.startTime)); olClock.currentTime = JulianDate.fromDate(new Date(opt.startTime)); olClock.stopTime = JulianDate.fromDate(new Date(opt.endTime)); diff --git a/src/layout/Container/mapRightMenu.vue b/src/layout/Container/mapRightMenu.vue index 500f9d13..049de07f 100644 --- a/src/layout/Container/mapRightMenu.vue +++ b/src/layout/Container/mapRightMenu.vue @@ -4,15 +4,20 @@ import type { LocateParams, MapControlItem } from '@/gis/ol/interface/common'; import { domFullscreenStatus } from '@/gis/common/domHandle'; import { mapRightMenuEvent } from '@/gis/ol/olRightMenu'; +import { getGif } from "@/utils/axios/symn"; // 是否显示定位页面 const isShowLocate = ref(false); - const locate = ref({ lon: null, lat: null, }); +// 是否显示gif +const isShowGif = ref(false); +const gifSrc = ref(''); +const gifParams = ref({ taskId: '', speciesId: '' }); + // 图标基础集合 const baseList = ref([ { @@ -88,7 +93,7 @@ const baseList = ref([ }, { name: 'zoomOut', - isMargin: true, + isMargin: false, tooltip: '缩小', isActive: false, activeName: 'zoomOut', @@ -128,6 +133,17 @@ const yxcjTool = ref([ ]); +// 输运模拟 +const symnTool = ref([ + { + name: 'gif', + isMargin: false, + tooltip: 'GIF', + isActive: false, + activeName: 'gif', + } +]); + // 图标集合 const svgList = ref([...baseList.value]); // 图标点击事件处理 @@ -183,6 +199,14 @@ function handleIconClick(item: MapControlItem) { falg, }); } + + // 处理gif + else if (item.name === 'gif') { + getGif(gifParams.value,(res: any) => { + gifSrc.value = window.FSXConfig.VUE_APP_SERVER_IP + res; + isShowGif.value = true; + }); + } // 处理其他功能(全屏、定位等) else { // 缩放按钮不激活状态切换 @@ -254,9 +278,10 @@ onMounted(() => { // 根据菜单,进行工具栏选项的变动 if (res.key === 'baseList') { svgList.value = [...baseList.value]; - } - else if (res.key === 'allList') { + } else if (res.key === 'allList') { svgList.value = [...baseList.value, ...yxcjTool.value]; + } else if (res.key === 'gifIcon') { + svgList.value = [...baseList.value, ...symnTool.value]; } // 按钮菜单触发状态 if (res.key === 'dataExport') { // 数据导出 @@ -266,6 +291,12 @@ onMounted(() => { switchIconActive(res.key, res.falg); } }); + + EventBusTool.getEventBus().subscribe('speciesChange', (res: any) => { + if (res.key === 'speciesId') { + gifParams.value = res.data; + } + }); }); @@ -301,6 +332,12 @@ onMounted(() => { + + GIF + + + + diff --git a/src/layout/Container/mapTimeSlider.vue b/src/layout/Container/mapTimeSlider.vue index 3a8226f4..632d7970 100644 --- a/src/layout/Container/mapTimeSlider.vue +++ b/src/layout/Container/mapTimeSlider.vue @@ -76,7 +76,7 @@ const isQueryData = ref(true); const marskType = ref('hour'); const start = ref(dayjs('2025-09-15 00:00:00')); const end = ref(dayjs('2025-09-16 00:00:00')); -const totalHours = ref(end.value.diff(start, marskType.value)); +const totalHours = ref(end.value.diff(start.value, marskType.value)); const value = ref(0); const playFalg = ref(false); const slodtooltip: any = (toolNum: number) => { @@ -270,6 +270,13 @@ function setStartAndEndTime(param: any) { // updateTimeLabel(start.value.valueOf()); } +const speciesValueChange = () => { + EventBusTool.getEventBus().publish('speciesChange', { + key: 'speciesId', + data: { taskId: props.taskId, speciesId: speciesValue.value }, + }); +}; + // 监听 speciesList 变化(比如父组件异步获取数据后更新) watch( () => props.speciesList, @@ -278,6 +285,10 @@ watch( console.log(newVal); speciesValue.value = newVal[0].value; + EventBusTool.getEventBus().publish('speciesChange', { + key: 'speciesId', + data: { taskId: props.taskId, speciesId: newVal[0].value }, + }); } else { speciesValue.value = null; @@ -353,7 +364,7 @@ onMounted(() => { + :options="props.speciesList" placeholder="请选择物种" style="width: 230px" @change="speciesValueChange" />
@@ -367,6 +378,7 @@ onMounted(() => {
+
value:{{ value }} ----- totalHours:{{ totalHours }}
diff --git a/src/pages/sjtb/configTask/dataTable/antvX6.ts b/src/pages/sjtb/configTask/dataTable/antvX6.ts index e36e399f..2fa42418 100644 --- a/src/pages/sjtb/configTask/dataTable/antvX6.ts +++ b/src/pages/sjtb/configTask/dataTable/antvX6.ts @@ -103,6 +103,7 @@ export class X6Graph { // 1. 配置同步字段:新增“配置”菜单项 const configItem = document.createElement('div'); + configItem.id = 'ant-x6-menu-1'; configItem.style.cssText = ` padding: 6px 12px; cursor: pointer; @@ -197,6 +198,7 @@ export class X6Graph { // 2. 配置同步数量 const syncNumItem = document.createElement('div'); + syncNumItem.id = 'ant-x6-menu-2'; syncNumItem.style.cssText = ` padding: 6px 12px; cursor: pointer; @@ -226,6 +228,7 @@ export class X6Graph { // 3. 原有“删除”菜单项(保持不变,调整顺序在配置项下方) const deleteItem = document.createElement('div'); + deleteItem.id = 'ant-x6-menu-3'; deleteItem.style.cssText = ` padding: 6px 12px; cursor: pointer; @@ -356,6 +359,14 @@ export class X6Graph { if (!nodeData.level) { return; } + + if (nodeData.level === 'level2') { + + } else if (nodeData.level === 'level3') { + + } else if (nodeData.level === 'level4') { + + } // 显示菜单(位置为点击坐标) this.showMenu(node.id, e.clientX, e.clientY); }); diff --git a/src/pages/sjtb/configTask/dataTable/index.vue b/src/pages/sjtb/configTask/dataTable/index.vue index 0bc09e74..4978aece 100644 --- a/src/pages/sjtb/configTask/dataTable/index.vue +++ b/src/pages/sjtb/configTask/dataTable/index.vue @@ -368,7 +368,7 @@ function handleSave() { }); emit('cancel'); } - }); + }, 30 * 60 * 1000); } else { ElMessage({ @@ -392,18 +392,19 @@ function handleCancel() { - + (); @@ -147,13 +148,13 @@ interface OptionItem { value: number; } const taskStatusList = ref([ - // -1执行失败,0未开始,1等待中,2运行中,3已完成,4任务检查未通过 + // -1执行失败,0未开始,1等待中,2运行中,3已完成,4检查未通过 { label: '执行失败', value: -1 }, { label: '未开始', value: 0 }, { label: '等待中', value: 1 }, { label: '运行中', value: 2 }, { label: '已完成', value: 3 }, - { label: '任务检查未通过', value: 4 }, + { label: '检查未通过', value: 4 }, ]); function handleClose() { @@ -255,15 +256,25 @@ function clearChild() { childList.splice(0); } // 置顶和取消置顶 -const pinToTopTask = (row: any) => { - pinToTopOrUnpin({ id: row.id }, (res) => { - if (res.code === 200) { - ElMessage.success('操作成功!'); - getList(); - } - }); +const pinToTopTask = (row: any, isPin: boolean) => { + if (!isPin) { + pinToTop({ taskId: row.id }, (res) => { + if (res.code === 200) { + ElMessage.success('置顶成功!'); + getList(); + } + }); + } else { + unpin({ taskId: row.id }, (res) => { + if (res.code === 200) { + ElMessage.success('取消置顶成功!'); + getList(); + } + }); + } }; function viewTask(task: any) { + debugger console.log('查看任务:', task); handleClose(); form.value = { @@ -281,6 +292,11 @@ function viewTask(task: any) { key: 'isQueryData', value: true, }); + if (task.taskMode === 1) { + EventBusTool.getEventBus().publish('mapRightMenuUIEvent', { + key: 'gifIcon' + }); + } // 移除所有台站 classInstances.olTarget?.clearMarkers(); @@ -546,7 +562,7 @@ function handleSizeChangeLog(val: number) { } function handleCurrentChangeLog(val: number) { console.log(`current page: ${val}`); - currentPage.value = val; + currentPageLog.value = val; getTaskLog({ taskId: logId.value, pageNum:currentPageLog.value, @@ -646,6 +662,9 @@ watch(drawerVisible, (newValue) => { console.log('抽屉状态变化:', newValue); if (newValue === false) { dialogVisible.value = true; + EventBusTool.getEventBus().publish('mapRightMenuUIEvent', { + key: 'baseList' + }); } }); @@ -960,7 +979,7 @@ getStations(); - + @@ -1158,7 +1177,7 @@ getStations();
等待中
运行中
已完成
-
任务检查未通过
+
检查未通过
@@ -1196,40 +1215,44 @@ getStations(); diff --git a/src/pages/tqybjs/index.vue b/src/pages/tqybjs/index.vue index b58e9d63..22286033 100644 --- a/src/pages/tqybjs/index.vue +++ b/src/pages/tqybjs/index.vue @@ -5,6 +5,7 @@ import { gisImgOpt, tqycAnimationType, weathFlag } from '@/gis/ol/index'; import { playbackSearchData, weatherDataLine, weatherPreview } from '@/utils/axios/tqyb/data/index'; import tab1 from './tab-1/index.vue'; import tab2 from './tab-2/index.vue'; +import tab3 from './tab-3/index.vue'; import WindRose from './WindRose.vue'; const { t } = useI18n(); @@ -238,7 +239,7 @@ onMounted(() => { - 建设中... + diff --git a/src/pages/tqybjs/tab-1/index.vue b/src/pages/tqybjs/tab-1/index.vue index e256b48a..54df9c60 100644 --- a/src/pages/tqybjs/tab-1/index.vue +++ b/src/pages/tqybjs/tab-1/index.vue @@ -42,13 +42,13 @@ interface OptionItem { value: number; } const taskStatusList = ref([ - // -1执行失败,0未开始,1等待中,2运行中,3已完成,4任务检查未通过 + // -1执行失败,0未开始,1等待中,2运行中,3已完成,4检查未通过 { label: '执行失败', value: -1 }, { label: '未开始', value: 0 }, { label: '等待中', value: 1 }, { label: '运行中', value: 2 }, { label: '已完成', value: 3 }, - { label: '任务检查未通过', value: 4 }, + { label: '检查未通过', value: 4 }, ]); function search() { @@ -509,7 +509,7 @@ getList();
等待中
运行中
已完成
-
任务检查未通过
+
检查未通过
@@ -568,7 +568,7 @@ getList(); {{ true ? t('pinToTop') : t('unpin') }} - + diff --git a/src/pages/tqybjs/tab-2/index.vue b/src/pages/tqybjs/tab-2/index.vue index e8260d38..9760e67c 100644 --- a/src/pages/tqybjs/tab-2/index.vue +++ b/src/pages/tqybjs/tab-2/index.vue @@ -99,7 +99,7 @@ function getList() { }]; } if (propsWithDefaults.type === 'gkqx') { - dataS = '6'; + dataS = ''; selectOption.value = [{ value: '6', label: 't1h', @@ -408,6 +408,9 @@ getList();
diff --git a/src/pages/yxcj/dbvarScatter/index.vue b/src/pages/yxcj/dbvarScatter/index.vue index 02d83ef2..536323ca 100644 --- a/src/pages/yxcj/dbvarScatter/index.vue +++ b/src/pages/yxcj/dbvarScatter/index.vue @@ -9,6 +9,11 @@ import { nextTick, onMounted, ref, watch } from 'vue'; import { useECharts } from '@/hooks/useECharts'; // import axios from 'axios' import { getBivariate } from '@/utils/axios/yxcj'; + +const props = defineProps({ + taskId: Number, +}); + // ======================== 1. 数据类型定义 ======================== interface DataPoint { lon: number; // 经度 @@ -224,7 +229,7 @@ const { updateChart: startAndStopChartStruUpdate } = useECharts({ }); function getlist() { - getBivariate({ taskId: 8 }, (result) => { + getBivariate({ taskId: props.taskId }, (result) => { // axios.get('/mokedata.json').then(result => { console.log(result); const res = result.result; diff --git a/src/pages/yxcj/index.vue b/src/pages/yxcj/index.vue index ed4ef673..c64f3442 100644 --- a/src/pages/yxcj/index.vue +++ b/src/pages/yxcj/index.vue @@ -5,7 +5,7 @@ import { ElButton, ElCol, ElDatePicker, ElForm, ElFormItem, ElInput, ElLoading, import { useI18n } from 'vue-i18n'; import Table from '@/components/Table/index.vue'; import { activeMoudleInf } from '@/gis/ol/index'; -import { createTask, deleteTask as deleteData, exportAcTimeSeriesTxt, exportBayesProbLocTxt, exportBivariateTxt, exportTemplate, exportUnivariateTxt, getBayesProbLoc, getById, getIdDetail, getPage, getTaskLog, importTask, runTask, updateTask, pinToTopOrUnpin } from '@/utils/axios/yxcj'; +import { createTask, deleteTask as deleteData, exportAcTimeSeriesTxt, exportBayesProbLocTxt, exportBivariateTxt, exportTemplate, exportUnivariateTxt, getBayesProbLoc, getById, getIdDetail, getPage, getTaskLog, importTask, runTask, updateTask, pinToTop, unpin } from '@/utils/axios/yxcj'; import { transformLogData } from '@/utils/index'; import { exportCharts } from '@/utils/index'; // 下载图表图片 import scatter from './dbvarScatter/index.vue'; @@ -108,6 +108,7 @@ const exportFlag = ref(''); const monOrAnaObj = ref(); const dbScatterObj = ref(); const univarBanObj = ref(); +const uploadButtonShow = ref(false); // 通过watch监听侧边栏的变化 watch(drawerVisible, (newValue) => { @@ -123,13 +124,13 @@ interface OptionItem { } const taskStatusList = ref([ - // -1执行失败,0未开始,1等待中,2运行中,3已完成,4任务检查未通过 + // -1执行失败,0未开始,1等待中,2运行中,3已完成,4检查未通过 { label: '执行失败', value: -1 }, { label: '未开始', value: 0 }, { label: '等待中', value: 1 }, { label: '运行中', value: 2 }, { label: '已完成', value: 3 }, - { label: '任务检查未通过', value: 4 }, + { label: '检查未通过', value: 4 }, ]); const releaseTypeList = ref([ { label: '持续释放', value: 1 }, @@ -418,6 +419,12 @@ function getDetail(id: string) { }); } function viewDetail(row: any) { + if (row.id) { + uploadButtonShow.value = true + } else { + uploadButtonShow.value = false + } + viewDetailVisible.value = true; getDetail(form.value?.id || row.id); } @@ -440,13 +447,22 @@ function getData(id: string) { }); } // 置顶和取消置顶 -const pinToTopTask = (row: any) => { - pinToTopOrUnpin({ id: row.id }, (res) => { - if (res.code === 200) { - ElMessage.success('操作成功!'); - getList(); - } - }); +const pinToTopTask = (row: any, isPin: boolean) => { + if (!isPin) { + pinToTop({ taskId: row.id }, (res) => { + if (res.code === 200) { + ElMessage.success('置顶成功!'); + getList(); + } + }); + } else { + unpin({ taskId: row.id }, (res) => { + if (res.code === 200) { + ElMessage.success('取消置顶成功!'); + getList(); + } + }); + } }; // 执行重建任务 function runTaskId(row: any) { @@ -890,6 +906,9 @@ onMounted(() => { v-model="viewDetailVisible" :title="t('view')" width="61vw" class="view-dialog" @close="viewDetailVisible = false" > + + {{ t('upload') }}abc + { - + @@ -950,33 +969,33 @@ onMounted(() => { @pagination="handlePagination" > @@ -1014,7 +1039,7 @@ onMounted(() => { - + @@ -1087,10 +1112,6 @@ onMounted(() => { - - {{ t('upload') }} - - diff --git a/src/utils/axios/symn/index.ts b/src/utils/axios/symn/index.ts index 6147a577..ad1dd443 100644 --- a/src/utils/axios/symn/index.ts +++ b/src/utils/axios/symn/index.ts @@ -81,16 +81,33 @@ export async function delSiteAndReleaseData(params: any, callback?: (data: any) } /** - * @method 置顶任务和取消置顶 + * @method 置顶任务 * @param {string} [params.id] - id * @returns {Promise} */ -export async function pinToTopOrUnpin(params: { - id: string; +export async function pinToTop(params: { + taskId: string; }, callback?: (data: any) => void): Promise { const response = await request({ - url: `${serverIp}${baseURL}/source/uuuuuuuuuu`, - method: 'GET', + url: `${serverIp}${baseURL}/transportTask/setTaskTop`, + method: 'PUT', + params, + }); + // 执行回调(如果存在) + callback?.(response); +} + +/** + * @method 取消置顶 + * @param {string} [params.id] - id + * @returns {Promise} + */ +export async function unpin(params: { + taskId: string; +}, callback?: (data: any) => void): Promise { + const response = await request({ + url: `${serverIp}${baseURL}/transportTask/setCancelTaskTop`, + method: 'PUT', params, }); // 执行回调(如果存在) @@ -428,3 +445,19 @@ export async function importFile( callback?.(response.result); } } + +/** + * 获取gif + */ +export async function getGif(param: any, callback?: (data: any) => void): Promise { + const response = await request({ + url: `${serverIp}${baseURL}/transportResult/getTaskGifAddr`, + method: 'GET', + params: param, + }); + + // 执行回调(如果存在) + if (callback && typeof callback === 'function') { + callback(response.result); + } +} diff --git a/src/utils/axios/sync/configTask/index.ts b/src/utils/axios/sync/configTask/index.ts index bcb650a0..9991a74f 100644 --- a/src/utils/axios/sync/configTask/index.ts +++ b/src/utils/axios/sync/configTask/index.ts @@ -235,11 +235,13 @@ export async function targetSourceUser(params: any, callback?: (data: any) => vo export async function createTargetTables( data: any, callback?: (data: any) => void, + timeout?: number, ): Promise { const response = await request({ url: `${serverIp}${baseURL}/syncStrategy/createTargetTables`, method: 'POST', data, + timeout: timeout || 300000 }); if (response.success && response.code === 200) { diff --git a/src/utils/axios/yxcj/index.ts b/src/utils/axios/yxcj/index.ts index 1930ad42..c5b38f80 100644 --- a/src/utils/axios/yxcj/index.ts +++ b/src/utils/axios/yxcj/index.ts @@ -211,16 +211,33 @@ export async function deleteTask(params: { } /** - * @method 置顶任务和取消置顶 + * @method 置顶任务 * @param {string} [params.id] - id * @returns {Promise} */ -export async function pinToTopOrUnpin(params: { - id: string; +export async function pinToTop(params: { + taskId: string; }, callback?: (data: any) => void): Promise { const response = await request({ - url: `${serverIp}${baseURL}/source/xxxxxxxxx`, - method: 'GET', + url: `${serverIp}${baseURL}/source/setTaskTop`, + method: 'PUT', + params, + }); + // 执行回调(如果存在) + callback?.(response); +} + +/** + * @method 取消置顶 + * @param {string} [params.id] - id + * @returns {Promise} + */ +export async function unpin(params: { + taskId: string; +}, callback?: (data: any) => void): Promise { + const response = await request({ + url: `${serverIp}${baseURL}/source/setCancelTaskTop`, + method: 'PUT', params, }); // 执行回调(如果存在)