From 20f0f9a048a1458957e92de2ed98d2af7bc2e450 Mon Sep 17 00:00:00 2001 From: Zhufu <1176354795@qq.com> Date: Thu, 1 Aug 2024 10:05:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=BC=80=E5=A7=8B=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E4=BA=91=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/demo/cloudQuery.ts | 10 +++++++++- src/components/MapboxMaps/MapComponent.vue | 1 + .../default/header/components/notify/index.vue | 9 +++++++-- src/store/modules/cloudquery.ts | 14 ++++++++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/api/demo/cloudQuery.ts b/src/api/demo/cloudQuery.ts index b0087adf..5c27aac8 100644 --- a/src/api/demo/cloudQuery.ts +++ b/src/api/demo/cloudQuery.ts @@ -2,7 +2,9 @@ import { defHttp } from '@/utils/http/axios'; enum Api { // 添加云查询任务 - AddDroneTask = '/api/DroneCloudQuery/AddDroneTask' + AddDroneTask = '/api/DroneCloudQuery/AddDroneTask', + // 根据云查询ID获取查询结果 + LoadCloudQueryById = '/api/DroneCloudQuery/LoadCloudQueryById' } export function AddDroneTask(params: { geomid: string }) { @@ -10,4 +12,10 @@ export function AddDroneTask(params: { geomid: string }) { url: Api.AddDroneTask, params, }); +} +export function LoadCloudQueryById(params: { id: string }) { + return defHttp.get({ + url: Api.LoadCloudQueryById, + params, + }); } \ No newline at end of file diff --git a/src/components/MapboxMaps/MapComponent.vue b/src/components/MapboxMaps/MapComponent.vue index e20ad0da..8155ee82 100644 --- a/src/components/MapboxMaps/MapComponent.vue +++ b/src/components/MapboxMaps/MapComponent.vue @@ -1243,6 +1243,7 @@ }else{ let geomidStr = props.geomsList.map(item => item.key).join(',') AddDroneTask({geomid:geomidStr}).then(res => { + message.success('成功提交云查询') useCloudQuery.setIdentification(true); }) } diff --git a/src/layouts/default/header/components/notify/index.vue b/src/layouts/default/header/components/notify/index.vue index ec9cf1e9..d5699a99 100644 --- a/src/layouts/default/header/components/notify/index.vue +++ b/src/layouts/default/header/components/notify/index.vue @@ -106,6 +106,7 @@ import CloudQueryModal from '@/views/dashboard/test/SearchMenu/CloudQueryModal/index.vue'; import Icon from '@/components/Icon/Icon.vue'; import { useCloudQueryStore } from '@/store/modules/cloudquery'; + import { LoadCloudQueryById } from '@/api/demo/cloudQuery.ts' const flowWfDataStore = flowStore(); const useCloudQuery = useCloudQueryStore(); @@ -246,8 +247,12 @@ } // 查看云查询结果 function handCloudQuery() { - open.value = true; - closeCloudQuery(); + let id = useCloudQuery.getCloudQueryInfo.id + LoadCloudQueryById({id}).then(res => { + useCloudQuery.setCloudQueryModalInfo(res) + open.value = true; + closeCloudQuery(); + }) } function closeCloudQuery() { cloudQueryVisible.value = false; diff --git a/src/store/modules/cloudquery.ts b/src/store/modules/cloudquery.ts index e75d543c..cb128b6f 100644 --- a/src/store/modules/cloudquery.ts +++ b/src/store/modules/cloudquery.ts @@ -7,6 +7,14 @@ export const useCloudQueryStore = defineStore({ identification: false, // 云查询信息 cloudqueryInfo: {}, + // 云查询结果展示 + cloudQueryModalInfo: { + basicQuery:{ + landClassify:{}, + plowLandOccupy:{}, + }, + timeImages:{}, + }, }), getters: { getCloudQueryInfo: (state) => { @@ -15,6 +23,9 @@ export const useCloudQueryStore = defineStore({ getIdentification: (state) => { return state.identification; }, + getCloudQueryModalInfo: (state) => { + return state.cloudQueryModalInfo; + } }, actions: { setCloudQueryInfo(info: any) { @@ -23,5 +34,8 @@ export const useCloudQueryStore = defineStore({ setIdentification(state: boolean) { this.identification = state; }, + setCloudQueryModalInfo(data: any){ + this.cloudQueryModalInfo = data; + } }, });