import request from '@/utils/request'
/**轮播图----------------------**/
//轮播图-新增
export function systemRotationChartAdd(data) {
  return request({
    url: '/system/rotationChart/add',
    method: 'post',
    data: data
  })
}
//轮播图-编辑
export function systemRotationChartEdit(data) {
  return request({
    url: '/system/rotationChart/edit',
    method: 'post',
    data: data
  })
}
//轮播图-列表
export function systemRotationChartList(data) {
  return request({
    url: '/system/rotationChart/list',
    method: 'post',
    data: data
  })
}
//轮播图-删除
export function systemRotationChartDelete(data) {
  return request({
    url: '/system/rotationChart/delete',
    method: 'post',
    data: data
  })
}
//轮播图-详细
export function systemRotationChartDetail(query) {
  return request({
    url: '/system/rotationChart/'+query,
    method: 'get',
  })
}
// 查询菜单列表
export function listMenu(data) {
  return request({
    url: '/system/menu/list',
    method: 'post',
    data: data
  })
}

// 查询菜单详细
export function getMenu(query) {
  return request({
    url: '/system/menu/detail',
    method: 'get',
    params: query
  })
}

// 新增菜单
export function addMenu(data) {
  return request({
    url: '/system/menu/add',
    method: 'post',
    data: data
  })
}

// 修改菜单
export function updateMenu(data) {
  return request({
    url: '/system/menu/update',
    method: 'post',
    data: data
  })
}

// 删除菜单
export function delMenu(query) {
  return request({
    url: '/system/menu/delete',
    method: 'get',
    params: query
  })
}

// 查询字典数据列表
export function listData(data) {
  return request({
    url: '/system/dict/item/list',
    method: 'post',
    data: data
  })
}

// 查询字典数据详细
export function getData(query) {
  return request({
    url: '/system/dict/item/detail',
    method: 'get',
    params: query
  })
}

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

// 新增字典数据
export function addData(data) {
  return request({
    url: '/system/dict/item/add',
    method: 'post',
    data: data
  })
}

// 修改字典数据
export function updateData(data) {
  return request({
    url: '/system/dict/item/update',
    method: 'post',
    data: data
  })
}

// 删除字典数据
export function delData(data) {
  return request({
    url: '/system/dict/item/delete',
    method: 'post',
    data: data
  })
}

// 查询字典类型列表
export function listType(data) {
  return request({
    url: '/system/dict/list',
    method: 'post',
    data: data
  })
}

// 查询字典类型详细
export function getType(query) {
  return request({
    url: '/system/dict/detail',
    method: 'get',
    params: query
  })
}

// 新增字典类型
export function addType(data) {
  return request({
    url: '/system/dict/add',
    method: 'post',
    data: data
  })
}

// 修改字典类型
export function updateType(data) {
  return request({
    url: '/system/dict/update',
    method: 'post',
    data: data
  })
}

// 删除字典类型
export function delType(data) {
  return request({
    url: '/system/dict/delete',
    method: 'post',
    data: data
  })
}

// 刷新字典缓存
export function refreshCache() {
  return request({
    url: '/system/dict/type/refreshCache',
    method: 'delete'
  })
}

// 获取字典选择框列表
export function optionselect() {
  return request({
    url: '/system/dict/type/optionselect',
    method: 'get'
  })
}

//修改通用配置
export function updateLogoInfo(data) {
  return request({
    url: '/system/config/logo/update',
    method: 'post',
    data: data
  })
}

// 保存开发配置
export function addUrlConfig(data) {
  return request({
    url: '/system/config/dev/update',
    method: 'post',
    data: data
  })
}

// 删除系统配置
export function systemConfigInfoDelete(data) {
  return request({
    url: '/system/config/info/delete',
    method: 'post',
    data: data
  })
}


// 获取文件列表
export function getFileList(data) {
  return request({
    url: '/system/file/list',
    method: 'post',
    data: data
  })
}

// 获取文件分类列表
export function getFileCategory(query) {
  return request({
    url: '/system/file/category',
    method: 'get',
    params: query
  })
}

//新增&更新公共配置
export function addOrUpdate(data) {
  return request({
    url: '/system/config/info/addOrUpdate',
    method: 'post',
    data: data
  })
}

