From b78033c22d6070098ca28433886e2c7289a9aa4a Mon Sep 17 00:00:00 2001 From: Raod <1130305001@qq.com> Date: Wed, 28 Jul 2021 11:33:12 +0800 Subject: [PATCH] api.js --- report-ui/src/api/reportDataSource.js | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 report-ui/src/api/reportDataSource.js diff --git a/report-ui/src/api/reportDataSource.js b/report-ui/src/api/reportDataSource.js new file mode 100644 index 00000000..cd23a825 --- /dev/null +++ b/report-ui/src/api/reportDataSource.js @@ -0,0 +1,51 @@ +import request from '@/utils/request' + +export function reportDataSourceList(params) { + return request({ + url: 'dataSource/pageList', + method: 'GET', + params, + }) +} + +export function reportDataSourceAdd(data) { + return request({ + url: 'dataSource', + method: 'post', + data + }) +} + +export function reportDataSourceDeleteBatch(data) { + return request({ + url: 'dataSource/delete/batch', + method: 'post', + data + }) +} + +export function reportDataSourceUpdate(data) { + return request({ + url: 'dataSource', + method: 'put', + data + }) +} + +export function reportDataSourceDetail(data) { + return request({ + url: 'dataSource/' + data.id, + method: 'get', + params: { accessKey: data.accessKey } + }) +} + +export function testConnection (data) { + return request({ + url: '/dataSource/testConnection', + method: 'post', + data, + }) +} + +export default { reportDataSourceList, reportDataSourceAdd, reportDataSourceDeleteBatch, reportDataSourceUpdate, reportDataSourceDetail, testConnection}