audit-maintain-service.js 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. import axios from '@/common/services/axios-instance'
  2. class AuditMaintainService {
  3. // 获取单个授权模型信息
  4. findIamAuditMaintain(id) {
  5. return axios({
  6. url: `api/xcoa-mobile/v1/iammodelmaintain/findIamModelMaintain?id=${id}`,
  7. method: 'post',
  8. }).then((res) => {
  9. return res.data
  10. })
  11. }
  12. // 获取审计事项分类树
  13. findIamAuditMaintainCategoryTree(parentId, orgId) {
  14. const url =
  15. 'api/xcoa-mobile/v1/iammodelcategory/findIamAuditMattersCategoryTree?parentId=' +
  16. parentId +
  17. '&auditOrgId=' +
  18. orgId
  19. return axios.post(url).then(function(res) {
  20. return res
  21. })
  22. }
  23. // 删除多个模型前提示
  24. // api/xcoa-mobile/v1/iam-page/iamModelMaintain?ids
  25. deleteCheckModel(ids) {
  26. return axios
  27. .delete('api/xcoa-mobile/v1/iam-page/iamModelMaintain?ids=' + ids)
  28. .then(function(res) {
  29. return res.data
  30. })
  31. }
  32. // 保存授权模型 iamModelMaintainSqSave
  33. saveIamAuditMaintain(params) {
  34. return axios({
  35. url: `api/xcoa-mobile/v1/iammodelmaintain/iamModelMaintainSqSave`,
  36. method: 'post',
  37. data: params,
  38. }).then((res) => {
  39. return res.data
  40. })
  41. }
  42. // 获取模型授权申请数据接口
  43. getmaintainsqdata(id) {
  44. return axios({
  45. url: `api/xcoa-mobile/v1/iammodelmaintain/getIamModelMaintains?id=${id}`,
  46. method: 'post',
  47. }).then((res) => {
  48. return res.data
  49. })
  50. }
  51. // 保存数据授权 saveIamModelMaintainSqDte
  52. saveIamModelMaintain(params) {
  53. return axios({
  54. url: `api/xcoa-mobile/v1/iammodelmaintain/saveIamModelMaintainSqDte`,
  55. method: 'post',
  56. data: params,
  57. }).then((res) => {
  58. return res.data
  59. })
  60. }
  61. // 获取数据授权 getIamModelMaintainSqDte
  62. getIamModelMaintain(id) {
  63. return axios({
  64. url: `api/xcoa-mobile/v1/iammodelmaintain/getIamModelMaintainSqDte?selectOrgId=${id}`,
  65. method: 'post',
  66. }).then((res) => {
  67. return res.data
  68. })
  69. }
  70. // 生成查看日志接口
  71. saveModelmaintainlogInfo(id) {
  72. return axios({
  73. url: `api/xcoa-mobile/v1/iammodelmaintainlog/saveModelmaintainlogInfo?maintainId=${id}&operateType=01`,
  74. method: 'get',
  75. }).then((res) => {
  76. return res.data
  77. })
  78. }
  79. // 删除时检查分类
  80. deleteCheckCategory(ids) {
  81. return axios
  82. .get('api/xcoa-mobile/v1/iammodelcategory/delete-check-category?ids=' + ids)
  83. .then(function(res) {
  84. return res.data
  85. })
  86. }
  87. // 删除时分类
  88. deleteCategory(ids) {
  89. return axios
  90. .delete('api/xcoa-mobile/v1/iammodelcategory/delete-category?ids=' + ids)
  91. .then(function(res) {
  92. return res.data
  93. })
  94. }
  95. // 删除事项
  96. deleteIamAuditMaintain(ids) {
  97. return axios
  98. .delete('api/xcoa-mobile/v1/iam-audit-maintain/delete-iamAuditMaintain?ids=' + ids)
  99. .then(function(res) {
  100. return res.data
  101. })
  102. }
  103. // 获取分级授权下拉列表
  104. getManagedHierarchyOrg(formId) {
  105. return axios({
  106. url: `api/xcoa-mobile/v1/iam-page/getHavePermissionOrg/${formId}`,
  107. method: 'post',
  108. }).then((res) => {
  109. return res
  110. })
  111. }
  112. // 导出审计事项
  113. exportItem(id, rootId) {
  114. return axios({
  115. method: 'post',
  116. url: 'api/xcoa-mobile/v1/iam-audit-maintain/exportItem',
  117. params: { id: Number(id), rootId: Number(rootId) },
  118. responseType: 'blob',
  119. })
  120. }
  121. // 导出模板
  122. exportItemTemplate(level) {
  123. return axios({
  124. method: 'post',
  125. url: 'api/xcoa-mobile/v1/iam-audit-maintain/exportItemTemplate',
  126. params: { level: Number(level) },
  127. responseType: 'blob',
  128. })
  129. }
  130. // 导入数据
  131. importItemTemplate(importType, groupId, auditOrgId) {
  132. return axios({
  133. method: 'post',
  134. url: 'api/xcoa-mobile/v1/iam-audit-maintain/importItemTemplate',
  135. params: { importType: importType, groupId: groupId, auditOrgId: Number(auditOrgId) },
  136. })
  137. }
  138. // 拖拽功能
  139. dragNode(data) {
  140. return axios({
  141. method: 'post',
  142. url: 'api/xcoa-mobile/v1/iammodelcategory/drage',
  143. data: data,
  144. })
  145. }
  146. // 获取分类树形图
  147. getFindModelCategoryTreeAll() {
  148. return axios({
  149. method: 'post',
  150. url: 'api/xcoa-mobile/v1/iammodelcategory/findModelCategoryTreeAll',
  151. })
  152. }
  153. setShareStatus(data) {
  154. return axios({
  155. method: 'post',
  156. url:
  157. 'api/xcoa-mobile/v1/iammodelmaintain/editIamModelSharedSetting?sharedSetting=' +
  158. data.sharedSetting +
  159. '&id=' +
  160. data.id,
  161. })
  162. }
  163. // 事件标签列表
  164. getEventTagList() {
  165. return axios({
  166. method: 'get',
  167. url: 'api/xcoa-mobile/v1/iamincidenttag/findIncidentTagListAll',
  168. })
  169. }
  170. // 删除事件标签
  171. deleteEventTag(ids) {
  172. return axios({
  173. method: 'delete',
  174. url: 'api/xcoa-mobile/v1/iam-page/iamIncidentTag?ids=' + ids,
  175. })
  176. }
  177. // 校验事件标签
  178. checkEventTag(ids) {
  179. return axios({
  180. method: 'get',
  181. url: 'api/xcoa-mobile/v1/iamincidenttag/deleteIncidentTagCheck?ids=' + ids,
  182. })
  183. }
  184. // 申请共享
  185. applyShareLog(data) {
  186. return axios({
  187. method: 'post',
  188. url: 'api/xcoa-mobile/v1/iamdetailformmodifylog/saveDetailFormModifyLog',
  189. data: data,
  190. })
  191. }
  192. applyShare(data) {
  193. return axios({
  194. method: 'post',
  195. url: 'api/framework/v1/page/handleData',
  196. data: data,
  197. })
  198. }
  199. // 请求申请共享新增模板
  200. getApplyShareModel(id) {
  201. return axios({
  202. method: 'post',
  203. url: 'api/framework/v1/page/wp/audit/maintain/iamModelShare',
  204. })
  205. }
  206. // 修改申请状态
  207. updateApplyStatus(data) {
  208. return axios({
  209. method: 'post',
  210. url: `api/xcoa-mobile/v1/iammodelshare/editIamModelApplyStatus?applyStatus=${data.applyStatus}&id=${data.id}`,
  211. })
  212. }
  213. // 获取分类授权申请数据接口
  214. getclassdata(id) {
  215. return axios({
  216. url: `api/xcoa-mobile/v1/iamdatacategory/getIamDataCategorys?id=${id}`,
  217. method: 'post',
  218. }).then((res) => {
  219. return res.data
  220. })
  221. }
  222. // 修改模型上下线
  223. // iammodelmaintain/modelOnline这是post方法
  224. // iammodelmaintain/modelOnline?status=1这样传参
  225. updateModelStatus(data) {
  226. return axios({
  227. method: 'post',
  228. url: `api/xcoa-mobile/v1/iammodelmaintain/modelOnline?status=${data.status}&id=${data.id}`,
  229. })
  230. }
  231. // 全量查询模型领域列表
  232. getAreaListAll() {
  233. return axios({
  234. url: 'api/xcoa-mobile/v1/model-domain/all',
  235. method: 'get',
  236. })
  237. }
  238. // 全量查询模型阶段列表
  239. getStageListAll() {
  240. return axios({
  241. url: 'api/xcoa-mobile/v1/model-phase/all',
  242. method: 'get',
  243. })
  244. }
  245. // 查询模型领域详情
  246. getAreaDetail(id) {
  247. return axios({
  248. url: `api/framework/v1/page/wp/audit/maintain/iamModelDomain?id=${id}`,
  249. method: 'post',
  250. })
  251. }
  252. // iammodelmaintain/modelSave 固化模型保存
  253. modelSaveGH(data) {
  254. return axios({
  255. url: `api/xcoa-mobile/v1/iammodelmaintain/modelSave`,
  256. method: 'post',
  257. data: data,
  258. })
  259. }
  260. // 多选绑定model-domain-user/butchBindPeople
  261. butchBindPeople(data) {
  262. return axios({
  263. url: `api/xcoa-mobile/v1/model-domain-user/butchBindPeople`,
  264. method: 'post',
  265. data: data,
  266. })
  267. }
  268. // 新增定时任务
  269. addTask(data) {
  270. return axios({
  271. url: `api/xcoa-mobile/v1/iammodelmaintain/addJob`,
  272. method: 'post',
  273. data: data,
  274. })
  275. }
  276. // pauseJob 暂停
  277. pauseJob(data) {
  278. return axios({
  279. url: `api/xcoa-mobile/v1/iammodelmaintain/pauseJob`,
  280. method: 'post',
  281. data: data,
  282. })
  283. }
  284. // /resumeJob 恢复
  285. resumeJob(data) {
  286. return axios({
  287. url: `api/xcoa-mobile/v1/iammodelmaintain/resumeJob`,
  288. method: 'post',
  289. data: data,
  290. })
  291. }
  292. // /rescheduleJob 更新定时任务表达式
  293. rescheduleJob(data) {
  294. return axios({
  295. url: `api/xcoa-mobile/v1/iammodelmaintain/rescheduleJob`,
  296. method: 'post',
  297. data: data,
  298. })
  299. }
  300. // /deleteJob 删除
  301. deleteJob(data) {
  302. return axios({
  303. url: `api/xcoa-mobile/v1/iammodelmaintain/deleteJob`,
  304. method: 'post',
  305. data: data,
  306. })
  307. }
  308. // /executeJob 立即执行
  309. executeJob(data) {
  310. return axios({
  311. url: `api/xcoa-mobile/v1/iammodelmaintain/executeJob`,
  312. method: 'post',
  313. data: data,
  314. })
  315. }
  316. // 查询状态 /getTriggerStatus
  317. getTriggerStatus(data) {
  318. return axios({
  319. url: `api/xcoa-mobile/v1/iammodelmaintain/getTriggerStatus`,
  320. method: 'post',
  321. data: data,
  322. })
  323. }
  324. // 数据导出 /modeljobdata/detailExport
  325. exportDataTime(data) {
  326. return axios({
  327. url: `api/xcoa-mobile/v1/modeljobdata/detailExport`,
  328. method: 'post',
  329. responseType: 'blob',
  330. data,
  331. })
  332. }
  333. // 查询基础数据
  334. getBaseData(data) {
  335. return axios({
  336. url: `api/xcoa-mobile/v1/modeljobdata/getList`,
  337. method: 'post',
  338. data,
  339. })
  340. }
  341. // 校验是否已经绑定
  342. // /model-domain-user/checkUnit POST String domainId ,String unitId
  343. checkBind(data) {
  344. return axios({
  345. url: `api/xcoa-mobile/v1/model-domain-user/checkUnit?domainId=${data.domainId}&unitId=${data.unitId}`,
  346. method: 'post',
  347. })
  348. }
  349. // 删除 领域绑定
  350. deleteArea(data) {
  351. return axios({
  352. url: `/api/xcoa-mobile/v1/iam-page/iamModelDomainUserRel?ids=${data}`,
  353. method: 'delete',
  354. })
  355. }
  356. // /model-domain-user/getGroup
  357. getGroup() {
  358. return axios({
  359. url: `api/xcoa-mobile/v1/model-domain-user/getGroup`,
  360. method: 'get',
  361. })
  362. }
  363. }
  364. export default new AuditMaintainService()