odf_new/odf-uniapp/services/trunk.js
zpc 88f86efd7a
All checks were successful
continuous-integration/drone/push Build is passing
21
2026-04-06 13:43:39 +08:00

27 lines
957 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { get, post } from './api'
export const getCableList = (deptId) =>
get('/business/OdfCables/list', { deptId })
export const getFaultList = (cableId, pageNum, pageSize) =>
get('/business/OdfCableFaults/list', { cableId, pageNum, pageSize })
export const getFaultDetail = (id) =>
get(`/business/OdfCableFaults/${id}`)
/**
* 新增故障JSON 提交,图片已上传至 COS
* @param {object} data - 故障信息,含 imageUrls 数组
* @returns {Promise}
*/
export const addFault = (data) => post('/business/OdfCableFaults/add', data, { timeout: 120000 })
export const incrementFaultCount = (id) =>
post(`/business/OdfCableFaults/incrementFaultCount/${id}`)
export const updateMileageCorrection = (id, mileageCorrection) =>
post(`/business/OdfCableFaults/updateMileageCorrection/${id}`, { mileageCorrection })
export const searchCablesAndFaults = (deptId, keyword) =>
get('/business/OdfCables/search', { deptId, keyword })