
import request from '@/config/axios'

export interface SOPVo {
  id: number,
  sopId: number,
  groupId: number,
  userId: number,
  userName: string,
  userType: number,
  userRole: string,
  remark: string
}

export interface PageParam {
  pageNo: number
  pageSize: number
}

// 查询SopUser列表
export const getSopUserPage = async (params: PageParam) => {
  return await request.get({ url: '/iscs/sop-user/getSopUserPage', params })
}
// 查询SopUserList
export const getSopUserList = async (params: PageParam) => {
  return await request.get({ url: '/iscs/sop-user/getSopUserList', params })
}
// 获取SopUser详细信息
export const selectSopUserById = async (id: number) => {
  return await request.get({ url: '/iscs/sop-user/selectSopUserById', params: { id: id } })
}


// 新增SopUser
export const insertSopUser = async (data: SOPVo) => {
  return await request.post({ url: '/iscs/sop-user/insertSopUser', data })
}

// 修改SopUser
export const updateSopUser= async (data: SOPVo) => {
  return await request.put({ url: '/iscs/sop-user/updateSopUser', data })
}

// 删除SopUser
export const deleteSopUserList = async (ids: number) => {
  return await request.delete({
    url: '/iscs/sop-user/deleteSopUserList?ids='+ids,
  })
}
