index.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import request from '@/config/axios'
  2. export interface sopVO {
  3. id: number,
  4. sopCode: string,
  5. sopName: string,
  6. sopType: number,
  7. workstationId: number,
  8. machineryId: number,
  9. sopContent: string,
  10. sopStatus: number,
  11. sopIndex: number,
  12. remark: string
  13. }
  14. export interface PageParam {
  15. pageNo: number
  16. pageSize: number
  17. sopName?: string
  18. sopType?: string
  19. machineryId?: string
  20. workstationId: number,
  21. }
  22. export interface NotificationsVO{
  23. id: number,
  24. enableNotifications:number
  25. }
  26. export interface ExecutionPlanVO{
  27. id: number,
  28. enableExecutionPlan:number
  29. }
  30. // 查询SOP列表
  31. export const getSopPage = async (params: PageParam) => {
  32. return await request.get({ url: '/iscs/sop/getSopPage', params })
  33. }
  34. // 获取SOP详细信息
  35. export const selectSopById = async (id: number) => {
  36. return await request.get({ url: '/iscs/sop/selectSopById', params: { id: id } })
  37. }
  38. // 新增SOP
  39. export const insertSop = async (data: sopVO) => {
  40. return await request.post({ url: '/iscs/sop/insertSop', data })
  41. }
  42. // 修改SOP
  43. export const updateSop = async (data: sopVO) => {
  44. return await request.put({ url: '/iscs/sop/updateSop', data })
  45. }
  46. // 更新SOP生效状态
  47. export const updateSopStatus = async (data: sopVO) => {
  48. return await request.put({ url: '/iscs/sop/updateSopStatus', data })
  49. }
  50. // 更新启用通知
  51. export const updateSopEnableNotification=async(data:NotificationsVO)=>{
  52. return await request.put({ url: '/iscs/sop/updateSopEnableNotification', data })
  53. }
  54. // 更新执行计划
  55. export const updateSopEnableExecutionPlan=async(data:ExecutionPlanVO)=>{
  56. return await request.put({ url: '/iscs/sop/updateSopEnableExecutionPlan', data })
  57. }
  58. // 删除SOP
  59. export const deleteSopList = async (ids: number) => {
  60. return await request.delete({
  61. url: '/iscs/sop/deleteSopList?ids='+ids,
  62. })
  63. }