index.ts 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. import microRequest from '../../utils/micro_request';
  2. const sciPath = import.meta.env.VITE_SCIENTIFIC;
  3. export function useDocumentApi() {
  4. return {
  5. // 纵向项目 (sci_project_vertical, pre_sci_project_vertical, sci_project_spontaneity_declaration_project)
  6. getVerticalByCode: (code: string) => {
  7. return microRequest.postRequest(sciPath, 'SciProjectVertical', 'GetSciProjectVerticalByCode', { projectCode: code });
  8. },
  9. // 横向项目 (sci_project_horizontal)
  10. getHorizontalByCode: (code: string) => {
  11. return microRequest.postRequest(sciPath, 'SciProjectHorizontal', 'GetEntityByCode', { projectCode: code });
  12. },
  13. // 校内项目 (sci_project_spontaneity)
  14. getSpontaneityByCode: (code: string) => {
  15. return microRequest.postRequest(sciPath, 'SciProjectSpontaneity', 'GetSciProjectSpontaneityByCode', { projectCode: code });
  16. },
  17. // 本科室子学科 (sci_project_discipline)
  18. getDisciplineByCode: (code: string) => {
  19. return microRequest.postRequest(sciPath, 'SciProjectDiscipline', 'GetDetail', { id: Number(code) });
  20. },
  21. // 获取学科评分模板列表
  22. getDisciplineTmplList: () => {
  23. return microRequest.postRequest(sciPath, 'SciProjectGradeTemplate', 'GetList', {});
  24. },
  25. // 学术成果(论文、奖项、专利、著作等共用 SciAchieve 控制器)
  26. getPaperByCode: (code: string) => {
  27. return microRequest.postRequest(sciPath, 'SciAchieve', 'GetPaperEntityByCode', { PaperCode: code });
  28. },
  29. getAwardsByCode: (code: string) => {
  30. return microRequest.postRequest(sciPath, 'SciAchieve', 'GetAwardsEntityByCode', { awardCode: code });
  31. },
  32. getPatentByCode: (code: string) => {
  33. return microRequest.postRequest(sciPath, 'SciAchieve', 'GetPatentEntityByCode', { patentCode: code });
  34. },
  35. getWorkByCode: (code: string) => {
  36. return microRequest.postRequest(sciPath, 'SciAchieve', 'GetWorkEntityByCode', { workCode: code });
  37. },
  38. // 学术委员会 (sci_academic_committee)
  39. getCommitteeByCode: (code: string) => {
  40. return microRequest.postRequest(sciPath, 'SciCommittee', 'GetChangeEntity', { id: Number(code) });
  41. },
  42. // 获取学术委员会原始详情
  43. getCommitteeById: (id: number, changeType?: string) => {
  44. return microRequest.postRequest(sciPath, 'SciCommittee', 'GetEntityById', { id, userType: changeType });
  45. },
  46. // 获取委员会列表
  47. getCommitteeList: () => {
  48. return microRequest.postRequest(sciPath, 'SciCommittee', 'GetList', {});
  49. },
  50. // 学术会议 (sci_academic_conferences)
  51. getConferenceById: (id: string | number) => {
  52. return microRequest.postRequest(sciPath, 'SciConference', 'GetEntityById', { id: Number(id) });
  53. },
  54. // 学术讲座 (sci_academic_lectures)
  55. getLectureById: (id: string | number) => {
  56. return microRequest.postRequest(sciPath, 'SciLecture', 'GetEntityById', { id: Number(id) });
  57. },
  58. // 社会任职 (sci_academic_committee_positions)
  59. getDutiesById: (id: string | number) => {
  60. return microRequest.postRequest(sciPath, 'SciDuties', 'GetEntityById', { id: Number(id) });
  61. },
  62. // 人员派驻 (sci_scientific_researchers_dispatch)
  63. getDispatchById: (id: string | number) => {
  64. return microRequest.postRequest(sciPath, 'SciDispatch', 'GetEntityById', { id: Number(id) });
  65. },
  66. // 经费认领 (sci_fund_allot_apply)
  67. getFundClaimById: (id: string | number) => {
  68. return microRequest.postRequest(sciPath, 'SciFundAllotApply', 'GetEntityById', { id: Number(id) });
  69. },
  70. // 获取财务到账详情
  71. getFundById: (id: string | number) => {
  72. return microRequest.postRequest(sciPath, 'SciFund', 'GetEntityById', { id: Number(id) });
  73. },
  74. // 经费报销 (sci_fund_expense)
  75. getFundExpenseById: (id: string | number) => {
  76. return microRequest.postRequest(sciPath, 'SciFundExpense', 'GetEntityById', { id: Number(id) });
  77. },
  78. // 获取经费卡科目余额
  79. getSubjAmount: (params: any) => {
  80. return microRequest.postRequest(sciPath, 'SciFundCard', 'GetSubjAmount', params);
  81. },
  82. // 获取经费卡详情
  83. getFundCardById: (id: string | number) => {
  84. return microRequest.postRequest(sciPath, 'SciFundCard', 'GetDetails', { id: Number(id) });
  85. },
  86. // 获取所有一级科目
  87. getAllFirstSubj: () => {
  88. return microRequest.postRequest(sciPath, 'SciSubj', 'GetAllFirstSubj', {});
  89. },
  90. // 经费奖励 (sci_fund_reward)
  91. getFundRewardById: (id: string | number) => {
  92. return microRequest.postRequest(sciPath, 'SciFundReward', 'GetEntityById', { id: Number(id) });
  93. },
  94. // 经费结转 (sci_fund_carryover)
  95. getFundCarryoverById: (id: string | number) => {
  96. return microRequest.postRequest(sciPath, 'SciFundCarryover', 'GetEntityById', { id: Number(id) });
  97. },
  98. // 考核批次 (sci_assessment_batch)
  99. getAssessmentBatchById: (id: string | number) => {
  100. return microRequest.postRequest(sciPath, 'SciBatch', 'GetEntityById', { id: Number(id) });
  101. },
  102. // 获取考核方案列表
  103. getAssessmentSchemeList: () => {
  104. return microRequest.postRequest(sciPath, 'SciAssessmentScheme', 'GetAllList', { schemeStatus: '10' });
  105. },
  106. // 项目中期/结项 (sci_project_audit)
  107. getProjectAuditById: (id: string | number) => {
  108. return microRequest.postRequest(sciPath, 'SciProjectAudit', 'GetEntityById', { id: Number(id) });
  109. },
  110. // 项目中检 (sci_project_inspection)
  111. getInspectionByCode: (code: string) => {
  112. return microRequest.postRequest(sciPath, 'SciProjectInspection', 'GetTaskDetail', { id: Number(code) });
  113. },
  114. // 项目结题 (sci_project_conclusion)
  115. getConclusionByCode: (code: string) => {
  116. return microRequest.postRequest(sciPath, 'SciProjectConclusion', 'GetTaskDetail', { id: Number(code) });
  117. },
  118. // 项目变更 (sci_project_change)
  119. getProjectChangeByCode: (code: string) => {
  120. return microRequest.postRequest(sciPath, 'SciProjectChange', 'GetDetail', { id: Number(code) });
  121. },
  122. // 学科中期 (sci_project_discipline_midterm)
  123. getDisciplineMidtermByCode: (code: string) => {
  124. return microRequest.postRequest(sciPath, 'SciDisciplineMidterm', 'GetEntityById', { id: Number(code) });
  125. },
  126. // 学科结题 (sci_project_discipline_final)
  127. getDisciplineFinalByCode: (code: string) => {
  128. return microRequest.postRequest(sciPath, 'SciDisciplineFinal', 'GetEntityById', { id: Number(code) });
  129. },
  130. // 论文投稿 (sci_paper_submission)
  131. getPaperSubmissionByCode: (code: string) => {
  132. return microRequest.postRequest(sciPath, 'SciAchieve', 'GetPaperSubmissionEntity', { id: Number(code) });
  133. },
  134. // 集成电路 (sci_property_circuit)
  135. getCircuitByCode: (code: string) => {
  136. return microRequest.postRequest(sciPath, 'SciProperty', 'GetCircuitEntity', { id: Number(code) });
  137. },
  138. // 著作权 (sci_property_copyright)
  139. getCopyrightByCode: (code: string) => {
  140. return microRequest.postRequest(sciPath, 'SciProperty', 'GetCopyrightEntity', { id: Number(code) });
  141. },
  142. // 医药凭证 (sci_property_medicine_credential)
  143. getCredentialByCode: (code: string) => {
  144. return microRequest.postRequest(sciPath, 'SciProperty', 'GetCredentialEntity', { id: Number(code) });
  145. },
  146. // 新品种 (sci_property_new_variety)
  147. getVarietyByCode: (code: string) => {
  148. return microRequest.postRequest(sciPath, 'SciProperty', 'GetVarietyEntity', { id: Number(code) });
  149. },
  150. // 标准 (sci_property_standard)
  151. getStandardByCode: (code: string) => {
  152. return microRequest.postRequest(sciPath, 'SciProperty', 'GetStandardEntity', { id: Number(code) });
  153. },
  154. // 伦理审查 (sci_ethical_review_form)
  155. getReviewByCode: (code: string) => {
  156. return microRequest.postRequest(sciPath, 'SciEthicalReview', 'GetEntityById', { id: Number(code) });
  157. },
  158. // 自发项目申报 (sci_project_spontaneity_declaration_project)
  159. getSpontaneityPlanByCode: (code: string) => {
  160. return microRequest.postRequest(sciPath, 'SciProjectSpontaneityDeclarationProject', 'GetSciProjectSpontaneityDeclarationProjectByCode', { projectCode: code });
  161. },
  162. // 经费冲正 (sci_fund_reverse)
  163. getFundReverseByCode: (code: string) => {
  164. return microRequest.postRequest(sciPath, 'SciFundReverse', 'GetEntityById', { id: Number(code) });
  165. },
  166. // 临时借款 (sci_temporary_fund_borrowing)
  167. getTemporaryFundByCode: (code: string) => {
  168. return microRequest.postRequest(sciPath, 'SciTemporaryFundBorrowing', 'GetDetail', { id: Number(code) });
  169. },
  170. // 获取成果标准详情 (通过ID)
  171. getAchievementStandardById: (id: string | number) => {
  172. return microRequest.postRequest(sciPath, 'SciAchievementStandard', 'GetEntityById', { id: Number(id) });
  173. },
  174. // 获取论文认领详情 (通过ID)
  175. getPaperPushById: (id: string | number) => {
  176. return microRequest.postRequest(sciPath, 'SciAchievementPaperPush', 'GetSciAchievementPaperPushEntity', { id: Number(id) });
  177. },
  178. // 获取其他成果详情 (通过ID)
  179. getOtherAchievementById: (id: string | number) => {
  180. return microRequest.postRequest(sciPath, 'SciAchievementOther', 'GetOtherEntity', { id: Number(id) });
  181. },
  182. // 获取软件著作权详情 (通过ID)
  183. getSoftwareAchievementById: (id: string | number) => {
  184. return microRequest.postRequest(sciPath, 'SciAchievementSoftware', 'GetSoftwareEntity', { id: Number(id) });
  185. }
  186. };
  187. }