import request from '@/config/axios' // 设备台账 VO export interface IotDeviceVO { id: number // 主键id deviceCode: string // 资产编码 deviceName: string // 设备名称 brand: number // 品牌 model: number // 规格型号 deptId: number // 所在部门id deptName: string // 所在部门名称 deviceStatus: string // 设备状态 deviceStatusName: string // 设备状态名称 assetProperty: string // 资产性质 picUrl: string // 图片 remark: string // 备注 manufacturerId: number // 制造商id supplierId: number // 供应商id manDate: Date // 生产日期 nameplate: string // 铭牌信息 expires: number // 质保到期 plPrice: number // 采购/租赁价格 plDate: Date // 采购/租赁日期 plYear: number // 折旧年限 plStartDate: number // 折旧开始日期 plMonthed: number // 已提折旧月数 plAmounted: number // 已提折旧金额 remainAmount: number // 剩余金额 infoId: number // 资料分类id infoType: string // 资料类型 infoName: string // 资料名称 infoRemark: string // 资料备注 infoUrl: string // 资料附件 templateJson: string // 动态模板信息 bomNodeId: number // bom节点id name: string // bom节点名称 code: string // bom节点编码 devicePersons: string // 设备责任人 逗号分隔 location: string lat: number lng: number } // 设备台账 API export const IotDeviceApi = { getMapDevice: async () => { return await request.get({ url: `/rq/iot-device/map`}) }, // 查询设备台账分页 getIotDevicePage: async (params: any) => { return await request.get({ url: `/rq/iot-device/page`, params }) }, // 获得设备关联责任人 分页 responsiblePage: async (params: any) => { return await request.get({ url: `/rq/iot-device/responsiblePage`, params }) }, // 获得设备动态 分页 deviceDynamicsPage: async (params: any) => { return await request.get({ url: `/rq/iot-device/deviceDynamicsPage`, params }) }, // 获得设备状态调整数据 分页 statusRelationDevices: async (params: any) => { return await request.get({ url: `/rq/iot-device/statusRelationDevices`, params }) }, // 获得设备调拨数据 分页 allotRelationDevices: async (params: any) => { return await request.get({ url: `/rq/iot-device/allotRelationDevices`, params }) }, // 获得设备关联责任人 分页 simpleDevices: async (params: any) => { return await request.get({ url: `/rq/iot-device/simple-list`, params }) }, // 查询 设备bom关联 列表分页 deviceAssociateBomPage: async (params: any) => { return await request.get({ url: `/rq/iot-device/deviceAssociateBomPage`, params }) }, // 查询 设备 bom关联 列表 deviceAssociateBomList: async (params: any) => { return await request.get({ url: `/rq/iot-device/deviceAssociateBomList`, params }) }, deviceAssociateBomListPage: async (params: any) => { return await request.get({ url: `/rq/iot-device/deviceAssociateBomListPage`, params }) }, // 查询设备台账详情 getIotDevice: async (id: number) => { return await request.get({ url: `/rq/iot-device/get?id=` + id }) }, getIotDeviceTds: async (id: number) => { return await request.get({ url: `/rq/iot-device/get/td?id=` + id }) }, // 新增设备台账 createIotDevice: async (data: IotDeviceVO) => { return await request.post({ url: `/rq/iot-device/create`, data }) }, // 保存 设备-状态 的关联关系 saveDeviceStatuses: async (data: any) => { return await request.post({ url: `/rq/iot-device/saveDeviceStatuses`, data }) }, // 保存 设备调拨记录 saveDeviceAllot: async (data: any) => { return await request.post({ url: `/rq/iot-device/saveDeviceAllot`, data }) }, // 修改设备台账 updateIotDevice: async (data: IotDeviceVO) => { return await request.put({ url: `/rq/iot-device/update`, data }) }, // 删除设备台账 deleteIotDevice: async (id: number) => { return await request.delete({ url: `/rq/iot-device/delete?id=` + id }) }, // 导出设备台账 Excel exportIotDevice: async (params) => { return await request.download({ url: `/rq/iot-device/export-excel`, params }) }, getIotDeviceTdPage: async (params: any) => { return await request.get({ url: `/rq/iot-device/td/page`, params }) }, }