systemDesigner.ts 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. import { request } from "umi";
  2. import { commonParams } from "./index";
  3. /**
  4. * 系统设计图列表
  5. * @param
  6. */
  7. export const FlowchartMindMapList = (data: commonParams) => {
  8. return request("/api/flowchartMindMap/list", {
  9. method: "POST",
  10. data,
  11. });
  12. };
  13. /**
  14. * 系统设计图详情
  15. * @param
  16. */
  17. export const FlowchartMindMapInfo = (data: { id: string }) => {
  18. return request("/api/flowchartMindMap/info", {
  19. method: "POST",
  20. data,
  21. });
  22. };
  23. /**
  24. * 添加系统设计图
  25. * @param 1思维导图 其他自定义
  26. */
  27. export const AddGraph = (data: { type: string, folderId: string }) => {
  28. return request("/api/flowchartMindMap/addGraph", {
  29. method: "POST",
  30. data,
  31. });
  32. };
  33. /**
  34. * 修改系统设计图信息
  35. * @param
  36. */
  37. export const EditGraph = (data) => {
  38. return request("/api/flowchartMindMap/editGraph", {
  39. method: "POST",
  40. data,
  41. });
  42. };
  43. /**
  44. * 删除系统设计图信息
  45. * @param
  46. */
  47. export const DeleteGraph = (data: { id: string }) => {
  48. return request("/api/flowchartMindMap/deleteGraph", {
  49. method: "POST",
  50. data,
  51. });
  52. };
  53. /**
  54. * 添加流程图元素
  55. * @param
  56. */
  57. export const AddFlowchartElement = (data) => {
  58. return request("/api/flowchartMindMap/addFlowchartElement", {
  59. method: "POST",
  60. data,
  61. });
  62. };
  63. /**
  64. * 编辑流程图元素
  65. * @param
  66. */
  67. export const EditFlowchartElement = (data) => {
  68. return request("/api/flowchartMindMap/editFlowchartElement", {
  69. method: "POST",
  70. data,
  71. });
  72. };
  73. /**
  74. * 删除流程图元素
  75. * @param
  76. */
  77. export const DeleteFlowchartElement = (data: { id: string }) => {
  78. return request("/api/flowchartMindMap/deleteFlowchartElement", {
  79. method: "POST",
  80. data,
  81. });
  82. };
  83. /**
  84. * 批量新增思维导图元素
  85. * @param
  86. */
  87. export const BatchAddFlowchartElement = (data: any[]) => {
  88. return request("/api/flowchartMindMap/batchAddFlowchartElement", {
  89. method: "POST",
  90. data,
  91. });
  92. };
  93. /**
  94. * 批量删除流程图元素
  95. * @param
  96. */
  97. export const BatchDeleteFlowchartElement = (data: { ids: string[] }) => {
  98. return request("/api/flowchartMindMap/batchDeleteFlowchartElement", {
  99. method: "POST",
  100. data,
  101. });
  102. };
  103. /**
  104. * 批量编辑思维导图元素
  105. * @param
  106. */
  107. export const BatchEditFlowchartElement = (data: any[]) => {
  108. return request("/api/flowchartMindMap/batchEditFlowchartElement", {
  109. method: "POST",
  110. data,
  111. });
  112. };
  113. /**
  114. * 添加思维导图元素
  115. * @param
  116. */
  117. export const AddMindMapElement = (data) => {
  118. return request("/api/flowchartMindMap/addMindMapElement", {
  119. method: "POST",
  120. data,
  121. });
  122. };
  123. /**
  124. * 编辑思维导图元素
  125. * @param
  126. */
  127. export const EditMindMapElement = (data) => {
  128. return request("/api/flowchartMindMap/editMindMapElement", {
  129. method: "POST",
  130. data,
  131. });
  132. };
  133. /**
  134. * 删除思维导图元素
  135. * @param
  136. */
  137. export const DeleteMindMapElement = (data: { id: string }) => {
  138. return request("/api/flowchartMindMap/deleteMindMapElement", {
  139. method: "POST",
  140. data,
  141. });
  142. };
  143. /**
  144. * 批量新增思维导图元素
  145. * @param
  146. */
  147. export const BatchAddMindMapElement = (data: any[]) => {
  148. return request("/api/flowchartMindMap/batchAddMindMapElement", {
  149. method: "POST",
  150. data,
  151. });
  152. };
  153. /**
  154. * 批量删除思维导图元素
  155. * @param
  156. */
  157. export const BatchDeleteMindMapElement = (data: { ids: string[] }) => {
  158. return request("/api/flowchartMindMap/batchDeleteMindMapElement", {
  159. method: "POST",
  160. data,
  161. });
  162. };
  163. /**
  164. * 批量编辑思维导图元素
  165. * @param
  166. */
  167. export const BatchEditMindMapElement = (data: any[]) => {
  168. return request("/api/flowchartMindMap/batchEditMindMapElement", {
  169. method: "POST",
  170. data,
  171. });
  172. };
  173. /**
  174. * 新增文件夹
  175. * @param
  176. */
  177. export const AddFolder = (data: { name: string, parentId: string }) => {
  178. return request("/api/flowchartMindMap/addFolder", {
  179. method: "POST",
  180. data,
  181. });
  182. };
  183. /**
  184. * 编辑文件夹
  185. * @param
  186. */
  187. export const EditFolder = (data: { id: string, name: string }) => {
  188. return request("/api/flowchartMindMap/editFolder", {
  189. method: "POST",
  190. data,
  191. });
  192. };
  193. /**
  194. * 删除文件夹
  195. * @param
  196. */
  197. export const DeleteFolder = (data: { id: string }) => {
  198. return request("/api/flowchartMindMap/deleteFolder", {
  199. method: "POST",
  200. data,
  201. });
  202. };
  203. /**
  204. * 移动文件/文件夹
  205. * @param
  206. */
  207. export const Move = (data: { fileType: "folder" | "chart", fileId: string, targetFolderId: string }) => {
  208. return request("/api/flowchartMindMap/move", {
  209. method: "POST",
  210. data,
  211. });
  212. };
  213. /**
  214. * 移动文件/文件夹
  215. * @param
  216. */
  217. export const Copy = (data: { fileType: "folder" | "chart", fileId: string, targetFolderId: string }) => {
  218. return request("/api/flowchartMindMap/copy", {
  219. method: "POST",
  220. data,
  221. });
  222. };
  223. /**
  224. * 全部文件夹
  225. * @param
  226. */
  227. export const GetAllFolders = () => {
  228. return request("/api/flowchartMindMap/getAllFolders", {
  229. method: "POST",
  230. });
  231. };
  232. /**
  233. * 保存全部
  234. * @param
  235. */
  236. export const SaveAll = (data: any) => {
  237. return request("/api/flowchartMindMap/saveAll", {
  238. method: "POST",
  239. data
  240. });
  241. };
  242. /**
  243. * 最近文件
  244. * @param
  245. */
  246. export const RecentFile = () => {
  247. return request("/api/flowchartMindMap/recentFile", {
  248. method: "POST",
  249. });
  250. };
  251. /**
  252. * 历史记录列表
  253. * @param
  254. */
  255. export const HistoryList = (data: {id: string}) => {
  256. return request("/api/flowchartMindMap/history/list", {
  257. method: "POST",
  258. data
  259. });
  260. };
  261. /**
  262. * 删除历史记录
  263. * @param
  264. */
  265. export const DeleteHistory = (data: {id: string}) => {
  266. return request("/api/flowchartMindMap/history/delete", {
  267. method: "POST",
  268. data
  269. });
  270. };
  271. /**
  272. * 恢复历史记录
  273. * @param
  274. */
  275. export const RevertHistory = (data: {id: string}) => {
  276. return request("/api/flowchartMindMap/history/revert", {
  277. method: "POST",
  278. data
  279. });
  280. };