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

  1. import httpRequest, { type BaseResponse } from "../httpRequest";
  2. import type { DetailTable } from "../../services/measure/type";
  3. export function startMeasurement() {
  4. return httpRequest<BaseResponse>({
  5. url: "/measurement-task/start-measurement",
  6. method: "POST",
  7. });
  8. }
  9. export function stopMeasurement() {
  10. return httpRequest<BaseResponse>({
  11. url: "/measurement-task/stop-measurement",
  12. method: "POST",
  13. });
  14. }
  15. export function analyzeMeasurement() {
  16. return httpRequest<BaseResponse>({
  17. url: "/measurement-task/analyze-measurement",
  18. method: "POST",
  19. });
  20. }
  21. export function saveMeasurement() {
  22. return httpRequest<BaseResponse>({
  23. url: "/measurement-task/save-report",
  24. method: "POST",
  25. });
  26. }
  27. export function getDetailList() {
  28. return httpRequest<BaseResponse<{list:DetailTable[]}>>({
  29. url: "/measurement-data/list",
  30. method: "POST",
  31. });
  32. }
  33. export function delDetail(params:{ids:string}) {
  34. return httpRequest<BaseResponse>({
  35. url: `/measurement-data/delete/${params.ids}`,
  36. method: "POST",
  37. });
  38. }
  39. export type MeasureRecord = {
  40. operatorName: "张三"; //操作员名称
  41. // trackShapeCode: "code01"; //轨形code
  42. // verificationMethodCode: "code01"; //核校方式code
  43. name: "某某铁路"; ///测量名称
  44. lineName: "河北段"; //线路名称
  45. location: "100米处"; //位置
  46. // direction: "左"; //方向
  47. };
  48. export function createMeasure(params: MeasureRecord) {
  49. return httpRequest<BaseResponse>({
  50. url: "/measurement-task/cache-measurement",
  51. params,
  52. method: "POST",
  53. });
  54. }