systemJc.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <div class="systemJc">
  3. <div class="systemJc-box" v-for="(item, index) in systemJcList" :key="index" @click="getDetail(index)">
  4. <div class="system-label">{{ item.label }}</div>
  5. </div>
  6. </div>
  7. </template>
  8. <script setup lang="ts">
  9. import { ref, reactive } from 'vue';
  10. import {useRouter } from 'vue-router'
  11. let router = useRouter(); //路由
  12. let systemJcList = reactive([{ label: '智能灌浆系统' }, { label: '智能注氮系统' }]);
  13. function getDetail(index) {
  14. switch (index) {
  15. case 0:
  16. router.push({
  17. path: '/fire/fire-zhuj',
  18. });
  19. break;
  20. case 1:
  21. router.push({
  22. path: '/fire/fire-zhud',
  23. });
  24. break;
  25. }
  26. }
  27. </script>
  28. <style lang="less" scoped>
  29. .systemJc {
  30. display: flex;
  31. position: relative;
  32. align-items: center;
  33. justify-content: space-around;
  34. width: 100%;
  35. height: 100%;
  36. .systemJc-box {
  37. position: relative;
  38. width: 168px;
  39. height: 100%;
  40. background: url('../../../../../assets/images/fire/firehome/zu-14578.png') no-repeat center;
  41. background-size: 100% 100%;
  42. cursor: pointer;
  43. .system-label {
  44. position: absolute;
  45. top: 14px;
  46. left: 50%;
  47. transform: translate(-50%, 0);
  48. color: #fff;
  49. font-size: 12px;
  50. }
  51. }
  52. }
  53. </style>