import Rs from "@@/services/RequestService" class deviceApi { // 查询Device列表 listDevice = (query: any) => { return Rs.get({ url: "/iot-device", params: query }) } // 查询Device详细 getDevice = (id: any) => { return Rs.get({ url: "/iot-device/" + id }) } // 新增Device addDevice = (data: any) => { return Rs.post({ url: "/iot-device", data: data }) } // 修改Device updateDevice = (data: any) => { return Rs.put({ url: "/iot-device/" + data.id, data: data }) } // 删除Device delDevice = (ids: any) => { return Rs.del({ url: "/iot-device", data: { ids } }) } refresh = () => { return Rs.post({ url: "/iot-device/refresh" }) } getDeviceProtocols = () => { return Rs.get({ url: "/iot-device/device-protocols" }) } getReportProtocols = () => { return Rs.get({ url: "/iot-device/report-protocols" }) } } export default deviceApi