cpm-service.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import axios from '@/common/services/axios-instance'
  2. class CpmService {
  3. // 获取当前人组织id
  4. getGroupIds() {
  5. return axios.get('api/xcoa-mobile/v1/iam-common/getGroupIds').then(function(res) {
  6. return res
  7. })
  8. }
  9. // 根据projectId获取项目信息
  10. getProjectData(id, flagz) {
  11. if (flagz === null || flagz === undefined) {
  12. flagz = true
  13. }
  14. if (flagz) {
  15. return axios.get(`api/xcoa-mobile/v1/cpm-work-paper/getProject?id=${id}`).then(function(res) {
  16. return res
  17. })
  18. } else {
  19. // 子项目
  20. return axios
  21. .get(`api/xcoa-mobile/v1/cpm-work-paper/getSubProject?id=${id}`)
  22. .then(function(res) {
  23. return res
  24. })
  25. }
  26. }
  27. // 获取数据
  28. getData(params) {
  29. return axios({
  30. url: 'api/xcoa-mobile/v1/iam-page/businessList',
  31. method: 'post',
  32. data: params,
  33. })
  34. }
  35. // 获取合规应用检查类型应用参数
  36. getDictData() {
  37. return axios.get('api/xcoa-mobile/v1/cpm-project/checkTypes').then(function(res) {
  38. return res
  39. })
  40. }
  41. // 获取整改提醒配置单ID
  42. getRemindConfigId() {
  43. return axios
  44. .get('api/xcoa-mobile/v1/cpmremindconfig/findCpmRemindConfigEntity')
  45. .then(function(res) {
  46. return res
  47. })
  48. }
  49. // 获取用户所在机构
  50. getCurrentUserGroup() {
  51. return axios({
  52. url: `api/xcoa-mobile/v1/iamorg/getCurrentUserGroup`,
  53. method: 'get',
  54. }).then((res) => {
  55. return res
  56. })
  57. }
  58. }
  59. export default new CpmService()