diff --git a/webs/ams-web/src/services/data-collection/history.ts b/webs/ams-web/src/services/data-collection/history.ts index 3791a8f..a2304f3 100644 --- a/webs/ams-web/src/services/data-collection/history.ts +++ b/webs/ams-web/src/services/data-collection/history.ts @@ -1,26 +1,27 @@ import { request } from '@cmp/cmp-element' +import EnhancedRequestGet from '@/services/EnhancedRequestGet' const baseUrl = '/ams/v1/collection/tasks/instances' export function getCollectionTasksInstances(params: Base.IListParams) { - return request.get(baseUrl, { params }) + return EnhancedRequestGet(baseUrl, { params }) } export function getCollectionTasksInstancesDetail(id: boolean) { - return request.get(`${baseUrl}/${id}`) + return EnhancedRequestGet(`${baseUrl}/${id}`) } export function getNodeLogs(id: number, params: { end: boolean; priority?: number }) { - return request.get(`/cop/v1/tasks/instances/nodes/${id}/logs`, { + return EnhancedRequestGet(`/cop/v1/tasks/instances/nodes/${id}/logs`, { params, }) } export function getHosts(params: any) { - return request.get('/cop/v1/hosts', { params }) + return EnhancedRequestGet('/cop/v1/hosts', { params }) } // simple修改 export function getIdentsBySimple(params: any): any { - return request.get('/cop/v1/identifications/simple', { + return EnhancedRequestGet('/cop/v1/identifications/simple', { params, }) } @@ -28,17 +29,17 @@ export function getIdentsBySimple(params: any): any { const scriptsUrl = '/cop/v1/scripts' // simple修改 export function getScriptBySimple(params: any) { - return request.get(`${scriptsUrl}/simple`, { + return EnhancedRequestGet(`${scriptsUrl}/simple`, { params, }) } export function getScriptDetail(id) { - return request.get(`${scriptsUrl}/${id}`) + return EnhancedRequestGet(`${scriptsUrl}/${id}`) } const groupUrl = '/cop/v1/scripts/groups' export function getGroup(params: any) { - return request.get(groupUrl, { + return EnhancedRequestGet(groupUrl, { params, }) } @@ -46,20 +47,20 @@ export function getGroup(params: any) { // 采集历史 const historyUrl = '/ams/v1/collection/history' export function getCollectionhistory(params: any): any { - return request.get(historyUrl, { + return EnhancedRequestGet(historyUrl, { params, }) } // 未采集 export function getCollectionInstances(params: any): any { - return request.get(`${historyUrl}/instances`, { + return EnhancedRequestGet(`${historyUrl}/instances`, { params, }) } // 数据详情列表 export function getCollectionItem(params: any): any { - return request.get(`${historyUrl}/item`, { + return EnhancedRequestGet(`${historyUrl}/item`, { params, }) } diff --git a/webs/ams-web/src/services/data-collection/task.ts b/webs/ams-web/src/services/data-collection/task.ts index 2cf3535..3ff54e4 100644 --- a/webs/ams-web/src/services/data-collection/task.ts +++ b/webs/ams-web/src/services/data-collection/task.ts @@ -1,12 +1,13 @@ import { request } from '@cmp/cmp-element' +import EnhancedRequestGet from '@/services/EnhancedRequestGet' const baseUrl = '/ams/v1/collection/tasks' export function getCollectionTasks(params: Base.IListParams) { - return request.get(baseUrl, { params }) + return EnhancedRequestGet(baseUrl, { params }) } export function getCollectionTaskDetail(id: number) { - return request.get(`${baseUrl}/${id}`) + return EnhancedRequestGet(`${baseUrl}/${id}`) } export function createCollectionTask(params: any) { diff --git a/webs/ams-web/src/services/data-link/rule.ts b/webs/ams-web/src/services/data-link/rule.ts index 14fdabd..6641d0e 100644 --- a/webs/ams-web/src/services/data-link/rule.ts +++ b/webs/ams-web/src/services/data-link/rule.ts @@ -1,11 +1,12 @@ import { request } from '@cmp/cmp-element' +import EnhancedRequestGet from '@/services/EnhancedRequestGet' const baseUrl = '/ams/v1/rule' export function getRule(params: Base.IListParams) { - return request.get(baseUrl, { params }) + return EnhancedRequestGet(baseUrl, { params }) } export function getRuleDetail(id: number) { - return request.get(`${baseUrl}/${id}`) + return EnhancedRequestGet(`${baseUrl}/${id}`) } export function createRule(params: any) { return request.post(baseUrl, params) diff --git a/webs/ams-web/src/views/data-collection/history/index.vue b/webs/ams-web/src/views/data-collection/history/index.vue index e4e8d18..9395af5 100644 --- a/webs/ams-web/src/views/data-collection/history/index.vue +++ b/webs/ams-web/src/views/data-collection/history/index.vue @@ -1,13 +1,6 @@ -