岗位管理:增删改查功能

This commit is contained in:
陈淳
2022-09-13 17:05:53 +08:00
parent 01631860f4
commit 7b6d8671cf
33 changed files with 665 additions and 58 deletions

View File

@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询部门列表
export function listDept(query) {
return request({
url: '/system/dept/list',
url: '/dept/pageList',
method: 'get',
params: query
})
@@ -20,7 +20,7 @@ export function listDeptExcludeChild(deptId) {
// 查询部门详细
export function getDept(deptId) {
return request({
url: '/system/dept/' + deptId,
url: '/dept/getById/' + deptId,
method: 'get'
})
}
@@ -28,7 +28,7 @@ export function getDept(deptId) {
// 新增部门
export function addDept(data) {
return request({
url: '/system/dept',
url: '/dept/add',
method: 'post',
data: data
})
@@ -37,7 +37,7 @@ export function addDept(data) {
// 修改部门
export function updateDept(data) {
return request({
url: '/system/dept',
url: '/dept/update',
method: 'put',
data: data
})
@@ -45,8 +45,13 @@ export function updateDept(data) {
// 删除部门
export function delDept(deptId) {
if("string"==typeof(deptId))
{
deptId=[deptId];
}
return request({
url: '/system/dept/' + deptId,
method: 'delete'
url: '/dept/delList',
method: 'delete',
data:postId
})
}

View File

@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询岗位列表
export function listPost(query) {
return request({
url: '/system/post/list',
url: '/post/pageList',
method: 'get',
params: query
})
@@ -12,7 +12,7 @@ export function listPost(query) {
// 查询岗位详细
export function getPost(postId) {
return request({
url: '/system/post/' + postId,
url: '/post/getById/' + postId,
method: 'get'
})
}
@@ -20,7 +20,7 @@ export function getPost(postId) {
// 新增岗位
export function addPost(data) {
return request({
url: '/system/post',
url: '/post/add',
method: 'post',
data: data
})
@@ -29,7 +29,7 @@ export function addPost(data) {
// 修改岗位
export function updatePost(data) {
return request({
url: '/system/post',
url: '/post/update',
method: 'put',
data: data
})
@@ -37,8 +37,13 @@ export function updatePost(data) {
// 删除岗位
export function delPost(postId) {
if("string"==typeof(postId))
{
postId=[postId];
}
return request({
url: '/system/post/' + postId,
method: 'delete'
url: '/post/delList',
method: 'delete',
data:postId
})
}