Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

118 wiersze
7.7 KiB

  1. <aside class="sidebar" id="sidebarApp">
  2. <div class="sidebar-logo">
  3. <img src="/static/images/logo.png" alt="维康基金会">
  4. </div>
  5. <nav class="sidebar-menu">
  6. {# 控制台 #}
  7. <div class="menu-group">
  8. <a class="menu-item {% if currentPage == 'dashboard' %}active{% endif %}" href="/admin/dashboard.html">
  9. <span class="menu-icon"><svg viewBox="0 0 1024 1024" width="18" height="18"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" fill="currentColor"/><path d="M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z" fill="currentColor"/></svg></span>
  10. <span>控制台</span>
  11. </a>
  12. </div>
  13. {# 内容管理 - 动态栏目菜单 #}
  14. {% if columnMenus and columnMenus.length %}
  15. <div class="menu-group">
  16. <div class="menu-group-title">内容管理</div>
  17. {% for menu in columnMenus %}
  18. {% if menu.children and menu.children.length %}
  19. <div class="menu-parent {% if menuGroup == menu.key %}open{% endif %}">
  20. <div class="menu-item">
  21. <span class="menu-icon" data-icon="{{ menu.icon }}"></span>
  22. <span>{{ menu.name }}</span>
  23. <i class="arrow"><svg viewBox="0 0 640 640"><path d="M300.3 440.8C312.9 451 331.4 450.3 343.1 438.6L471.1 310.6C480.3 301.4 483 287.7 478 275.7C473 263.7 461.4 256 448.5 256L192.5 256C179.6 256 167.9 263.8 162.9 275.8C157.9 287.8 160.7 301.5 169.9 310.6L297.9 438.6L300.3 440.8z" fill="currentColor"/></svg></i>
  24. </div>
  25. <div class="submenu-items">
  26. {% for child in menu.children %}
  27. <a class="menu-item {% if currentPage == child.key %}active{% endif %}" href="{{ child.url }}"><span>{{ child.name }}</span></a>
  28. {% endfor %}
  29. </div>
  30. </div>
  31. {% endif %}
  32. {% endfor %}
  33. </div>
  34. {% endif %}
  35. {# 数据管理 #}
  36. <div class="menu-group">
  37. <div class="menu-group-title">数据管理</div>
  38. <a class="menu-item {% if currentPage == 'medicine' %}active{% endif %}" href="/admin/data/medicine.html">
  39. <span class="menu-icon"><svg viewBox="0 0 1024 1024" width="18" height="18"><path d="M839.2 295.2l-110.4-110.4c-12.8-12.8-33.6-12.8-46.4 0L574.4 292.8l-46.4-46.4c-12.8-12.8-33.6-12.8-46.4 0l-296 296c-12.8 12.8-12.8 33.6 0 46.4l110.4 110.4c12.8 12.8 33.6 12.8 46.4 0l108-108 46.4 46.4c12.8 12.8 33.6 12.8 46.4 0l296-296c12.8-12.8 12.8-33.6 0-46.4zM319.2 652.8l-64-64 249.6-249.6 64 64-249.6 249.6z" fill="currentColor"/></svg></span>
  40. <span>药品援助记录</span>
  41. </a>
  42. </div>
  43. {# 系统设置 #}
  44. <div class="menu-group">
  45. <div class="menu-group-title">系统设置</div>
  46. <a class="menu-item {% if currentPage == 'column' %}active{% endif %}" href="/admin/system/column.html">
  47. <span class="menu-icon"><svg viewBox="0 0 1024 1024" width="18" height="18"><path d="M128 128h256v256H128V128zm0 512h256v256H128V640zm512-512h256v256H640V128zm0 512h256v256H640V640z" fill="currentColor"/></svg></span>
  48. <span>栏目管理</span>
  49. </a>
  50. <a class="menu-item {% if currentPage == 'config' %}active{% endif %}" href="/admin/system/config.html">
  51. <span class="menu-icon"><svg viewBox="0 0 1024 1024" width="18" height="18"><path d="M512 682.7c-94.3 0-170.7-76.4-170.7-170.7S417.7 341.3 512 341.3 682.7 417.7 682.7 512 606.3 682.7 512 682.7zm0-277.4c-58.8 0-106.7 47.9-106.7 106.7s47.9 106.7 106.7 106.7 106.7-47.9 106.7-106.7-47.9-106.7-106.7-106.7z" fill="currentColor"/><path d="M924.4 405.3l-67.8-11.3c-7.1-26.8-17.4-52.4-30.6-76.3l40.3-55.4c10.5-14.4 8.8-34.3-4-46.9l-54.2-54.2c-12.6-12.8-32.5-14.5-46.9-4l-55.4 40.3c-23.9-13.2-49.5-23.5-76.3-30.6l-11.3-67.8c-2.9-17.6-18.2-30.5-36-30.5h-76.6c-17.8 0-33.1 12.9-36 30.5l-11.3 67.8c-26.8 7.1-52.4 17.4-76.3 30.6l-55.4-40.3c-14.4-10.5-34.3-8.8-46.9 4l-54.2 54.2c-12.8 12.6-14.5 32.5-4 46.9l40.3 55.4c-13.2 23.9-23.5 49.5-30.6 76.3l-67.8 11.3c-17.6 2.9-30.5 18.2-30.5 36v76.6c0 17.8 12.9 33.1 30.5 36l67.8 11.3c7.1 26.8 17.4 52.4 30.6 76.3l-40.3 55.4c-10.5 14.4-8.8 34.3 4 46.9l54.2 54.2c12.6 12.8 32.5 14.5 46.9 4l55.4-40.3c23.9 13.2 49.5 23.5 76.3 30.6l11.3 67.8c2.9 17.6 18.2 30.5 36 30.5h76.6c17.8 0 33.1-12.9 36-30.5l11.3-67.8c26.8-7.1 52.4-17.4 76.3-30.6l55.4 40.3c14.4 10.5 34.3 8.8 46.9-4l54.2-54.2c12.8-12.6 14.5-32.5 4-46.9l-40.3-55.4c13.2-23.9 23.5-49.5 30.6-76.3l67.8-11.3c17.6-2.9 30.5-18.2 30.5-36v-76.6c0-17.8-12.9-33.1-30.5-36z" fill="currentColor"/></svg></span>
  52. <span>网站配置</span>
  53. </a>
  54. <div class="menu-parent {% if currentPage in ['sys-user','sys-role','sys-log'] %}open{% endif %}">
  55. <div class="menu-item">
  56. <span class="menu-icon"><svg viewBox="0 0 1024 1024" width="18" height="18"><path d="M832 464H192c-17.7 0-32 14.3-32 32v352c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 344H232V536h560v272z" fill="currentColor"/><path d="M512 624c-35.3 0-64 28.7-64 64s28.7 64 64 64 64-28.7 64-64-28.7-64-64-64z" fill="currentColor"/><path d="M736 464V288c0-123.7-100.3-224-224-224S288 164.3 288 288v176h64V288c0-88.2 71.8-160 160-160s160 71.8 160 160v176h64z" fill="currentColor"/></svg></span>
  57. <span>系统管理</span>
  58. <i class="arrow"><svg viewBox="0 0 640 640"><path d="M300.3 440.8C312.9 451 331.4 450.3 343.1 438.6L471.1 310.6C480.3 301.4 483 287.7 478 275.7C473 263.7 461.4 256 448.5 256L192.5 256C179.6 256 167.9 263.8 162.9 275.8C157.9 287.8 160.7 301.5 169.9 310.6L297.9 438.6L300.3 440.8z" fill="currentColor"/></svg></i>
  59. </div>
  60. <div class="submenu-items">
  61. <a class="menu-item {% if currentPage == 'sys-user' %}active{% endif %}" href="/admin/system/user.html"><span>用户管理</span></a>
  62. <a class="menu-item {% if currentPage == 'sys-role' %}active{% endif %}" href="/admin/system/role.html"><span>角色权限</span></a>
  63. <a class="menu-item {% if currentPage == 'sys-log' %}active{% endif %}" href="/admin/system/log.html"><span>操作日志</span></a>
  64. </div>
  65. </div>
  66. </div>
  67. </nav>
  68. </aside>
  69. <script>
  70. // 渲染动态图标 - 使用临时Vue实例渲染图标
  71. document.addEventListener('DOMContentLoaded', function() {
  72. if (!window.ElementPlusIconsVue || !window.Vue) return;
  73. document.querySelectorAll('.menu-icon[data-icon]').forEach(function(el) {
  74. var iconName = el.getAttribute('data-icon');
  75. if (!iconName) {
  76. el.innerHTML = '<svg viewBox="0 0 1024 1024" width="18" height="18"><path d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" fill="currentColor"/></svg>';
  77. return;
  78. }
  79. var iconComp = window.ElementPlusIconsVue[iconName];
  80. if (iconComp) {
  81. // 创建临时容器
  82. var tempDiv = document.createElement('div');
  83. tempDiv.style.display = 'none';
  84. document.body.appendChild(tempDiv);
  85. // 创建临时Vue应用渲染图标
  86. var tempApp = Vue.createApp({
  87. template: '<el-icon :size="18"><component :is="icon"></component></el-icon>',
  88. data: function() { return { icon: iconComp }; }
  89. });
  90. tempApp.use(ElementPlus);
  91. tempApp.mount(tempDiv);
  92. // 提取渲染后的SVG
  93. var svg = tempDiv.querySelector('svg');
  94. if (svg) {
  95. svg.setAttribute('width', '18');
  96. svg.setAttribute('height', '18');
  97. svg.querySelectorAll('path').forEach(function(p) {
  98. p.setAttribute('fill', 'currentColor');
  99. });
  100. el.innerHTML = svg.outerHTML;
  101. }
  102. // 清理
  103. tempApp.unmount();
  104. document.body.removeChild(tempDiv);
  105. }
  106. });
  107. });
  108. </script>