dept.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. import request from '@/utils/request'
  2. // 查询部门列表
  3. export function listDept(query) {
  4. return request({
  5. url: '/system/dept/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询部门列表VO
  11. export function listDeptVO(query) {
  12. return request({
  13. url: '/system/dept/listVO',
  14. method: 'get',
  15. params: query
  16. })
  17. }
  18. // 查询院系列表
  19. export function listDepartments() {
  20. return request({
  21. url: '/system/dept/departments/list',
  22. method: 'get'
  23. })
  24. }
  25. // 查询楼栋列表-通过院系ID
  26. export function listbuildings(id) {
  27. return request({
  28. url: `/system/dept/${id}/building/list`,
  29. method: 'get'
  30. })
  31. }
  32. // 查询部门列表(排除节点)
  33. export function listDeptExcludeChild(deptId) {
  34. return request({
  35. url: '/system/dept/list/exclude/' + deptId,
  36. method: 'get'
  37. })
  38. }
  39. // 查询部门详细
  40. export function getDept(deptId) {
  41. return request({
  42. url: '/system/dept/' + deptId,
  43. method: 'get'
  44. })
  45. }
  46. // 查询部门下拉树结构
  47. export function treeselect() {
  48. return request({
  49. url: '/system/dept/treeselect',
  50. method: 'get'
  51. })
  52. }
  53. // 根据角色ID查询部门树结构
  54. export function roleDeptTreeselect(roleId) {
  55. return request({
  56. url: '/system/dept/roleDeptTreeselect/' + roleId,
  57. method: 'get'
  58. })
  59. }
  60. // 新增部门
  61. export function addDept(data) {
  62. return request({
  63. url: '/system/dept',
  64. method: 'post',
  65. data: data
  66. })
  67. }
  68. // 修改部门
  69. export function updateDept(data) {
  70. return request({
  71. url: '/system/dept',
  72. method: 'put',
  73. data: data
  74. })
  75. }
  76. // 删除部门
  77. export function delDept(deptId) {
  78. return request({
  79. url: '/system/dept/' + deptId,
  80. method: 'delete'
  81. })
  82. }
  83. // 查询部门电子签章列表
  84. export function signList(query) {
  85. return request({
  86. url: '/system/dept/sign/list',
  87. method: 'get',
  88. params: query
  89. })
  90. }
  91. // 编辑电子签章
  92. export function deptSign(data) {
  93. return request({
  94. url: '/system/dept/sign',
  95. method: 'put',
  96. data: data
  97. })
  98. }
  99. //根据账户查询学院与楼栋
  100. export function treeselectByUser(data) {
  101. return request({
  102. url: '/system/dept/treeselectByUser',
  103. method: 'get',
  104. data: data
  105. })
  106. }