public.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. import request from '@/utils/request'
  2. // 查询部门下拉树结构
  3. export function deptTreeSelect(removeId) {
  4. return request({
  5. url: '/system/dept/deptTree',
  6. method: 'get',
  7. params:removeId
  8. })
  9. }
  10. export function handsheDeptTreeSelect() {
  11. return request({
  12. url: '/system/dept/deptTree/hangshe',
  13. method: 'get'
  14. })
  15. }
  16. export function businessTreeSelect(para) {
  17. // return request({
  18. // url: '/system/dept/deptTree/business',
  19. // method: 'get'
  20. // })
  21. if(!para)
  22. {
  23. para={
  24. excludeOrgCode:"900000000",
  25. excludeOrgName:"各部门"
  26. }
  27. excludeOrgCode="900000000"
  28. excludeOrgName:"各部门"
  29. }
  30. return request({
  31. url: '/system/dept/deptTree/business',
  32. method: 'post',
  33. data: para,
  34. })
  35. }
  36. export function wholeTreeSelect(para) {
  37. if(!para) {
  38. para={
  39. orgId:"",
  40. includeSub:true,
  41. excludeOrgName:"各部门"
  42. }
  43. }
  44. return request({
  45. url: '/system/dept/deptTree/whole',
  46. method: 'post',
  47. data: para,
  48. })
  49. }
  50. // 查询文件
  51. export function getFile(code) {
  52. return request({
  53. url: '/file/file/getFile/' + code,
  54. method: 'get'
  55. })
  56. }
  57. // 查询机构下拉树结构
  58. export function deptTreeList() {
  59. return request({
  60. url: '/system/dept/sysDeptTree',
  61. method: 'get'
  62. })
  63. }
  64. export function upload(data,type) {
  65. return request({
  66. url: '/file/file/upload',
  67. method: 'post',
  68. headers: {
  69. 'Content-Type': 'multipart/form-data',
  70. },
  71. data: data,
  72. params:{
  73. busType: type
  74. }
  75. })
  76. }
  77. // 获取当前系统角色信息
  78. export function getRoles() {
  79. return request({
  80. url: '/system/role/getRoles',
  81. method: 'get'
  82. })
  83. }