device.js 790 B

1234567891011121314151617181920212223242526272829
  1. import {get, post} from "@/util/request/index.js";
  2. import {Page} from "@/common/consts/CommonConst";
  3. export const getDeviceList = async ({page = Page.page, size = Page.size, ...params}) => {
  4. return await post('/device/getDeviceList', {
  5. page,
  6. size,
  7. ...params
  8. });
  9. }
  10. export const getDeviceDetail = async (id) => {
  11. return await get(`/device/getDeviceDetail/${id}`)
  12. }
  13. export const getDeviceMeta = async (id) => {
  14. return await get(`/device/getMetadataInfo/${id}`);
  15. }
  16. export const forbidDevice = async (ids = []) => {
  17. return await post('/device/forbidDevice', ids);
  18. }
  19. export const startDevice = async (ids = []) => {
  20. return await post('/device/startDevice', ids);
  21. }
  22. export const scrapDevice = async (data) => {
  23. return await post('/device/insertScrapDevice', data);
  24. }