audit-maintain-service.js 8.5 KB

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