/*********************************系统公告*********************************/
// 消息编辑
export function systemNoticeUpdate(data) {
  return request({
    url: '/system/notice/update',
    method: 'post',
    data: data
  })
}
// 消息-详情接口
export function systemNoticeDetail(query) {
  return request({
    url: '/system/notice/detail',
    method: 'get',
    params: query
  })
}
// 消息-详情-用户ids
export function systemNoticeSendUserIds(query) {
  return request({
    url: '/system/notice/sendUserIds',
    method: 'get',
    params: query
  })
}
// 删除消息
export function systemNoticeDelete(data) {
  return request({
    url: '/system/notice/delete',
    method: 'post',
    data: data
  })
}
// 撤回消息
export function systemNoticeCancel(data) {
  return request({
    url: '/system/notice/cancel',
    method: 'post',
    data: data
  })
}
// 发送消息
export function systemNoticeSend(data) {
  return request({
    url: '/system/notice/send',
    method: 'post',
    data: data
  })
}
//消息接收人查询
export function systemNoticeGetSendType(query) {
  return request({
    url: '/system/notice/getSendType',
    method: 'get',
    params: query
  })
}
//消息-添加
export function systemNoticeAdd(data) {
  return request({
    url: '/system/notice/add',
    method: 'post',
    data: data
  })
}
//消息-列表
export function systemNoticeList(data) {
  return request({
    url: '/system/notice/list',
    method: 'post',
    data: data
  })
}
// 发送-校院通知/工作计划
export function systemNotifyAdd(data) {
  return request({
    url: '/system/notify/add',
    method: 'post',
    data: data
  })
}
/*********************************角色管理*********************************/
//角色列表
export function systemRoleList(data) {
  return request({
    url: '/system/role/list',
    method: 'post',
    data: data
  })
}

//角色新增
export function systemRoleAdd(data) {
  return request({
    url: '/system/role/add',
    method: 'post',
    data: data
  })
}

//角色编辑
export function systemRoleUpdate(data) {
  return request({
    url: '/system/role/update',
    method: 'post',
    data: data
  })
}

//角色删除
export function systemRoleDelete(data) {
  return request({
    url: '/system/role/delete',
    method: 'post',
    data: data
  })
}

//角色详情
export function systemRoleDetail(query) {
  return request({
    url: '/system/role/detail',
    method: 'get',
    params: query
  })
}

//获取角色权限树
export function systemRoleGetRoleMenu(query) {
  return request({
    url: '/system/role/getRoleMenu',
    method: 'get',
    params: query
  })
}

//保存角色权限
export function systemRoleSaveRolePermission(data) {
  return request({
    url: '/system/role/saveRolePermission',
    method: 'post',
    data: data
  })
}

/*********************************小程序菜单*********************************/

//权限列表
export function appletMenuList(data) {
  return request({
    url: '/system/applet/menu/list',
    method: 'post',
    data: data
  })
}
//权限树
export function appletMenuTree(data) {
  return request({
    url: '/system/applet/menu/tree',
    method: 'post',
    data: data
  })
}
//权限-添加
export function appletMenuAdd(data) {
  return request({
    url: '/system/applet/menu/add',
    method: 'post',
    data: data
  })
}
//权限-编辑
export function appletMenuUpdate(data) {
  return request({
    url: '/system/applet/menu/update',
    method: 'post',
    data: data
  })
}
//权限-删除
export function appletMenuDelete(data) {
  return request({
    url: '/system/applet/menu/delete',
    method: 'post',
    data: data
  })
}
//权限-详情
export function appletMenuDetail(query) {
  return request({
    url: '/system/applet/menu/detail',
    method: 'get',
    params: query
  })
}

/*********************************小程序布局设置*********************************/

//布局查询
export function appletLayoutSelect(query) {
  return request({
    url: '/system/applet/layout/select',
    method: 'get',
    params: query
  })
}
//布局设置
export function appletLayoutSetup(data) {
  return request({
    url: '/system/applet/layout/setup',
    method: 'post',
    data: data
  })
}
//布局删除
export function appletLayoutDelete(data) {
  return request({
    url: '/system/applet/layout/delete',
    method: 'post',
    data: data
  })
}

/*********************************小程序布局设置*********************************/

//获取小程序权限配置
export function systemAppletRoleGetRoleMenu(query) {
  return request({
    url: '/system/applet/role/getRoleMenu',
    method: 'get',
    params: query
  })
}

//保存小程序权限配置
export function systemAppletRoleSaveRolePermission(data) {
  return request({
    url: '/system/applet/role/saveRolePermission',
    method: 'post',
    data: data
  })
}

//获取小程序权限字段
export function systemAppletRolePermission(query) {
  return request({
    url: '/system/applet/role/permission',
    method: 'get',
    params: query
  })
}

/*********************************人脸库*********************************/
//人脸库-列表
export function systemUserFaceList(data) {
  return request({
    url: '/system/user/face/list',
    method: 'post',
    data: data
  })
}
//人脸库-编辑
export function systemUserFaceUpdate(data) {
  return request({
    url: '/system/user/face/update',
    method: 'post',
    data: data
  })
}

/********************************* 电子签章 *********************************/

// 查询部门电子签章列表
export function signList(query) {
  return request({
    url: '/system/dept/sign/list',
    method: 'get',
    params: query
  })
}
// 编辑电子签章
export function deptSign(data) {
  return request({
    url: '/system/dept/sign',
    method: 'put',
    data: data
  })
}
