import request from '@/utils/request'

// 查询内部公告列表
export function listEhsNoticeMessage(query) {
  return request({
    url: '/ehsNoticeMessage/ehsNoticeMessage/list',
    method: 'get',
    params: query
  })
}
export function listEhsNoticeMessageAdmin(query) {
  return request({
    url: '/ehsNoticeMessage/ehsNoticeMessage/listAdmin',
    method: 'get',
    params: query
  })
}
// 查询内部公告详细
export function getEhsNoticeMessage(noticeMessageId) {
  return request({
    url: '/ehsNoticeMessage/ehsNoticeMessage/' + noticeMessageId,
    method: 'get'
  })
}

// 新增内部公告
export function addEhsNoticeMessage(data) {
  return request({
    url: '/ehsNoticeMessage/ehsNoticeMessage',
    method: 'post',
    data: data
  })
}

// 修改内部公告
export function updateEhsNoticeMessage(data) {
  return request({
    url: '/ehsNoticeMessage/ehsNoticeMessage',
    method: 'put',
    data: data
  })
}

// 删除内部公告
export function delEhsNoticeMessage(noticeMessageId) {
  return request({
    url: '/ehsNoticeMessage/ehsNoticeMessage/' + noticeMessageId,
    method: 'delete'
  })
}
//发布
export function issueNews(query) {
  return request({
    url: '/ehsNoticeMessage/ehsNoticeMessage/issueNews',
    method: 'get',
    params: query
  })
}
// 阅读
export function detailEhsNoticeMessage(noticeMessageId) {
  return request({
    url: '/ehsNoticeMessage/ehsNoticeMessage/detail/' + noticeMessageId,
    method: 'get'
  })
}

// 只读显示
export function displayDetailEhsNoticeMessage(noticeMessageId) {
  return request({
    url: '/ehsNoticeMessage/ehsNoticeMessage/displayDetail/' + noticeMessageId,
    method: 'get'
  })
}
