/*
 * @Author: SunTao 328867980@qq.com
 * @Date: 2024-10-08 09:26:24
 * @LastEditors: SunTao 328867980@qq.com
 * @LastEditTime: 2024-11-05 13:40:07
 * @FilePath: \znxjxt-ui\src\api\xj\defect.js
 * @Description: 巡检信息-病害管理接口
 */
import request from "@/utils/request";

// 查询病害日志列表
export function listDefect(query) {
  return request({
    url: "/xj/defect/list",
    method: "get",
    params: query,
  });
}

// 查询病害日志详细
export function getDefect(id) {
  return request({
    url: "/xj/defect/" + id,
    method: "get",
  });
}

// 新增病害日志
export function addDefect(data) {
  return request({
    url: "/xj/defect",
    method: "post",
    data: data,
  });
}

// 修改病害日志
export function updateDefect(data) {
  return request({
    url: "/xj/defect",
    method: "put",
    data: data,
  });
}

// 删除病害日志
export function delDefect(id) {
  return request({
    url: "/xj/defect/" + id,
    method: "delete",
  });
}

