data.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import store from '@/store';
  2. const colorMatching = [
  3. {
  4. main: '#3479FF',
  5. background: 'rgba(52, 121, 255, 0.05)',
  6. border: 'rgba(52, 121, 255, 0.15)'
  7. },
  8. {
  9. main: '#754BEE',
  10. background: 'rgba(117, 75, 238, 0.05)',
  11. border: 'rgba(117, 75, 238, 0.15)'
  12. },
  13. {
  14. main: '#FF7134',
  15. background: 'rgba(255, 52, 52, 0.05)',
  16. border: 'rgba(255, 52, 52, 0.15)'
  17. },
  18. {
  19. main: '#56BD05',
  20. background: 'rgba(86, 189, 5, 0.05)',
  21. border: 'rgba(86, 189, 5, 0.15)'
  22. },
  23. {
  24. main: '#00BD84',
  25. background: 'rgba(0, 189, 132, 0.05)',
  26. border: 'rgba(0, 189, 132, 0.15)'
  27. },
  28. {
  29. main: '#DF339A',
  30. background: 'rgba(223, 51, 154, 0.05)',
  31. border: 'rgba(223, 51, 154, 0.15)'
  32. },
  33. {
  34. main: '#CF7B18',
  35. background: 'rgba(207, 123, 24, 0.05)',
  36. border: 'rgba(207, 123, 24, 0.15)'
  37. }
  38. ];
  39. const buttonColorList = new Map([
  40. [0, '#63A1FF'],
  41. [1, '#f90'],
  42. [2, '#00CD8F']
  43. ]);
  44. function getMenuList() {
  45. let popedom_code_list = store.state.user.popedom_code_list;
  46. let isStudent = store.state.user.user_type === 'STUDENT';
  47. return [
  48. {
  49. name: 'Key289',
  50. tab: 'TaskList',
  51. isShow: isStudent || popedom_code_list.includes(2000001)
  52. },
  53. {
  54. name: 'Key215',
  55. tab: 'CurriculaList',
  56. isShow: isStudent || popedom_code_list.includes(2000001)
  57. },
  58. {
  59. name: 'Key290',
  60. tab: 'TemplateList',
  61. isShow: !isStudent && popedom_code_list.includes(2000002)
  62. }
  63. ];
  64. }
  65. export { colorMatching, getMenuList, buttonColorList };