|
@@ -1,44 +1,52 @@
|
|
import request from '@/config/axios'
|
|
import request from '@/config/axios'
|
|
|
|
|
|
-export interface DeviceBomVO {
|
|
|
|
- id?: number
|
|
|
|
- name: string
|
|
|
|
- code: string
|
|
|
|
- parentId: number
|
|
|
|
- deviceCategoryId: number
|
|
|
|
- deviceId: number
|
|
|
|
- status: number
|
|
|
|
- sort: number
|
|
|
|
- type: string
|
|
|
|
- createTime: Date
|
|
|
|
|
|
+// PMS 设备BOM 关系 VO
|
|
|
|
+export interface IotDeviceBomVO {
|
|
|
|
+ id: number // 主键
|
|
|
|
+ deviceCategoryId: number // 所属设备分类
|
|
|
|
+ deviceId: number // 所属设备
|
|
|
|
+ name: string // BOM名称
|
|
|
|
+ code: string // BOM编码
|
|
|
|
+ parentId: number // 父BOM id 顶级为0
|
|
|
|
+ childIds: string // 子节点id 逗号分隔
|
|
|
|
+ level: number // 层级
|
|
|
|
+ leafFlag: number // 是否叶子节点 0是 1否
|
|
|
|
+ sort: number // 显示顺序
|
|
|
|
+ type: string // 1维修 2保养 1,2维修+保养
|
|
|
|
+ status: number // 状态 0启用 1停用
|
|
|
|
+ remark: string // 备注
|
|
|
|
+ version: number // 版本
|
|
}
|
|
}
|
|
|
|
|
|
-// 查询设备bom(精简/树)列表
|
|
|
|
-export const getSimpleDeviceBomList = async (params: PageParam): Promise<DeviceBomVO[]> => {
|
|
|
|
- return await request.get({ url: '/pms/iot-device-bom/simple-list', params})
|
|
|
|
-}
|
|
|
|
|
|
+// PMS 设备BOM 关系 API
|
|
|
|
+export const IotDeviceBomApi = {
|
|
|
|
+ // 查询PMS 设备BOM 关系分页
|
|
|
|
+ getIotDeviceBomPage: async (params: any) => {
|
|
|
|
+ return await request.get({ url: `/pms/iot-device-bom/page`, params })
|
|
|
|
+ },
|
|
|
|
|
|
-// 查询 设备Bom树 列表
|
|
|
|
-export const getBomPage = async (params: PageParam) => {
|
|
|
|
- return await request.get({ url: '/pms/iot-device-bom/list', params })
|
|
|
|
-}
|
|
|
|
|
|
+ // 查询PMS 设备BOM 关系详情
|
|
|
|
+ getIotDeviceBom: async (id: number) => {
|
|
|
|
+ return await request.get({ url: `/pms/iot-device-bom/get?id=` + id })
|
|
|
|
+ },
|
|
|
|
|
|
-// 查询Bom树节点详情
|
|
|
|
-export const getBom = async (id: number) => {
|
|
|
|
- return await request.get({ url: '/rq/iot-bom/get?id=' + id })
|
|
|
|
-}
|
|
|
|
|
|
+ // 新增PMS 设备BOM 关系
|
|
|
|
+ createIotDeviceBom: async (data: IotDeviceBomVO) => {
|
|
|
|
+ return await request.post({ url: `/pms/iot-device-bom/create`, data })
|
|
|
|
+ },
|
|
|
|
|
|
-// 新增Bom树节点
|
|
|
|
-export const createBomNode = async (data: DeviceBomVO) => {
|
|
|
|
- return await request.post({ url: '/rq/iot-bom/create', data: data })
|
|
|
|
-}
|
|
|
|
|
|
+ // 修改PMS 设备BOM 关系
|
|
|
|
+ updateIotDeviceBom: async (data: IotDeviceBomVO) => {
|
|
|
|
+ return await request.put({ url: `/pms/iot-device-bom/update`, data })
|
|
|
|
+ },
|
|
|
|
|
|
-// 修改Bom树节点
|
|
|
|
-export const updateBomNode = async (params: DeviceBomVO) => {
|
|
|
|
- return await request.put({ url: '/rq/iot-bom/update', data: params })
|
|
|
|
-}
|
|
|
|
|
|
+ // 删除PMS 设备BOM 关系
|
|
|
|
+ deleteIotDeviceBom: async (id: number) => {
|
|
|
|
+ return await request.delete({ url: `/pms/iot-device-bom/delete?id=` + id })
|
|
|
|
+ },
|
|
|
|
|
|
-// 删除Bom树节点
|
|
|
|
-export const deleteBomNode = async (id: number) => {
|
|
|
|
- return await request.delete({ url: '/rq/iot-bom/delete?id=' + id })
|
|
|
|
|
|
+ // 导出PMS 设备BOM 关系 Excel
|
|
|
|
+ exportIotDeviceBom: async (params) => {
|
|
|
|
+ return await request.download({ url: `/pms/iot-device-bom/export-excel`, params })
|
|
|
|
+ },
|
|
}
|
|
}
|