equipment.js 843 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import {
  2. get,
  3. put,
  4. putJ,
  5. postJ,
  6. deleteApi
  7. } from "@/utils/request";
  8. import Vue from "vue";
  9. // 查询实例详情
  10. export async function getPhysicalModel(id) {
  11. const res = await get(Vue.prototype.apiUrl + `/main/asset/getPhysicalModel/${id}`, {});
  12. if (res.code == 0) {
  13. return res.data;
  14. }
  15. return Promise.reject(new Error(res.message));
  16. }
  17. // 查询实例详情
  18. export async function getRealData(id) {
  19. const res = await get(Vue.prototype.apiUrl + `/main/asset/getRealData/${id}`, {});
  20. if (res.code == 0) {
  21. return res.data;
  22. }
  23. return Promise.reject(new Error(res.message));
  24. }
  25. // 查询实例详情
  26. export async function getHistoryData(data) {
  27. const res = await postJ(Vue.prototype.apiUrl + `/main/asset/getHistoryData`, data);
  28. if (res.code == 0) {
  29. return res.data;
  30. }
  31. return Promise.reject(new Error(res.message));
  32. }