You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.5 KiB
59 lines
1.5 KiB
import httpRequest, { type BaseResponse } from "../httpRequest";
|
|
import type { DetailTable } from "../../services/measure/type";
|
|
|
|
export function startMeasurement() {
|
|
return httpRequest<BaseResponse>({
|
|
url: "/measurement-task/start-measurement",
|
|
method: "POST",
|
|
});
|
|
}
|
|
export function stopMeasurement() {
|
|
return httpRequest<BaseResponse>({
|
|
url: "/measurement-task/stop-measurement",
|
|
method: "POST",
|
|
});
|
|
}
|
|
export function analyzeMeasurement() {
|
|
return httpRequest<BaseResponse>({
|
|
url: "/measurement-task/analyze-measurement",
|
|
method: "POST",
|
|
});
|
|
}
|
|
export function saveMeasurement() {
|
|
return httpRequest<BaseResponse>({
|
|
url: "/measurement-task/save-report",
|
|
method: "POST",
|
|
});
|
|
}
|
|
|
|
export function getDetailList() {
|
|
return httpRequest<BaseResponse<{list:DetailTable[]}>>({
|
|
url: "/measurement-data/list",
|
|
method: "POST",
|
|
});
|
|
}
|
|
|
|
export function delDetail(params:{ids:string}) {
|
|
return httpRequest<BaseResponse>({
|
|
url: `/measurement-data/delete/${params.ids}`,
|
|
method: "POST",
|
|
});
|
|
}
|
|
|
|
export type MeasureRecord = {
|
|
operatorName: "张三"; //操作员名称
|
|
// trackShapeCode: "code01"; //轨形code
|
|
// verificationMethodCode: "code01"; //核校方式code
|
|
name: "某某铁路"; ///测量名称
|
|
lineName: "河北段"; //线路名称
|
|
location: "100米处"; //位置
|
|
// direction: "左"; //方向
|
|
};
|
|
|
|
export function createMeasure(params: MeasureRecord) {
|
|
return httpRequest<BaseResponse>({
|
|
url: "/measurement-task/cache-measurement",
|
|
params,
|
|
method: "POST",
|
|
});
|
|
}
|