index.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // src/api/system/machinery.ts
  2. import request from '@/config/axios'
  3. export interface MachineryVO {
  4. machineryId?: number
  5. machineryName: string
  6. machineryCode: string
  7. machineryType: string
  8. parentId?: number
  9. remark?: string
  10. createTime?: Date
  11. }
  12. export interface PageParam {
  13. current: number
  14. size: number
  15. machineryName?: string
  16. machineryCode?: string
  17. machineryType?: string
  18. }
  19. // 查询设备工艺列表
  20. export const listTechnology = async (params: PageParam) => {
  21. return await request.get({ url: '/iscs/machinery/getIsMachineryPage', params })
  22. }
  23. // 查询设备工艺详情
  24. export const getTechnologyInfo = async (id: number) => {
  25. return await request.get({ url: '/iscs/machinery/selectIsMachineryById', params: { machineryId: id } })
  26. }
  27. // 新增设备工艺
  28. export const addTechnology = async (data: MachineryVO) => {
  29. return await request.post({ url: '/iscs/machinery/insertIsMachinery', data })
  30. }
  31. // 修改设备工艺
  32. export const updateTechnology = async (data: MachineryVO) => {
  33. return await request.post({ url: '/iscs/machinery/updateIsMachinery', data })
  34. }
  35. // 删除设备工艺
  36. export const delTechnology = async (id: number) => {
  37. return await request.post({
  38. url: '/iscs/machinery/deleteIsMachineryByTechnologyIds',
  39. params: { machineryIds: id }
  40. })
  41. }
  42. // 保存设备工艺与隔离点的关系
  43. export const saveMachineryPoints = async (data: any) => {
  44. return await request.post({ url: '/iscs/machinery/saveMachineryPoints', data })
  45. }