index.ts 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. /**
  2. * 静态数据与全局常量配置
  3. */
  4. // 缓存相关的 Key
  5. export const CACHE_KEY = {
  6. TOKEN: 'ACCESS_TOKEN', //token
  7. USER_INFO: 'USER_INFO', //用户信息
  8. REMEMBER_USER: 'REMEMBER_USER', // 记住用户名
  9. PERMS: 'PERMS', // 权限
  10. ROLES: 'ROLES' // 角色
  11. };
  12. // 分页默认参数
  13. export const PAGE_CONFIG = {
  14. DEFAULT_PAGE_NUM: 1,
  15. DEFAULT_PAGE_SIZE: 10
  16. };
  17. // 项目状态选项
  18. export const projectStatusOptions = [
  19. { dictLabel: '全部状态', dictValue: '' },
  20. { dictLabel: '待立项', dictValue: '05' },
  21. { dictLabel: '立项', dictValue: '10' },
  22. { dictLabel: '在研', dictValue: '20' },
  23. { dictLabel: '结题验收', dictValue: '30' },
  24. { dictLabel: '中止', dictValue: '40' }
  25. ];
  26. // 变更类型选项
  27. export const changeTypeOptions = [
  28. { dictLabel: '成员变更', dictValue: '10' },
  29. { dictLabel: '预算变更', dictValue: '20' },
  30. { dictLabel: '延期变更', dictValue: '30' },
  31. { dictLabel: '经费变更', dictValue: '40' },
  32. { dictLabel: '中止变更', dictValue: '50' },
  33. { dictLabel: '经费调剂', dictValue: '60' },
  34. ];
  35. // 审批状态选项
  36. export const approvalStatusOptions = [
  37. { dictLabel: '待提交', dictValue: '10' },
  38. { dictLabel: '审批中', dictValue: '20' },
  39. { dictLabel: '审批通过', dictValue: '30' },
  40. { dictLabel: '审批退回', dictValue: '40' }
  41. ];
  42. // 临床研究选项 (针对横向项目)
  43. export const isClinicalTrialOptions = [
  44. { dictLabel: '临床试验', dictValue: '10' },
  45. { dictLabel: '横向其他', dictValue: '20' }
  46. ];
  47. // 审批流节点结果选项
  48. export const flowApprovalResultOptions = [
  49. { dictLabel: '通过', dictValue: 'pass', type: 'success' },
  50. { dictLabel: '拒绝', dictValue: 'rejection', type: 'error' },
  51. { dictLabel: '退回', dictValue: 'back', type: 'warning' },
  52. { dictLabel: '审批中', dictValue: 'processing', type: 'primary' }
  53. ];
  54. // 审批流审核方式选项
  55. export const flowApprovalModelOptions = [
  56. { dictLabel: '会签', dictValue: '10' },
  57. { dictLabel: '或签', dictValue: '20' }
  58. ];
  59. // 中检状态选项
  60. export const inspApprovalStatusOptions = [
  61. { dictLabel: '待提交', dictValue: '10', type: 'info' },
  62. { dictLabel: '审批中', dictValue: '20', type: 'primary' },
  63. { dictLabel: '审批通过', dictValue: '30', type: 'success' },
  64. { dictLabel: '审批退回', dictValue: '40', type: 'error' }
  65. ];
  66. // 待办页面 Tab 分类
  67. export const TODO_TAB_LIST = [
  68. { name: '待我审批', type: 'approval' as const },
  69. { name: '我发起的', type: 'start' as const },
  70. { name: '审批历史', type: 'history' as const }
  71. ];
  72. // 首页常用功能导航列表
  73. export const HOME_NAV_LIST = [
  74. { name: '科研项目', path: '/pages/project/index', icon: '/static/imgs/fund-claim.png' },
  75. { name: '经费认领', path: '/pages/fund/claim/index', icon: '/static/imgs/fund-claim.png' },
  76. { name: '经费入账', path: '/pages/fund/claim-records/index', icon: '/static/imgs/fund-entry.png' },
  77. { name: '经费报销', path: '/pages/fund/reimbursement/index', icon: '/static/imgs/fund-reimburse.png' },
  78. // { name: '科研成果', path: '/pages/fund/reimbursement-remind/index', icon: '/static/imgs/fund-reimburse.png' },
  79. // { name: '考核奖励', path: '/pages/fund/reimbursement-remind/index', icon: '/static/imgs/fund-reimburse.png' },
  80. { name: '业务审批', path: '/pages/todo/index', icon: '/static/imgs/home-tech.png' }
  81. ];
  82. // 首页模拟通知公告列表
  83. export const NOTICE_LIST_MOCK = [
  84. { id: 1, title: '公告标题', date: '发布日期' },
  85. { id: 2, title: '公告标题', date: '发布日期' },
  86. { id: 3, title: '公告标题', date: '发布日期' }
  87. ];
  88. // 默认分页数量
  89. export const DEFAULT_PAGE_SIZE = 25;
  90. export const projectRoleOptions = [
  91. { dictLabel: '负责人', dictValue: '10' },
  92. { dictLabel: '主要参与人', dictValue: '20' },
  93. { dictLabel: '一般参与人', dictValue: '30' }
  94. ];
  95. // 人员类型选项
  96. export const memberTypeOptions = [
  97. { dictLabel: '本院人员', dictValue: '10' },
  98. { dictLabel: '非本院人员', dictValue: '20' },
  99. { dictLabel: '研究生', dictValue: '30' }
  100. ];
  101. /**
  102. * 根据项目类型标识获取显示名称
  103. * @param type 项目类型标识 (vertical/horizontal/spontaneity)
  104. * @returns 项目分类中文名称
  105. */
  106. export const getProjectTypeName = (type: string) => {
  107. const map: Record<string, string> = {
  108. 'vertical': '纵向项目',
  109. 'horizontal': '横向项目',
  110. 'spontaneity': '校园项目',
  111. '10': '纵向项目',
  112. '20': '横向项目',
  113. '30': '校园项目'
  114. };
  115. return map[type] || '未知项目';
  116. };
  117. // 论文类型选项
  118. export const paperTypeOptions = [
  119. { dictValue: '10', dictLabel: '学术专著' },
  120. { dictValue: '20', dictLabel: '编著' },
  121. { dictValue: '30', dictLabel: '译著' },
  122. { dictValue: '40', dictLabel: '科普读物' },
  123. { dictValue: '50', dictLabel: '行业指南' },
  124. { dictValue: '60', dictLabel: '教材' }
  125. ];
  126. // 著作类别选项
  127. export const workClassOptions = [
  128. { dictValue: '10', dictLabel: '学术专著' },
  129. { dictValue: '20', dictLabel: '编著' },
  130. { dictValue: '30', dictLabel: '译著' },
  131. { dictValue: '40', dictLabel: '科普读物' },
  132. { dictValue: '50', dictLabel: '行业指南' },
  133. { dictValue: '60', dictLabel: '教材' }
  134. ];
  135. // 专利类型选项
  136. export const patentClassOptions = [
  137. { dictValue: '10', dictLabel: '实用新型' },
  138. { dictValue: '20', dictLabel: '外观新型' },
  139. { dictValue: '30', dictLabel: '发明专利' },
  140. { dictValue: '40', dictLabel: '计算机软件著作权' }
  141. ];
  142. // 获奖级别选项
  143. export const awardLevelOptions = [
  144. { dictValue: '10', dictLabel: '学校级' },
  145. { dictValue: '20', dictLabel: '地市级' },
  146. { dictValue: '30', dictLabel: '省级奖' },
  147. { dictValue: '40', dictLabel: '部级奖' },
  148. { dictValue: '50', dictLabel: '国家级' }
  149. ];
  150. // 获奖等级选项
  151. export const awardGradeOptions = [
  152. { dictValue: '10', dictLabel: '特等奖' },
  153. { dictValue: '20', dictLabel: '一等奖' },
  154. { dictValue: '30', dictLabel: '二等奖' },
  155. { dictValue: '40', dictLabel: '三等奖' },
  156. { dictValue: '50', dictLabel: '四等奖' },
  157. { dictValue: '90', dictLabel: '其他' }
  158. ];
  159. // 奖励类别选项
  160. export const awardClassOptions = [
  161. { dictValue: '10', dictLabel: '国家最高科学技术奖' },
  162. { dictValue: '20', dictLabel: '其他奖项' }
  163. ];
  164. // 奖励类型选项
  165. export const awardTypeOptions = [
  166. { dictValue: '10', dictLabel: '成果奖' },
  167. { dictValue: '20', dictLabel: '人才奖' }
  168. ];
  169. // 合作类型选项
  170. export const cooperationTypeOptions = [
  171. { dictValue: '10', dictLabel: '独立申请' },
  172. { dictValue: '20', dictLabel: '联合申请' }
  173. ];