import axios from './network'
// 登录
export const adminLogin = (obj) => axios.post('/admin/login', obj)
// 登录用户
export const adminLoginqx = () => axios.get('/admin/login')
// 退出登录
export const detelLogin = () => axios.delete('/admin/login')
// 权限列表
export const permissionList = () => axios.get('/permission?guard_name=admin')
// 角色列表
export const adminRole = (objLimt) => axios.get('/admin/role?limit=' + objLimt)
// 添加角色
export const adminRolePost = (obj) => axios.post('/admin/role', obj)
// 管理员添加
export const adminAdmins = (obj) => axios.post('/admin/admins', obj)
// 用户管理管理员列表
export const adminAdminsGet = (obj) => axios.get('/admin/admins?limit=' + obj.limit + '&role_id=' + obj.role_id)
// 角色管理管理员列表
export const adminAdminsRoleGet = (obj) => axios.get('/admin/admins?limit=' + obj.limit + '&role_id=' + obj.role_id + '&sort=bind_role_at:desc')
export const adminAdminsRoleGetTwe = (obj) => axios.get('/admin/admins?limit=' + obj.limit + '&role_id=' + obj.role_id)
// 管理员编辑
export const adminAdminsPut = (obj) => axios.put('/admin/admins/' + obj.id, obj)
// 管理员删除
export const adminAdminsDetele = (obj) => axios.delete('/admin/admins/' + obj.id)
// 检查是否激活
export const checkIsActivate = () => axios.get('/check/is/activate')
// 检测超级管理员账号
export const activateCheckAdmin = (obj) => axios.post('/activate/check/admin', obj)
// 激活账号
export const activatePost = (obj) => axios.post('/activate', obj)
// 更新当前账号密码
export const adminLoginPassword = (obj) => axios.post('/admin/login/password', obj)
// 发送手机验证码
export const adminSendResetPasswordPphone = (obj) => axios.post('/admin-send-reset-password/phone', obj)
// 职位列表
export const adminZhiwei = (objLimt) => axios.get('/admin/zhi-wei?limit=' + objLimt)
// 添加职位
export const adminZhiweiPost = (obj) => axios.post('/admin/zhi-wei', obj)
// 消息列表
export const adminMessage = (obj) => axios.get('/admin/message?type=' + obj.type + '&page=1&limit=100')
// 消息列表
export const adminMessageDetails = (obj) => axios.get('/admin/message/' + obj)
// 重置密码
export const adminresetPasswordPPhone = (obj) => axios.post('/admin-reset-password/phone', obj)
// 创建角色权限
export const adminAdminRolePermission = (obj) => axios.post('/admin/admin-role-permission', obj)
// 用户配置角色
export const adminAdminRoleAddPost = (obj) => axios.post('/admin/admin/' + obj.adminid + '/role', obj)
// 量表-二级列表
export const adminScalelvl = (objLimt) => axios.get('/admin/scale-lvl?type=' + objLimt)
// 量表-二级列表
export const adminScalelvlTwe = (objLimt, time) => axios.get('/admin/scale-lvl?type=' + objLimt + '&report_time=' + time)
// 接触绑定角色
export const adminAdminRoleDelPost = (obj) => axios.delete('/admin/admin/' + obj.admin_id + '/role/' + obj.id)
// 更改手机号
export const adminPhonePost = (obj) => axios.post('/admin/admin/' + obj.admin_id + '/phone', obj)
// 用户更换手机号发送验证码
export const adminUpdateAdminPhoneCode = (obj) => axios.post('/admin/update-admin-phone-code', obj)
// 量表字段
export const adminScaleField = (id) => axios.get('/admin/scale-field?lvl_type=' + id)
// 消息量表回显
export const adminScaleFieldMessage = (obj) => axios.get('/admin/scale-field?lvl_type=' + obj.id + '&report_time=' + obj.timer)
// 量表字段
export const adminschoolbaseGet = (id) => axios.get('/admin/school-base/' + id)
export const adminschoolbasePut = (obj) => axios.put('/admin/school-base/' + obj.id, obj)
// 学校基本信息发送手机号验证码
export const adminresetphonecode = (obj) => axios.post('/admin/reset-phone-code', obj)
// 激活发送手机号验证码
export const activatesendphonecode = (obj) => axios.post('/activate/send-phone-code', obj)
// 学校基本信息更换手机号
export const adminschoolbaseupdatephone = (obj) => axios.post('/admin/school-base/1/update-phone', obj)
// 学校基本信息更换手机号
export const adminbattchadminmppath = () => axios.post('/admin/battch-admin-tmp-path')
// 消息详情
export const adminmessageGet = (id) => axios.get('/admin/message/' + id)
// 学校详情
export const adminschoolbaseDetails = () => axios.get('/admin/school-base/1')
// 获取上报
export const adminreport = () => axios.get('/admin/report')
// 根据上报编码获取上报详情
export const adminreportinfo = (code) => axios.get('/admin/report/info/' + code)
// 根据上报编码获取上报详情
export const adminscaletypeinfo = (obj) => axios.get('/admin/scale/type/info/' + obj.code + '/?type=' + obj.id)
export const adminreportfeedbackinfo = (obj) => axios.get('/admin/report/feedback/info/' + obj)
// 生成唯一编码
export const adminscalecode = () => axios.get('/admin/scale/code')
// 学校类型列表
export const schooltypelist = () => axios.get('/school/type/list')
export const adminsumfenzhi = (obj) => axios.get('/admin/feedback?report_code=' + obj.report_code + '&lv1=' + obj.id + '&sub_id=' + obj.subid)
export const adminscalefieldothers = (obj) => axios.post('/admin/scale-field-others', obj)
export const adminscalefieldothersGet = (code) => axios.get('/admin/scale-field-others/' + code)
export const adminscalefieldothersPut = (code) => axios.put('/admin/scale-field-others/' + code.sub_id, code)
export const admiadminyindao = (type) => axios.get('/admin/admin-yin-dao/' + type)
export const admiadminyindaopost = (obj) => axios.post('/admin/admin-yin-dao', obj)
export const adminMessagePut = (id) => axios.put('/admin/message/' + id)
// 上报获取倒计时
export const adminreportcycle = () => axios.get('/admin/report/cycle')

export const adminifread = (obj) => axios.get('/admin/if/read?report_code=' + obj.report_code + '&scale_lv1_id=' + obj.id)
export const admincountbycode = (obj) => axios.get('admin/count/by/code?report_code=' + obj.report_code)
export const adminsetread = (obj) => axios.get('/admin/set/read?report_code=' + obj.report_code + '&scale_lv1_id=' + obj.id)
export const adminmonthisreport = () => axios.get('/admin/month/is/report')


