home.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. <template>
  2. <div class="main">
  3. <div class="top-area">
  4. <div class="left">
  5. <div class="flex-box">
  6. <div class="top-card" style="margin-right: 2%">
  7. <div class="title">早安,陈兆雪,开始您工作的一天吧!</div>
  8. <div class="btn-box">
  9. <div>
  10. <div class="top">
  11. <img src="@/assets/images/home-ring.png" alt="" />
  12. <div>全部消息</div>
  13. </div>
  14. <div class="bottom">4</div>
  15. </div>
  16. <div>
  17. <div class="top">
  18. <img src="@/assets/images/home-book.png" alt="" />
  19. <div>完成消息</div>
  20. </div>
  21. <div class="bottom">7</div>
  22. </div>
  23. <div>
  24. <div class="top">
  25. <img src="@/assets/images/home-file.png" alt="" />
  26. <div>代办消息</div>
  27. </div>
  28. <div class="bottom">11</div>
  29. </div>
  30. <div>
  31. <div class="top">
  32. <img src="@/assets/images/home-email.png" alt="" />
  33. <div>未读消息</div>
  34. </div>
  35. <div class="bottom">12</div>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="top-card" style="padding: 0 24px;">
  40. <el-tabs v-model="activeName">
  41. <el-tab-pane label="快速操作" name="first">
  42. <div class="flex-row">
  43. <div class="fast-btn">
  44. <div class="circle"></div>
  45. <div class="label">角色管理</div>
  46. </div>
  47. <div class="fast-btn">
  48. <div class="circle"></div>
  49. <div class="label">部门管理</div>
  50. </div>
  51. <div class="fast-btn">
  52. <div class="circle"></div>
  53. <div class="label">新增</div>
  54. </div>
  55. </div>
  56. </el-tab-pane>
  57. <el-tab-pane label="最近访问" name="second">
  58. <div class="flex-row">
  59. <div class="fast-btn">
  60. <div class="circle"></div>
  61. <div class="label">角色管理</div>
  62. </div>
  63. <div class="fast-btn">
  64. <div class="circle"></div>
  65. <div class="label">部门管理</div>
  66. </div>
  67. </div>
  68. </el-tab-pane>
  69. </el-tabs>
  70. </div>
  71. </div>
  72. <div class="flex-box" style="margin-top: 14px;">
  73. <div class="center-card" style="margin-right: 2%">
  74. <div class="title">今日生产KPI</div>
  75. <pie-chart />
  76. </div>
  77. <div class="center-card">
  78. <div class="title">已办流程</div>
  79. <line-chart />
  80. </div>
  81. </div>
  82. <div class="flex-box" style="margin-top: 14px;">
  83. <div class="bottom-card">
  84. <div class="title">数据总览</div>
  85. <cut-line-chart></cut-line-chart>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="right">
  90. <div class="top-card">
  91. <div class="top-bar">
  92. <div class="left">最新公告</div>
  93. <div class="right">查看全部</div>
  94. </div>
  95. <div class="cell line">
  96. <div class="time">2024-01-02</div>
  97. <div class="content">网站于某月某日开始测试上线,请各部门...</div>
  98. <div class="tag">公告</div>
  99. </div>
  100. <div class="cell line">
  101. <div class="time">2024-01-02</div>
  102. <div class="content">网站于某月某日开始测试上线,请各部门...</div>
  103. <div class="tag">公告</div>
  104. </div>
  105. <div class="cell line">
  106. <div class="time">2024-01-02</div>
  107. <div class="content">网站于某月某日开始测试上线,请各部门...</div>
  108. <div class="tag">公告</div>
  109. </div>
  110. <div class="cell line">
  111. <div class="time">2024-01-02</div>
  112. <div class="content">网站于某月某日开始测试上线,请各部门...</div>
  113. <div class="tag">公告</div>
  114. </div>
  115. <div class="cell line">
  116. <div class="time">2024-01-02</div>
  117. <div class="content">网站于某月某日开始测试上线,请各部门...</div>
  118. <div class="tag">公告</div>
  119. </div>
  120. <div class="cell">
  121. <div class="time">2024-01-02</div>
  122. <div class="content">网站于某月某日开始测试上线,请各部门...</div>
  123. <div class="tag">公告</div>
  124. </div>
  125. </div>
  126. <div class="bottom-card">
  127. <div class="top-bar">
  128. <div class="left">代办事项</div>
  129. <div class="right">查看全部</div>
  130. </div>
  131. <div class="cell">
  132. <div class="content">
  133. <div class="title">港口某个项目需要修改某个地方,请尽快尽快尽快修...</div>
  134. <el-tag class="ml-2" type="success">已通过</el-tag>
  135. </div>
  136. <div class="time">提交时间:2024-01-12 | 提交人:张三</div>
  137. </div>
  138. <div class="cell">
  139. <div class="content">
  140. <div class="title">港口某个项目需要修改某个地方,请尽快尽快尽快修...</div>
  141. <el-tag class="ml-2" type="success">已通过</el-tag>
  142. </div>
  143. <div class="time">提交时间:2024-01-12 | 提交人:张三</div>
  144. </div>
  145. <div class="cell">
  146. <div class="content">
  147. <div class="title">港口某个项目需要修改某个地方,请尽快尽快尽快修...</div>
  148. <el-tag class="ml-2" type="success">已通过</el-tag>
  149. </div>
  150. <div class="time">提交时间:2024-01-12 | 提交人:张三</div>
  151. </div>
  152. <div class="cell">
  153. <div class="content">
  154. <div class="title">港口某个项目需要修改某个地方,请尽快尽快尽快修...</div>
  155. <el-tag class="ml-2" type="success">已通过</el-tag>
  156. </div>
  157. <div class="time">提交时间:2024-01-12 | 提交人:张三</div>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. <div class="bottom-area">
  163. <div class="title">今日工作量</div>
  164. <div class="table">
  165. <el-table
  166. :data="tableData"
  167. border
  168. style="width: 100%"
  169. row-key="id"
  170. >
  171. <el-table-column prop="name" label="姓名" />
  172. <el-table-column prop="step" label="进度条">
  173. <template #default>
  174. <el-progress :percentage="11" />
  175. </template>
  176. </el-table-column>
  177. <el-table-column prop="num" label="数量" />
  178. <el-table-column prop="state" label="状态展示">
  179. <template #default="scope">
  180. <el-tag
  181. :type="scope.row.state === 1 ? 'info' : 'success'"
  182. disable-transitions
  183. >{{ scope.row.state === 1 ? '进行中' : '已完成' }}
  184. </el-tag
  185. >
  186. </template>
  187. </el-table-column>
  188. <el-table-column prop="number" label="完成量" />
  189. </el-table>
  190. </div>
  191. <div class="page-bottom">
  192. <el-pagination background layout="prev, pager, next" :total="0" />
  193. </div>
  194. </div>
  195. </div>
  196. </template>
  197. <script setup>
  198. import PieChart from '@/views/home/components/PieChart.vue'
  199. import LineChart from '@/views/home/components/LineChart.vue'
  200. import cutLineChart from '@/views/home/components/cutLineChart.vue'
  201. const activeName = ref('first')
  202. const tableData = ref([{ name: '小明', num: '123', number: '11', step: '0.1', state: 1 }, {
  203. name: '小明',
  204. num: '123',
  205. number: '11',
  206. step: '0.1',
  207. state: 1
  208. }, { name: '小明', num: '123', number: '11', step: '0.1', state: 1 }])
  209. </script>
  210. <style scoped lang="scss">
  211. .main {
  212. min-width: 1066px;
  213. padding: 4px;
  214. .top-area {
  215. display: flex;
  216. .left {
  217. width: 70%;
  218. .flex-box {
  219. display: flex;
  220. justify-content: flex-start;
  221. }
  222. .top-card {
  223. width: 48%;
  224. height: 146px;
  225. border-radius: 10px;
  226. background-color: white;
  227. box-sizing: border-box;
  228. overflow: hidden;
  229. .title {
  230. color: #999;
  231. font-family: 'PingFang HK';
  232. font-size: 12px;
  233. font-style: normal;
  234. font-weight: 600;
  235. line-height: normal;
  236. margin-left: 16px;
  237. margin-top: 10px;
  238. }
  239. .btn-box {
  240. display: flex;
  241. justify-content: space-around;
  242. align-items: center;
  243. margin-top: 30px;
  244. font-size: 13px;
  245. .top {
  246. display: flex;
  247. align-items: center;
  248. }
  249. .bottom {
  250. font-size: 32px;
  251. font-weight: bold;
  252. margin-top: 7px;
  253. }
  254. img {
  255. height: 17px;
  256. width: 17px;
  257. margin-right: 10px;
  258. }
  259. }
  260. .fast-btn {
  261. display: flex;
  262. flex-direction: column;
  263. align-items: center;
  264. justify-content: center;
  265. margin-right: 30px;
  266. .circle {
  267. height: 48px;
  268. width: 48px;
  269. background-color: lightgrey;
  270. border-radius: 50%;
  271. }
  272. .label {
  273. margin-top: 5px;
  274. color: #666;
  275. font-family: 'Alibaba PuHuiTi 3.0';
  276. font-size: 14px;
  277. font-style: normal;
  278. font-weight: 400;
  279. line-height: normal;
  280. }
  281. }
  282. }
  283. .center-card {
  284. width: 48%;
  285. height: 238px;
  286. border-radius: 10px;
  287. background-color: white;
  288. padding: 12px 14px;
  289. box-sizing: border-box;
  290. overflow: hidden;
  291. .title {
  292. color: #000;
  293. font-family: 'PingFang SC';
  294. font-size: 14px;
  295. font-style: normal;
  296. font-weight: 500;
  297. line-height: normal;
  298. }
  299. }
  300. .bottom-card {
  301. width: 98%;
  302. height: 373px;
  303. border-radius: 10px;
  304. background-color: white;
  305. padding: 12px 14px;
  306. box-sizing: border-box;
  307. overflow: hidden;
  308. .title {
  309. color: #000;
  310. font-family: 'PingFang SC';
  311. font-size: 14px;
  312. font-style: normal;
  313. font-weight: 500;
  314. line-height: normal;
  315. }
  316. }
  317. }
  318. .right {
  319. width: 30%;
  320. .top-card {
  321. width: 100%;
  322. height: 398px;
  323. border-radius: 10px;
  324. background-color: white;
  325. padding: 12px;
  326. box-sizing: border-box;
  327. .top-bar {
  328. display: flex;
  329. justify-content: space-between;
  330. align-items: center;
  331. width: 100%;
  332. margin-bottom: 10px;
  333. .left {
  334. margin-left: 7px;
  335. color: #000;
  336. font-family: 'PingFang SC';
  337. font-size: 14px;
  338. font-style: normal;
  339. font-weight: 500;
  340. line-height: normal;
  341. }
  342. .right {
  343. width: fit-content;
  344. color: #999;
  345. font-family: 'Alibaba PuHuiTi 3.0';
  346. font-size: 12px;
  347. font-style: normal;
  348. font-weight: 500;
  349. line-height: normal;
  350. margin-right: 4px;
  351. cursor: pointer;
  352. }
  353. }
  354. .cell {
  355. height: 56px;
  356. width: 100%;
  357. display: flex;
  358. align-items: center;
  359. justify-content: space-between;
  360. &.line {
  361. border-bottom: 1px solid #ebebeb;
  362. }
  363. .time {
  364. color: #999;
  365. font-family: 'Alibaba PuHuiTi 3.0';
  366. font-size: 12px;
  367. font-style: normal;
  368. font-weight: 500;
  369. }
  370. .content {
  371. width: 60%;
  372. height: 20px;
  373. color: #333;
  374. font-family: 'Alibaba PuHuiTi 3.0';
  375. font-size: 14px;
  376. font-style: normal;
  377. font-weight: 400;
  378. line-height: normal;
  379. white-space: nowrap; /* 保持文本在一行 */
  380. overflow: hidden; /* 隐藏超出容器的文本 */
  381. text-overflow: ellipsis; /* 超出部分显示省略号 */
  382. }
  383. .tag {
  384. width: 44px;
  385. height: 17px;
  386. font-size: 12px;
  387. line-height: 17px;
  388. text-align: center;
  389. color: white;
  390. border-radius: 4px;
  391. background: #ff852e;
  392. }
  393. }
  394. }
  395. .bottom-card {
  396. width: 100%;
  397. height: 373px;
  398. border-radius: 10px;
  399. background-color: white;
  400. margin-top: 14px;
  401. padding: 12px;
  402. box-sizing: border-box;
  403. .top-bar {
  404. display: flex;
  405. justify-content: space-between;
  406. align-items: center;
  407. width: 100%;
  408. margin-bottom: 20px;
  409. .left {
  410. margin-left: 7px;
  411. color: #000;
  412. font-family: 'PingFang SC';
  413. font-size: 14px;
  414. font-style: normal;
  415. font-weight: 500;
  416. line-height: normal;
  417. }
  418. .right {
  419. width: fit-content;
  420. color: #999;
  421. font-family: 'Alibaba PuHuiTi 3.0';
  422. font-size: 12px;
  423. font-style: normal;
  424. font-weight: 500;
  425. line-height: normal;
  426. margin-right: 4px;
  427. cursor: pointer;
  428. }
  429. }
  430. .cell {
  431. width: 100%;
  432. height: 67px;
  433. border: 1px solid #eeeeee;
  434. border-radius: 10px;
  435. margin-bottom: 10px;
  436. padding: 12px 20px;
  437. box-sizing: border-box;
  438. .content {
  439. display: flex;
  440. align-items: center;
  441. justify-content: space-between;
  442. .title {
  443. color: #000;
  444. font-family: 'Alibaba PuHuiTi 3.0';
  445. font-size: 14px;
  446. font-style: normal;
  447. font-weight: 400;
  448. line-height: normal;
  449. white-space: nowrap; /* 保持文本在一行 */
  450. overflow: hidden; /* 隐藏超出容器的文本 */
  451. text-overflow: ellipsis; /* 超出部分显示省略号 */
  452. margin-right: 4px;
  453. }
  454. }
  455. .time {
  456. color: #999;
  457. font-family: 'Alibaba PuHuiTi 3.0';
  458. font-size: 12px;
  459. font-style: normal;
  460. font-weight: 400;
  461. line-height: normal;
  462. margin-top: 5px;
  463. }
  464. }
  465. }
  466. }
  467. }
  468. .bottom-area {
  469. width: 100%;
  470. margin-top: 14px;
  471. height: 412px;
  472. border-radius: 10px;
  473. background-color: white;
  474. padding: 12px 14px;
  475. box-sizing: border-box;
  476. .title {
  477. color: #000;
  478. font-family: 'PingFang SC';
  479. font-size: 14px;
  480. font-style: normal;
  481. font-weight: 500;
  482. line-height: normal;
  483. }
  484. .table {
  485. margin-top: 20px;
  486. height: 285px;
  487. overflow-y: scroll;
  488. }
  489. .page-bottom {
  490. display: flex;
  491. justify-content: flex-end;
  492. margin-top: 10px;
  493. }
  494. }
  495. }
  496. </style>