law-service.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. import axios from '@/common/services/axios-instance'
  2. class LawService {
  3. // 获取案由配置下级节点
  4. findCaseCatelogtree(parentId) {
  5. const url = 'api/framework/v1/law-case-action/findLawCaseActionTree?parentCode=' + parentId
  6. return axios.post(url).then(function (res) {
  7. return res
  8. })
  9. }
  10. // 获取案由配置节点最大数值
  11. findActionCode(parentId) {
  12. const url = 'api/framework/v1/law-case-action/findActionCode?parentCode=' + parentId
  13. return axios.get(url).then(function (res) {
  14. return res
  15. })
  16. }
  17. getAlljfStage() {
  18. const url = 'api/xcoa-mobile/v1/iam-page/businessList'
  19. const params = {
  20. buttonExpressions: [],
  21. columns: 'STAGE_CODE,text0,STAGE_NAME,CREATOR_NAME,CREATION_TIME',
  22. expressions: [],
  23. formId: 'onlhead:7d24a24cc49641d8a5477dd1f73bf515',
  24. maxResults: 10,
  25. orderBy: 'CREATION_TIME ASC',
  26. startPosition: 0,
  27. }
  28. return axios.post(url, params).then(function (res) {
  29. return res
  30. })
  31. }
  32. // 根据纠纷projectId获取纠纷进展信息
  33. getProgressData(id) {
  34. return axios.get(`api/framework/v1/law-work-step/step-tree?lawId=${id}`).then(function (res) {
  35. return res
  36. })
  37. }
  38. // 获取案件阶段树代码 api/framework/v1/lawcasestage/findLawCaseStageTree
  39. getCaseTree(caseType, caseStage) {
  40. const url = 'api/framework/v1/lawcasestage/findLawCaseStageTree'
  41. const params = {
  42. caseType: caseType,
  43. caseStage: caseStage,
  44. }
  45. return axios
  46. .get(
  47. `api/framework/v1/lawcasestage/findLawCaseStageTree?caseType=${caseType}&caseStage=${caseStage}`
  48. )
  49. .then(function (res) {
  50. return res
  51. })
  52. }
  53. getAllCaseTree() {
  54. return axios.get(`api/framework/v1/lawcasestage/findAll`).then(function (res) {
  55. return res
  56. })
  57. }
  58. getAllcaseproStage() {
  59. const url = 'api/framework/v1/lawexecuteproceure/findExecuteProceureList'
  60. return axios.post(url).then(function (res) {
  61. return res
  62. })
  63. }
  64. // 获取案件信息
  65. getCaseData(caseId) {
  66. return axios
  67. .get(`api/framework/v1/law-case-finish/getCaseInfoByCaseId?caseId=${caseId}`)
  68. .then(function (res) {
  69. return res
  70. })
  71. }
  72. getdict(id) {
  73. return axios
  74. .get(`api/framework/v1/app-dict/select-item/${id}?parentId=${id}`)
  75. .then(function (res) {
  76. return res
  77. })
  78. // const url = 'api/xcoa-mobile/v1/iam-page/businessList'
  79. // return axios.post(url, params).then(function(res) {
  80. // return res
  81. // })
  82. // http://localhost:8888/xcoa/api/framework/v1/app-dict/select-item/280447518411472896?parentId=280447518411472896
  83. }
  84. // 创建案件接口
  85. createCase(disputeId, type) {
  86. return axios
  87. .get(
  88. `api/xcoa-mobile/v1/law-dispute-finish/createLawCase?disputeId=${disputeId}&disputeResult=${type}`
  89. )
  90. .then(function (res) {
  91. return res
  92. })
  93. }
  94. // 根据案件id获取案件大事记信息
  95. getMemoir(id) {
  96. return axios
  97. .get(`api/xcoa-mobile/v1/law-work-step/law-memoir?lawId=${id}`)
  98. .then(function (res) {
  99. return res
  100. })
  101. }
  102. // 统计接口-案件数量统计
  103. getCaseStatistics(params) {
  104. const url = 'api/xcoa-mobile/v1/law-statistics/getCaseAmount'
  105. return axios.post(url, params).then(function (res) {
  106. return res
  107. })
  108. }
  109. // 统计接口-诉讼地位统计
  110. getSsdwStatistics(params) {
  111. const url = 'api/framework/v1/law-case-statistics/getLawCaseResult'
  112. return axios.post(url, params).then(function (res) {
  113. return res
  114. })
  115. }
  116. // 统计接口-案件阶段统计
  117. getCasestageStatistics(params) {
  118. const url = 'api/framework/v1/law-case-statistics/getLawCaseResult'
  119. return axios.post(url, params).then(function (res) {
  120. return res
  121. })
  122. }
  123. getBeanByFormId(id, formId) {
  124. const url = 'api/framework/v1/page/wp/' + formId
  125. return axios.post(url, { id: id }).then(function (res) {
  126. return res
  127. })
  128. }
  129. getBeanByInstId(instId) {
  130. return axios
  131. .get('api/framework/v1/task-form-process/done-pages/' + instId)
  132. .then(function (res) {
  133. return res
  134. })
  135. }
  136. // 获取业务类型id
  137. getTypeBusId(id) {
  138. return axios({
  139. url: 'api/framework/v1/businesstype-manage/auth-businesstypes/moduleid?appModuleId=' + id,
  140. method: 'get',
  141. })
  142. }
  143. // 根据案件上报id 查询所需值
  144. findByCase(caseId) {
  145. return axios
  146. .get(`api/framework/v1/law-case-reporting/findByCase?caseId=${caseId}`)
  147. .then(function (res) {
  148. return res
  149. })
  150. }
  151. // 执行程序唯一校验
  152. getCaseExecuteCode(code, id) {
  153. return axios
  154. .get(`api/framework/v1/lawexecuteproceure/validate/code?code=${code}&id=${id}`)
  155. .then(function (res) {
  156. return res
  157. })
  158. }
  159. // 判断用户是否拥有角色
  160. isUserHasRole(account, roleCode) {
  161. return axios
  162. .get(
  163. `api/xcoa-mobile/v1/iam-common/common/user-hasRole?account=${account}&roleCode=${roleCode}`
  164. )
  165. .then(function (res) {
  166. return res
  167. })
  168. }
  169. // 获取用户
  170. getUser(account) {
  171. return axios
  172. .get(`api/xcoa-mobile/v1/lawLawYerController/getUser?account=${account}`)
  173. .then(function (res) {
  174. return res
  175. })
  176. }
  177. }
  178. export default new LawService()