Commit 98b4034e authored by yf's avatar yf

增删改功能 --杨帆

parent a013869e
...@@ -43,25 +43,25 @@ export function treeselect() { ...@@ -43,25 +43,25 @@ export function treeselect() {
// 查询部门下拉树结构 // 查询部门下拉树结构
export function getChildrenDept(userId) { export function getChildrenDept(userId) {
return request({ return request({
url: '/system/dept/getChildren/'+userId, url: '/system/dept/getChildren/' + userId,
method: 'get' method: 'get'
}) })
} }
// 根据角色ID查询部门树结构 // 根据角色ID查询部门树结构
export function roleDeptTreeselect(roleId,menuId) { export function roleDeptTreeselect(roleId, menuId) {
return request({ return request({
url: '/system/dept/roleDeptTreeSelect/' + roleId + '/'+ menuId, url: '/system/dept/roleDeptTreeSelect/' + roleId + '/' + menuId,
method: 'get' method: 'get'
}) })
} }
// 新增部门 // 新增部门
export function addDept(data) { export function addDept(data) {
console.log(data) // console.log(data)
data = Qs.stringify(data) data = Qs.stringify(data)
console.log(11112311111111) // console.log(11112311111111)
console.log(data) // console.log(data)
return request({ return request({
url: '/system/dept/add', url: '/system/dept/add',
method: 'post', method: 'post',
...@@ -79,7 +79,10 @@ export function updateDept(data) { ...@@ -79,7 +79,10 @@ export function updateDept(data) {
return request({ return request({
url: '/system/dept/update/' + businessId, url: '/system/dept/update/' + businessId,
method: 'put', method: 'put',
data data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
......
...@@ -91,7 +91,10 @@ export function updateMenu(data) { ...@@ -91,7 +91,10 @@ export function updateMenu(data) {
return request({ return request({
url: '/system/menu/update/'+ businessId, url: '/system/menu/update/'+ businessId,
method: 'put', method: 'put',
data data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment