import { get, post, parmasPost } from '@/http/index'

// 查询保存状态
export const getStatus = async () => {
  return await get('/SystemConfigrationController/status')
}

// 系统设置 -> 本级单位设置 -> 单位选择列表查询
export const unitselection = async () => {
  return await get('/SystemConfigrationController/status')
}

// 系统设置 -> 本级单位设置 -> 涉及装备专业设置查询
export const equipmentspecialty = async () => {
  return await get('/system/equipmentProfession/querySelfEquipmentProfession')
}

// 系统设置 -> 本级单位设置 -> 保存
export const preservation = async (formData) => {
  return await post('/system/deploy/updateOrSaveDeploy', formData)
}

// 系统设置 -> 本级单位设置 -> 根据用户操作返回状态和数据
export const userstatusanddata = async () => {
  return await get('/system/deploy/queryOrganizationList')
}

// 系统配置 -> 单位
export const userstatusanddataNew = async () => {
  return await get('/system/organization/treeSelect')
}

// 根据单位查专业
export const searchEquipment = async (formData) => {
  return await parmasPost('/system/equipmentProfession/treeSelect', formData)
}

// 系统设置 -> 本级单位设置 -> 当前本级单位ID查询
export const selectOrgId = async () => {
  return await get('/system/deploy/selectOrgId')
}

// 首次进入接口
export const initPage = async () => {
  return await get('/system/deploy/getLevelUnitInfo')
}
