index.ts 8.2 KB

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