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; + } }, });