/*
 * @Author: SunTao 328867980@qq.com
 * @Date: 2024-11-27 10:58:33
 * @LastEditors: SunTao 328867980@qq.com
 * @LastEditTime: 2024-11-27 10:58:33
 * @FilePath: \znxjxt-ui\src\api\xj\document.js
 * @Description: 养护通知单相关接口
 */

import request from "@/utils/request";

// 路段下拉数据
export function getSegment() {
  return request({
    url: "/api/v2/segment/selectList",
    method: "post",
  });
}

// 查询列表病害类型
export function getDefectList(params) {
  return request({
    url: "/bigscreen/v2/getDefectTypesDrowDown",
    method: "get",
    params,
  });
}

// 病害状态下拉类型
export function getDefectStatus() {
  return request({
    url: "/metadata/defectState",
    method: "get",
  });
}

// 获取养护通知单列表
export function getMaintenanceNoticeList(params) {
  return request({
    url: "/maintenance-notice/list",
    method: "get",
    params,
  });
}

// 生成养护通知单
export function addMaintenanceNotice(data) {
  return request({
    url: "/maintenance-notice/create",
    method: "post",
    data,
  });
}

// 根据id查询养护通知单
export function getMaintenanceNoticeById(params) {
  return request({
    url: `/maintenance-notice/getNoticeByDefectId`,
    method: "get",
    params,
  });
}
