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

171 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'
import { add, del, edit, preview } from '@/api/deviceInfo'
// datasource
export function pageList(params) {
return request({
3 years ago
url: '/dataSource/pageList',
3 years ago
method: 'get',
params,
})
}
export function dataSource(data) {
return request({
3 years ago
url: '/dataSource/' + data.id,
3 years ago
method: 'get',
data,
})
}
// delete datasource
export function deleteDataSource(data) {
return request({
3 years ago
url: '/dataSource/' + data.id,
3 years ago
method: 'delete',
data,
})
}
export function testConnection(data) {
return request({
3 years ago
url: '/dataSource/testConnection',
3 years ago
method: 'post',
data,
})
}
export function addDataSource(data) {
return request({
3 years ago
url: '/dataSource',
3 years ago
method: 'post',
data,
})
}
export function editDataSource(data) {
return request({
3 years ago
url: '/dataSource',
3 years ago
method: 'put',
data,
})
}
// resultset
export function dataSetPreview(data) {
return request({
3 years ago
url: `/dataSet/detailBysetId/${data.id}`,
3 years ago
method: 'get',
})
}
export function addDataSet(data) {
return request({
3 years ago
url: '/dataSet',
3 years ago
method: 'post',
data,
})
}
export function editDataSet(data) {
return request({
3 years ago
url: '/dataSet',
3 years ago
method: 'put',
data,
})
}
// delete dataset
export function deleteDataSet(data) {
return request({
3 years ago
url: '/dataSet/' + data.id,
3 years ago
method: 'delete',
data,
})
}
// 下拉数据源
export function queryAllDataSourceSet(data) {
return request({
3 years ago
url: '/dataSource/queryAllDataSource',
3 years ago
method: 'get',
data,
})
}
// 数据集高级规则js验证
export function verificationSet(data) {
return request({
3 years ago
url: '/dataSetParam/verification',
3 years ago
method: 'post',
data,
})
}
// 测试数据转换以及返回数据table列表
export function testTransformSet(data) {
return request({
3 years ago
url: '/dataSet/testTransform',
3 years ago
method: 'post',
data,
})
}
// report
export function reportPageList(params) {
return request({
3 years ago
url: '/report/pageList',
3 years ago
method: 'get',
params,
})
}
// report
export function addReport(data) {
return request({
3 years ago
url: '/report',
3 years ago
method: 'post',
data,
})
}
// report
export function editReport(data) {
return request({
3 years ago
url: '/report',
3 years ago
method: 'put',
data,
})
}
// report
export function delReport(data) {
return request({
3 years ago
url: '/report/delReport',
3 years ago
method: 'delete',
data,
})
}
// report
export function detailReport(id, accessKey) {
return request({
3 years ago
url: `/report/${id}?accessKey=${accessKey}`,
3 years ago
method: 'get',
})
}
// reportExcel
export function addReportExcel(data) {
return request({
3 years ago
url: '/reportExcel',
3 years ago
method: 'post',
data,
})
}
// reportExcel
export function editReportExcel(data) {
return request({
3 years ago
url: '/reportExcel',
3 years ago
method: 'put',
data,
})
}
export default { add, edit, del, preview }