law-case-tree-service.js 694 B

12345678910111213141516171819202122232425
  1. import axios from '@/common/services/axios-instance'
  2. class AuditTreeService {
  3. // 获取根节点
  4. getSelectCaseNode(deptId) {
  5. return axios({
  6. url: `api/framework/v1/law-case-action/findLawCaseActionTree?parentCode=${deptId}`,
  7. method: 'post',
  8. }).then((res) => {
  9. res.data.forEach((item) => (item.isLeaf = item.leaf))
  10. return res
  11. })
  12. }
  13. // 获取根节点
  14. searchCaseNode(key) {
  15. return axios({
  16. url: `api/framework/v1/law-case-action/findActionTreeByKeyWord?keyWord=${key}`,
  17. method: 'get',
  18. }).then((res) => {
  19. res.data.forEach((item) => (item.isLeaf = item.leaf))
  20. return res
  21. })
  22. }
  23. }
  24. export default new AuditTreeService()