63 lines
1.5 KiB
JavaScript
63 lines
1.5 KiB
JavaScript
|
|
/*
|
||
|
|
* @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
|
||
|
|
* @Date: 2024-10-08 09:26:24
|
||
|
|
* @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
|
||
|
|
* @LastEditTime: 2024-10-08 18:06:36
|
||
|
|
* @FilePath: \znxjxt-ui\src\api\xj\disease.js
|
||
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||
|
|
*/
|
||
|
|
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'
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// 病害类型下拉数据
|
||
|
|
export function getDefectTypes() {
|
||
|
|
return request({
|
||
|
|
url: '/metadata/defectTypes',
|
||
|
|
method: 'get'
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|