81 lines
1.7 KiB
JavaScript
81 lines
1.7 KiB
JavaScript
import request from '@/utils/request'
|
||
const baseUrl='/document/statistics/definition'
|
||
// 初始化
|
||
export function init() {
|
||
return request({
|
||
url: `${baseUrl}/init`,
|
||
method: 'get'
|
||
})
|
||
}
|
||
// 新增
|
||
export function add(data) {
|
||
return request({
|
||
url: `${baseUrl}/add`,
|
||
method: 'post',
|
||
data
|
||
})
|
||
}
|
||
// 修改
|
||
export function update(data) {
|
||
return request({
|
||
url: `${baseUrl}/update`,
|
||
method: 'post',
|
||
data
|
||
})
|
||
}
|
||
// 删除
|
||
export function deleteStatistics(id) {
|
||
return request({
|
||
url: `${baseUrl}/deleteDocStatisticsDefinition`,
|
||
method: 'delete',
|
||
params: {
|
||
id
|
||
}
|
||
})
|
||
}
|
||
// 页查询列表-不包含options
|
||
export function getPageList(query) {
|
||
return request({
|
||
url: `${baseUrl}/getPageList`,
|
||
method: 'get',
|
||
params: query
|
||
})
|
||
}
|
||
// 根据id获取统计定义详情
|
||
export function getDocStatisticsDefinitionById(id) {
|
||
return request({
|
||
url: `${baseUrl}/getDocStatisticsDefinitionById`,
|
||
method: 'get',
|
||
params: {id}
|
||
})
|
||
}
|
||
// 根据code获取统计定义详情
|
||
export function getDocStatisticsDefinitionByCode(code) {
|
||
return request({
|
||
url: `${baseUrl}/getDocStatisticsDefinitionByCode`,
|
||
method: 'get',
|
||
params: {code}
|
||
})
|
||
}
|
||
// 获取文档统计定义选项列表并按指定格式返回
|
||
export function getOptionList() {
|
||
return request({
|
||
url: `${baseUrl}/getOptionList`,
|
||
method: 'get',
|
||
params: {}
|
||
})
|
||
}
|
||
|
||
// 获取文档统计定义列表(包含options,即字典数据)
|
||
// isStatistics
|
||
// integer
|
||
// (query)
|
||
// 文档统计定义是否启用 0:不统计 1:统计 可不传
|
||
export function getListWithOptionList(isStatistics=undefined) {
|
||
return request({
|
||
url: `${baseUrl}/getListWithOptionList`,
|
||
method: 'get',
|
||
params: {isStatistics}
|
||
})
|
||
}
|