import axios from "@/assets/js/axios";
|
|
/**
|
* 查询项目分页-根据筛选条件
|
*/
|
export const projectSearch = (params, data) => {
|
return axios({
|
method: "POST",
|
url: "/project/search",
|
params: params,
|
data: data
|
});
|
}
|
|
/**
|
* 删除项目
|
*/
|
export const delProject = (params) => {
|
return axios({
|
method: "DELETE",
|
url: "/project",
|
params: params
|
});
|
}
|
|
/**
|
* 添加项目
|
*/
|
export const addProject = (data) => {
|
return axios({
|
method: "POST",
|
url: "/project",
|
data: data
|
});
|
}
|
|
/**
|
* 更新项目
|
*/
|
export const updateProject = (data) => {
|
return axios({
|
method: "PUT",
|
url: "/project",
|
data: data
|
});
|
}
|
|
/**
|
* 查询所有用户
|
*/
|
export const searchUserAll = () => {
|
return axios({
|
method: "GET",
|
url: "/user/all",
|
});
|
}
|
|
/**
|
* 获取统计数据
|
*/
|
export const getCount = () => {
|
return axios({
|
method: "GET",
|
url: "/project/getCount",
|
});
|
}
|
|
/**
|
* 查询当前是否存在试验
|
* @returns {AxiosPromise}
|
*/
|
export const getExitTest = () => {
|
return axios({
|
method: "GET",
|
url: "/experiment/exist"
|
});
|
}
|
|
/**
|
* 获取所有的项目
|
* @returns {AxiosPromise}
|
*/
|
export const getAllProject = () => {
|
return axios({
|
method: "GET",
|
url: "/project/getAll"
|
});
|
}
|
|
/**
|
* 查询实验编号
|
*/
|
export const searchTestNumber = (type) => {
|
return axios({
|
method: "GET",
|
url: "/experiment/experimentId",
|
params: {
|
type: type
|
},
|
});
|
}
|
|
/**
|
* 添加空载或负载的试验
|
* @param data
|
* @returns {AxiosPromise}
|
*/
|
export const addKzFzTest = (data) => {
|
return axios({
|
method: "POST",
|
url: "/experiment/kzfz",
|
data,
|
});
|
|
}
|
|
/**
|
* 查询测试点列表
|
* @param data
|
* @returns {AxiosPromise}
|
*/
|
export const experimentPoint = (params) => {
|
return axios({
|
method: "GET",
|
url: "/experiment/point",
|
params: params,
|
});
|
|
}
|
|
/**
|
* 检查前置条件
|
* @param type
|
* @returns {AxiosPromise}
|
*/
|
export const checkPrecondition = (type) => {
|
return axios({
|
method: "GET",
|
url: "/experiment/checkPrecondition",
|
params: {
|
type: type,
|
}
|
});
|
}
|
|
/**
|
* 升温测试
|
*/
|
export const testHeatingUp = (experimentId)=>{
|
console.log(experimentId);
|
return axios({
|
method: "GET",
|
url: "/experiment/checkPreconditionStep1",
|
params: {
|
experimentId: experimentId,
|
}
|
});
|
}
|
|
/**
|
* 启动负载点测试
|
* @param data
|
* @returns {AxiosPromise}
|
*/
|
export const startPointTest = (data)=>{
|
return axios({
|
method: "POST",
|
url: "/experiment/startExperimentPoint",
|
data,
|
});
|
|
}
|
|
/**
|
* 完成试验
|
* @param experimentId
|
* @returns {AxiosPromise}
|
*/
|
export const completeTest = (experimentId)=>{
|
return axios({
|
method: "POST",
|
url: "/experiment/finishExperiment",
|
params: {
|
experimentId: experimentId,
|
},
|
});
|
}
|
|
/**
|
* 手动结束试验测试点
|
* @param id
|
* @returns {AxiosPromise}
|
*/
|
export const stopTestPoint = (id)=>{
|
return axios({
|
method: "POST",
|
url: "/experiment/finishExperimentPoint",
|
params: {
|
id: id
|
},
|
});
|
}
|
|
export const changePreOption = (id, value)=> {
|
return axios({
|
method: "PUT",
|
url: "/experiment/precondition",
|
params: {
|
id,
|
value
|
},
|
});
|
}
|
|
/**
|
* 重做当前试验点
|
* @param id
|
* @returns {AxiosPromise}
|
*/
|
export const redoTestPoint = (id)=>{
|
return axios({
|
method: "POST",
|
url: "/experiment/restartExperimentPoint",
|
params: {
|
id,
|
},
|
});
|
}
|