import axios from 'axios'
import config from '../apiConfig'
import url from '../baseUrl'
let baseUrl = url.baseUrl //用户

//重置密码 
const $ajaxResetpassword = params => axios.post(baseUrl + '/user/resetpassword', params, config)
const $ajaxLogin = params => axios.post(baseUrl + '/login', params, config)
const $ajaxLoginout = params => axios.get(baseUrl + '/loginout', params, config)
const $ajaxUpdateUserHead = params => axios.post(baseUrl + '/user/updateUserHead', params, { config });//修改用户头像

const $ajaxFindpageuser = params => axios.get(baseUrl + '/user/findpageuser', { params })//查询用户列表
const $ajaxFindoneuser = params => axios.get(baseUrl + '/user/findoneuser', { params })//查询用户个人信息和权限
const $ajaxSelectstation = params => axios.post(baseUrl + '/station/selectstation', params, config)//查询驿站列表 
const $ajaxAddstation = params => axios.post(baseUrl + '/station/addstation', params, config)//新增驿站 
const $ajaxUpdatestation = params => axios.post(baseUrl + '/station/updatestation', params, config)//修改驿站 
const $ajaxDeletestation = params => axios.post(baseUrl + '/station/deletestation', params, config)//删除驿站 
const $ajaxSelectsysrole = params => axios.get(baseUrl + '/role/selectsysrole', { params })//查询系统所有角色
const $ajaxAdduser = params => axios.post(baseUrl + '/user/adduser', params, config)//新增用户
const $ajaxDeleteuser = params => axios.post(baseUrl + '/user/deleteuser', params, config)//删除用户
const $ajaxFindtreemenu = params => axios.post(baseUrl + '/menu/findtreemenu', params, config)//查询系统所有菜单
const $ajaxAddrolemenu = params => axios.post(baseUrl + '/role/addrolemenu', params)//新增角色和菜单
const $ajaxDeleterole = params => axios.post(baseUrl + '/role/deleterole', params, config)//删除角色
const $ajaxFinduserbyname = params => axios.get(baseUrl + '/user/finduserbyname', { params })//
const $ajaxUpdateuserpassword = params => axios.post(baseUrl + '/user/updateuserpassword', params, config)//修改密码
const $ajaxFindUserNei = params => axios.get(baseUrl + '/user/findUserNei', { params })//查询内部账号下拉列表

const $ajaxAddrolename = params => axios.post(baseUrl + '/role/addrolename', params, config)//新增角色名称
const $ajaxSelectsysrolemenu = params => axios.get(baseUrl + '/role/selectsysrolemenu', { params })//查询角色拥有的菜单权限
const $ajaxUpdaterolemenu = params => axios.post(baseUrl + '/role/updaterolemenu', params, { config })//新增角色或修改角色与菜单关系
const $ajaxSelectsysallrole = params => axios.get(baseUrl + '/role/selectsysallrole', { params });//查询系统所有角色
const $ajaxSelectuserrole = params => axios.get(baseUrl + '/userauth/selectuserrole', { params });//查询用户角色
const $ajaxuUpdateuserauth = params => axios.post(baseUrl + '/userauth/updateuserauth', params, config);//修改用户角色
const $ajaxSelectallcity = params => axios.get(baseUrl + '/city/selectallcity', { params });//查询系统所有城市
const $ajaxSelectusermenu = params => axios.get(baseUrl + '/menu/selectuserReportmenu', { params });//查询用户菜单
const $ajaxSelectiframemenu = params => axios.get(baseUrl + '/menuApi/findIframeMenu', { params });//查询用户iframe菜单



