移动端V1.0
This commit is contained in:
77
api/system/dept.js
Normal file
77
api/system/dept.js
Normal file
@@ -0,0 +1,77 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询无权限的部门列表
|
||||
export function noAuthList(query) {
|
||||
return request({
|
||||
url: '/system/dept/noAuthList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门列表
|
||||
export function listDept(query) {
|
||||
return request({
|
||||
url: '/system/dept/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询学院名称
|
||||
export function getDeptName() {
|
||||
return request({
|
||||
url: '/system/dept/name',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门列表(排除指定节点)
|
||||
export function listDeptExcludeChild(deptId) {
|
||||
return request({
|
||||
url: `/system/dept/list/exclude/${deptId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门详细信息
|
||||
export function getDept(deptId) {
|
||||
return request({
|
||||
url: `/system/dept/${deptId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增部门
|
||||
export function addDept(data) {
|
||||
return request({
|
||||
url: '/system/dept',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改部门信息
|
||||
export function updateDept(data) {
|
||||
return request({
|
||||
url: '/system/dept/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除部门
|
||||
export function delDept(deptId) {
|
||||
return request({
|
||||
url: `/system/dept/delete/${deptId}`,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询行政架构下的部门数据
|
||||
export function getXZJGDept(deptId) {
|
||||
return request({
|
||||
url: '/system/dept/getXZJGDept',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
27
api/system/dict/data.js
Normal file
27
api/system/dict/data.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典数据列表
|
||||
export function listData(query) {
|
||||
return request({
|
||||
'url': 'system/dict/data/list',
|
||||
'method': 'get',
|
||||
query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典数据详细
|
||||
export function getData(dictCode) {
|
||||
return request({
|
||||
'url': '/system/dict/data/'+ dictCode,
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据字典类型查询字典数据信息
|
||||
export function getDicts(dictType) {
|
||||
return request({
|
||||
'url': '/system/dict/data/type/'+ dictType,
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
19
api/system/dict/type.js
Normal file
19
api/system/dict/type.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典类型列表
|
||||
export function listType(query) {
|
||||
return request({
|
||||
'url': '/system/dict/type/list',
|
||||
'method': 'get',
|
||||
query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典类型详细
|
||||
export function getType(dictId) {
|
||||
return request({
|
||||
'url': '/system/dict/type/'+ dictId,
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
41
api/system/user.js
Normal file
41
api/system/user.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import upload from '@/utils/upload'
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 用户密码重置
|
||||
export function updateUserPwd(oldPassword, newPassword) {
|
||||
const data = {
|
||||
oldPassword,
|
||||
newPassword
|
||||
}
|
||||
return request({
|
||||
url: '/system/user/profile/updatePwd',
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户个人信息
|
||||
export function getUserProfile() {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改用户个人信息
|
||||
export function updateUserProfile(data) {
|
||||
return request({
|
||||
url: '/system/user/profile',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户头像上传
|
||||
export function uploadAvatar(data) {
|
||||
return upload({
|
||||
url: '/system/user/profile/avatar',
|
||||
name: data.name,
|
||||
filePath: data.filePath
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user