admin-vue3/src/api/crm/project/inspection/index.ts

48 lines
1.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import request from '@/config/axios'
// 项目巡检配置 VO
export interface ProjectInspectionConfigVO {
id?: number // 主键ID
projectId: number // 项目ID
configId: number // 配置ID
configType?: number // 配置类型
configName: string // 配置名称
frequency: string // 巡检频率
managementParty: string // 管理方
contactPerson: string // 联系人
contactPhone: string // 联系电话
responsiblePersonId: string // 负责人
status: number // 状态0-停用1-启用
remark: string // 备注
}
// 查询项目巡检配置分页
export const getProjectInspectionConfigPage = async (params: any) => {
return await request.get({ url: `/crm/project-inspection-config/page`, params })
}
// 查询项目巡检配置详情
export const getProjectInspectionConfig = async (id: number) => {
return await request.get({ url: `/crm/project-inspection-config/get?id=` + id })
}
// 新增项目巡检配置
export const createProjectInspectionConfig = async (data: ProjectInspectionConfigVO) => {
return await request.post({ url: `/crm/project-inspection-config/create`, data })
}
// 修改项目巡检配置
export const updateProjectInspectionConfig = async (data: ProjectInspectionConfigVO) => {
return await request.put({ url: `/crm/project-inspection-config/update`, data })
}
// 删除项目巡检配置
export const deleteProjectInspectionConfig = async (id: number) => {
return await request.delete({ url: `/crm/project-inspection-config/delete?id=` + id })
}
// 导出项目巡检配置 Excel
export const exportProjectInspectionConfig = async (params: any) => {
return await request.download({ url: `/crm/project-inspection-config/export-excel`, params })
}