You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tanghe-report/report-ui/src/api/report.js

166 lines
2.9 KiB
JavaScript

3 years ago
/*
* @Author: zyk
* @Date: 2020-07-13 15:13:37
* @Last Modified by: zyk
* @Last Modified time: 2021-03-04 10:46:26
*/
import request from '@/utils/request'
// datasource
3 years ago
export function pageList (params) {
3 years ago
return request({
3 years ago
url: '/dataSource/pageList',
3 years ago
method: 'get',
params,
})
}
3 years ago
export function dataSource (data) {
3 years ago
return request({
3 years ago
url: '/dataSource/' + data.id,
3 years ago
method: 'get',
data,
})
}
// delete datasource
3 years ago
export function deleteDataSource (data) {
3 years ago
return request({
3 years ago
url: '/dataSource/' + data.id,
3 years ago
method: 'delete',
data,
})
}
3 years ago
export function testConnection (data) {
3 years ago
return request({
3 years ago
url: '/dataSource/testConnection',
3 years ago
method: 'post',
data,
})
}
3 years ago
export function addDataSource (data) {
3 years ago
return request({
3 years ago
url: '/dataSource',
3 years ago
method: 'post',
data,
})
}
3 years ago
export function editDataSource (data) {
3 years ago
return request({
3 years ago
url: '/dataSource',
3 years ago
method: 'put',
data,
})
}
// resultset
3 years ago
export function dataSetPreview (data) {
3 years ago
return request({
3 years ago
url: `/dataSet/detailBysetId/${data.id}`,
3 years ago
method: 'get',
})
}
3 years ago
export function addDataSet (data) {
3 years ago
return request({
3 years ago
url: '/dataSet',
3 years ago
method: 'post',
data,
})
}
3 years ago
export function editDataSet (data) {
3 years ago
return request({
3 years ago
url: '/dataSet',
3 years ago
method: 'put',
data,
})
}
// delete dataset
3 years ago
export function deleteDataSet (data) {
3 years ago
return request({
3 years ago
url: '/dataSet/' + data.id,
3 years ago
method: 'delete',
data,
})
}
// 下拉数据源
3 years ago
export function queryAllDataSourceSet (data) {
3 years ago
return request({
3 years ago
url: '/dataSource/queryAllDataSource',
3 years ago
method: 'get',
data,
})
}
// 数据集高级规则js验证
3 years ago
export function verificationSet (data) {
3 years ago
return request({
3 years ago
url: '/dataSetParam/verification',
3 years ago
method: 'post',
data,
})
}
// 测试数据转换以及返回数据table列表
3 years ago
export function testTransformSet (data) {
3 years ago
return request({
3 years ago
url: '/dataSet/testTransform',
3 years ago
method: 'post',
data,
})
}
// report
3 years ago
export function reportPageList (params) {
3 years ago
return request({
3 years ago
url: '/report/pageList',
3 years ago
method: 'get',
params,
})
}
// report
3 years ago
export function addReport (data) {
3 years ago
return request({
3 years ago
url: '/report',
3 years ago
method: 'post',
data,
})
}
// report
3 years ago
export function editReport (data) {
3 years ago
return request({
3 years ago
url: '/report',
3 years ago
method: 'put',
data,
})
}
// report
3 years ago
export function delReport (data) {
3 years ago
return request({
3 years ago
url: '/report/delReport',
3 years ago
method: 'delete',
data,
})
}
// report
3 years ago
export function detailReport (id, accessKey) {
3 years ago
return request({
3 years ago
url: `/report/${id}?accessKey=${accessKey}`,
3 years ago
method: 'get',
})
}
// reportExcel
3 years ago
export function addReportExcel (data) {
3 years ago
return request({
3 years ago
url: '/reportExcel',
3 years ago
method: 'post',
data,
})
}
// reportExcel
3 years ago
export function editReportExcel (data) {
3 years ago
return request({
3 years ago
url: '/reportExcel',
3 years ago
method: 'put',
data,
})
3 years ago
}