//*****************************新权限类*************************************************************** 
const $ajaxSelectpermobjpage = params => axios.get(baseUrl + '/permobj/selectpermobjpage', { params });//对象锁列表,分页查询
const $ajaxDeletepermobj = params => axios.post(baseUrl + '/permobj/deletepermobj', params, config);//删除对象锁
const $ajaxInsertpermobj = params => axios.post(baseUrl + '/permobj/insertpermobj', params, { config });//新增对象锁
const $ajaxSelectpermclasspage = params => axios.get(baseUrl + '/permclass/selectpermclasspage', { params });//查询权限类
const $ajaxInsertpermclass = params => axios.post(baseUrl + '/permclass/insertpermclass', params, { config });//新增权限类
const $ajaxSelectpermclassoptypepage = params => axios.get(baseUrl + '/permclassoptype/selectpermclassoptypepage', { params });//根据权限类id查询权限类操作类型,分页查询
const $ajaxDeletepermclassoptype = params => axios.post(baseUrl + '/permclassoptype/deletepermclassoptype', params, config);//删除权限类操作类型
const $ajaxInsertpermclassoptype = params => axios.post(baseUrl + '/permclassoptype/insertpermclassoptype', params, { config });//新增权限类操作类型
const $ajaxDeletepermclass = params => axios.post(baseUrl + '/permclass/deletepermclass', params, config);//删除权限类
const $ajaxSelectpermclasstree = params => axios.get(baseUrl + '/permclass/selectpermclasstree', { params });//查询权限类树
const $ajaxInsertpermobjgroup = params => axios.post(baseUrl + '/permobjgroup/insertpermobjgroup', params, { config });//新增权限对象组
const $ajaxSelectallpermobj = params => axios.get(baseUrl + '/permobj/selectallpermobj', { params });//查询所有对象锁
const $ajaxInsertbachobjgrouprole = params => axios.post(baseUrl + '/permobjgroup/insertbachobjgrouprole', params, { config });//新增对象组和对象锁关系
const $ajaxDeleteobjgrouprole = params => axios.post(baseUrl + '/permobjgroup/deleteobjgrouprole', params, config);//删除对象组和对象锁关系
const $ajaxDeleteobjgroup = params => axios.post(baseUrl + '/permobjgroup/deleteobjgroup', params, config);//删除对象组
const $ajaxSelectpermclassall = params => axios.get(baseUrl + '/permclass/selectpermclassall', { params });//获取所有权限类
const $ajaxSelectpermclassoptype = params => axios.get(baseUrl + '/permclassoptype/selectpermclassoptype', { params });//根据权限类id查询权限类操作类型
const $ajaxSelectpermroleclasstree = params => axios.get(baseUrl + '/permroleclass/selectpermroleclasstree', { params });//根据角色 查询权限类
const $ajaxInsertpermroleclass = params => axios.post(baseUrl + '/permroleclass/insertpermroleclass', params, { config });//新增角色权限类，对象组，对象锁
const $ajaxDeletepermroleclasstree = params => axios.post(baseUrl + '/permroleclass/deletepermroleclasstree', params, config);//删除角色权限类
const $ajaxSelectroleorgpage = params => axios.get(baseUrl + '/permroleorg/selectroleorgpage', { params });//查询组织列表
const $ajaxInsertpermroleorg = params => axios.post(baseUrl + '/permroleorg/insertpermroleorg', params, { config });//新增组织树
const $ajaxSelectroleorgtree = params => axios.get(baseUrl + '/permroleorg/selectroleorgtree', { params });//查询组织树
const $ajaxInsertroleorgnode = params => axios.post(baseUrl + '/permroleorg/insertroleorgnode', params, { config });//添加组织树和角色关系
const $ajaxDeletepermroleorgnode = params => axios.post(baseUrl + '/permroleorg/deletepermroleorgnode', params, config);//删除 组织某个节点及下面数据
const $ajaxDeletepermroleorg = params => axios.post(baseUrl + '/permroleorg/deletepermroleorg', params, config);//删除 组织树，同时删除节点
const $ajaxSelectcitypage = params => axios.get(baseUrl + '/city/selectcitypage', { params });//查询城市
const $ajaxInsertcity = params => axios.post(baseUrl + '/city/insertcity', params, { config });//新增城市
const $ajaxUpdatecity = params => axios.post(baseUrl + '/city/updatecity', params, { config });//修改城市
const $ajaxDeletecity = params => axios.post(baseUrl + '/city/deletecity', params, config);//删除城市，只修改状态
const $ajaxUpdatepermroleorg = params => axios.post(baseUrl + '/permroleorg/updatepermroleorg', params, { config });//修改组织树名称

// POST 
export default {
  $ajaxResetpassword,
  $ajaxLogin,
  $ajaxLoginout,
  $ajaxUpdateUserHead,
  $ajaxFindpageuser,
  $ajaxFindoneuser,
  $ajaxSelectstation,
  $ajaxAddstation,
  $ajaxUpdatestation,
  $ajaxDeletestation,
  $ajaxSelectsysrole,
  $ajaxAdduser,
  $ajaxDeleteuser,
  $ajaxFindtreemenu,
  $ajaxAddrolemenu,
  $ajaxDeleterole,
  $ajaxFinduserbyname,
  $ajaxUpdateuserpassword,
  $ajaxFindUserNei,

  $ajaxAddrolename,
  $ajaxSelectsysrolemenu,
  $ajaxUpdaterolemenu,
  $ajaxSelectuserrole,
  $ajaxuUpdateuserauth,
  $ajaxSelectallcity,
  $ajaxSelectusermenu,

  $ajaxSelectpermobjpage,
  $ajaxDeletepermobj,
  $ajaxInsertpermobj,
  $ajaxSelectpermclasspage,
  $ajaxInsertpermclass,
  $ajaxSelectpermclassoptypepage,
  $ajaxDeletepermclassoptype,
  $ajaxInsertpermclassoptype,
  $ajaxDeletepermclass,
  $ajaxSelectpermclasstree,
  $ajaxInsertpermobjgroup,
  $ajaxSelectallpermobj,
  $ajaxInsertbachobjgrouprole,
  $ajaxDeleteobjgrouprole,
  $ajaxDeleteobjgroup,
  $ajaxSelectpermclassall,
  $ajaxSelectpermclassoptype,
  $ajaxSelectpermroleclasstree,
  $ajaxInsertpermroleclass,
  $ajaxDeletepermroleclasstree,
  $ajaxSelectroleorgpage,
  $ajaxInsertpermroleorg,
  $ajaxSelectroleorgtree,
  $ajaxSelectsysallrole,
  $ajaxInsertroleorgnode,
  $ajaxDeletepermroleorgnode,
  $ajaxDeletepermroleorg,
  $ajaxSelectcitypage,
  $ajaxInsertcity,
  $ajaxUpdatecity,
  $ajaxDeletecity,
  $ajaxUpdatepermroleorg,
  $ajaxSelectiframemenu

}