index.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import request from '@/config/axios'
  2. // IoT 产品物模型 VO
  3. export interface ThinkModelFunctionVO {
  4. id: number // 物模型功能编号
  5. identifier: string // 功能标识
  6. name: string // 功能名称
  7. description: string // 功能描述
  8. productId: number // 产品编号
  9. productKey: string // 产品标识
  10. type: number // 功能类型
  11. property: string // 属性
  12. event: string // 事件
  13. service: string // 服务
  14. }
  15. // IoT 产品物模型 API
  16. export const ThinkModelFunctionApi = {
  17. // 查询产品物模型分页
  18. getThinkModelFunctionPage: async (params: any) => {
  19. return await request.get({ url: `/iot/think-model-function/page`, params })
  20. },
  21. // 获得产品物模型
  22. getThinkModelFunctionListByProductId: async (params: any) => {
  23. return await request.get({
  24. url: `/iot/think-model-function/list-by-product-id`,
  25. params
  26. })
  27. },
  28. // 查询产品物模型详情
  29. getThinkModelFunction: async (id: number) => {
  30. return await request.get({ url: `/iot/think-model-function/get?id=` + id })
  31. },
  32. // 新增产品物模型
  33. createThinkModelFunction: async (data: ThinkModelFunctionVO) => {
  34. return await request.post({ url: `/iot/think-model-function/create`, data })
  35. },
  36. // 修改产品物模型
  37. updateThinkModelFunction: async (data: ThinkModelFunctionVO) => {
  38. return await request.put({ url: `/iot/think-model-function/update`, data })
  39. },
  40. // 删除产品物模型
  41. deleteThinkModelFunction: async (id: number) => {
  42. return await request.delete({ url: `/iot/think-model-function/delete?id=` + id })
  43. },
  44. // 导出产品物模型 Excel
  45. exportThinkModelFunction: async (params) => {
  46. return await request.download({ url: `/iot/think-model-function/export-excel`, params })
  47. }
  48. }