archive-api.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import requestV2 from "@/utils/request-v2";
  2. export enum Type {
  3. EMR = 1,
  4. }
  5. export interface PatientArchive {
  6. id: string;
  7. patNo: string;
  8. times: number;
  9. documentId: string;
  10. createId: string;
  11. name: string;
  12. isDir: boolean;
  13. parentId: string;
  14. path: string;
  15. type: number;
  16. sort: number;
  17. info: string;
  18. children?: PatientArchive[];
  19. }
  20. export function getPatientArchives(patNo: string, times = 0) {
  21. return requestV2<PatientArchive[]>({
  22. url: "/thyy/archive/getPatientArchives",
  23. method: "GET",
  24. params: { patNo, times },
  25. });
  26. }
  27. export function submitTask(data: { patNo: string; times: number }[]) {
  28. return requestV2({
  29. url: "/thyy/archive/submitTask",
  30. method: "POST",
  31. data,
  32. });
  33. }
  34. export function currentOrganize(patNo: string, times: number) {
  35. return requestV2<string>({
  36. url: "/thyy/archive/currentOrganize",
  37. method: "get",
  38. params: { patNo, times },
  39. });
  40. }
  41. export function organizeFiles(patNo: string, times: number) {
  42. return requestV2({
  43. url: "/thyy/archive/organizeFiles",
  44. method: "get",
  45. params: { patNo, times },
  46. });
  47. }
  48. export function exitOrganizeFiles(patNo: string, times: number) {
  49. return requestV2({
  50. url: "/thyy/archive/exitOrganizeFiles",
  51. method: "get",
  52. params: { patNo, times },
  53. });
  54. }
  55. export function sort(data) {
  56. return requestV2({
  57. url: "/thyy/archive/sort",
  58. method: "post",
  59. data,
  60. });
  61. }
  62. export function delFile(data: PatientArchive) {
  63. return requestV2({
  64. url: "/thyy/archive/delFile",
  65. method: "post",
  66. data,
  67. });
  68. }
  69. export function addDir(data) {
  70. return requestV2({
  71. url: "/thyy/archive/addDir",
  72. method: "post",
  73. data,
  74. });
  75. }
  76. export function rename(id, name) {
  77. return requestV2({
  78. url: "/thyy/archive/rename",
  79. method: "get",
  80. params: { id, name },
  81. });
  82. }
  83. export function getAllLog(patNo: string, times: number) {
  84. return requestV2({
  85. url: "/thyy/archive/getAllLog",
  86. method: "get",
  87. params: { patNo, times },
  88. });
  89. }