| | |
| | | import request from '@/utils/request' |
| | | import request from "@/utils/request"; |
| | | |
| | | // ==================== 巡检任务管理 ==================== |
| | | // ==================== 巡检任务 ==================== |
| | | |
| | | /** |
| | | * @desc 查询巡检任务列表 |
| | |
| | | */ |
| | | export function getInspectionTaskList(query) { |
| | | return request({ |
| | | url: '/equipment/inspection/task/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/equipment/inspection/task/list", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function getInspectionTask(id) { |
| | | return request({ |
| | | url: '/equipment/inspection/task/' + id, |
| | | method: 'get' |
| | | }) |
| | | url: "/equipment/inspection/task/" + id, |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function createInspectionTask(data) { |
| | | return request({ |
| | | url: '/equipment/inspection/task', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | url: "/equipment/inspection/task", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function updateInspectionTask(data) { |
| | | return request({ |
| | | url: '/equipment/inspection/task', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | url: "/equipment/inspection/task", |
| | | method: "put", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function deleteInspectionTask(id) { |
| | | return request({ |
| | | url: '/equipment/inspection/task/' + id, |
| | | method: 'delete' |
| | | }) |
| | | url: "/equipment/inspection/task/" + id, |
| | | method: "delete", |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function startInspectionTask(taskId) { |
| | | return request({ |
| | | url: '/equipment/inspection/task/' + taskId + '/start', |
| | | method: 'post' |
| | | }) |
| | | url: "/equipment/inspection/task/" + taskId + "/start", |
| | | method: "post", |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function completeInspectionTask(taskId, data) { |
| | | return request({ |
| | | url: '/equipment/inspection/task/' + taskId + '/complete', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | url: "/equipment/inspection/task/" + taskId + "/complete", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ==================== 巡检记录管理 ==================== |
| | |
| | | */ |
| | | export function submitInspectionRecord(data) { |
| | | return request({ |
| | | url: '/equipment/inspection/record/submit', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | url: "/equipment/inspection/record/submit", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function getInspectionRecordList(query) { |
| | | return request({ |
| | | url: '/equipment/inspection/record/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/equipment/inspection/record/list", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function getInspectionRecord(id) { |
| | | return request({ |
| | | url: '/equipment/inspection/record/' + id, |
| | | method: 'get' |
| | | }) |
| | | url: "/equipment/inspection/record/" + id, |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // ==================== 文件上传 ==================== |
| | |
| | | */ |
| | | export function uploadInspectionImage(file) { |
| | | return request({ |
| | | url: '/equipment/inspection/upload/image', |
| | | method: 'post', |
| | | url: "/equipment/inspection/upload/image", |
| | | method: "post", |
| | | data: file, |
| | | headers: { |
| | | 'Content-Type': 'multipart/form-data' |
| | | } |
| | | }) |
| | | "Content-Type": "multipart/form-data", |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function uploadInspectionVideo(file) { |
| | | return request({ |
| | | url: '/equipment/inspection/upload/video', |
| | | method: 'post', |
| | | url: "/equipment/inspection/upload/video", |
| | | method: "post", |
| | | data: file, |
| | | headers: { |
| | | 'Content-Type': 'multipart/form-data' |
| | | } |
| | | }) |
| | | "Content-Type": "multipart/form-data", |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function batchUploadFiles(formData) { |
| | | return request({ |
| | | url: '/equipment/inspection/upload/batch', |
| | | method: 'post', |
| | | url: "/equipment/inspection/upload/batch", |
| | | method: "post", |
| | | data: formData, |
| | | headers: { |
| | | 'Content-Type': 'multipart/form-data' |
| | | } |
| | | }) |
| | | "Content-Type": "multipart/form-data", |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | // ==================== 异常报备管理 ==================== |
| | |
| | | */ |
| | | export function reportAbnormalSituation(data) { |
| | | return request({ |
| | | url: '/equipment/inspection/abnormal/report', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | url: "/equipment/inspection/abnormal/report", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function getAbnormalReportList(query) { |
| | | return request({ |
| | | url: '/equipment/inspection/abnormal/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/equipment/inspection/abnormal/list", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function getAbnormalReport(id) { |
| | | return request({ |
| | | url: '/equipment/inspection/abnormal/' + id, |
| | | method: 'get' |
| | | }) |
| | | url: "/equipment/inspection/abnormal/" + id, |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function handleAbnormalReport(id, data) { |
| | | return request({ |
| | | url: '/equipment/inspection/abnormal/' + id + '/handle', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | url: "/equipment/inspection/abnormal/" + id + "/handle", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function transferAbnormalReport(id, data) { |
| | | return request({ |
| | | url: '/equipment/inspection/abnormal/' + id + '/transfer', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | url: "/equipment/inspection/abnormal/" + id + "/transfer", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function closeAbnormalReport(id, data) { |
| | | return request({ |
| | | url: '/equipment/inspection/abnormal/' + id + '/close', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | url: "/equipment/inspection/abnormal/" + id + "/close", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ==================== 统计分析 ==================== |
| | |
| | | */ |
| | | export function getInspectionStats(params) { |
| | | return request({ |
| | | url: '/equipment/inspection/stats', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | url: "/equipment/inspection/stats", |
| | | method: "get", |
| | | params: params, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function getAbnormalStats(params) { |
| | | return request({ |
| | | url: '/equipment/inspection/abnormal/stats', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | url: "/equipment/inspection/abnormal/stats", |
| | | method: "get", |
| | | params: params, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function exportInspectionReport(params) { |
| | | return request({ |
| | | url: '/equipment/inspection/export/report', |
| | | method: 'get', |
| | | url: "/equipment/inspection/export/report", |
| | | method: "get", |
| | | params: params, |
| | | responseType: 'blob' |
| | | }) |
| | | responseType: "blob", |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function exportAbnormalRecords(params) { |
| | | return request({ |
| | | url: '/equipment/inspection/abnormal/export', |
| | | method: 'get', |
| | | url: "/equipment/inspection/abnormal/export", |
| | | method: "get", |
| | | params: params, |
| | | responseType: 'blob' |
| | | }) |
| | | responseType: "blob", |
| | | }); |
| | | } |
| | | |
| | | // ==================== 设备二维码 ==================== |
| | |
| | | export function getDeviceQRCode(deviceId) { |
| | | return request({ |
| | | url: `/equipment/device/${deviceId}/qrcode`, |
| | | method: 'get' |
| | | }) |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function verifyDeviceQRCode(data) { |
| | | return request({ |
| | | url: '/equipment/device/qrcode/verify', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | url: "/equipment/device/qrcode/verify", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ==================== 模板管理 ==================== |
| | |
| | | */ |
| | | export function getInspectionTemplateList(query) { |
| | | return request({ |
| | | url: '/equipment/inspection/template/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/equipment/inspection/template/list", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function getInspectionTemplate(id) { |
| | | return request({ |
| | | url: '/equipment/inspection/template/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | url: "/equipment/inspection/template/" + id, |
| | | method: "get", |
| | | }); |
| | | } |