import axios from '@/common/services/axios-instance' class CpmService { // 获取当前人组织id getGroupIds() { return axios.get('api/xcoa-mobile/v1/iam-common/getGroupIds').then(function(res) { return res }) } // 根据projectId获取项目信息 getProjectData(id, flagz) { if (flagz === null || flagz === undefined) { flagz = true } if (flagz) { return axios.get(`api/xcoa-mobile/v1/cpm-work-paper/getProject?id=${id}`).then(function(res) { return res }) } else { // 子项目 return axios .get(`api/xcoa-mobile/v1/cpm-work-paper/getSubProject?id=${id}`) .then(function(res) { return res }) } } // 获取数据 getData(params) { return axios({ url: 'api/xcoa-mobile/v1/iam-page/businessList', method: 'post', data: params, }) } // 获取合规应用检查类型应用参数 getDictData() { return axios.get('api/xcoa-mobile/v1/cpm-project/checkTypes').then(function(res) { return res }) } // 获取整改提醒配置单ID getRemindConfigId() { return axios .get('api/xcoa-mobile/v1/cpmremindconfig/findCpmRemindConfigEntity') .then(function(res) { return res }) } // 获取用户所在机构 getCurrentUserGroup() { return axios({ url: `api/xcoa-mobile/v1/iamorg/getCurrentUserGroup`, method: 'get', }).then((res) => { return res }) } } export default new CpmService()