typings.d.ts 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. declare namespace API {
  2. type BasicPageParams = {
  3. /** 页码 */
  4. current: number
  5. /** 页数 */
  6. pageSize: number
  7. }
  8. type BasicFetchResult<T> = {
  9. items: T[]
  10. total: number
  11. }
  12. type ProjectList = BasicFetchResult<ProjectListItem>
  13. type ProjectListItem = {
  14. createdTime: string
  15. name: string
  16. created: Nullable<{
  17. ID: string
  18. name: string
  19. institution: {
  20. ID: string
  21. name: string
  22. }
  23. }>
  24. createdID: string
  25. projectTypeID: string
  26. ID: string
  27. reportAccount: { ID: string; name: string }[]
  28. approval: {
  29. ID?: string
  30. name?: string
  31. }
  32. }
  33. type ProjectDetail = ProjectListItem & {
  34. approval: Nullable<{ ID: string; name: string }>
  35. }
  36. type ProjectListParams = BasicPageParams & {
  37. search?: string
  38. projectTypeID?: string
  39. }
  40. type ProjectDelParams = {
  41. ID: string
  42. }
  43. type ProjectUpdateParams = {
  44. ID: string
  45. name: string
  46. projectTypeID: string
  47. }
  48. type ProjectAddParams = Omit<ProjectUpdateParams, 'ID'>
  49. type ProjectTypeList = ProjectTypeListItem[]
  50. type ProjectTypeListItem = {
  51. name: string
  52. ID: string
  53. updatedTime: string
  54. createdTime: string
  55. }
  56. /** 事业单位列表 */
  57. type InstitutionList = BasicFetchResult<InstitutionListItem>
  58. type InstitutionListItem = {
  59. name: string
  60. /** @name 简称 */
  61. acronym: string
  62. /** @name 企业代码 */
  63. enterpriseCode: string
  64. /** @name 组织结构代码 */
  65. organizationCode: string
  66. /** @name 人员账号数量 */
  67. institutionAccountTotal: number
  68. bank: string
  69. bankAccount: string
  70. phone: string
  71. address: string
  72. fax: string
  73. legalPerson: string
  74. idCard: string
  75. createdTime: string
  76. updatedTime: string
  77. ID: string
  78. /** @name 成员总数 */
  79. memberTotal: number
  80. /** @name 单位管理员 */
  81. manager: {
  82. ID: string
  83. name: string
  84. }
  85. }
  86. type InstitutionListParams = BasicPageParams & {
  87. search?: string
  88. accountType?: string
  89. dataID?: string
  90. isCreated?: string
  91. }
  92. type InstitutionAddParams = Omit<InstitutionListItem, 'createdTime' | 'updatedTime' | 'ID'>
  93. type InstitutionUpdateParams = Omit<InstitutionListItem, 'createdTime' | 'updatedTime'>
  94. /** 账号列表 */
  95. type AccountList = BasicFetchResult<AccountListItem>
  96. type AccountListItem = {
  97. ID: string
  98. createdTime: number
  99. accountType: string
  100. account: string
  101. name: string
  102. phone: string
  103. institution: {
  104. ID: string
  105. name: string
  106. }
  107. key: string
  108. value: string
  109. created?: {
  110. id: string
  111. name: string
  112. }
  113. createdID: string
  114. id: string
  115. dataID: string
  116. gender: string
  117. }
  118. type AccountListParams = BasicPageParams & {
  119. search?: string
  120. /** @name 账号类型(1-企事业账号) ... */
  121. accountType: number
  122. }
  123. type AcountAddParams = {
  124. /** @name 企事业ID */
  125. institutionID: string
  126. /** @name 账号类型(1-企事业账号) ... */
  127. accountType: string
  128. account: string
  129. password: string
  130. name: string
  131. phone?: string
  132. gender: number
  133. }
  134. type AcountUpdateParams = Omit<AcountAddParams, 'account' | 'accountType' | 'password'> & {
  135. ID: string
  136. }
  137. type AcountInstitutionListParams = BasicPageParams & {
  138. search?: string
  139. /** @name 账号类型(1-企事业账号) ... */
  140. accountType: number
  141. /** @name 对应类型ID*/
  142. dataID?: string
  143. }
  144. type AccountType = {
  145. value: number
  146. name: string
  147. }
  148. type OrganizationalStructureListParams = {
  149. structureType: string
  150. dataID: string
  151. }
  152. type OrganizationalListParams = {
  153. institutionID: string
  154. }
  155. type OrganizationalStructureListItem = {
  156. structureType: number
  157. dataID: string
  158. name: string
  159. parentID: string
  160. ID: string
  161. accountTotal: number
  162. sort: number
  163. id: string
  164. children: OrganizationalStructureListItem[]
  165. isLeaf: boolean
  166. }
  167. type OrganizationalStructureAddParams = {
  168. structureType: string
  169. dataID: string
  170. name: string
  171. parentID: string
  172. }
  173. type OrganizationalStructureUpdateParams = {
  174. ID: string
  175. name: string
  176. }
  177. type OrganizationalStructureMoveSortParams = {
  178. ID: string
  179. operation: string
  180. }
  181. type OrganizationalStructureMoveParams = {
  182. ID: string
  183. moveID: string
  184. }
  185. type OrganizationalStructureDelParams = {
  186. ID: string
  187. }
  188. type Schema = {
  189. ID: string
  190. columnType: number
  191. schema: string
  192. }
  193. type SchemaParams = {
  194. columnType: number
  195. }
  196. type ApprovalItem = {
  197. ID: string
  198. name: string
  199. flowProcess: any
  200. flowProcessData: any
  201. }
  202. type ApprovalList = ApprovalItem[]
  203. type ApprovalListParams = BasicPageParams & {
  204. search?: string
  205. }
  206. type ApprovalSetParams = {
  207. ID: string
  208. accountID: string
  209. approvalID: string
  210. }
  211. type LoginParams = {
  212. account: string
  213. password: string
  214. autoLogin: boolean
  215. type: string
  216. }
  217. type LoginResult = {
  218. code: number
  219. msg: number
  220. }
  221. type AurrentAccount = {
  222. ID: string
  223. createdTime: number
  224. accountType: string
  225. account: string
  226. name: string
  227. phone: string
  228. institution: {
  229. ID: string
  230. name: string
  231. }
  232. created: string
  233. createdID: string
  234. id: string
  235. dataID: string
  236. gender: string
  237. }
  238. type UpdateSettingParams = {
  239. password: string
  240. newPassword: string
  241. confirmPassword: string
  242. }
  243. type SettingInfo = {
  244. name: string
  245. logo: string
  246. backstageName: string
  247. backstageLogo: string
  248. }
  249. type MenuRoleItem = {
  250. id: string
  251. name: string
  252. }
  253. type RoleListParams = {
  254. normal?: boolean
  255. }
  256. type CreateRoleParams = {
  257. name: string
  258. }
  259. type UpdateRoleParams = {
  260. ID: string
  261. name: string
  262. }
  263. type DelRoleParams = {
  264. ID: string
  265. }
  266. type RoleStaffItem = {
  267. account: string
  268. name: string
  269. institution: {
  270. ID: string
  271. name: string
  272. }
  273. }
  274. type LinkAccountParams = {
  275. ID: string
  276. accountID: string
  277. }
  278. type RolePermissionParams = {
  279. ID: string
  280. frontPermission: string
  281. }
  282. type DataSourceMenuItem = {
  283. ID?: string
  284. name?: string
  285. url?: string
  286. items?: DataSourceItem[]
  287. }
  288. type DataSourceItem = {
  289. ID?: string
  290. name?: string
  291. enable?: string
  292. index?: number
  293. }
  294. type TemplateListItem = {
  295. action?: string
  296. name?: string
  297. schema?: string
  298. }
  299. type SaveApprovalParams = {
  300. name?: string
  301. accountIDs?: AccountListItem[]
  302. }
  303. type ApprovalAccountDetail = {
  304. name: string
  305. institutionID: string
  306. accountIDs: []
  307. }
  308. type ProfileTemplateItem = {
  309. ID?: string
  310. parentID?: string
  311. name?: string
  312. enable?: boolean
  313. required?: boolean
  314. mode?: 'paper' | 'upload'
  315. sort?: number
  316. folder?: boolean
  317. moveable?: boolean
  318. position?: 'top' | 'bottom'
  319. children?: ProfileTemplateItem[]
  320. }
  321. type InstitutionRoleItem = {
  322. ID: string
  323. acronym: string
  324. approvalMember: any[]
  325. created: string
  326. createdID: string
  327. createdTime: number
  328. id: string
  329. institutionAcountTotal: number
  330. memberTotal: number
  331. name: string
  332. }
  333. type AddInstitutionRoleParams = {
  334. institutionID: string
  335. accountID: string
  336. }
  337. type UpdateInstitutionRoleParams = {
  338. ID: string
  339. institutionID: string
  340. accountID: string
  341. }
  342. type RuleCodeUpdateParams = {
  343. tab: string
  344. rules: any[]
  345. }
  346. type SubjectParams = {
  347. ID: string
  348. name: string
  349. institutionIDs: any[]
  350. }
  351. type RuleCodeParams = {
  352. tab: string
  353. subjectID: string
  354. }
  355. type ExecutorItem = {
  356. ID?: string
  357. name?: string
  358. /** 设置方式: yz-预置成员,bz-步骤设置 */
  359. setType?: 'yz' | 'bz'
  360. /** 审批模式: user-指定用户, xx-会签, yy-或签 */
  361. approvalType?: 'user'
  362. step?: string
  363. members?: {
  364. type: string
  365. value: string | string[]
  366. }
  367. businessType?: string
  368. }
  369. type AccountBgParams = {
  370. name: string
  371. account: string
  372. password: string
  373. roleIDs: string
  374. enable: boolean
  375. }
  376. type Executor = {
  377. ID?: string
  378. name?: string
  379. configure?: string[]
  380. /** 表示该执行者由动态配置出来的 */
  381. dynamicID?: string
  382. dynamicSteps?: { executorID: string; stepID: string }[]
  383. }
  384. type ParticipantInfo = {
  385. approvalWay?: string
  386. executor?: Executor
  387. dynamicID?: string
  388. dynamicSteps?: { stepID: string; executorID: string }[]
  389. stepMatters?: {
  390. matterID: string
  391. formPermission: string[]
  392. costPermission: string[]
  393. profilePermission: string[]
  394. }[]
  395. }
  396. type ConditionInfo = {
  397. ID?: string
  398. /** 条件内容 */
  399. specificCondition?: { condition?: [string, string, string]; value?: string }[]
  400. process?: ApprovalProcess[]
  401. }
  402. /** 业务审批 */
  403. type ApprovalProcess = {
  404. ID?: string
  405. name?: string
  406. sectorType?: 'approval' | 'condition'
  407. participantInfo?: ParticipantInfo
  408. conditionInfo?: ConditionInfo[]
  409. }
  410. type LoginLogParams = {
  411. ID: string
  412. ip: string
  413. ipInfo: string
  414. browser: string
  415. os: string
  416. userID: string
  417. platform: string
  418. createTime: number
  419. id: string
  420. }
  421. type MatterTreeItem = {
  422. ID?: string
  423. subjectID?: string
  424. matterType?: 'category' | 'matter'
  425. businessType?: string
  426. parentID?: string
  427. name?: string
  428. sort?: number
  429. assembly?: any[]
  430. id?: string
  431. children?: MatterTreeItem[]
  432. }
  433. type MatterItem = Omit<MatterTreeItem, 'children'>
  434. type AddMatterParams = Pick<MatterTreeItem, 'subjectID' | 'businessType' | 'matterType' | 'name'>
  435. type UpdateMatterParams = Pick<MatterTreeItem, 'ID' | 'parentID' | 'name'>
  436. type DelMatterParams = Pick<MatterTreeItem, 'ID'>
  437. }