dashboard.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <div class="min-h-screen bg-gray-50">
  3. <!-- Sidebar -->
  4. <aside class="w-64 min-h-screen bg-[#08002E] text-white border-r">
  5. <nav class="p-4">
  6. <div class="mb-4">菜单类别标题</div>
  7. <ul class="space-y-2">
  8. <li>
  9. <a href="#/dashboard" class="flex items-center px-4 py-2 hover:bg-gray-700 rounded-lg">
  10. <Home class="w-5 h-5 mr-3" />
  11. 首页
  12. </a>
  13. </li>
  14. <li>
  15. <a href="#/organization" class="flex items-center px-4 py-2 hover:bg-gray-700 rounded-lg">
  16. <Users class="w-5 h-5 mr-3" />
  17. 组织架构
  18. </a>
  19. </li>
  20. <li>
  21. <a href="#/userList" class="flex items-center px-4 py-2 hover:bg-gray-700 rounded-lg">
  22. <List class="w-5 h-5 mr-3" />
  23. 用户列表信息
  24. </a>
  25. </li>
  26. <li>
  27. <a href="#/systemModule1" class="flex items-center px-4 py-2 hover:bg-gray-700 rounded-lg">
  28. <Box class="w-5 h-5 mr-3" />
  29. 系统模块1
  30. </a>
  31. </li>
  32. <li>
  33. <a href="#/systemModule2" class="flex items-center px-4 py-2 hover:bg-gray-700 rounded-lg">
  34. <Box class="w-5 h-5 mr-3" />
  35. 系统模块2
  36. </a>
  37. </li>
  38. </ul>
  39. </nav>
  40. </aside>
  41. <!-- Main Content -->
  42. <main class="flex-1 p-6">
  43. <div class="grid grid-cols-4 gap-6 mb-6">
  44. <div class="bg-white rounded-lg p-6 flex items-center space-x-4 shadow-sm">
  45. <div class="w-12 h-12 rounded-lg flex items-center justify-center bg-blue-50">
  46. <FileText class="text-blue-500" size={24} />
  47. </div>
  48. <div>
  49. <div class="text-3xl font-semibold">
  50. 21<span class="text-gray-400 text-lg">/35</span>
  51. </div>
  52. <div class="text-gray-500">合同审核</div>
  53. </div>
  54. </div>
  55. <div class="bg-white rounded-lg p-6 flex items-center space-x-4 shadow-sm">
  56. <div class="w-12 h-12 rounded-lg flex items-center justify-center bg-yellow-50">
  57. <FileText class="text-yellow-500" size={24} />
  58. </div>
  59. <div>
  60. <div class="text-3xl font-semibold">
  61. 28<span class="text-gray-400 text-lg">/40</span>
  62. </div>
  63. <div class="text-gray-500">合同签署</div>
  64. </div>
  65. </div>
  66. <div class="bg-white rounded-lg p-6 flex items-center space-x-4 shadow-sm">
  67. <div class="w-12 h-12 rounded-lg flex items-center justify-center bg-green-50">
  68. <FileText class="text-green-500" size={24} />
  69. </div>
  70. <div>
  71. <div class="text-3xl font-semibold">
  72. 40<span class="text-gray-400 text-lg">/65</span>
  73. </div>
  74. <div class="text-gray-500">合同登记</div>
  75. </div>
  76. </div>
  77. <div class="bg-white rounded-lg p-6 flex items-center space-x-4 shadow-sm">
  78. <div class="w-12 h-12 rounded-lg flex items-center justify-center bg-red-50">
  79. <FileText class="text-red-500" size={24} />
  80. </div>
  81. <div>
  82. <div class="text-3xl font-semibold">
  83. 12<span class="text-gray-400 text-lg">/15</span>
  84. </div>
  85. <div class="text-gray-500">合同履约</div>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="grid grid-cols-2 gap-6">
  90. <div class="bg-white rounded-lg p-6 shadow-sm">
  91. <div class="flex items-center justify-between mb-4">
  92. <h2 class="text-lg font-medium">特办事项</h2>
  93. <div class="flex space-x-4">
  94. <button class="px-3 py-1 text-blue-600 bg-blue-50 rounded-md">全部</button>
  95. <button class="px-3 py-1 text-blue-600">今天</button>
  96. <button class="px-3 py-1 text-gray-500">本周</button>
  97. <button class="px-3 py-1 text-gray-500">本月</button>
  98. </div>
  99. </div>
  100. <div class="space-y-4">
  101. <div v-for="(task, index) in tasks" :key="index" class="flex items-start">
  102. <input type="checkbox" :checked="task.completed" class="mt-1 mr-3" />
  103. <div>
  104. <div class="text-gray-900">{{ task.title }}</div>
  105. <div class="text-gray-500 text-sm">{{ task.project }}</div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="bg-white rounded-lg p-6 shadow-sm">
  111. <div class="flex items-center justify-between mb-4">
  112. <h2 class="text-lg font-medium">项目进程</h2>
  113. </div>
  114. <table class="w-full">
  115. <thead>
  116. <tr class="text-gray-500">
  117. <th class="pb-4 text-left font-normal">项目名称</th>
  118. <th class="pb-4 text-left font-normal">负责人</th>
  119. <th class="pb-4 text-left font-normal">截止日期</th>
  120. <th class="pb-4 text-left font-normal">当前状态</th>
  121. </tr>
  122. </thead>
  123. <tbody class="text-sm">
  124. <tr v-for="(project, index) in projects" :key="index" class="border-t">
  125. <td class="py-4">{{ project.name }}</td>
  126. <td class="py-4">{{ project.owner }}</td>
  127. <td class="py-4">{{ project.deadline }}</td>
  128. <td class="py-4">
  129. <span :class="[
  130. 'px-2 py-1 rounded text-sm',
  131. project.statusColor
  132. ]">
  133. {{ project.status }}
  134. </span>
  135. </td>
  136. </tr>
  137. </tbody>
  138. </table>
  139. </div>
  140. <div class="bg-white rounded-lg p-6 shadow-sm">
  141. <div class="flex items-center justify-between mb-4">
  142. <h2 class="text-lg font-medium">快捷功能</h2>
  143. <MoreHorizontal class="text-gray-400" />
  144. </div>
  145. <div class="space-y-3">
  146. <div v-for="(func, index) in quickFunctions" :key="index"
  147. class="text-gray-700 hover:text-blue-600 cursor-pointer">
  148. {{ func }}
  149. </div>
  150. </div>
  151. </div>
  152. <div class="bg-white rounded-lg p-6 shadow-sm">
  153. <div class="flex items-center justify-between mb-4">
  154. <h2 class="text-lg font-medium">合同类型统计</h2>
  155. <div class="flex items-center space-x-4">
  156. <div class="flex items-center">
  157. <div class="w-3 h-3 bg-blue-500 rounded-sm mr-2"></div>
  158. <span class="text-sm text-gray-500">A合同</span>
  159. </div>
  160. <div class="flex items-center">
  161. <div class="w-3 h-3 bg-green-500 rounded-sm mr-2"></div>
  162. <span class="text-sm text-gray-500">B合同</span>
  163. </div>
  164. </div>
  165. </div>
  166. <div class="h-64">
  167. <!-- Chart would go here - using a placeholder -->
  168. <div class="w-full h-full bg-gray-50 rounded flex items-center justify-center">
  169. Bar Chart Placeholder
  170. </div>
  171. </div>
  172. </div>
  173. </div>
  174. </main>
  175. </div>
  176. </template>
  177. <script setup>
  178. import {
  179. Home, Users, List, Box, FileText, MoreHorizontal
  180. } from 'lucide-vue-next'
  181. const metrics = [
  182. { label: '合同审核', value: 21, total: 35 },
  183. { label: '合同签署', value: 28, total: 40 },
  184. { label: '合同登记', value: 40, total: 65 },
  185. { label: '合同履约', value: 12, total: 15 }
  186. ]
  187. const tasks = [
  188. { title: '联系xxxx客户,商讨具体合同事宜', project: 'xxxx公司公积金管理', completed: true },
  189. { title: '完成合同模版创建并上传系统', project: 'xxxxx公司人员xxxx合同管理', completed: true },
  190. { title: '审核xxxxxxx合同', project: 'xxxx公司人员xxx合同签订', completed: false },
  191. { title: '签署xxxx合同,邮件发送xxxxx客户', project: 'xxxxxxxxx公司人员资源管理', completed: true }
  192. ]
  193. const projects = [
  194. { name: 'xxxx公司公积金管理', owner: '任小东', deadline: '2023/07/25', status: '已延期', statusColor: 'bg-red-50 text-red-600' },
  195. { name: 'xxxxx公司人员xxxx合同管理', owner: '胡晓东', deadline: '2024/01/09', status: '进行中', statusColor: 'bg-blue-50 text-blue-600' },
  196. { name: 'xxxx公司人员xxx合同签订', owner: '李兵', deadline: '2025/01/08', status: '进行中', statusColor: 'bg-blue-50 text-blue-600' },
  197. { name: 'xxxxxxxxx公司人员资源管理', owner: '王天一', deadline: '2023/09/03', status: '已完成', statusColor: 'bg-green-50 text-green-600' }
  198. ]
  199. const quickFunctions = [
  200. '人力资源主合同(标准版)',
  201. '人事代理服务协议(标准版)',
  202. '人事代理服务协议',
  203. '人事代理服务协议',
  204. '人事代理服务协议(企业版)',
  205. '人事代理服务协议(定制版)'
  206. ]
  207. </script>