lipenghui 2 dienas atpakaļ
vecāks
revīzija
65fd33aca2
1 mainītis faili ar 14 papildinājumiem un 48 dzēšanām
  1. 14 48
      src/api/pms/device/index.ts

+ 14 - 48
src/api/pms/device/index.ts

@@ -7,8 +7,8 @@ export interface IotDeviceVO {
   deviceName: string // 设备名称
   brand: number // 品牌
   model: number // 规格型号
-  deptId: number // 所在部门id
-  deptName: string // 所在部门名称
+  deptId: number    // 所在部门id
+  deptName: string  // 所在部门名称
   deviceStatus: string // 设备状态
   deviceStatusName: string // 设备状态名称
   assetProperty: string // 资产性质
@@ -46,17 +46,20 @@ export interface IotDeviceVO {
 
 // 设备台账 API
 export const IotDeviceApi = {
-  getCompany: async (params: any) => {
-    return await request.get({ url: `/rq/iot-device/company?id=` + params })
+  getCompany: async (params:any) => {
+    return await request.get({ url: `/rq/iot-device/company?id=`+params})
   },
-  getMaxCode: async (params: any) => {
-    return await request.get({ url: `/rq/iot-device/max?yfCode=` + params })
+  getCompanyByDevice: async (params:any) => {
+    return await request.get({ url: `/rq/iot-device/company/`+params})
   },
-  getMapDevice: async (params: any) => {
-    return await request.get({ url: `/rq/iot-device/map`, params })
+  getMaxCode: async (params:any) => {
+    return await request.get({ url: `/rq/iot-device/max?yfCode=`+params})
   },
-  getAllDeviceParams: async (params: any) => {
-    return await request.get({ url: `/rq/iot-device/all/params`, params })
+  getMapDevice: async (params:any) => {
+    return await request.get({ url: `/rq/iot-device/map`, params})
+  },
+  getAllDeviceParams: async (params:any) => {
+    return await request.get({ url: `/rq/iot-device/all/params`, params})
   },
   // 查询设备台账分页
   getIotDevicePage: async (params: any) => {
@@ -114,15 +117,7 @@ export const IotDeviceApi = {
     return await request.get({ url: `/rq/iot-device/get?id=` + id })
   },
   getIotDeviceTds: async (id: number) => {
-    return await request.get({
-      url: `/rq/iot-device/get/gateway/td?id=` + id
-    })
-  },
-
-  getIotDeviceZHBDTds: async (id: number) => {
-    return await request.get({
-      url: `/rq/iot-device/get/zhbd/td?id=` + id
-    })
+    return await request.get({ url: `/rq/iot-device/get/td?id=` + id })
   },
   // 新增设备台账
   createIotDevice: async (data: IotDeviceVO) => {
@@ -157,37 +152,8 @@ export const IotDeviceApi = {
     return await request.get({ url: `/rq/iot-device/td/page`, params })
   },
 
-  // 设备成套接口
-
-  // 查看详情时获取成套设备列表
-  getIotDeviceSets: async (params: any) => {
-    return await request.get({ url: `/rq/iot-device-group-detail/page`, params })
-  },
-
   // 新增时根据部门id获取设备列表
   getIotDeviceSetOptions: async (id: any) => {
     return await request.get({ url: `/rq/iot-device/dept/${id}` })
   },
-
-  // 获取成套列表
-  getIotDeviceSetList: async (params: any) => {
-    return await request.get({ url: `/rq/iot-device-group/page`, params })
-  },
-  // 添加成套
-  createIotDeviceSet: async (data: any) => {
-    return await request.post({ url: `/rq/iot-device-group/create`, data })
-  },
-  // 编辑成套
-  updateIotDeviceSet: async (data: any) => {
-    return await request.put({ url: `/rq/iot-device-group/update`, data })
-  },
-  // 删除成套
-  deleteIotDeviceSet: async (id: number) => {
-    return await request.delete({ url: `/rq/iot-device-group/delete?id=` + id })
-  },
-
-  // 获取关联设备
-  getIotDeviceSetRelation: async (params) => {
-    return await request.get({ url: `/rq/iot-device-group/device/group`, params })
-  }
 }