type.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. const { mock } = require('mockjs')
  2. const { icons } = require('../utils')
  3. module.exports = [
  4. {
  5. url: '/sys/sysType/v1/getTypesByKey',
  6. type: 'get',
  7. response() {
  8. return {
  9. success: true,
  10. code: 200,
  11. message: '成功',
  12. data: {
  13. rows: [
  14. {
  15. id: '6',
  16. name: '流程分类',
  17. typeKey: 'FLOW_TYPE',
  18. parentId: '0',
  19. isLeaf: 'N',
  20. open: 'true',
  21. isParent: 'true',
  22. pkVal: '6',
  23. children: mock({
  24. 'data|20': [
  25. {
  26. createTime: '2021-02-01 17:53:08',
  27. id: '@id',
  28. typeGroupKey: 'FLOW_TYPE',
  29. name: '@cword(3,8)',
  30. typeKey: '111',
  31. struType: 1,
  32. parentId: '1301112336211382272',
  33. depth: 1,
  34. path: '6.1301112336211382272.1356178762215067648.',
  35. isLeaf: 'Y',
  36. ownerId: '0',
  37. sn: 0,
  38. isParent: 'false',
  39. pkVal: '1356178762215067648',
  40. },
  41. ],
  42. }).data,
  43. },
  44. ],
  45. },
  46. }
  47. },
  48. },
  49. ]