import request from '@/utils/request'

//分析
export function de_Analysis(data) {
  return request({
    url: request.apiModule.wb + '/degradation/analysis',
    method: 'get',
    params: data
  })
}
//计算模型向导
export function de_Calc(data) {
  return request({
    url: request.apiModule.wb + '/degradation/calc',
    method: 'get',
    params: data
  })
}
// 复制
export function de_copy(data) {
  return request({
    url: request.apiModule.wb + '/degradation/copy',
    method: 'get',
    params:data
  })
}
//退化创建
export function de_Create(data) {
  return request({
    url: request.apiModule.wb + '/degradation/create',
    method: 'post',
    data
  })
}
//创建寿命数据分析
export function de_WeibullCreate(data) {
  return request({
    url: request.apiModule.wb + '/degradation/createWeibull',
    method: 'post',
    data
  })
}
//数据列表
export function de_DataList(data) {
  return request({
    url: request.apiModule.wb + '/degradation/data-list',
    method: 'get',
    params: data
  })
}
//数据保存
export function de_DataSave(data) {
  return request({
    url: request.apiModule.wb + '/degradation/data-save',
    method: 'post',
    data
  })
}

//退化名称修改-删除，delFlag控制
export function de_Edit(data) {
  return request({
    url: request.apiModule.wb + '/degradation/edit',
    method: 'post',
    data
  })
}
//导出
export function de_DataExport(data) {
  return request({
    url: request.apiModule.wb + '/degradation/export',
    method: 'get',
    params: data
  })
}
//获取设置
export function de_GetSetting(data) {
  return request({
    url: request.apiModule.wb + '/degradation/get-setting',
    method: 'get',
    params: data
  })
}
//获取退化数据（单元数量、数据量、测量值）
export function de_GetData(data) {
  return request({
    url: request.apiModule.wb + '/degradation/getDataInfo',
    method: 'get',
    params: data
  })
}
//获取分析结果列表
export function de_GetResList(data) {
  return request({
    url: request.apiModule.wb + '/degradation/getResultList',
    method: 'get',
    params: data
  })
}
//获取作图数据
//目前弃用
export function de_GetResPlot(data) {
  return request({
    url: request.apiModule.wb + '/degradation/getResultPlot',
    method: 'get',
    params: data
  })
}
//导入模板下载
export function de_ImportTemp(data) {
  return request({
    url: request.apiModule.wb + '/degradation/import-template',
    method: 'get',
    params: data
  })
}
//导入
export function de_ImportData(data) {
  return request({
    url: request.apiModule.wb + '/degradation/importData',
    method: 'post',
    data
  })
}
//退化列表
export function de_List(data) {
  return request({
    url: request.apiModule.wb + '/degradation/list',
    method: 'get',
    params: data
  })
}
//保存设置
export function de_SaveSetting(data) {
  return request({
    url: request.apiModule.wb + '/degradation/save-setting',
    method: 'post',
    data
  })
}
//选择模型向导
export function de_SelectModel(data) {
  return request({
    url: request.apiModule.wb + '/degradation/selectModel',
    method: 'get',
    params: data
  })
}