index.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. import { request } from "umi";
  2. type commonParams = {
  3. currentPage: number;
  4. pageSize: number;
  5. orderByProperty: string;
  6. Ascending: boolean;
  7. totalPage: number;
  8. totalCount: number;
  9. filters: any[];
  10. };
  11. /**
  12. * 查询多语言
  13. * @param data {maxCount: number, searchKey: string, searchLan: "zh-CN" | "en"}
  14. * @returns
  15. */
  16. export const ListLangBySearchKey = (data: {
  17. maxCount: number;
  18. searchKey: string;
  19. searchLan: "zh-CN" | "en";
  20. }) => {
  21. return request("/api/system/ListLangBySearchKey", {
  22. method: "POST",
  23. data,
  24. });
  25. };
  26. /**
  27. * 场景查询
  28. * @param data
  29. * @returns
  30. * {
  31. "currentPage": 1,
  32. "pageSize": 10,
  33. "orderByProperty": "Id",
  34. "Ascending": false,
  35. "totalPage": 1,
  36. "totalCount": 1,
  37. "filters": [
  38. {
  39. "name": "EnterpriseId"
  40. }
  41. ]
  42. }
  43. */
  44. export const GetAllWfScene = (data: commonParams) => {
  45. return request("/api/wfScene/GetAllWfScene", {
  46. method: "POST",
  47. data,
  48. });
  49. };
  50. /**
  51. * 流程查询
  52. * @param data
  53. * @returns
  54. * {
  55. "currentPage": 1,
  56. "pageSize": 10,
  57. "orderByProperty": "Id",
  58. "Ascending": false,
  59. "totalPage": 1,
  60. "totalCount": 1,
  61. "filters": [
  62. {
  63. "name": "EnterpriseId"
  64. }
  65. ]
  66. }
  67. */
  68. export const GetAllWorkflows = (data: commonParams) => {
  69. return request("/api/workflow/GetAllWorkflows", {
  70. method: "POST",
  71. data,
  72. });
  73. };
  74. /**
  75. * 获取全部页面
  76. * @param data
  77. * @returns
  78. */
  79. export const GetAllPage = () => {
  80. return request<{
  81. codeItemCount: number;
  82. description: string;
  83. directory: string;
  84. fileName: string;
  85. id: string;
  86. isFavourite: boolean;
  87. is_page_load_from_localhost: boolean;
  88. langDescription: string;
  89. langName: string;
  90. menuLinkUrl: string;
  91. name: string;
  92. processStatus: string;
  93. randerType: number;
  94. reportType: number;
  95. type: number;
  96. }>("/api/bpm/GetAllPage", {
  97. method: "POST",
  98. });
  99. };
  100. /**
  101. * 获取全部视图和表
  102. * @param data
  103. * @returns
  104. */
  105. export const GetAllTablesAndViews = () => {
  106. return request<{
  107. appBusinessTables: {
  108. aliasName: string;
  109. description: string;
  110. id: string;
  111. isLatest: boolean;
  112. latest: boolean;
  113. name: string;
  114. schemaName: string;
  115. type: number;
  116. }[];
  117. bpmViewTables: {
  118. description: string;
  119. directory: string;
  120. id: string;
  121. name: string;
  122. schemaName: string;
  123. type: number;
  124. }[];
  125. }>("/api/table/GetAllTablesAndViews", {
  126. method: "POST",
  127. });
  128. };