import request from '@/utils/request'

export function listBoardScreen(query) {
  return request({
    url: '/mes/board/screen/list',
    method: 'get',
    params: query
  })
}

export function getBoardScreen(screenId) {
  return request({
    url: '/mes/board/screen/' + screenId,
    method: 'get'
  })
}

export function addBoardScreen(data) {
  return request({
    url: '/mes/board/screen',
    method: 'post',
    data
  })
}

export function updateBoardScreen(data) {
  return request({
    url: '/mes/board/screen',
    method: 'put',
    data
  })
}

export function delBoardScreen(screenId) {
  return request({
    url: '/mes/board/screen/' + screenId,
    method: 'delete'
  })
}

export function getBoardScreenConfig(screenId) {
  return request({
    url: '/mes/board/screen/config',
    method: 'get',
    params: { screenId }
  })
}

export function saveBoardScreenConfig(data) {
  return request({
    url: '/mes/board/screen/config',
    method: 'post',
    data
  })
}

export function resetBoardScreenConfig(screenId) {
  return request({
    url: '/mes/board/screen/config',
    method: 'delete',
    params: { screenId }
  })
}
