index.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div class="page">
  3. <van-tabs v-model:active="active" color="#00B3EC" title-active-color="#00B3EC">
  4. <van-tab title="设备报修">
  5. <SubmitPage @set-active="changeActive" />
  6. </van-tab>
  7. <van-tab title="报修记录">
  8. <List :active="active" @set-active="changeActive" />
  9. </van-tab>
  10. </van-tabs>
  11. </div>
  12. </template>
  13. <script lang="ts" setup name="homePage">
  14. import { ref } from 'vue';
  15. // import { useUserStore } from '/@/store/modules/user';
  16. import SubmitPage from './submit.vue';
  17. import List from './list.vue';
  18. const active = ref(0);
  19. // const userStore = useUserStore();
  20. // const getUserInfo = computed(() => {
  21. // const { name = '' } = userStore.getUserInfo() || {};
  22. // return name;
  23. // });
  24. // const onClickTab = (title) => {};
  25. const changeActive = (type) => {
  26. document.documentElement.scrollTo({ top: 0, behavior: 'smooth' });
  27. active.value = type;
  28. };
  29. </script>
  30. <style lang="scss" scoped>
  31. .page {
  32. background-color: #f5f5f5;
  33. }
  34. .header {
  35. display: flex;
  36. justify-content: center;
  37. align-items: center;
  38. padding: 0 20px;
  39. font-size: 40px;
  40. img {
  41. width: 90px;
  42. height: 90px;
  43. }
  44. }
  45. .intro-header {
  46. margin-top: 20px;
  47. display: flex;
  48. align-items: center;
  49. justify-content: center;
  50. font-size: 16px;
  51. }
  52. .supportList {
  53. margin: 0 16px;
  54. .nut-cell-group__title {
  55. margin-top: 30px;
  56. }
  57. .nut-icon {
  58. color: green;
  59. }
  60. }
  61. .btn-wrap {
  62. margin: 20px;
  63. }
  64. .btn-confirm {
  65. // @include main-lang-bg(302px, 82px, '/@/assets/button', 'confirm.png');
  66. }
  67. </style>