123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- import request from '@/utils/request'
- import { praseStrEmpty } from "@/utils/ruoyi";
- // 查询用户列表
- export function listUser(query) {
- return request({
- url: '/system/user/teacher/list',
- method: 'get',
- params: query
- })
- }
- // 查询教职工下拉列表
- export function optionUser(data) {
- return request({
- url: '/system/user/teacher/option',
- method: 'post',
- data: data
- })
- }
- // 查询用户详细
- export function getUser(userId) {
- return request({
- url: '/system/user/teacher/' + praseStrEmpty(userId),
- method: 'get'
- })
- }
- // 新增用户
- export function addUser(data) {
- return request({
- url: '/system/user/teacher',
- method: 'post',
- data: data
- })
- }
- // 修改用户
- export function updateUser(data) {
- return request({
- url: '/system/user/teacher',
- method: 'put',
- data: data
- })
- }
- // 删除用户
- export function delUser(userId) {
- return request({
- url: '/system/user/teacher/' + userId,
- method: 'delete'
- })
- }
- // 用户密码重置
- export function resetUserPwd(userId, password) {
- const data = {
- userId,
- password
- }
- return request({
- url: '/system/user/teacher/resetPwd',
- method: 'put',
- data: data
- })
- }
- // 用户状态修改
- export function changeUserStatus(userId, status) {
- const data = {
- userId,
- status
- }
- return request({
- url: '/system/user/teacher/changeStatus',
- method: 'put',
- data: data
- })
- }
- // 查询用户个人信息
- export function getUserProfile() {
- return request({
- url: '/system/user/teacher/profile',
- method: 'get'
- })
- }
- // 修改用户个人信息
- export function updateUserProfile(data) {
- return request({
- url: '/system/user/teacher/profile',
- method: 'put',
- data: data
- })
- }
- // 用户密码重置
- export function updateUserPwd(oldPassword, newPassword) {
- const data = {
- oldPassword,
- newPassword
- }
- return request({
- url: '/system/user/teacher/profile/updatePwd',
- method: 'put',
- params: data
- })
- }
- // 用户头像上传
- export function uploadAvatar(data) {
- return request({
- url: '/system/user/teacher/profile/avatar',
- method: 'post',
- data: data
- })
- }
- // 查询授权角色
- export function getAuthRole(userId) {
- return request({
- url: '/system/user/teacher/authRole/' + userId,
- method: 'get'
- })
- }
- // 保存授权角色
- export function updateAuthRole(data) {
- return request({
- url: '/system/user/teacher/authRole',
- method: 'put',
- params: data
- })
- }
- //教职工启用停用接口
- export function putUserTeacher(data) {
- return request({
- url: '/system/user/teacher',
- method: 'put',
- data: data
- })
- }
- //删除教职工
- export function delTeacher(userId) {
- return request({
- url: '/system/user/teacher/' + userId,
- method: 'delete'
- })
- }
- //重置教职工密码
- export function teacherResetPwd(data) {
- return request({
- url: '/system/user/teacher/resetPwd',
- method: 'put',
- data: data
- })
- }
- //新增部门
- export function addDeptByTeacher(data) {
- return request({
- url: '/system/dept/addDeptByTeacher',
- method: 'post',
- data: data
- })
- }
- //编辑部门
- export function putDeptByTeacher(data) {
- return request({
- url: '/system/dept',
- method: 'put',
- data: data
- })
- }
- //编辑部门名称
- export function updateDeptName(data) {
- return request({
- url: '/system/dept/updateDeptName',
- method: 'put',
- data: data
- })
- }
- //部门位置移动
- export function editDeptOrder(data) {
- return request({
- url: '/system/dept/editDeptOrder',
- method: 'put',
- data: data
- })
- }
- //删除部门
- export function delDept(deptId) {
- return request({
- url: '/system/dept/'+deptId,
- method: 'delete',
- })
- }
- //部门添加人员
- export function editUserByDept(data) {
- return request({
- url: '/system/user/teacher/editUserByDept',
- method: 'put',
- data: data
- })
- }
- //查询教师详情接口
- export function getTeacherInfo(userId) {
- return request({
- url: '/system/user/teacher/' + userId,
- method: 'get'
- })
- }
- //查询身份列表
- export function optionselect(query) {
- return request({
- url: '/system/post/optionselect',
- method: 'get',
- params: query
- })
- }
- //字段模糊搜索
- export function getVaguet(query) {
- return request({
- url: '/system/dict/data/getVague',
- method: 'get',
- params: query
- })
- }
- //根据用户查询权限
- export function userPermit(userId) {
- return request({
- url: '/system/permit/userPermit/'+userId,
- method: 'get',
- })
- }
- //新增教职工
- export function addUserTeacher(data) {
- return request({
- url: '/system/user/teacher',
- method: 'post',
- data:data
- })
- }
- //编辑教职工
- export function putUserTeacherNew(data) {
- return request({
- url: '/system/user/teacher',
- method: 'put',
- data:data
- })
- }
- //教职工在职离职联动启用停用
- export function editNatureLinkage(data) {
- return request({
- url: '/system/user/teacher/editNatureLinkage',
- method: 'put',
- data: data
- })
- }
- // 查询部门下拉树结构
- export function treeselect(query) {
- return request({
- url: '/system/dept/treeselect',
- method: 'get',
- params: query
- })
- }
- //批量获取老师数据
- export function teacherBatchSelect(data) {
- return request({
- url: 'system/user/teacher/batchSelect/'+data,
- method: 'post',
- })
- }
- //批量修改老师卡号
- export function teacherUpdateCardNum(data) {
- return request({
- url: '/system/user/teacher/updateCardNum',
- method: 'put',
- data: data
- })
- }
|