ShortCuts.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <CollapseContainer class="shortcuts" title="快捷入口" :canExpan="false">
  3. <template #action>
  4. <a-button size="small" type="link"> 新建 </a-button>
  5. </template>
  6. <a-row>
  7. <template v-for="item in shortCuts" :key="item.img">
  8. <a-col :span="8" class="p-3 shortcuts__item">
  9. <img :src="item.img" class="mb-2 shortcuts__item-img" />
  10. <span>{{ item.name }}</span>
  11. </a-col>
  12. </template>
  13. <a-col :span="8" class="p-3 shortcuts__item">
  14. <span class="mb-2 shortcuts__item-all">
  15. <RightOutlined />
  16. </span>
  17. <br />
  18. <span>查看全部</span>
  19. </a-col>
  20. </a-row>
  21. </CollapseContainer>
  22. </template>
  23. <script lang="ts">
  24. import { defineComponent } from 'vue';
  25. import { Row, Col } from 'ant-design-vue';
  26. import { CollapseContainer } from '/@/components/Container/index';
  27. import { RightOutlined } from '@ant-design/icons-vue';
  28. import wokbImg1 from '/@/assets/images/dashboard/wokb/attendance.png';
  29. import wokbImg2 from '/@/assets/images/dashboard/wokb/overtime.png';
  30. import wokbImg3 from '/@/assets/images/dashboard/wokb/meal.png';
  31. import wokbImg4 from '/@/assets/images/dashboard/wokb/leave.png';
  32. import wokbImg5 from '/@/assets/images/dashboard/wokb/stamp.png';
  33. import wokbImg6 from '/@/assets/images/dashboard/wokb/travel.png';
  34. import wokbImg7 from '/@/assets/images/dashboard/wokb/performance.png';
  35. import wokbImg8 from '/@/assets/images/dashboard/wokb/approve.png';
  36. const shortCuts = [
  37. {
  38. img: wokbImg1,
  39. name: '考勤记录',
  40. },
  41. {
  42. img: wokbImg2,
  43. name: '加班申请',
  44. },
  45. {
  46. img: wokbImg3,
  47. name: '餐补申请',
  48. },
  49. {
  50. img: wokbImg4,
  51. name: '请假',
  52. },
  53. {
  54. img: wokbImg5,
  55. name: '用章申请',
  56. },
  57. {
  58. img: wokbImg6,
  59. name: '差旅报销',
  60. },
  61. {
  62. img: wokbImg7,
  63. name: '绩效申请',
  64. },
  65. {
  66. img: wokbImg8,
  67. name: '审批',
  68. },
  69. ];
  70. export default defineComponent({
  71. components: { [Row.name]: Row, [Col.name]: Col, CollapseContainer, RightOutlined },
  72. setup() {
  73. return { shortCuts };
  74. },
  75. });
  76. </script>
  77. <style lang="less" scoped>
  78. .shortcuts {
  79. &__item {
  80. text-align: center;
  81. &-img {
  82. width: 36px;
  83. margin-left: auto;
  84. margin-right: auto;
  85. }
  86. &-all {
  87. display: inline-block;
  88. width: 36px;
  89. height: 36px;
  90. line-height: 36px;
  91. color: #000;
  92. cursor: pointer;
  93. background: lightgrey;
  94. border-radius: 50%;
  95. }
  96. }
  97. }
  98. </style>