typings.d.ts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. // @ts-ignore
  2. /* eslint-disable */
  3. declare namespace API {
  4. type CurrentUser = {
  5. staff: {
  6. staffId: string
  7. categoryId: string
  8. departmentId: string
  9. departmentName: string
  10. username: string
  11. category: string
  12. avatar: string
  13. qq: string
  14. qualifications: string
  15. isAdmin: number
  16. roles: string[]
  17. }
  18. menus: MenuListItem[]
  19. }
  20. type LoginResult = {
  21. code: number
  22. msg: number
  23. data?: {
  24. token: string
  25. }
  26. }
  27. type PageParams = {
  28. current?: number
  29. pageSize?: number
  30. }
  31. type BasicFetchResult<T extends any> = {
  32. list: T[]
  33. total: number
  34. }
  35. type MenuListItem = {
  36. id: string
  37. parend_id: string
  38. name: string
  39. sort: number
  40. }
  41. type Roles = string[]
  42. type MenuRoleItem = {
  43. backstageMenuId: string
  44. id: string
  45. name: string
  46. }
  47. type CreateRoleParams = {
  48. name: string
  49. backstageMenuId: string
  50. }
  51. type LoginParams = {
  52. username?: string
  53. password?: string
  54. autoLogin?: boolean
  55. type?: string
  56. }
  57. type ErrorResponse = {
  58. /** 业务约定的错误码 */
  59. errorCode: string
  60. /** 业务上的错误信息 */
  61. errorMessage?: string
  62. /** 业务上的请求是否成功 */
  63. success?: boolean
  64. }
  65. type NoticeIconList = {
  66. data?: NoticeIconItem[]
  67. /** 列表的内容总数 */
  68. total?: number
  69. success?: boolean
  70. }
  71. type NoticeIconItemType = 'notification' | 'message' | 'event'
  72. type NoticeIconItem = {
  73. id?: string
  74. extra?: string
  75. key?: string
  76. read?: boolean
  77. avatar?: string
  78. title?: string
  79. status?: string
  80. datetime?: string
  81. description?: string
  82. type?: NoticeIconItemType
  83. }
  84. type RoleStaffListItem = {
  85. staffId: string
  86. categoryId: string
  87. departmentId: string
  88. positionId: string
  89. username: string
  90. category: string
  91. jobNumber: string
  92. qq: string
  93. phone: string
  94. departmentName: string
  95. position: string
  96. hiredate: string
  97. }
  98. type GetStaffListParams = {
  99. search?: string
  100. departmentId?: string
  101. } & PageParams
  102. type StaffItem = {
  103. id: string
  104. categoryId: string
  105. departmentId: string
  106. positionId: string
  107. username: string
  108. category: string
  109. avatar: string
  110. qq: string
  111. qualifications: string
  112. departmentName: string
  113. gender: string
  114. phone: string
  115. avtelephoneatar: string
  116. email: string
  117. birthday: string
  118. position: string
  119. jobNumber: string
  120. hiredate: string
  121. remittanceName: string
  122. bankName: string
  123. bankNumber: string
  124. coupletNumber: string
  125. salaryCard: string
  126. salaryBank: string
  127. baseWage: string
  128. postWage: string
  129. achievementBonus: string
  130. marriage: string
  131. nativePlace: string
  132. emergencyContacts: string
  133. living: string
  134. IDcards: string
  135. IDcardsImgA: string
  136. IDcardsImgB: string
  137. certificate: string
  138. diploma: string
  139. professionalTitle: string
  140. nation: string
  141. graduateInstitutions: string
  142. major: string
  143. education: string
  144. graduationTime: string
  145. registeredResidence: string
  146. householdRegistrationType: string
  147. IDcardsValidity: string
  148. }
  149. type AddRoleStaffParams = {
  150. id: string
  151. staffId: string
  152. }
  153. type UpdateRolePermissionParams = {
  154. id: string
  155. permission: string
  156. }
  157. type GetRolePermissionResultModel = {
  158. id: string
  159. backstageMenuId: string
  160. name: string
  161. permission: string | null
  162. dataPermission: string | null
  163. }
  164. type AttendanceItem = {
  165. id: string
  166. applicantStaffId: string
  167. applicantStaffName: string
  168. staff: { id: string; staff: string }[]
  169. }
  170. type DeleteAttendance = {
  171. id: string
  172. staffId: string
  173. }
  174. type LinkAttendance = {
  175. id: string
  176. staffId: string
  177. }
  178. type Addattendance = {
  179. applicantStaffId: string
  180. }
  181. }