import request from '@/utils/request'

// 根据参数键名查询参数值
export function getConfigKey(configKey) {
  return request({
    url: '/system/config/configKey/' + configKey,
    method: 'get'
  })
}

// 根据字典类型查询字典数据信息
export function getDicts(dictType) {
  return request({
    url: '/system/dict/item/option?dictCode=' + dictType,
    method: 'get'
  })
}

//查询当前用户下的预案触发数据
export function selectTriggerInfo(query) {
  return request({
    url: '/laboratory/plan/selectTriggerInfo',
    method: 'get',
    params: query
  })
}

// 查询我的所有消息
export function myAlllistContent(query) {
  return request({
    url: '/laboratory/content/myAll/list',
    method: 'get',
    params: query
  })
}

// 查询院系列表
export function listDepartments() {
  return request({
    url: '/system/dept/departments/list',
    method: 'get'
  })
}

//查询楼栋/根据楼栋ID查询楼层(无权限)
export function buildFloorGetlist(query) {
  return request({
    url: '/laboratory/buildFloor/getlist',
    method: 'get',
    params: query
  })
}

// 查询用户列表
export function listUser(query) {
  return request({
    url: '/system/user/getNotAuthList',
    method: 'get',
    params: query
  })
}

//获取职位列表
export function optionselect(query) {
  return request({
    url: '/system/post/optionselect',
    method: 'get',
    params: query
  })
}

//查询分级管控管理工作详情
export function gradeManageWorkInfo(recordId) {
  return request({
    url: '/laboratory/gradeManageWork/'+recordId,
    method: 'get',
  })
}

//向对应实验室发送语音(文字转语音)
export function mangerVoice(data,id) {
  return request({
    url: '/laboratory/subject/manger/voice/'+id,
    method: 'post',
    params: data
  })
}

// 删除安全准入资格
export function delGroup(id) {
  return request({
    url: '/laboratory/group/' + id,
    method: 'delete'
  })
}

//获取当前用户登录信息
export function getLoginUser(query) {
  return request({
    url: '/bottle/usegasApply/getLoginUser',
    method: 'get',
    params: query
  })
}

//报警记录处理
export function handle(data) {
  return request({
    url: '/chemical/hxpAlarmRecord/handleProcessing',
    method: 'put',
    data: data
  })
}

// 查询检查推送信息配置列表
export function listCheckConfig() {
  return request({
    url: '/laboratory/checkConfig/info',
    method: 'get'
  })
}

//获取当前用户登录信息
export function getLoginUserAirbottle(query) {
  return request({
    url: '/airbottle/qualificationApplyManage/getLoginUser',
    method: 'get',
    params: query
  })
}

// 查询实验室字典列表
export function subjectDictList(data) {
  return request({
    url: '/laboratory/subject/getSubjectDict',
    method: 'get',
    params: data
  })
}
// 上传电子签名
export function genSign(data) {
  return request({
    url: '/system/user/genSign',
    method: 'post',
    data: data
  })
}
// 修改电子签名
export function updateSignature(data) {
  return request({
    url: '/system/user/updateSignature  ',
    method: 'post',
    data: data
  })
}

//获取个人信息
export function profile(query) {
  return request({
    url: '/system/user/profile',
    method: 'get',
    params: query
  })
}

// 查询公共配置
export function configInfo(data) {
  return request({
    url: '/auth/configInfo',
    method: 'get',
    params: data
  })
}
/*=================================V3=================================*/
//查询人员下拉裂变
export function systemUserSelectUser(data) {
  return request({
    url: '/system/user/selectUser',
    method: 'post',
    data: data
  })
}
